:root {
  --bg: #101316;
  --surface: #181c20;
  --surface-2: #20262b;
  --paper: #f3f0e7;
  --ink: #f7f5ef;
  --muted: #98a1a8;
  --line: rgba(255,255,255,.1);
  --accent: #ef5b3f;
  --red: #ef5b3f;
  --accent-2: #ffc857;
  --cyan: #64d7da;
  --green: #8bd59a;
  --shadow: 0 24px 70px rgba(0,0,0,.34);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -4%, rgba(239,91,63,.17), transparent 28rem),
    radial-gradient(circle at 100% 20%, rgba(100,215,218,.09), transparent 34rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button { border: 0; }
img { display: block; max-width: 100%; }
form, p, h1, h2, h3 { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.035em; }
h1 { font-size: clamp(42px, 6vw, 78px); line-height: .95; }
h2 { font-size: clamp(27px, 3vw, 40px); line-height: 1; }
.page { width: min(100% - 48px, 1280px); margin: 0 auto; padding: 32px 0 100px; }
.eyebrow { color: var(--accent-2); font-size: 10px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border-radius: 13px; font-weight: 850; }
.button.accent { color: #151719; background: var(--accent-2); }
.button.glass { border: 1px solid var(--line); background: rgba(255,255,255,.07); }
.button:hover { transform: translateY(-1px); }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(255,255,255,.055);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(255,200,87,.1); }
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 750; }
.toast {
  position: fixed; z-index: 70; top: calc(88px + env(safe-area-inset-top, 0px)); left: 50%; max-width: min(90vw, 520px);
  padding: 13px 18px; border-radius: 14px; color: #15201a; background: var(--green);
  box-shadow: var(--shadow); transform: translateX(-50%);
}
.toast.error { color: white; background: #b84639; }

/* Navigation */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: calc(74px + env(safe-area-inset-top, 0px)); display: flex; align-items: center; gap: 38px;
  padding: env(safe-area-inset-top, 0px) max(24px, calc((100vw - 1280px) / 2)) 0;
  border-bottom: 1px solid var(--line); background: rgba(16,19,22,.86); backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px 13px 13px 5px;
  color: #16191b; background: var(--accent-2); font: 900 13px/1 Georgia, serif; transform: rotate(-2deg);
}
.brand-mark.large { width: 54px; height: 54px; font-size: 16px; }
.brand > span:last-child { display: grid; }
.brand b { font: 700 19px/1 Georgia, serif; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 8px; letter-spacing: .14em; text-transform: uppercase; }
.desktop-nav { height: 100%; display: flex; margin-left: auto; }
.desktop-nav a { position: relative; display: grid; place-items: center; padding: 0 16px; color: var(--muted); font-size: 13px; font-weight: 800; }
.desktop-nav a::after { content: ""; position: absolute; right: 50%; bottom: 0; left: 50%; height: 3px; background: var(--accent-2); transition: .18s; }
.desktop-nav a.active, .desktop-nav a:hover { color: white; }
.desktop-nav a.active::after { right: 14px; left: 14px; }
.profile-menu { position: relative; }
.profile-menu summary { list-style: none; }
.profile-menu summary::-webkit-details-marker { display: none; }
.profile-trigger {
  width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line);
  border-radius: 50%; color: #101316; background: var(--cyan); font-weight: 900; cursor: pointer;
}
.profile-dropdown {
  position: absolute; top: calc(100% + 12px); right: 0; width: 250px; padding: 9px;
  border: 1px solid var(--line); border-radius: 18px; background: #20252a; box-shadow: var(--shadow);
}
.profile-summary { display: flex; align-items: center; gap: 11px; padding: 10px; border-bottom: 1px solid var(--line); }
.profile-summary > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #101316; background: var(--cyan); font-weight: 900; }
.profile-summary > div { display: grid; gap: 3px; }
.profile-summary small { color: var(--muted); font-size: 10px; }
.profile-dropdown > a, .profile-dropdown form button { width: 100%; display: flex; padding: 11px 10px; border-radius: 10px; background: transparent; font-size: 13px; text-align: left; }
.profile-dropdown > a:hover, .profile-dropdown form button:hover { background: rgba(255,255,255,.06); }
.bottom-nav { display: none; }

/* Login */
.login-page { width: 100%; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-shell { width: min(1060px, 100%); display: grid; grid-template-columns: 1.2fr .8fr; overflow: hidden; border: 1px solid var(--line); border-radius: 34px; background: var(--surface); box-shadow: var(--shadow); }
.login-art { position: relative; min-height: 620px; display: flex; flex-direction: column; justify-content: center; padding: 70px; overflow: hidden; background: linear-gradient(145deg, #1f292b, #171a1e); }
.login-art::before { content: ""; position: absolute; width: 450px; height: 450px; right: -160px; bottom: -210px; border: 80px solid var(--accent); border-radius: 50%; opacity: .75; }
.login-art h1 { max-width: 680px; margin: 16px 0 22px; font-size: clamp(50px, 6vw, 82px); }
.login-art > p:last-of-type { max-width: 540px; color: var(--muted); font-size: 18px; line-height: 1.5; }
.film-strip { position: absolute; right: -60px; bottom: 80px; display: flex; gap: 9px; transform: rotate(-10deg); }
.film-strip i { width: 70px; height: 95px; border: 3px solid var(--accent-2); border-radius: 6px; opacity: .28; }
.login-card { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 54px; background: var(--paper); color: #161a1c; }
.login-card .eyebrow { margin: 12px 0 -10px; color: #7a5c15; }
.login-card h2 { margin-bottom: 6px; font-size: 42px; }
.login-card label { color: #4e565a; }
.login-card input { color: #161a1c; border-color: #d4d7d5; background: white; }
.login-card .button { width: 100%; margin-top: 6px; }

/* Dashboard */
.hero { min-height: 430px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, .7fr); gap: 20px; padding: 58px; overflow: visible; border-radius: 32px; background: linear-gradient(130deg, #242a2f, #171b1f); box-shadow: var(--shadow); }
.hero-copy { min-width: 0; }
.hero h1 { margin: 18px 0 22px; }
.hero h1 em { color: var(--accent-2); font: italic 500 1em/1 Georgia, serif; }
.hero-copy > p:not(.eyebrow) { max-width: 670px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.hero-stats { display: grid; gap: 10px; align-content: stretch; }
.hero-stats > a { min-width: 0; display: contents; }
.hero-stats article { display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.045); }
.hero-stats strong { color: var(--accent-2); font-size: 44px; line-height: 1; }
.hero-stats span { margin-top: 7px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.instant-search { position: relative; z-index: 15; max-width: 710px; margin-top: 31px; }
.instant-search > form, .big-search { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 8px 8px 8px 17px; border: 1px solid var(--line); border-radius: 16px; background: #faf8f1; color: #1a1c1d; }
.instant-search input, .big-search input { min-height: 44px; padding: 0 5px; border: 0; background: transparent; color: #1a1c1d; box-shadow: none; }
.instant-search > form button, .big-search button { min-height: 44px; padding: 0 17px; border-radius: 11px; color: #17191a; background: var(--accent-2); font-weight: 850; }
.search-suggestions { position: absolute; top: calc(100% + 8px); right: 0; left: 0; max-height: 430px; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: #20252a; box-shadow: var(--shadow); }
.suggestion-row { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 8px; border-radius: 11px; }
.suggestion-row:hover { background: rgba(255,255,255,.06); }
.suggestion-row img, .suggestion-poster { width: 46px; height: 64px; object-fit: cover; border-radius: 7px; background: #30363b; }
.suggestion-row > div { min-width: 0; display: grid; gap: 4px; }
.suggestion-row b, .suggestion-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-row small { color: var(--muted); }
.suggestion-row button { width: 38px; height: 38px; border-radius: 50%; color: #141719; background: var(--accent-2); font-size: 20px; font-weight: 900; }
.suggestion-row .suggestion-actions { display: flex; gap: 5px; }
.suggestion-row .suggestion-ignore { display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.suggestion-ignore svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.suggestion-row.is-hiding { opacity: 0; transform: translateX(10px); transition: opacity .18s, transform .18s; }
.api-warning { display: grid; gap: 4px; margin: 18px 0; padding: 15px 18px; border: 1px solid rgba(239,91,63,.35); border-radius: 15px; background: rgba(239,91,63,.1); }
.api-warning span { color: #d7a8a0; font-size: 12px; }
.section-block { margin-top: 58px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-head h2 { margin: 7px 0 0; }
.section-head a { color: var(--accent-2); font-size: 12px; font-weight: 800; }
.media-carousel { position: relative; }
.media-row { display: grid; grid-auto-flow: column; grid-auto-columns: 190px; gap: 14px; overflow-x: auto; padding: 3px 2px 14px; scroll-behavior: smooth; scroll-snap-type: x proximity; scrollbar-width: none; }
.media-row::-webkit-scrollbar { display: none; }
.media-row .media-card { scroll-snap-align: start; }
.media-carousel::before, .media-carousel::after {
  content: ""; position: absolute; z-index: 2; top: 0; bottom: 0; width: 70px;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.media-carousel::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.media-carousel::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.media-carousel.has-prev::before, .media-carousel.has-next::after { opacity: 1; }
.carousel-button {
  position: absolute; z-index: 4; top: 37%; width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: white; background: rgba(24,28,32,.94);
  box-shadow: 0 10px 28px rgba(0,0,0,.35); font-size: 34px; line-height: 1; backdrop-filter: blur(10px);
}
.carousel-button:hover { color: #151719; border-color: var(--accent-2); background: var(--accent-2); }
.carousel-prev { left: -20px; }
.carousel-next { right: -20px; }

/* Media cards */
.media-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 28px 15px; }
.media-card { min-width: 0; position: relative; }
.poster-link { position: relative; aspect-ratio: 2/3; display: block; overflow: hidden; border-radius: 17px; background: var(--surface-2); }
.poster-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.media-card:hover .poster-link img { transform: scale(1.025); }
.poster-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font: 700 56px/1 Georgia, serif; }
.rating { position: absolute; right: 8px; bottom: 8px; padding: 6px 8px; border-radius: 9px; color: #16191a; background: var(--accent-2); font-size: 10px; font-weight: 900; }
.media-card-copy { position: relative; padding: 11px 81px 0 2px; }
.card-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.card-meta span { color: var(--cyan); }
.card-meta i { font-style: normal; }
.media-card h3 { margin: 7px 0 0; overflow: hidden; font-size: 17px; line-height: 1.16; text-overflow: ellipsis; white-space: nowrap; }
.quick-card-actions { position: absolute; top: 8px; right: 0; display: flex; gap: 5px; }
.quick-card-actions button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.06); font-size: 18px; }
.quick-card-actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quick-add-form button:hover, .quick-add-form button.added { color: #151719; background: var(--green); }
.quick-ignore-form button:hover { color: white; border-color: var(--red); background: var(--red); }
.quick-add-form button span { display: none; }
.media-card.is-hiding { opacity: 0; transform: scale(.96); transition: opacity .18s, transform .18s; }
.queue-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.queue-strip > a { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.035); }
.queue-strip img, .queue-strip > a > span { width: 44px; height: 62px; flex: 0 0 auto; display: grid; place-items: center; object-fit: cover; border-radius: 7px; background: var(--surface-2); }
.queue-strip > a > div { min-width: 0; display: grid; gap: 5px; }
.queue-strip b, .queue-strip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-strip small { color: var(--muted); font-size: 9px; }

/* Pages */
.page-head { min-height: 170px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.page-head h1 { margin: 9px 0 12px; }
.page-head p:last-child { margin: 0; color: var(--muted); }
.search-head { display: grid; grid-template-columns: minmax(0,1fr) minmax(380px,.8fr); align-items: end; }
.big-search { margin-bottom: 4px; }
.tabs { display: flex; gap: 8px; margin-bottom: 28px; overflow-x: auto; }
.tabs a { flex: 0 0 auto; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 800; }
.tabs a.active { color: #151719; border-color: var(--accent-2); background: var(--accent-2); }
.result-count { margin-bottom: 20px; color: var(--muted); font-size: 13px; }
.empty-message { grid-column: 1/-1; padding: 70px 20px; color: var(--muted); text-align: center; }
.library-filter { display: grid; grid-template-columns: minmax(240px,1fr) 180px auto; gap: 9px; margin-bottom: 16px; }
.library-filter button { padding: 0 18px; border-radius: 13px; color: #141719; background: var(--accent-2); font-weight: 850; }
.library-list { display: grid; gap: 12px; }
.library-item { min-width: 0; display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 20px; padding: 13px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.035); }
.library-poster { aspect-ratio: 2/3; overflow: hidden; border-radius: 12px; background: var(--surface-2); }
.library-poster img { width: 100%; height: 100%; object-fit: cover; }
.library-poster span { width: 100%; height: 100%; display: grid; place-items: center; font: 700 34px/1 Georgia, serif; }
.library-copy { min-width: 0; padding: 9px 5px 5px 0; }
.library-copy h2 { margin: 9px 0 6px; font-size: 27px; }
.original-title { color: var(--muted); font: 400 15px/1.3 Georgia, serif; }
.library-copy > p:last-of-type { max-width: 800px; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.library-actions { display: flex; align-items: center; gap: 7px; margin-top: 16px; }
.library-actions form { flex: 0 0 auto; }
.library-actions select { min-height: 40px; width: 160px; padding: 0 10px; font-size: 11px; }
.compact-button { min-height: 40px; padding: 0 13px; border-radius: 11px; font-size: 11px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.05); }
.icon-button.active { color: #16191a; background: var(--accent-2); }
.icon-button.danger { color: #f18878; font-size: 21px; }
.empty-state { display: grid; justify-items: center; padding: 80px 20px; border: 1px dashed var(--line); border-radius: 24px; text-align: center; }
.empty-state > span { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; color: #151719; background: var(--accent-2); font-size: 34px; }
.empty-state h2 { margin: 18px 0 8px; }
.empty-state p { color: var(--muted); }

/* Animation archive */
.animation-head { align-items: center; }
.animation-head > div:first-child { max-width: 760px; }
.animation-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.animation-filters {
  display: grid; grid-template-columns: minmax(240px,1.2fr) minmax(230px,1fr) auto;
  align-items: end; gap: 10px; padding: 17px; border: 1px solid var(--line);
  border-radius: 19px; background: rgba(255,255,255,.035);
}
.animation-filters .button { min-height: 48px; }
.animation-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 13px 0 36px; }
.animation-summary span {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: 10px;
}
.animation-summary b { color: var(--accent-2); }
.animation-timeline { display: grid; gap: 42px; }
.animation-year { display: grid; grid-template-columns: 118px minmax(0,1fr); gap: 20px; }
.animation-year > header { position: sticky; top: 96px; height: fit-content; display: grid; gap: 7px; }
.animation-year > header span { color: var(--accent-2); font: 700 34px/1 Georgia, serif; }
.animation-year > header i { color: var(--muted); font-size: 9px; font-style: normal; text-transform: uppercase; }
.animation-year-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.animation-entry {
  min-width: 0; display: grid; grid-template-columns: 28px 62px minmax(0,1fr) auto;
  align-items: center; gap: 11px; padding: 9px; border: 1px solid var(--line);
  border-radius: 16px; background: rgba(255,255,255,.035); transition: opacity .18s, border-color .18s;
}
.animation-entry.downloaded { border-color: rgba(139,213,154,.42); background: rgba(139,213,154,.07); }
.animation-entry.is-filtered { opacity: .5; border-color: rgba(239,91,63,.35); }
.animation-number { color: var(--muted); font: 700 11px/1 Georgia, serif; text-align: center; }
.animation-poster { width: 62px; aspect-ratio: 2/3; overflow: hidden; border-radius: 9px; background: var(--surface-2); }
.animation-poster img { width: 100%; height: 100%; object-fit: cover; }
.animation-poster > span { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font: 700 28px/1 Georgia, serif; }
.animation-copy { min-width: 0; }
.animation-copy h2 { margin: 0 0 5px; overflow: hidden; font-size: 18px; line-height: 1.12; text-overflow: ellipsis; white-space: nowrap; }
.animation-copy > p { margin: 0 0 7px; overflow: hidden; color: var(--muted); font: 400 11px/1.3 Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.animation-copy > div { display: flex; flex-wrap: wrap; gap: 5px; }
.animation-copy > div span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.animation-copy > div span + span::before { content: "·"; margin-right: 5px; color: #596167; }
.animation-actions { display: flex; gap: 5px; }
.animation-action {
  width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line);
  border-radius: 50%; color: var(--muted); background: rgba(255,255,255,.045); font-weight: 900;
}
.animation-action svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.animation-action.check:hover, .animation-action.check.active { color: #111719; border-color: var(--green); background: var(--green); }
.animation-action.remove:hover { color: white; border-color: var(--red); background: var(--red); }
.animation-action.restore { color: #111719; border-color: var(--accent-2); background: var(--accent-2); font-size: 20px; }
.catalog-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 44px; }
.catalog-pagination > :last-child { justify-self: end; }
.catalog-pagination b { color: var(--muted); font-size: 11px; }

/* Detail */
.detail-page { width: 100%; padding-top: 0; }
.detail-hero { position: relative; min-height: 650px; display: grid; align-items: end; overflow: hidden; background: #14171a; }
.detail-backdrop { position: absolute; inset: 0; background: var(--backdrop) center 20%/cover no-repeat; opacity: .68; }
.detail-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,19,22,.97) 7%, rgba(16,19,22,.78) 48%, rgba(16,19,22,.3)), linear-gradient(0deg, #101316, transparent 55%); }
.detail-shell { position: relative; z-index: 2; width: min(100% - 64px, 1180px); display: grid; grid-template-columns: 250px minmax(0,1fr); align-items: end; gap: 36px; margin: 0 auto; padding: 72px 0 58px; }
.detail-poster { aspect-ratio: 2/3; overflow: hidden; border-radius: 20px; background: var(--surface-2); box-shadow: var(--shadow); }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-poster span { width: 100%; height: 100%; display: grid; place-items: center; font: 700 80px/1 Georgia, serif; }
.detail-copy { max-width: 820px; }
.detail-meta { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.detail-meta span { padding: 7px 10px; border-radius: 8px; color: #111719; background: var(--cyan); font-weight: 900; }
.detail-meta i { font-style: normal; }
.detail-meta .certification { padding: 3px 6px; border: 1px solid rgba(255,255,255,.55); border-radius: 3px; }
.detail-meta b { color: var(--accent-2); }
.release-notice { width: fit-content; display: grid; gap: 3px; margin-top: 15px; padding: 10px 13px; border-left: 3px solid var(--accent-2); background: rgba(255,200,87,.1); }
.release-notice b { color: var(--accent-2); font-size: 12px; text-transform: uppercase; }
.release-notice span { color: #d1d4d4; font-size: 11px; }
.detail-copy h1 { margin: 18px 0 9px; font-size: clamp(46px, 6vw, 78px); }
.detail-copy h1 small { color: #b3b9bb; font: 500 .46em/1 Inter, sans-serif; white-space: nowrap; }
.detail-copy .original-title { color: #d0d0cc; }
.tagline { margin: 8px 0 19px; color: #c7c9c7; font: italic 500 16px/1.4 Georgia, serif; }
.detail-subtitle { margin: 20px 0 7px; font-size: 16px; letter-spacing: 0; }
.overview { max-width: 760px; color: #c2c5c5; font-size: 15px; line-height: 1.65; }
.fact-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 21px 0; }
.fact-row span { padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 11px; }
.fact-row b { color: white; }
.crew-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; max-width: 760px; margin: 19px 0; }
.crew-row div { min-width: 0; display: grid; gap: 4px; }
.crew-row b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.crew-row span { color: var(--muted); font-size: 10px; }
.next-episode { display: grid; gap: 4px; width: fit-content; padding: 12px 14px; border-left: 3px solid var(--accent-2); background: rgba(255,255,255,.05); }
.next-episode span { color: var(--muted); font-size: 12px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.danger-action { color: #f18878; }
.danger-action:hover { color: white; border-color: var(--red); background: var(--red); }
.detail-content { width: min(100% - 48px, 1180px); display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 32px; margin: 0 auto; padding: 48px 0 100px; }
.detail-main-column { min-width: 0; display: grid; gap: 40px; }
.detail-section > header h2 { margin: 7px 0 20px; font-size: 31px; }
.cast-row { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 11px; overflow-x: auto; padding-bottom: 13px; scrollbar-width: thin; }
.cast-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.04); }
.cast-card > div { height: 172px; display: grid; place-items: center; overflow: hidden; color: var(--muted); background: var(--surface-2); font-size: 34px; }
.cast-card img { width: 100%; height: 100%; object-fit: cover; }
.cast-card b, .cast-card small { display: block; padding: 0 10px; }
.cast-card b { margin-top: 11px; font-size: 12px; line-height: 1.25; }
.cast-card small { min-height: 41px; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.media-facts { align-self: start; display: grid; gap: 0; padding: 20px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.035); }
.media-facts .eyebrow { margin-bottom: 8px; }
.media-facts div { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.media-facts span { color: var(--muted); font-size: 10px; }
.media-facts b { font-size: 12px; line-height: 1.4; }
.media-facts small { color: var(--accent-2); font-size: 9px; line-height: 1.4; }
.media-facts .region-release { gap: 5px; }
.collection-card { position: relative; min-height: 320px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--collection-backdrop) center/cover no-repeat, var(--surface); }
.collection-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,30,49,.98), rgba(12,30,49,.78) 60%, rgba(12,30,49,.35)); }
.collection-copy { position: relative; z-index: 1; padding: 34px; }
.collection-copy h2 { margin: 8px 0 10px; font-size: 31px; }
.collection-copy > p:not(.eyebrow) { max-width: 700px; color: #d6dddd; font-size: 12px; line-height: 1.55; }
.collection-parts { display: flex; gap: 9px; overflow-x: auto; margin-top: 20px; padding-bottom: 5px; }
.collection-parts a { flex: 0 0 220px; display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 10px; padding: 8px; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; background: rgba(0,0,0,.28); }
.collection-parts img { width: 48px; height: 68px; object-fit: cover; border-radius: 7px; }
.collection-parts span { min-width: 0; display: grid; gap: 5px; }
.collection-parts b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.collection-parts small { color: #b9c4c7; font-size: 9px; }

/* Settings */
.settings-grid, .users-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.settings-card, .about-card { padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.04); }
.settings-card h2 { margin-bottom: 21px; font-size: 27px; }
.settings-card form { display: grid; gap: 15px; }
.settings-card p, .about-card p { color: var(--muted); line-height: 1.6; }
.settings-card code { color: var(--accent-2); }
.region-settings { grid-column: 1/-1; }
.region-settings-head { display: grid; grid-template-columns: minmax(260px,.75fr) minmax(360px,1.25fr); gap: 30px; align-items: end; margin-bottom: 22px; }
.region-settings-head h2 { margin: 7px 0 0; }
.region-settings-head > p { margin: 0; font-size: 12px; }
.region-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.region-option {
  min-width: 0; display: flex; grid-template-columns: none; align-items: center; gap: 11px;
  padding: 12px; border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink); background: rgba(255,255,255,.035); cursor: pointer;
}
.region-option:has(input:checked) { border-color: var(--accent-2); background: rgba(255,200,87,.1); }
.region-option input { width: 20px; height: 20px; min-height: 0; flex: 0 0 auto; margin: 0; padding: 0; accent-color: var(--accent-2); box-shadow: none; }
.region-option span { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 7px; }
.region-option b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.region-option small { color: var(--muted); font-size: 9px; }
.region-settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 7px; }
.region-settings-actions > span { color: var(--muted); font-size: 10px; }
.user-list { align-content: start; }
.user-row { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.user-row:first-of-type { border-top: 0; }
.user-row > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: #111719; background: var(--cyan); font-weight: 900; }
.user-row > div { display: grid; gap: 3px; }
.user-row small { color: var(--muted); }
.about-card { max-width: 760px; }
.tmdb-logo { display: block; width: min(210px,55vw); height: auto; }
.about-card h2 { margin: 24px 0 14px; }

@media (max-width: 900px) {
  .page { width: min(100% - 30px, 820px); }
  .topbar { padding: env(safe-area-inset-top, 0px) 16px 0; }
  .media-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(4,1fr); }
  .hero-stats article { min-height: 110px; }
  .search-head { grid-template-columns: 1fr; }
  .queue-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  h1 { font-size: 40px; }
  .topbar { height: calc(60px + env(safe-area-inset-top, 0px)); }
  .brand-mark { width: 36px; height: 36px; font-size: 11px; }
  .brand b { font-size: 17px; }
  .brand small, .desktop-nav { display: none; }
  .profile-menu { margin-left: auto; }
  .profile-trigger { width: 38px; height: 38px; }
  .profile-dropdown { position: fixed; top: calc(65px + env(safe-area-inset-top, 0px)); right: 10px; }
  .page { width: 100%; padding: 15px 14px 35px; }
  .bottom-nav {
    position: fixed; z-index: 60; right: 0; bottom: 0; left: 0;
    height: calc(74px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5,1fr);
    padding: 8px 4px env(safe-area-inset-bottom); border-top: 1px solid rgba(0,0,0,.1);
    color: #536064; background: rgba(247,245,239,.96); backdrop-filter: blur(18px);
  }
  .bottom-nav a { min-width: 0; display: grid; justify-items: center; gap: 3px; font-size: 9px; font-weight: 800; }
  .bottom-nav a > span { font-size: 21px; line-height: 27px; }
  .bottom-nav a.active { color: #111719; }
  .bottom-nav .nav-search { position: relative; color: #111719; }
  .bottom-nav .nav-search > span { width: 49px; height: 49px; display: grid; place-items: center; margin-top: -22px; border: 5px solid #f7f5ef; border-radius: 50%; background: var(--accent-2); font-size: 30px; box-shadow: 0 7px 20px rgba(0,0,0,.18); }
  .bottom-nav em { font-style: normal; }

  .login-page {
    padding: calc(15px + env(safe-area-inset-top, 0px)) 15px
      calc(15px + env(safe-area-inset-bottom, 0px));
  }
  .login-shell { display: block; border-radius: 27px; }
  .login-art { min-height: 240px; padding: 34px 25px; }
  .login-art h1 { margin: 11px 0 13px; font-size: 42px; }
  .login-art > p:last-of-type { font-size: 13px; }
  .login-card { padding: 30px 24px; }
  .film-strip { display: none; }

  .hero { min-height: auto; display: block; padding: 25px 20px; border-radius: 23px; }
  .hero h1 { margin: 12px 0 15px; font-size: 38px; }
  .hero-copy > p:not(.eyebrow) { display: none; }
  .hero-stats { grid-template-columns: repeat(2,1fr); gap: 6px; margin-top: 15px; }
  .hero-stats article { min-height: 76px; padding: 10px; border-radius: 13px; }
  .hero-stats strong { font-size: 26px; }
  .hero-stats span { font-size: 7px; }
  .instant-search { margin-top: 21px; }
  .instant-search > form { grid-template-columns: 20px minmax(0,1fr); padding: 6px 10px; }
  .instant-search > form button { display: none; }
  .search-suggestions {
    position: fixed; z-index: 80; top: calc(60px + env(safe-area-inset-top, 0px));
    right: 8px; left: 8px; max-height: calc(100vh - 150px - env(safe-area-inset-top, 0px));
  }
  .suggestion-row { grid-template-columns: 42px minmax(0,1fr) 81px; }
  .suggestion-row img, .suggestion-poster { width: 42px; height: 58px; }

  .section-block { margin-top: 39px; }
  .section-head { margin-bottom: 14px; }
  .section-head h2 { font-size: 25px; }
  .section-head a { font-size: 10px; }
  .media-row { grid-auto-columns: 164px; gap: 11px; padding-bottom: 18px; }
  .media-carousel::before, .media-carousel::after, .carousel-button { display: none; }
  .media-card-copy {
    display: grid; grid-template-columns: minmax(0,1fr) auto;
    grid-template-areas: "title title" "meta actions";
    align-items: center; gap: 8px 7px; padding: 10px 2px 0;
  }
  .media-card-copy > a { grid-area: title; min-width: 0; }
  .card-meta { grid-area: meta; min-width: 0; font-size: 9px; }
  .media-card h3 {
    min-height: 38px; margin: 0; display: -webkit-box; overflow: hidden;
    font-size: 16px; line-height: 1.18; white-space: normal;
    -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  }
  .quick-card-actions { position: static; grid-area: actions; gap: 4px; }
  .quick-card-actions button { width: 31px; height: 31px; font-size: 16px; }
  .quick-card-actions svg { width: 14px; height: 14px; }
  .rating { padding: 5px 7px; font-size: 9px; }
  .queue-strip { display: flex; overflow-x: auto; }
  .queue-strip > a { flex: 0 0 225px; }

  .page-head { min-height: auto; display: block; margin: 20px 2px 23px; }
  .page-head h1 { margin: 8px 0 10px; font-size: 38px; }
  .page-head p:last-child { font-size: 12px; }
  .big-search { margin-top: 20px; grid-template-columns: 20px minmax(0,1fr); }
  .big-search button { grid-column: 1/-1; }
  .tabs { margin: 0 -14px 22px; padding: 0 14px; }
  .tabs a { padding: 9px 12px; }
  .media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 10px; }
  .animation-head-actions { justify-content: stretch; margin-top: 18px; }
  .animation-head-actions .button { flex: 1 1 150px; }
  .animation-filters { grid-template-columns: 1fr; padding: 13px; }
  .animation-summary { margin-bottom: 28px; }
  .animation-year { grid-template-columns: 1fr; gap: 12px; }
  .animation-year > header {
    position: static; display: flex; align-items: baseline; justify-content: space-between;
    padding-bottom: 8px; border-bottom: 1px solid var(--line);
  }
  .animation-year > header span { font-size: 30px; }
  .animation-year-list { grid-template-columns: 1fr; }
  .animation-entry { grid-template-columns: 22px 55px minmax(0,1fr) auto; gap: 8px; padding: 8px; }
  .animation-poster { width: 55px; }
  .animation-copy h2 { font-size: 15px; }
  .animation-copy > div span:last-child { display: none; }
  .animation-actions { flex-direction: column; }
  .animation-action { width: 32px; height: 32px; }
  .catalog-pagination { grid-template-columns: 1fr 1fr; }
  .catalog-pagination b { grid-row: 2; grid-column: 1/-1; justify-self: center; }
  .library-filter { grid-template-columns: 1fr 1fr; }
  .library-filter input { grid-column: 1/-1; }
  .library-filter button { min-height: 46px; }
  .library-tabs { margin-top: 20px; }
  .library-item { grid-template-columns: 82px minmax(0,1fr); gap: 12px; padding: 9px; border-radius: 16px; }
  .library-copy { padding-top: 3px; }
  .library-copy h2 { margin: 6px 0 4px; font-size: 20px; }
  .library-copy > p:last-of-type, .library-copy .original-title { display: none; }
  .library-actions { flex-wrap: wrap; margin-top: 12px; }
  .library-actions select { width: 128px; }

  .detail-page { padding: 0 0 20px; }
  .detail-hero { min-height: auto; align-items: end; }
  .detail-backdrop { bottom: auto; height: 330px; background-position: center top; }
  .detail-backdrop::after { background: linear-gradient(0deg, #101316 4%, rgba(16,19,22,.1) 80%), linear-gradient(90deg, rgba(16,19,22,.55), transparent); }
  .detail-shell { width: 100%; display: block; padding: 205px 16px 30px; }
  .detail-poster { width: 108px; margin: 0 0 15px; border-radius: 13px; }
  .detail-copy { min-width: 0; }
  .detail-meta { flex-wrap: wrap; gap: 6px; font-size: 8px; }
  .detail-meta span { padding: 5px 7px; }
  .release-notice { margin-top: 10px; }
  .detail-copy h1 { margin: 11px 0 7px; font-size: 34px; }
  .detail-copy h1 small { display: block; margin-top: 5px; font-size: 15px; }
  .detail-copy .original-title { font-size: 12px; }
  .tagline { font-size: 13px; }
  .overview { display: block; font-size: 13px; }
  .fact-row { margin: 15px 0; }
  .fact-row span { padding: 7px 9px; font-size: 9px; }
  .crew-row { grid-template-columns: 1fr 1fr; }
  .detail-actions { display: grid; grid-template-columns: 1fr; }
  .detail-actions form, .detail-actions .button { width: 100%; }
  .detail-content { width: 100%; grid-template-columns: 1fr; gap: 24px; padding: 29px 16px 55px; }
  .detail-main-column { gap: 29px; }
  .detail-section > header h2 { font-size: 26px; }
  .cast-row { grid-auto-columns: 116px; }
  .cast-card > div { height: 150px; }
  .collection-card { min-height: 290px; border-radius: 19px; }
  .collection-copy { padding: 24px 19px; }
  .collection-copy h2 { font-size: 26px; }
  .collection-parts a { flex-basis: 200px; }

  .settings-grid, .users-layout { grid-template-columns: 1fr; }
  .settings-card, .about-card { padding: 21px; border-radius: 18px; }
  .region-settings-head { grid-template-columns: 1fr; gap: 8px; }
  .region-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .region-option { padding: 10px; }
  .region-settings-actions { align-items: stretch; flex-direction: column; }
  .region-settings-actions .button { width: 100%; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 34px; }
  .media-row { grid-auto-columns: 156px; }
  .library-actions select { width: 112px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
