/* Birthday Stream — streaming-style birthday theme */
:root {
	--bg: #141414;
	--bg-2: #1f1f1f;
	--bg-3: #2a2a2a;
	--text: #ffffff;
	--muted: #b3b3b3;
	--red: #e50914;
	--red-dark: #b20710;
	--green: #46d369;
	--radius: 6px;
	--gutter: 4%;
	--card-w: clamp(160px, 18vw, 300px);
	--poster-w: clamp(130px, 13vw, 220px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- Nav ---------- */
.nav {
	position: fixed; inset: 0 0 auto 0; z-index: 50;
	display: flex; align-items: center; gap: 2.5rem;
	padding: 18px var(--gutter);
	background: linear-gradient(to bottom, rgba(0,0,0,.75), transparent);
	transition: background .3s;
}
.nav.is-solid { background: var(--bg); }
.nav__logo {
	font-family: "Bebas Neue", Impact, sans-serif;
	font-size: clamp(28px, 3vw, 40px);
	letter-spacing: 2px;
	color: var(--red);
	text-decoration: none;
	text-transform: uppercase;
	text-shadow: 0 2px 8px rgba(0,0,0,.5);
	margin: 0;
	line-height: 1;
}
.nav__links { display: flex; gap: 1.25rem; font-size: 14px; }
.nav__links a { text-decoration: none; color: #e5e5e5; transition: color .2s; }
.nav__links a:hover { color: var(--muted); }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.nav__icon { background: none; border: 0; padding: 4px; display: grid; place-items: center; }
.nav__icon.is-on { color: var(--red); }
.nav__avatar {
	width: 34px; height: 34px; border-radius: 4px; border: 0; padding: 0;
	background: var(--red); overflow: hidden; font-weight: 700;
	display: grid; place-items: center;
}
.nav__avatar span { width: 100%; height: 100%; display: grid; place-items: center; }
.nav__avatar img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) { .nav__links { display: none; } }

/* ---------- Intro / profiles ---------- */
.intro {
	position: fixed; inset: 0; z-index: 100;
	background: var(--bg);
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 24px;
	animation: fade .5s ease;
}
.intro.is-leaving { animation: zoomOut .6s ease forwards; }
.intro__title { font-size: clamp(28px, 4vw, 56px); font-weight: 500; margin: 0 0 2rem; text-align: center; }
.intro__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(16px, 2vw, 32px); }
.profile { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.profile__pic {
	width: clamp(90px, 10vw, 160px); aspect-ratio: 1; border-radius: var(--radius);
	overflow: hidden; display: grid; place-items: center;
	font-size: clamp(40px, 5vw, 72px); font-weight: 700;
	outline: 3px solid transparent; outline-offset: 0; transition: outline-color .2s;
}
.profile__pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
/* Profile crops: frame each photo so the whole head shows */
.profile__pic { position: relative; }
.profile .profile__pic img { position: absolute; max-width: none; height: auto; object-fit: initial; }
.profile:nth-child(1) .profile__pic img { width: 133.33%; left: -10%; top: 0; }
.profile:nth-child(2) .profile__pic img { width: 133.33%; left: -16.67%; top: 0; }
.profile:nth-child(3) .profile__pic img { width: 200%; left: -70%; top: -25%; }
.profile:nth-child(4) .profile__pic img { width: 161.3%; left: -30.6%; top: -33.6%; }
.profile:nth-child(5) .profile__pic img { width: 147%; left: -30.9%; top: -17.9%; }
.profile__name { color: var(--muted); font-size: clamp(14px, 1.3vw, 20px); transition: color .2s; }
.profile:hover .profile__pic, .profile:focus-visible .profile__pic { outline-color: #fff; }
.profile:hover .profile__name { color: #fff; }

/* ---------- Opening animation (plays once per visit) ---------- */
.splash { position: fixed; inset: 0; z-index: 400; background: #000; display: grid; place-items: center; overflow: hidden; cursor: pointer; contain: strict; }
.splash__start { display: none !important; }
.splash__start { display: none !important; }
.splash.is-go { animation: splashOut .45s ease 3.55s forwards; }
.splash__stage { position: relative; z-index: 2; display: grid; place-items: center; transform-origin: 50% 50%; will-change: transform, opacity; opacity: 0; }
.splash.is-go .splash__stage { opacity: 1; animation: splashZoom 1.15s cubic-bezier(.7,0,.85,.35) 2.3s forwards; }
.splash__word { display: flex; position: relative; padding: .06em .03em .14em; font-family: "Bebas Neue", Impact, sans-serif; font-size: clamp(72px, 15vw, 230px); line-height: .85; letter-spacing: .015em; color: #e50914; -webkit-font-smoothing: antialiased; }
.splash__word span { display: inline-block; opacity: 0; transform-origin: 50% 0; transform: translate3d(0, 25%, 0) scaleY(var(--sy)) scale(.7); will-change: transform, opacity; }
.splash.is-go .splash__word span { animation: splashLetter .55s cubic-bezier(.2,.9,.3,1.2) forwards; animation-delay: calc(var(--i) * 70ms + .1s); }
.splash.is-go .splash__word span:first-child { animation: splashLetter .55s cubic-bezier(.2,.9,.3,1.2) .1s forwards, splashKCenter .65s cubic-bezier(.65,0,.25,1) 1.6s forwards; }
.splash.is-go .splash__word span:not(:first-child):not(.splash__shine) { animation: splashLetter .55s cubic-bezier(.2,.9,.3,1.2) calc(var(--i) * 70ms + .1s) forwards, splashFadeAway .45s ease-in 1.55s forwards; }
.splash__word .splash__shine { position: absolute; top: 0; bottom: 0; left: 0; width: 45%; opacity: 1; background: linear-gradient(100deg, transparent, rgba(255,255,255,.7), transparent); mix-blend-mode: overlay; transform: translate3d(-160%, 0, 0); pointer-events: none; }
.splash.is-go .splash__word .splash__shine { animation: splashShine .75s ease .85s forwards; }
.splash__ribbons { position: absolute; inset: -5% -10%; z-index: 1; display: flex; gap: 3px; opacity: 0; transform: scaleX(.02); transform-origin: 50% 50%; will-change: transform, opacity; pointer-events: none; }
.splash.is-go .splash__ribbons { animation: splashRibbons 1.2s cubic-bezier(.5,0,.25,1) 2.35s forwards; }
.splash__ribbons i { flex: 1; transform: translate3d(0, var(--dy), 0); }
.splash__start { position: absolute; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 18px; background: none; border: 0; color: #fff; font: 600 14px Inter, sans-serif; letter-spacing: 4px; text-transform: uppercase; animation: splashPulse 1.8s ease-in-out infinite; }
.splash__start-k { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: #e50914; font: 400 64px/1 "Bebas Neue", Impact, sans-serif; letter-spacing: 0; box-shadow: 0 0 0 0 rgba(229,9,20,.6); animation: splashRing 1.8s ease-out infinite; }
.splash.is-go .splash__start { display: none; }
.splash__skip { position: absolute; z-index: 3; right: 22px; bottom: 18px; color: rgba(255,255,255,.45); font: 500 12px Inter, sans-serif; letter-spacing: 2px; text-transform: uppercase; display: none; }
.splash.is-go .splash__skip { display: block; }
@keyframes splashLetter { to { opacity: 1; transform: translate3d(0, 0, 0) scaleY(var(--sy)) scale(1); } }
@keyframes splashKCenter { from { opacity: 1; transform: translate3d(0, 0, 0) scaleY(var(--sy)) scale(1); } to { opacity: 1; transform: translate3d(var(--kx, 0px), 0, 0) scaleY(1) scale(1.35); } }
@keyframes splashFadeAway { from { opacity: 1; transform: translate3d(0, 0, 0) scaleY(var(--sy)) scale(1); } to { opacity: 0; transform: translate3d(0, 0, 0) scaleY(var(--sy)) scale(.8); } }
@keyframes splashShine { to { transform: translate3d(330%, 0, 0); } }
@keyframes splashZoom { 0% { transform: scale(1); opacity: 1; } 70% { opacity: 1; } 100% { transform: scale(9); opacity: 0; } }
@keyframes splashRibbons { 0% { opacity: 0; transform: scaleX(.02); } 25% { opacity: 1; } 100% { opacity: 1; transform: scaleX(1); } }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }
@keyframes splashPulse { 50% { opacity: .75; } }
@keyframes splashRing { 0% { box-shadow: 0 0 0 0 rgba(229,9,20,.6); } 100% { box-shadow: 0 0 0 26px rgba(229,9,20,0); } }
@media (prefers-reduced-motion: reduce) { .splash { display: none !important; } }

/* ---------- Hero ---------- */
.hero { position: relative; height: 92vh; min-height: 520px; overflow: hidden; }
.hero__bg, .hero__bg img, .hero__bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__bg { background: radial-gradient(circle at 70% 30%, #4a0a0e, var(--bg) 70%); }
.hero__bg img { animation: kenburns 30s ease-in-out infinite alternate; }
.hero__shade {
	position: absolute; inset: 0;
	background:
		linear-gradient(77deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.4) 45%, transparent 75%),
		linear-gradient(to top, var(--bg) 0%, transparent 30%);
}
.hero__content { position: absolute; left: var(--gutter); bottom: 22%; width: min(560px, 90%); animation: rise .9s ease both; }
.hero__badge { display: flex; align-items: center; gap: 8px; letter-spacing: 4px; font-size: 13px; font-weight: 600; color: #ddd; margin: 0 0 8px; }
.hero__badge-mark { font-size: 20px; letter-spacing: 0; }
.hero__title {
	font-family: "Bebas Neue", Impact, sans-serif;
	font-size: clamp(56px, 9vw, 140px);
	line-height: .9; margin: 0 0 14px; letter-spacing: 2px;
	text-transform: uppercase;
	text-shadow: 0 4px 24px rgba(0,0,0,.6);
}
.hero__rank { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: clamp(16px, 1.6vw, 22px); margin: 0 0 12px; }
.crown { font-size: 1.4em; }
.hero__tagline { font-size: clamp(15px, 1.3vw, 20px); line-height: 1.45; color: #eee; margin: 0 0 22px; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.hero__buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 10px 26px; border-radius: 4px; border: 0;
	font-size: clamp(15px, 1.2vw, 19px); font-weight: 700; text-decoration: none;
	transition: transform .15s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn--play { background: #fff; color: #000; }
.btn--play:hover { background: rgba(255,255,255,.75); }
.btn--info { background: rgba(109,109,110,.7); color: #fff; }
.btn--info:hover { background: rgba(109,109,110,.45); }

/* ---------- Rows ---------- */
.rows { position: relative; margin-top: -9vh; z-index: 2; padding-bottom: 2rem; }
.row { margin-bottom: max(2.6vw, 22px); }
.row__title { font-size: clamp(17px, 1.5vw, 24px); font-weight: 700; margin: 0 var(--gutter) 10px; color: #e5e5e5; }
.row__wrap { position: relative; }
.row__track {
	display: flex; gap: 8px;
	overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
	padding: 28px var(--gutter) 48px; margin: -28px 0 -48px;
	scrollbar-width: none;
}
.row__track::-webkit-scrollbar { display: none; }
.row__arrow {
	position: absolute; top: 0; bottom: 0; z-index: 5; width: var(--gutter);
	border: 0; background: rgba(20,20,20,.6); font-size: 44px; line-height: 1;
	opacity: 0; transition: opacity .2s, background .2s;
}
.row__arrow--left { left: 0; }
.row__arrow--right { right: 0; }
.row__wrap:hover .row__arrow { opacity: 1; }
.row__arrow:hover { background: rgba(20,20,20,.85); }
@media (hover: none) { .row__arrow { display: none; } }

.card {
	position: relative; flex: 0 0 var(--card-w); aspect-ratio: 16/9;
	padding: 0; border: 0; border-radius: var(--radius); overflow: visible;
	background: var(--bg-2); scroll-snap-align: start;
	transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
	text-align: left;
}
.card__img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.card__rank {
	position: absolute; left: 6px; bottom: -6px; z-index: 2;
	font-family: "Bebas Neue", Impact, sans-serif; font-size: clamp(48px, 5vw, 80px); line-height: 1;
	color: var(--bg); -webkit-text-stroke: 2px #fff; pointer-events: none;
}
.card__type {
	position: absolute; top: 8px; right: 8px; z-index: 2;
	background: rgba(0,0,0,.65); border-radius: 3px; padding: 2px 7px; font-size: 12px; font-weight: 600;
}
.card__hover {
	position: absolute; inset: auto 0 0 0; z-index: 3;
	padding: 28px 12px 10px; border-radius: 0 0 var(--radius) var(--radius);
	background: linear-gradient(to top, rgba(0,0,0,.95), transparent);
	display: flex; flex-direction: column; gap: 4px;
	opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s;
}
.card__title { font-weight: 700; font-size: 14px; }
.card__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #ddd; flex-wrap: wrap; }
.match { color: var(--green); font-weight: 700; }
.pill { border: 1px solid rgba(255,255,255,.4); padding: 0 5px; border-radius: 2px; font-size: 11px; }
.pill:empty { display: none; }

/* Top 10 row: big outlined numbers beside each card */
.row--top10 .card { flex-basis: calc(var(--card-w) * 1.05); margin-left: clamp(34px, 4vw, 64px); }
.row--top10 .card:first-child { margin-left: clamp(26px, 3vw, 48px); }
.row--top10 .card__rank {
	left: auto; right: calc(100% - 14px); bottom: -10px;
	font-size: clamp(90px, 9vw, 150px); color: var(--bg); -webkit-text-stroke: 3px #595959; letter-spacing: -4px;
}

/* Poster row: tall 2:3 cards, like "Only on Netflix" */
.row--poster .card { flex-basis: var(--poster-w); aspect-ratio: 2/3; }
.row--poster .card__hover { padding-top: 40px; }
.row--poster .card__title { display: none; }

@media (hover: hover) {
	.card:hover, .card:focus-visible { transform: scale(1.28); z-index: 10; box-shadow: 0 14px 30px rgba(0,0,0,.7); transition-delay: .15s; }
	.card:hover .card__hover, .card:focus-visible .card__hover { opacity: 1; transform: none; transition-delay: .2s; }
	.card:hover .card__rank { opacity: 0; }
	.row--poster .card:hover { transform: scale(1.12); }
	.row__track .card:first-child:hover { transform-origin: left center; }
	.row__track .card:last-child:hover { transform-origin: right center; }
}

.empty { text-align: center; padding: 10vh var(--gutter); color: var(--muted); }
.empty a { color: var(--red); }

/* ---------- Countdown ---------- */
.countdown { text-align: center; padding: 5rem var(--gutter); background: radial-gradient(ellipse at center, #2a0508 0%, var(--bg) 70%); }
.countdown__label { letter-spacing: 6px; text-transform: uppercase; color: var(--muted); margin: 0 0 1.5rem; font-weight: 600; }
.countdown__clock { display: flex; justify-content: center; gap: clamp(12px, 3vw, 40px); }
.countdown__clock div { display: flex; flex-direction: column; align-items: center; min-width: 70px; }
.countdown__clock span { font-family: "Bebas Neue", Impact, sans-serif; font-size: clamp(54px, 9vw, 120px); line-height: 1; color: #fff; }
.countdown__clock small { color: var(--muted); text-transform: uppercase; letter-spacing: 2px; font-size: 12px; }
.countdown__done { font-family: "Bebas Neue", Impact, sans-serif; font-size: clamp(44px, 7vw, 96px); letter-spacing: 2px; color: var(--red); margin: 0; animation: pulse 1.6s ease-in-out infinite; }

/* ---------- Wishes ---------- */
.wishes { padding: 3rem 0 4rem; }
.wishes .row__title { margin-bottom: 1rem; }
.wishes__grid {
	display: grid; gap: 14px; padding: 0 var(--gutter);
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	align-items: start;
}
.wish-form, .wish { background: var(--bg-2); border-radius: var(--radius); padding: 18px; }
.wish-form { border: 1px solid var(--bg-3); display: flex; flex-direction: column; gap: 12px; }
.wish-form h3 { margin: 0; }
.wish-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.wish-form input[type=text], .wish-form textarea {
	background: #333; border: 1px solid #444; border-radius: 4px; color: #fff; padding: 10px 12px; font: inherit; font-size: 15px;
}
.wish-form input:focus, .wish-form textarea:focus { outline: 2px solid #fff; outline-offset: 1px; }
.wish-form .file input { font-size: 13px; color: var(--muted); }
.wish-form .btn { justify-content: center; }
.hp { position: absolute; left: -9999px; }
.wish { animation: rise .5s ease both; }
.wish__img { width: calc(100% + 36px); margin: -18px -18px 14px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; max-width: none; }
.wish__msg { margin: 0 0 10px; line-height: 1.5; font-size: 15px; }
.wish__from { margin: 0; color: var(--red); font-weight: 600; font-size: 14px; }
.notice { margin: 0 var(--gutter) 1rem; padding: 12px 16px; border-radius: 4px; }
.notice--ok { background: rgba(70,211,105,.15); color: var(--green); }
.notice--err { background: rgba(229,9,20,.15); color: #ff6b6b; }

/* ---------- Modal player ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 3vh 16px; overflow-y: auto; }
.modal__backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.75); animation: fade .25s ease; }
.modal__box {
	position: relative; width: min(900px, 100%); background: #181818; border-radius: 8px; overflow: hidden;
	box-shadow: 0 20px 60px rgba(0,0,0,.8); animation: pop .3s cubic-bezier(.2,.8,.2,1);
}
.modal__close {
	position: absolute; top: 12px; right: 12px; z-index: 5; width: 38px; height: 38px; border-radius: 50%;
	border: 0; background: #181818; font-size: 26px; line-height: 1;
}
.modal__media { position: relative; aspect-ratio: 16/9; background: #000; }
.modal__media.is-tall { aspect-ratio: auto; height: min(78vh, 900px); }
.modal__media iframe, .modal__media video, .modal__media img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; }
.modal__media::after { content: ""; position: absolute; inset: auto 0 0; height: 60px; background: linear-gradient(to top, #181818, transparent); pointer-events: none; }
.modal__media.is-player::after { display: none; }
.slides__nav {
	position: absolute; top: 50%; translate: 0 -50%; z-index: 3; width: 44px; height: 44px; border-radius: 50%;
	border: 0; background: rgba(0,0,0,.55); font-size: 28px; line-height: 1;
}
.slides__nav--prev { left: 12px; }
.slides__nav--next { right: 12px; }
.slides__count { position: absolute; bottom: 14px; right: 16px; z-index: 3; font-size: 13px; background: rgba(0,0,0,.6); padding: 2px 8px; border-radius: 3px; }
.modal__info { padding: 20px 32px 32px; }
.modal__meta { display: flex; align-items: center; gap: 10px; font-size: 15px; color: #ddd; }
.modal__info h2 { margin: 10px 0; font-size: clamp(22px, 2.5vw, 32px); }
.modal__info p { margin: 0; color: #d2d2d2; line-height: 1.55; white-space: pre-line; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 3rem var(--gutter); color: #777; font-size: 13px; border-top: 1px solid #222; }
.footer__logo { font-family: "Bebas Neue", Impact, sans-serif; font-size: 28px; letter-spacing: 2px; color: var(--red); margin: 0 0 6px; }

/* ---------- Access gate ---------- */
.gate-body { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #3a070b, #000 70%); }
.gate { width: min(400px, 92vw); background: rgba(0,0,0,.75); padding: 48px 40px; border-radius: 6px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.gate h1 { margin: 8px 0 0; font-size: 26px; }
.gate input { background: #333; border: 0; border-radius: 4px; padding: 14px; color: #fff; font-size: 16px; }
.gate .btn { justify-content: center; background: var(--red); color: #fff; }
.gate .btn:hover { background: var(--red-dark); }
.gate .notice { margin: 0; }

/* ---------- Confetti ---------- */
.confetti { position: fixed; top: -12px; z-index: 300; width: 10px; height: 14px; pointer-events: none; animation: fall linear forwards; }

/* ---------- Animations ---------- */
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } }
@keyframes zoomOut { to { opacity: 0; transform: scale(1.15); } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.12) translate(-1%, -1%); } }
@keyframes pulse { 50% { transform: scale(1.05); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 600px) {
	.hero { height: 80vh; }
	.hero__content { bottom: 16%; }
	.rows { margin-top: -4vh; }
	.modal__info { padding: 16px 20px 24px; }
	:root { --card-w: 42vw; --poster-w: 32vw; }
	.row--top10 .card { margin-left: 34px; }
	.row--top10 .card__rank { font-size: 80px; }
}
