:root {
  --bg: #050505;
  --panel: #121212;
  --panel-soft: #1c1c1c;
  --text: #ffffff;
  --muted: #b8b8b8;
  --red: #e50914;
  --red-dark: #93050c;
  --pink: #ff8fb3;
  --radius: 18px;
  --shadow: 0 22px 70px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.app, .screen { min-height: 100vh; }
.screen { display: none; }
.screen.active { display: block; }

.brand, .nav-brand {
  letter-spacing: -0.08em;
  color: var(--red);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 950;
  text-shadow: 0 0 24px rgba(229, 9, 20, .35);
}

.profile-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 100%, rgba(229, 9, 20, .55), transparent 30%),
    radial-gradient(circle at 5% 5%, rgba(255, 143, 179, .16), transparent 30%),
    linear-gradient(180deg, #050505 0%, #130207 100%);
}
.profile-screen .brand { position: fixed; top: 26px; left: 32px; z-index: 2; font-size: clamp(2rem, 5vw, 4rem); }
.profile-content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 80px 20px 40px;
  position: relative;
  z-index: 2;
}
.profile-content h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4.8rem);
  font-weight: 700;
}
.tiny-label {
  margin: 0;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 800;
  font-size: .78rem;
}
.profiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: clamp(14px, 3vw, 28px);
  width: min(880px, 100%);
}
.profile-card {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  display: grid;
  gap: 12px;
  justify-items: center;
  transition: transform .25s ease, filter .25s ease;
}
.profile-card:hover { transform: translateY(-8px) scale(1.03); filter: brightness(1.1); }
.profile-avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #252525, #53030a);
  border: 2px solid transparent;
  box-shadow: var(--shadow);
}
.profile-card:hover .profile-avatar { border-color: #fff; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-name { font-size: 1rem; font-weight: 700; }
.outline-txt, .secondary-btn, .small-pill {
  border: 1px solid rgba(255,255,255,.45);
  color: var(--text);
  background: rgba(255,255,255,.09);
  border-radius: 999px;
  padding: 11px 18px;
  backdrop-filter: blur(12px);
}
.primary-btn {
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #000;
  padding: 13px 20px;
  font-weight: 800;
  box-shadow: 0 14px 40px rgba(255,255,255,.16);
}
.secondary-btn { border-radius: 10px; font-weight: 800; }
.soft-glow { position: absolute; width: 360px; height: 360px; border-radius: 50%; filter: blur(80px); opacity: .35; }
.soft-glow.one { background: var(--red); bottom: -80px; left: 10%; }
.soft-glow.two { background: #7a3cff; top: 12%; right: -100px; }

.home-screen { background: #050505; }
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 58px);
  background: linear-gradient(180deg, rgba(0,0,0,.95), rgba(0,0,0,.55), transparent);
}
.nav-brand { background: transparent; border: 0; font-size: clamp(1.8rem, 4vw, 3rem); padding: 0; }
.nav-links { display: flex; gap: 20px; color: #e8e8e8; font-size: .95rem; }
.nav-links a:hover { color: #fff; }
.small-pill { margin-left: auto; padding: 8px 14px; font-size: .85rem; }

.hero {
  min-height: 78vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 130px clamp(18px, 5vw, 76px) 80px;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, #050505 78%);
  z-index: -1;
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(0,0,0,.9), rgba(0,0,0,.55) 42%, rgba(0,0,0,.15));
}
.hero-copy { width: min(720px, 100%); animation: fadeUp .8s ease both; }
.hero-copy h2 {
  margin: 10px 0 8px;
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: .9;
  letter-spacing: -.06em;
}
.hero-meta { color: #e7e7e7; font-weight: 800; }
.hero-description { color: #ddd; font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.5; max-width: 620px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.rows { padding: 10px clamp(18px, 5vw, 76px) 40px; }
.row { margin-bottom: 38px; }
.row h2, .reasons-section h2, .finale-section h2 { margin: 0 0 18px; font-size: clamp(1.45rem, 3vw, 2.35rem); }
.card-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 30vw);
  gap: 14px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x mandatory;
}
.card-track::-webkit-scrollbar { height: 8px; }
.card-track::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 999px; }
.memory-card {
  border: 0;
  color: #fff;
  text-align: left;
  border-radius: 14px;
  background: #151515;
  overflow: hidden;
  min-height: 228px;
  scroll-snap-align: start;
  box-shadow: 0 14px 38px rgba(0,0,0,.38);
  transition: transform .25s ease, box-shadow .25s ease;
}
.memory-card:hover { transform: scale(1.045); box-shadow: 0 18px 52px rgba(0,0,0,.55); z-index: 2; }
.memory-thumb { position: relative; aspect-ratio: 16 / 9; background: #272727; }
.memory-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-badge {
  position: absolute;
  inset: auto auto 10px 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,.78);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.65);
}
.memory-info { padding: 12px; }
.memory-info h3 { margin: 0 0 5px; font-size: 1rem; }
.memory-info p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.35; }

.reasons-section { padding: 50px clamp(18px, 5vw, 76px); background: linear-gradient(180deg, #050505, #110005 45%, #050505); }
.reasons-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.reason-card {
  min-height: 150px;
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(135deg, rgba(229,9,20,.22), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.1);
}
.reason-card strong { display: block; font-size: 2rem; color: var(--pink); margin-bottom: 12px; }
.reason-card p { margin: 0; color: #eee; line-height: 1.5; }

.finale-section { padding: 64px clamp(18px, 5vw, 76px) 100px; }
.finale-card {
  min-height: 340px;
  border-radius: 28px;
  padding: clamp(24px, 5vw, 60px);
  background:
    linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.18)),
    radial-gradient(circle at 82% 30%, rgba(229,9,20,.9), transparent 28%),
    linear-gradient(135deg, #1a0508, #050505);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: var(--shadow);
}
.finale-card p { color: #ddd; max-width: 520px; line-height: 1.5; }

.modal, .finale-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}
.modal.active, .finale-overlay.active { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.8); backdrop-filter: blur(8px); }
.modal-card {
  position: relative;
  z-index: 2;
  width: min(940px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  margin: 14px auto;
  overflow: auto;
  background: #151515;
  border-radius: 22px;
  box-shadow: var(--shadow);
  animation: modalIn .28s ease both;
}
.close-btn, .close-finale {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 999999;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.9);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}

.modal {
  pointer-events: auto;
}

.modal-card {
  pointer-events: auto;
}

.modal-media { background: #000; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.modal-media img, .modal-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-copy { padding: 24px; }
.modal-copy h3 { margin: 8px 0; font-size: clamp(1.6rem, 4vw, 3rem); }
.modal-copy p { color: #ddd; line-height: 1.6; font-size: 1rem; }
.modal-date { color: var(--pink) !important; font-weight: 800; }

.finale-overlay { background: #000; color: #fff; overflow: hidden; }
.close-finale { position: fixed; }
.finale-stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 18px;
  background: radial-gradient(circle at 50% 50%, rgba(229,9,20,.2), transparent 38%), #000;
}
.letter-panel {
  width: min(760px, 94%);
  padding: clamp(24px, 5vw, 56px);
  border-radius: 28px;
  background: linear-gradient(135deg, #fff8fb, #ffdbe5);
  color: #2b0008;
  box-shadow: 0 30px 90px rgba(229,9,20,.18);
  animation: letterIn 1s ease both;
}
.letter-panel h2 { margin: 10px 0 16px; font-size: clamp(2rem, 6vw, 4rem); line-height: 1; letter-spacing: -.04em; }
.letter-panel p { font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.8; white-space: pre-line; }
.credits-window {
  pointer-events: none;
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: #000;
}
.finale-overlay.credits .letter-panel { display: none; }
.finale-overlay.credits .credits-window { display: grid; }
.credits-roll {
  position: absolute;
  bottom: -80%;
  width: min(720px, 92%);
  text-align: center;
  animation: rollCredits 21s linear both;
}
.credit-line { margin: 18px 0; font-size: clamp(1rem, 3vw, 1.45rem); }
.credit-role { color: var(--muted); display: block; font-size: .82em; }
.ending-logo {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  color: var(--red);
  font-size: min(50vw, 360px);
  font-weight: 950;
  text-shadow: 0 0 48px rgba(229,9,20,.55);
  animation: logoPulse 2.2s ease both;
}
.finale-overlay.logo .ending-logo { display: grid; }
.replay-btn { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); display: none; }
.finale-overlay.logo .replay-btn { display: block; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes letterIn { from { opacity: 0; transform: translateY(30px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes rollCredits { from { transform: translateY(0); } to { transform: translateY(-180vh); } }
@keyframes logoPulse { 0% { opacity: 0; transform: scale(.4); } 35% { opacity: 1; transform: scale(1); } 100% { opacity: 1; transform: scale(.94); } }

@media (max-width: 760px) {
  .profiles { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .nav-links { display: none; }
  .top-nav { padding: 14px 18px; }
  .hero { min-height: 72vh; padding: 110px 18px 60px; }
  .card-track { grid-auto-columns: 76vw; }
  .reasons-grid { grid-template-columns: 1fr; }
  .profile-screen .brand { left: 18px; }
}
.static-memory-card {
  cursor: default;
}

.static-memory-card:hover {
  transform: none;
  box-shadow: 0 14px 38px rgba(0,0,0,.38);
}

.static-memory-card .play-badge {
  display: none;
}

.memory-info p {
  display: none;
}

.memory-info h3 {
  margin-bottom: 0;
}

.memory-card {
  min-height: auto;
}
.disabled-profile {
  opacity: 100;
  cursor: not-allowed;
}

.disabled-profile .profile-avatar {
  border-color: transparent !important;
}