:root {
  --bg: #0a0b0f;
  --bg-2: #0f1116;
  --surface: #15171e;
  --surface-2: #1d2029;
  --surface-3: #262a35;
  --border: rgba(255, 255, 255, .08);
  --border-2: rgba(255, 255, 255, .14);
  --text: #f2f3f6;
  --muted: #9ba1b0;
  --faint: #6b7181;
  --accent: #ff4f38;
  --accent-2: #ff9a3d;
  --accent-grad: linear-gradient(135deg, #ff4f38, #ff9a3d);
  --gold: #f5c518;
  --ok: #3ecf8e;
  --radius: 14px;
  --radius-sm: 10px;
  --header: 68px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
p a, small a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
[hidden] { display: none !important; }
.container { padding-left: var(--gutter); padding-right: var(--gutter); }
.muted { color: var(--muted); }
.flag-tr {
  display: inline-grid; place-items: center; font-size: 9px; font-weight: 900; letter-spacing: .02em;
  width: 20px; height: 14px; border-radius: 3px; background: #e30a17; color: #fff; line-height: 1;
}

/* ---------- Header ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter);
  background: linear-gradient(rgba(10, 11, 15, .85), rgba(10, 11, 15, 0));
  transition: background .3s, backdrop-filter .3s, box-shadow .3s;
}
body.scrolled .topbar, body.on-watch .topbar {
  background: rgba(10, 11, 15, .88); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 var(--border);
}
.brand img { height: 34px; width: auto; display: block; }
.nav { display: flex; gap: 6px; }
.nav a {
  padding: 8px 14px; border-radius: 99px; color: var(--muted); font-weight: 600; font-size: 14px;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); background: rgba(255, 255, 255, .08); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; width: 280px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--border); border-radius: 99px;
  transition: border-color .2s, background .2s, width .3s var(--ease);
}
.search:focus-within { border-color: var(--border-2); background: rgba(255, 255, 255, .1); width: 340px; }
.search i { color: var(--muted); font-size: 14px; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 14px; }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: none; border: 0; color: var(--muted); font-size: 17px; transition: color .2s, background .2s, transform .15s;
}
.icon-btn:hover, .icon-btn.active { color: var(--text); background: rgba(255, 255, 255, .08); }
.icon-btn:active { transform: scale(.92); }
.mobile-only { display: none; }

/* ---------- Views ---------- */
.view { min-height: 100vh; padding-bottom: 60px; }
.view-enter { animation: view-in .45s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.page { padding-top: calc(var(--header) + 20px); }
.page.narrow { max-width: 820px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: clamp(24px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.02em; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 99px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text);
  font-weight: 700; font-size: 14px; white-space: nowrap; transition: transform .15s var(--ease), background .2s, filter .2s, box-shadow .2s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(255, 79, 56, .3); }
.btn-primary:hover { background: var(--accent-grad); filter: brightness(1.08); box-shadow: 0 10px 30px rgba(255, 79, 56, .42); }
.btn-glass { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-glass:hover { background: rgba(255, 255, 255, .22); }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; }

/* ---------- Skeletons ---------- */
.skeleton { position: relative; overflow: hidden; background: var(--surface); }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent);
  animation: shimmer 1.4s infinite;
}
.skeleton:has(img.loaded)::after { display: none; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton-line { height: 12px; border-radius: 6px; margin-top: 10px; width: 70%; background: var(--surface); position: relative; overflow: hidden; }
.skeleton-line::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent); animation: shimmer 1.4s infinite; }
.skeleton-line.w40 { width: 40%; height: 34px; }
.skeleton-line.w70 { width: 70%; }
.skeleton-line.w90 { width: 90%; }
.details-skeleton { padding: 24px 0; }

/* ---------- Hero ---------- */
.hero { position: relative; height: min(82vh, 800px); min-height: 480px; overflow: hidden; background: var(--bg-2); }
.skeleton-hero { background: linear-gradient(110deg, var(--bg-2) 30%, var(--surface) 50%, var(--bg-2) 70%); background-size: 200% 100%; animation: hero-shimmer 1.6s infinite; }
@keyframes hero-shimmer { to { background-position: -200% 0; } }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.1s ease, visibility 1.1s; }
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 20%; transform: scale(1.08); }
.hero-slide.active .hero-bg { animation: kenburns 12s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1.02); } }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 11, 15, .92) 0%, rgba(10, 11, 15, .6) 38%, rgba(10, 11, 15, 0) 70%),
    linear-gradient(0deg, var(--bg) 0%, rgba(10, 11, 15, 0) 42%);
}
.hero-content { position: absolute; left: 0; right: 0; bottom: clamp(56px, 12vh, 120px); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero-slide.active .hero-content > * { animation: rise .8s var(--ease) both; }
.hero-slide.active .hero-content > :nth-child(2) { animation-delay: .08s; }
.hero-slide.active .hero-content > :nth-child(3) { animation-delay: .16s; }
.hero-slide.active .hero-content > :nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.hero-logo { max-width: min(460px, 72vw); max-height: 170px; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 4px 24px rgba(0, 0, 0, .5)); }
.hero-title { font-size: clamp(32px, 5.5vw, 64px); font-weight: 900; letter-spacing: -.03em; line-height: 1; margin: 0; max-width: 14ch; text-shadow: 0 4px 24px rgba(0, 0, 0, .5); }
.hero-meta { display: flex; align-items: center; gap: 12px; color: #d5d8e0; font-weight: 600; font-size: 14px; }
.hero-meta > span + span::before { content: "•"; margin-right: 12px; color: var(--faint); }
.rating-pill { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); }
.hero-overview {
  max-width: 560px; margin: 0; color: #d9dce4; font-size: clamp(14px, 1.3vw, 17px); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}
.hero-actions { display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.hero-dots { position: absolute; right: var(--gutter); bottom: clamp(60px, 12vh, 124px); display: flex; gap: 8px; }
.hero-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: rgba(255, 255, 255, .35); transition: width .35s var(--ease), background .3s; }
.hero-dots button.active { width: 28px; background: #fff; }

/* ---------- Rows ---------- */
.rows { position: relative; z-index: 2; margin-top: -40px; }
.rows > .container:first-child { margin-top: 0; }
.rail { margin: 22px 0 30px; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.rail-head h2, .section-head h2, .people-section h2 { font-size: clamp(17px, 1.8vw, 21px); font-weight: 800; letter-spacing: -.01em; margin: 0; }
.see-all { color: var(--muted); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; transition: color .2s, gap .2s; }
.see-all:hover { color: var(--text); gap: 9px; }
.see-all i { font-size: 10px; }
.rail-body { position: relative; }
.rail-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(128px, 13.5vw, 196px); gap: 14px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
  padding: 8px var(--gutter) 14px; scrollbar-width: none;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; }
.rail-track.wide { grid-auto-columns: clamp(240px, 24vw, 340px); }
.rail-arrow {
  position: absolute; top: 8px; bottom: 50px; z-index: 3; width: calc(var(--gutter) - 4px); min-width: 40px;
  display: grid; place-items: center; border: 0; color: #fff; font-size: 20px; opacity: 0; transition: opacity .25s;
}
.rail-arrow.left { left: 0; background: linear-gradient(90deg, rgba(10, 11, 15, .95), transparent); }
.rail-arrow.right { right: 0; background: linear-gradient(-90deg, rgba(10, 11, 15, .95), transparent); }
.rail-body:hover .rail-arrow { opacity: 1; }
.rail-arrow i { transition: transform .2s; }
.rail-arrow:hover i { transform: scale(1.3); }

/* ---------- Cards ---------- */
.card { display: block; min-width: 0; outline-offset: 4px; border-radius: var(--radius-sm); }
.card-poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35); transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card-poster img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .5s, transform .6s var(--ease); }
.card-poster img.loaded { opacity: 1; }
.card-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; font-weight: 700; color: var(--muted); }
.card-rating {
  position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px; border-radius: 7px; font-size: 11px; font-weight: 800; color: var(--gold);
  background: rgba(10, 11, 15, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.card-play {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; font-size: 22px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .1)); transition: opacity .3s;
}
.card-play i { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-grad); padding-left: 3px; transform: scale(.7); transition: transform .35s var(--ease); box-shadow: 0 8px 24px rgba(255, 79, 56, .45); }
.card:hover .card-poster, .card:focus-visible .card-poster { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(0, 0, 0, .55); }
.card:hover .card-poster img { transform: scale(1.06); }
.card:hover .card-play, .card:focus-visible .card-play { opacity: 1; }
.card:hover .card-play i { transform: scale(1); }
.card-title { margin-top: 10px; font-size: 14px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.wide-card { display: block; min-width: 0; }
.wide-img { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; transition: transform .35s var(--ease); }
.wide-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.wide-img img.loaded { opacity: 1; }
.wide-card:hover .wide-img { transform: translateY(-4px); }
.wide-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .3s; }
.wide-play i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #000; padding-left: 3px; }
.wide-card:hover .wide-play { opacity: 1; }
.wide-remove {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; color: #fff;
  background: rgba(10, 11, 15, .7); opacity: 0; transition: opacity .2s, background .2s;
}
.wide-card:hover .wide-remove { opacity: 1; }
.wide-remove:hover { background: var(--accent); }
.wide-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .25); }
.wide-progress i { display: block; height: 100%; background: var(--accent); }

/* ---------- Grid / chips ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 26px 16px; }
.sentinel { height: 1px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--border); color: #cfd3dc; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip:active { transform: scale(.96); }
.chip.active { background: var(--text); border-color: var(--text); color: #0a0b0f; }
.chip.active .flag-tr { box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.chip.small { height: 32px; padding: 0 13px; font-size: 13px; }
.chips.genres { margin-bottom: 26px; }
.seg { display: inline-flex; padding: 4px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); }
.seg a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 99px; font-weight: 700; font-size: 14px; color: var(--muted); transition: background .2s, color .2s; }
.seg a.active { background: var(--surface-3); color: var(--text); }

.empty-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 70px 20px; gap: 6px; }
.empty-state h3 { margin: 10px 0 0; font-size: 20px; }
.empty-state p { color: var(--muted); margin: 0 0 14px; max-width: 46ch; }
.empty-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: var(--surface); color: var(--muted); }

.banner {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--radius); margin: 16px 0 4px;
  background: linear-gradient(120deg, rgba(255, 79, 56, .18), rgba(255, 154, 61, .06)); border: 1px solid rgba(255, 110, 60, .28);
  transition: transform .2s, border-color .2s;
}
.banner:hover { transform: translateY(-2px); border-color: rgba(255, 110, 60, .5); }
.banner > i:first-child { font-size: 22px; color: var(--accent-2); }
.banner div { flex: 1; display: flex; flex-direction: column; }
.banner span { color: var(--muted); font-size: 13px; }

/* ---------- Watch page ---------- */
.theater { position: relative; padding: calc(var(--header) + 14px) var(--gutter) 10px; isolation: isolate; }
.ambient {
  position: absolute; left: 50%; top: calc(var(--header) + 14px); z-index: -1; pointer-events: none;
  width: min(100%, calc((100vh - var(--header) - 60px) * 16 / 9), 1500px); aspect-ratio: 16 / 9; transform: translateX(-50%) scale(1.12);
  filter: blur(70px) saturate(1.5); opacity: 0; transition: opacity 1.4s ease;
}
.ambient.on { opacity: .55; }
.player-frame { position: relative; margin: 0 auto; width: min(100%, calc((100vh - var(--header) - 60px) * 16 / 9), 1500px); }
.cover { position: absolute; inset: 0; z-index: 20; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; background: #000; }
.cover-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .55; transform: scale(1.03); animation: kenburns 14s ease-out forwards; }
.cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0, 0, 0, .1), rgba(0, 0, 0, .7)); }
.cover-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; padding: 20px; animation: rise .7s var(--ease); }
.cover-logo { max-width: min(420px, 70%); max-height: 150px; object-fit: contain; filter: drop-shadow(0 4px 20px rgba(0, 0, 0, .6)); }
.cover h1 { font-size: clamp(26px, 4vw, 48px); margin: 0; }

.watch-body { padding-top: 10px; }
.details-skeleton { max-width: 1500px; margin: 0 auto; padding-top: 26px; }

/* Title header: blurred backdrop, poster, logo, info */
.details-hero { position: relative; padding: 36px 0 30px; overflow: hidden; isolation: isolate; }
.details-bg {
  position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center 25%;
  opacity: .22; filter: blur(2px) saturate(1.1);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 55%, transparent 100%);
}
.details { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; max-width: 1500px; margin: 0 auto; }
.details-poster { border-radius: 16px; overflow: hidden; aspect-ratio: 2 / 3; background: var(--surface); box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06); }
.details-poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.details-poster img.loaded { opacity: 1; }
.details-main { min-width: 0; padding-top: 4px; }
.details-logo { max-width: min(440px, 90%); max-height: 120px; object-fit: contain; object-position: left center; display: block; margin-bottom: 16px; filter: drop-shadow(0 4px 20px rgba(0, 0, 0, .5)); }
.details-title { font-size: clamp(28px, 3.6vw, 44px); font-weight: 900; letter-spacing: -.025em; margin: 0 0 14px; line-height: 1.08; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; color: #d0d4dd; font-weight: 600; font-size: 14px; }
.meta-row > span + span:not(.type-pill)::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); margin-right: 16px; vertical-align: middle; }
.imdb { display: inline-flex; align-items: center; gap: 6px; }
.imdb b { background: var(--gold); color: #000; font-weight: 900; font-size: 12px; padding: 2px 6px; border-radius: 4px; letter-spacing: -.02em; }
.tmdb { color: var(--gold); display: inline-flex; align-items: center; gap: 4px; }
.tmdb small { color: var(--muted); font-weight: 500; }
.cert { border: 1px solid var(--border-2); padding: 1px 7px; border-radius: 5px; font-size: 12px; }
.type-pill { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 3px 9px; border-radius: 99px; background: rgba(255, 79, 56, .14); color: var(--accent-2); }
.genre-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.genre { padding: 6px 13px; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: #d7dae2; }
.tagline { font-style: italic; color: var(--accent-2); margin: 18px 0 0; font-size: 15px; font-weight: 500; }
.overview { font-size: 16px; line-height: 1.75; color: #dde0e7; max-width: 72ch; margin: 12px 0 0; }
.credit-line { display: flex; gap: 12px; margin-top: 12px; font-size: 14px; }
.credit-line span { color: var(--faint); min-width: 84px; }
.credit-line b { font-weight: 600; color: #e4e6ec; }
.details-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

.details-sections { max-width: 1500px; margin: 0 auto; }
.episodes-section, .people-section, .facts-section { margin-top: 40px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.section-head h2, .facts-section h2 { font-size: clamp(18px, 1.8vw, 22px); font-weight: 800; margin: 0; }
.facts-section h2 { margin-bottom: 14px; }
.season-picker { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; padding: 4px 2px; }
.season-picker::-webkit-scrollbar { display: none; }
.episodes { display: grid; gap: 10px; }
.episode {
  display: grid; grid-template-columns: clamp(150px, 22vw, 260px) 1fr; gap: 20px; align-items: center; padding: 10px;
  border-radius: var(--radius); border: 1px solid transparent; transition: background .2s, border-color .2s, transform .2s;
}
.episode:hover { background: var(--surface); }
.episode.playing { background: var(--surface); border-color: rgba(255, 79, 56, .5); }
.episode.upcoming { opacity: .5; pointer-events: none; }
.ep-still { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; }
.ep-still img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s, transform .5s var(--ease); }
.ep-still img.loaded { opacity: 1; }
.episode:hover .ep-still img { transform: scale(1.05); }
.ep-num { position: absolute; left: 10px; bottom: 8px; font-weight: 900; font-size: 24px; line-height: 1; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.ep-play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; background: rgba(0, 0, 0, .4); transition: opacity .25s; font-size: 18px; }
.ep-play i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #000; padding-left: 2px; }
.episode:hover .ep-play { opacity: 1; }
.episode.playing .ep-play { opacity: 1; background: rgba(0, 0, 0, .5); }
.episode.playing .ep-play i { background: var(--accent-grad); color: #fff; }
.ep-info { min-width: 0; }
.ep-title { display: flex; flex-direction: column; gap: 3px; }
.ep-title b { font-size: 16px; }
.ep-title span { color: var(--muted); font-size: 12px; }
.ep-info p { margin: 8px 0 0; color: #c2c6d0; font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Cast & crew: portrait cards instead of tight face circles */
.people { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(118px, 11vw, 150px); gap: 14px; overflow-x: auto; padding: 8px 2px 14px; scrollbar-width: none; }
.people::-webkit-scrollbar { display: none; }
.person { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.person-photo {
  aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--surface-2), var(--surface)); font-weight: 800; font-size: 30px; color: var(--muted);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .05);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.person:hover .person-photo { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 79, 56, .45); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; opacity: 0; transition: opacity .4s; }
.person-photo img.loaded { opacity: 1; }
.person-text { display: flex; flex-direction: column; gap: 2px; }
.person b { font-size: 13px; line-height: 1.3; }
.person-text span { font-size: 12px; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.fact { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.fact-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 79, 56, .12); color: var(--accent-2); flex: none; font-size: 14px; }
.fact div { display: flex; flex-direction: column; min-width: 0; }
.fact div span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.fact div b { font-size: 14px; font-weight: 600; margin-top: 2px; }
.watch-body > .rail { margin-top: 36px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .8); backdrop-filter: blur(8px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.modal-body { position: relative; width: min(1100px, 100%); aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; animation: pop .3s var(--ease); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal-body iframe { width: 100%; height: 100%; border: 0; }
.modal-close { position: absolute; top: 10px; right: 10px; z-index: 1; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 18px; }

/* ---------- Settings ---------- */
.settings-page { max-width: 900px; margin: 0 auto; }
.card-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; }
.card-panel h2 { font-size: 17px; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.card-panel h2 > i { color: var(--accent-2); width: 20px; }
.card-panel > .muted { margin: -6px 0 16px; font-size: 14px; }
.fields { display: grid; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.row { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.field-label { font-weight: 600; font-size: 14px; }
.field small { color: var(--muted); font-size: 13px; }
.field select, .field input, form input[type=text] {
  height: 44px; padding: 0 14px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border-2); outline: none; min-width: 0; width: 100%;
  transition: border-color .2s;
}
.field select { max-width: 340px; cursor: pointer; }
.field select:focus, .field input:focus, form input:focus { border-color: var(--accent-2); }
.inline { display: flex; gap: 10px; }
.inline input { flex: 1; }
.pill { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: var(--surface-3); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pill.ok { background: rgba(62, 207, 142, .15); color: var(--ok); }
.switch { position: relative; width: 48px; height: 28px; border-radius: 99px; border: 0; background: var(--surface-3); flex: none; transition: background .25s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch.on { background: var(--accent); }
.switch.on i { transform: translateX(20px); }
.shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px 20px; }
.shortcuts div { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #cfd3dc; }
kbd { min-width: 88px; text-align: center; padding: 4px 8px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border-2); border-bottom-width: 2px; font: 700 12px Inter, system-ui, sans-serif; }
.save-status {
  position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 99px; font-weight: 700; font-size: 14px; background: var(--surface-3); transition: opacity .25s, transform .25s var(--ease);
}
.save-status.show { opacity: 1; transform: translate(-50%, 0); }
.save-status.ok { background: #16372a; color: var(--ok); }
.save-status.err { background: #3a1818; color: #ff8a8a; }
.dropzone {
  margin-top: 14px; padding: 36px 20px; border: 2px dashed var(--border-2); border-radius: var(--radius); text-align: center; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; transition: border-color .2s, color .2s;
}
.dropzone i { font-size: 28px; }
.dropzone:hover { border-color: var(--accent-2); color: var(--text); }
.form-error { color: #ff8a8a; min-height: 1em; margin: 10px 0 0; }

/* ---------- Mobile tab bar ---------- */
.tabbar { display: none; }

@media (max-width: 900px) {
  .nav { display: none; }
  .search { display: none; }
  .mobile-only { display: grid; }
  body.search-open .search {
    display: flex; position: fixed; left: 12px; right: 12px; top: calc(var(--header) - 4px); width: auto; z-index: 51;
    background: var(--surface-2); height: 46px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); animation: rise .25s var(--ease);
  }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0; z-index: 60;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(12, 13, 18, .94);
    backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-top: 1px solid var(--border);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; color: var(--faint); font-size: 11px; font-weight: 600; transition: color .2s; }
  .tabbar a i { font-size: 18px; transition: transform .2s var(--ease); }
  .tabbar a .flag-tr { height: 18px; width: 26px; font-size: 10px; opacity: .6; }
  .tabbar a.active { color: var(--text); }
  .tabbar a.active i { transform: translateY(-1px) scale(1.08); color: var(--accent-2); }
  .tabbar a.active .flag-tr { opacity: 1; }
  .view { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .details { grid-template-columns: 120px minmax(0, 1fr); gap: 18px; }
  .hero-nav { display: none; }
  .rail-arrow { display: none; }
  .hero { height: 72vh; min-height: 460px; }
  .hero-shade { background: linear-gradient(0deg, var(--bg) 4%, rgba(10, 11, 15, .55) 50%, rgba(10, 11, 15, .25) 100%); }
  .hero-content { bottom: 64px; }
  .hero-dots { left: 50%; right: auto; transform: translateX(-50%); bottom: 26px; }
}

@media (max-width: 600px) {
  :root { --header: 58px; }
  .brand img { height: 28px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 18px 10px; }
  .card-title { font-size: 12px; }
  .card-sub { display: none; }
  .card-rating { font-size: 10px; padding: 2px 5px; }
  .chips.filters { flex-wrap: nowrap; overflow-x: auto; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter); scrollbar-width: none; }
  .chips.genres { flex-wrap: nowrap; overflow-x: auto; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter); scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .hero-actions .btn-lg { height: 46px; padding: 0 20px; font-size: 15px; }
  .hero-overview { -webkit-line-clamp: 2; }
  .theater { padding: var(--header) 0 0; }
  .ambient { display: none; }
  .player-frame { width: 100%; }
  .cover { border-radius: 0; }
  .episode { grid-template-columns: 128px 1fr; gap: 12px; padding: 8px 0; }
  .ep-info p { -webkit-line-clamp: 2; font-size: 12px; }
  .facts { grid-template-columns: 1fr 1fr; gap: 8px; }
  .fact { padding: 12px; }
  .details { grid-template-columns: 1fr; }
  .details-poster { display: none; }
  .details-hero { padding-top: 22px; }
  .credit-line { flex-direction: column; gap: 2px; }
  .card-panel { padding: 18px 16px; }
  .field.row { align-items: flex-start; }
  .inline { flex-wrap: wrap; }
  .inline .btn { flex: 1; }
  .page-head .seg { width: 100%; }
  .page-head .seg a { flex: 1; justify-content: center; }
}

/* ======================================================================
   Header: search trigger + admin entry
   ====================================================================== */
.search-trigger {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 14px; width: 290px;
  border-radius: 99px; border: 1px solid var(--border); background: rgba(255, 255, 255, .06); color: var(--muted);
  font-size: 14px; text-align: left; transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.search-trigger span { flex: 1; }
.search-trigger kbd { min-width: 0; padding: 1px 8px; font-size: 11px; color: var(--muted); background: rgba(255, 255, 255, .06); }
.search-trigger:hover { background: rgba(255, 255, 255, .1); border-color: var(--border-2); color: var(--text); box-shadow: 0 0 0 4px rgba(255, 255, 255, .03); }
.admin-link {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 99px;
  font-weight: 700; font-size: 13px; color: var(--muted); border: 1px solid transparent; transition: color .2s, background .2s, border-color .2s;
}
.admin-link i { font-size: 15px; }
.admin-link:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.admin-link.active { color: var(--text); background: rgba(255, 79, 56, .12); border-color: rgba(255, 79, 56, .35); }
.admin-link.active i { color: var(--accent-2); }
@media (max-width: 900px) {
  .search-trigger { display: none; }
  .admin-link span { display: none; }
  .admin-link { width: 40px; padding: 0; justify-content: center; }
}

/* ======================================================================
   Search overlay
   ====================================================================== */
body.so-open { overflow: hidden; }
.so { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 9vh 16px 16px; }
.so-backdrop { position: absolute; inset: 0; background: rgba(6, 7, 10, .72); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); opacity: 0; transition: opacity .25s; }
.so-panel {
  position: relative; width: min(760px, 100%); max-height: 82vh; display: flex; flex-direction: column;
  background: rgba(20, 22, 29, .96); border: 1px solid var(--border-2); border-radius: 22px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  opacity: 0; transform: translateY(-14px) scale(.98); transition: opacity .25s, transform .3s var(--ease);
}
.so.open .so-backdrop { opacity: 1; }
.so.open .so-panel { opacity: 1; transform: none; }
.so-bar { display: flex; align-items: center; gap: 12px; padding: 0 16px 0 22px; height: 70px; border-bottom: 1px solid var(--border); flex: none; }
.so-icon { color: var(--accent-2); font-size: 20px; }
.so-bar input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.so-bar input::placeholder { color: var(--faint); font-weight: 500; }
.so-bar input::-webkit-search-cancel-button { display: none; }
.so-clear, .so-esc { border: 0; background: rgba(255, 255, 255, .07); color: var(--muted); border-radius: 8px; height: 30px; font-size: 12px; font-weight: 700; transition: background .2s, color .2s; }
.so-clear { width: 30px; }
.so-esc { padding: 0 10px; }
.so-clear:hover, .so-esc:hover { background: rgba(255, 255, 255, .14); color: var(--text); }
.so-bar input:placeholder-shown ~ .so-clear { display: none; }
.so-body { overflow-y: auto; padding: 8px 14px 16px; overscroll-behavior: contain; }
.so-section h3 { margin: 16px 8px 10px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.so-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 6px; }
.so-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface); color: #cfd3dc; font-size: 13px; font-weight: 600; transition: background .2s, border-color .2s;
}
.so-chip i { color: var(--faint); font-size: 11px; }
.so-chip:hover { background: var(--surface-2); border-color: var(--border-2); }
.so-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.so-row {
  display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 12px;
  transition: background .15s; position: relative;
}
.so-row.active, .so-row:hover { background: rgba(255, 255, 255, .06); }
.so-row.active { box-shadow: inset 3px 0 0 var(--accent); }
.so-thumb { width: 44px; height: 64px; border-radius: 8px; overflow: hidden; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--faint); }
.so-thumb img { width: 100%; height: 100%; object-fit: cover; }
.so-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.so-row-text b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-row-text span { font-size: 12px; color: var(--muted); }
.so-rating { color: var(--gold); font-size: 13px; font-weight: 700; white-space: nowrap; }
.so-go { color: var(--faint); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; }
.so-row.active .so-go, .so-row:hover .so-go { opacity: 1; transform: none; }
.skeleton-row { height: 80px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .04), transparent) var(--surface); background-size: 200% 100%; animation: hero-shimmer 1.4s infinite; margin-bottom: 4px; }
.so-top {
  position: relative; display: block; border-radius: 16px; overflow: hidden; min-height: 200px; margin: 0 4px;
  background: var(--surface) center / cover no-repeat; transition: transform .3s var(--ease), box-shadow .3s;
}
.so-top.skeleton { height: 200px; margin: 14px 4px 10px; }
.so-top.active, .so-top:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px rgba(255, 79, 56, .6), 0 18px 40px rgba(0, 0, 0, .45); }
.so-top-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 15, 20, .96) 0%, rgba(14, 15, 20, .82) 45%, rgba(14, 15, 20, .3) 100%); }
.so-top-body { position: relative; display: flex; gap: 18px; padding: 18px; align-items: center; }
.so-top-poster { width: 104px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); flex: none; }
.so-top-text { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.so-kind { font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.so-top h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; line-height: 1.1; }
.so-top-meta { display: flex; gap: 12px; font-size: 13px; color: #cfd3dc; font-weight: 600; }
.so-top p { margin: 0; font-size: 13px; color: #c3c7d1; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.so-play { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; height: 34px; padding: 0 16px; border-radius: 99px; background: var(--accent-grad); font-weight: 800; font-size: 13px; box-shadow: 0 8px 20px rgba(255, 79, 56, .35); }
.so-all {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: calc(100% - 8px); margin: 14px 4px 0; height: 46px;
  border-radius: 12px; border: 1px dashed var(--border-2); background: none; color: var(--muted); font-weight: 700; transition: color .2s, border-color .2s, background .2s;
}
.so-all:hover { color: var(--text); border-color: var(--accent-2); background: rgba(255, 79, 56, .06); }
.so-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 16px; color: var(--muted); text-align: center; }
.so-empty i { font-size: 30px; color: var(--faint); margin-bottom: 6px; }
.so-empty b { color: var(--text); font-size: 17px; }
.so-empty p { margin: 0; }
@media (max-width: 600px) {
  .so { padding: 0; }
  .so-panel { max-height: 100%; height: 100%; border-radius: 0; border: 0; }
  .so-bar { height: 62px; padding: 0 12px 0 16px; }
  .so-bar input { font-size: 17px; }
  .so-top-poster { width: 76px; }
  .so-top h2 { font-size: 19px; }
  .so-top p { display: none; }
}

/* ======================================================================
   Browse: hero, type switch, filter tabs, category tiles
   ====================================================================== */
.browse-hero { position: relative; padding: calc(var(--header) + 34px) 0 22px; overflow: hidden; }
.browse-glow {
  position: absolute; inset: -40% -10% auto; height: 420px; pointer-events: none;
  background: radial-gradient(ellipse at 20% 40%, rgba(255, 79, 56, .22), transparent 60%), radial-gradient(ellipse at 80% 20%, rgba(255, 154, 61, .12), transparent 55%);
  filter: blur(10px);
}
.browse-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .16em; color: var(--accent-2); }
.browse-head h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 900; letter-spacing: -.035em; margin: 6px 0 6px; line-height: 1; }
.browse-blurb { margin: 0; color: var(--muted); font-size: 16px; animation: rise .5s var(--ease); }
.type-switch {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.type-switch a { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 22px; font-weight: 800; font-size: 14px; color: var(--muted); transition: color .3s; }
.type-switch a.active { color: #fff; }
.ts-thumb {
  position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 12px;
  background: var(--accent-grad); box-shadow: 0 6px 18px rgba(255, 79, 56, .4); transition: transform .4s var(--ease);
}
.type-switch[data-active="series"] .ts-thumb { transform: translateX(100%); }

.filter-bar {
  position: sticky; top: var(--header); z-index: 30; margin-bottom: 8px;
  background: linear-gradient(rgba(10, 11, 15, .92), rgba(10, 11, 15, .85)); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}
.filter-tabs { position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.ftab {
  position: relative; display: inline-flex; align-items: center; gap: 9px; padding: 17px 16px; white-space: nowrap;
  color: var(--muted); font-weight: 700; font-size: 14px; transition: color .25s;
}
.ftab i { font-size: 13px; opacity: .8; transition: transform .3s var(--ease), color .25s; }
.ftab:hover { color: var(--text); }
.ftab:hover i { transform: translateY(-1px) scale(1.12); }
.ftab.active { color: var(--text); }
.ftab.active i { color: var(--accent-2); opacity: 1; }
.ftab .flag-tr { transform: scale(.95); }
.ftab-ink {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 0; border-radius: 3px 3px 0 0;
  background: var(--accent-grad); box-shadow: 0 0 14px rgba(255, 79, 56, .7);
  transition: transform .45s var(--ease), width .45s var(--ease);
}

.categories { margin: 22px 0 8px; }
.cat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cat-head h2 { margin: 0; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.cat-head h2 i { color: var(--accent-2); font-size: 15px; }
.cat-arrows { display: flex; gap: 4px; }
.genre-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(150px, 15vw, 196px); gap: 12px;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter); padding: 6px var(--gutter) 14px; scrollbar-width: none;
}
.genre-rail::-webkit-scrollbar { display: none; }
.genre-tile {
  --h: 220;
  position: relative; height: 92px; border-radius: 16px; overflow: hidden; scroll-snap-align: start;
  display: flex; align-items: flex-end; padding: 14px 16px;
  background:
    radial-gradient(circle at 85% 20%, hsla(var(--h), 90%, 70%, .35), transparent 55%),
    linear-gradient(135deg, hsl(var(--h) 62% 34%), hsl(calc(var(--h) + 28) 58% 16%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 8px 22px rgba(0, 0, 0, .3);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), filter .3s;
}
.genre-tile.skeleton { background: var(--surface); box-shadow: none; }
.genre-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .14) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.genre-tile:hover { transform: translateY(-4px) scale(1.02); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 16px 36px hsla(var(--h), 70%, 30%, .45); }
.genre-tile:hover::after { transform: translateX(120%); }
.gt-name { position: relative; z-index: 1; font-weight: 800; font-size: 15px; letter-spacing: -.01em; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); line-height: 1.15; }
.gt-icon { position: absolute; right: -8px; top: -4px; font-size: 58px; opacity: .22; transform: rotate(-12deg); transition: transform .5s var(--ease), opacity .3s; }
.genre-tile:hover .gt-icon { transform: rotate(0) scale(1.08); opacity: .34; }
.genre-tile.active { box-shadow: 0 0 0 2px #fff, 0 12px 30px hsla(var(--h), 70%, 35%, .55); }
.genre-tile.active .gt-icon { opacity: .4; }
.genre-tile.active::before { content: "\f00c"; font: var(--fa-font-solid); position: absolute; top: 10px; left: 12px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: hsl(var(--h) 60% 30%); font-size: 11px; z-index: 1; }

.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 16px; flex-wrap: wrap; }
.result-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.rh-genre { color: var(--accent-2); }
.rh-clear { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 700; color: var(--muted); transition: color .2s, border-color .2s; }
.rh-clear:hover { color: var(--text); border-color: var(--border-2); }
.fade-in { animation: view-in .4s var(--ease); }
@media (max-width: 600px) {
  .browse-hero { padding-top: calc(var(--header) + 18px); }
  .browse-head { align-items: stretch; }
  .type-switch { width: 100%; }
  .browse-blurb { font-size: 14px; }
  .ftab { padding: 14px 12px; font-size: 13px; }
  .genre-rail { grid-auto-columns: 136px; }
  .genre-tile { height: 80px; padding: 12px; }
  .gt-name { font-size: 14px; }
  .cat-arrows { display: none; }
}

/* ======================================================================
   Admin panel
   ====================================================================== */
.admin { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; max-width: 1400px; margin: 0 auto; padding: calc(var(--header) + 24px) var(--gutter) 40px; }
.admin-nav { position: sticky; top: calc(var(--header) + 24px); align-self: start; display: flex; flex-direction: column; gap: 4px; }
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 18px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.admin-brand div { display: flex; flex-direction: column; }
.admin-brand b { font-size: 17px; }
.admin-brand span:not(.admin-badge) { font-size: 12px; color: var(--muted); }
.admin-badge { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-grad); font-size: 18px; box-shadow: 0 8px 20px rgba(255, 79, 56, .35); }
.admin-nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--muted); font-weight: 700; font-size: 14px;
  transition: background .2s, color .2s;
}
.admin-nav a i { width: 18px; text-align: center; }
.admin-nav a:hover { background: var(--surface); color: var(--text); }
.admin-nav a.active { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.admin-nav a.active i { color: var(--accent-2); }
.admin-main { min-width: 0; animation: view-in .4s var(--ease); }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-head h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); font-weight: 900; letter-spacing: -.02em; }
.admin-head p { margin: 4px 0 0; max-width: 70ch; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-danger { background: rgba(255, 80, 80, .12); border-color: rgba(255, 80, 80, .35); color: #ff8a8a; }
.btn-danger:hover { background: rgba(255, 80, 80, .22); }
.icon-btn.danger:hover { color: #ff7b7b; background: rgba(255, 80, 80, .12); }
.icon-btn:disabled { opacity: .3; pointer-events: none; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; }
.fields.two { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat > div:last-child { display: flex; flex-direction: column; min-width: 0; }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; background: var(--surface-2); color: var(--muted); flex: none; }
.stat.accent .stat-icon { background: rgba(255, 79, 56, .16); color: var(--accent-2); }
.stat.ok .stat-icon { background: rgba(62, 207, 142, .14); color: var(--ok); }
.stat.warn .stat-icon { background: rgba(245, 197, 24, .14); color: var(--gold); }
.stat.bad .stat-icon { background: rgba(255, 80, 80, .14); color: #ff7b7b; }
.stat-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat small { color: var(--muted); font-size: 12px; }
.spark-card { padding-bottom: 12px; }
.spark-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 14px; }
.spark-head i { color: var(--accent-2); }
.spark svg { width: 100%; height: 110px; display: block; }
.health-list { display: grid; gap: 4px; }
.health-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--border); font-size: 14px; }
.health-row:last-child { border-bottom: 0; }
.health-row b { flex: 1; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; display: inline-block; }
.dot.ok, .addon-status.ok .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(62, 207, 142, .15); }
.dot.bad, .addon-status.bad .dot { background: #ff6b6b; box-shadow: 0 0 0 4px rgba(255, 90, 90, .15); }
.dot.off { background: var(--surface-3); }

.add-addon .inline input { font-size: 14px; }
.add-addon small { display: block; margin-top: 10px; }
.addon-list { display: grid; gap: 10px; }
.addon { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; transition: opacity .2s, border-color .2s; }
.addon:hover { border-color: var(--border-2); }
.addon.disabled { opacity: .55; }
.addon-row { display: flex; align-items: center; gap: 14px; }
.addon-logo { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; font-size: 18px; }
.addon-logo img { width: 100%; height: 100%; object-fit: cover; }
.addon-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.addon-info b { font-size: 15px; }
.addon-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addon-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.addon-status.bad { color: #ff8a8a; }
.addon-status.ok { color: var(--ok); }
.addon-tools { display: flex; align-items: center; gap: 2px; }
.addon-tools .icon-btn { width: 34px; height: 34px; font-size: 14px; }
.addon-tools .switch { margin-left: 8px; }
.addon-edit { display: flex; gap: 8px; margin-top: 12px; }
.addon-edit input { flex: 1; height: 40px; padding: 0 12px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border-2); outline: none; }

.torrent-table { display: grid; gap: 8px; }
.torrent-row {
  display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(140px, 1.3fr) 110px 70px 90px 40px; gap: 16px; align-items: center;
  padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
}
.tr-name { min-width: 0; display: flex; flex-direction: column; }
.tr-name b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-progress { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent-grad); border-radius: 6px; transition: width .6s var(--ease); }
.tr-stat { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-stat i { color: var(--faint); }
.empty-mini { display: flex; align-items: center; gap: 12px; padding: 26px; border-radius: var(--radius); border: 1px dashed var(--border-2); color: var(--muted); }
.log-box { height: 62vh; overflow-y: auto; padding: 14px; border-radius: var(--radius); background: #07080b; border: 1px solid var(--border); font: 12px/1.6 ui-monospace, "Cascadia Code", Consolas, monospace; }
.log { display: flex; gap: 12px; }
.log time { color: var(--faint); flex: none; }
.log.warn span { color: var(--gold); }
.log.error span { color: #ff8a8a; }

.lock { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.lock-card { width: min(380px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 34px 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: pop .4s var(--ease); }
.lock-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 26px; background: var(--accent-grad); box-shadow: 0 12px 30px rgba(255, 79, 56, .4); margin-bottom: 6px; }
.lock-card h1 { margin: 0; font-size: 24px; }
.lock-card p { margin: 0 0 8px; }
.lock-input { width: 100%; }
.lock-input input { width: 100%; height: 54px; text-align: center; font-size: 24px; letter-spacing: .5em; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border-2); outline: none; }
.lock-input input:focus { border-color: var(--accent-2); }
.lock-input input::placeholder { letter-spacing: normal; font-size: 15px; color: var(--faint); }
.lock-input.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.lock-card .btn { width: 100%; margin-top: 6px; }

.dialog { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; }
.dialog.open { opacity: 1; }
.dialog-card { width: min(420px, 100%); padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); transform: scale(.95); transition: transform .25s var(--ease); }
.dialog.open .dialog-card { transform: none; }
.dialog-card h3 { margin: 0 0 8px; font-size: 18px; }
.dialog-card p { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; gap: 16px; }
  .admin-nav { position: sticky; top: var(--header); z-index: 20; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter); background: rgba(10, 11, 15, .92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-brand { display: none; }
  .admin-nav a { white-space: nowrap; padding: 9px 13px; }
  .admin-nav a.active { box-shadow: inset 0 -3px 0 var(--accent); }
  .torrent-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .tr-progress { grid-column: 1 / -1; }
  .tr-name { grid-column: 1 / 2; }
  .addon-row { flex-wrap: wrap; }
  .addon-tools { width: 100%; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ======================================================================
   Mouse drag-to-scroll for every horizontal strip
   ====================================================================== */
@media (hover: hover) {
  .rail-track, .genre-rail, .people, .filter-tabs, .season-picker { cursor: grab; }
}
.dragging { cursor: grabbing !important; scroll-snap-type: none !important; user-select: none; }
.dragging a, .dragging img { pointer-events: none; }
.rail-track img, .genre-rail, .people img { -webkit-user-drag: none; }

/* Category tiles: room for the hover lift + glow (horizontal scrollers clip everything outside) */
.genre-rail { padding-top: 16px; padding-bottom: 26px; margin-top: -10px; margin-bottom: -12px; }
.rail-track { padding-top: 14px; margin-top: -6px; }

/* ======================================================================
   Carousel: arrows, progress timer, swipe
   ====================================================================== */
.hero { touch-action: pan-y; user-select: none; outline: none; }
.hero-nav {
  position: absolute; top: 50%; z-index: 3; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .18); color: #fff; font-size: 18px;
  background: rgba(10, 11, 15, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .3s, transform .3s var(--ease), background .2s;
}
.hero-nav.prev { left: 22px; transform: translateX(-8px); }
.hero-nav.next { right: 22px; transform: translateX(8px); }
.hero.hover .hero-nav, .hero:focus-within .hero-nav { opacity: 1; transform: none; }
.hero-nav:hover { background: rgba(255, 79, 56, .75); }
.hero-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3; background: rgba(255, 255, 255, .06); }
.hero-timer i { display: block; height: 100%; width: 0; background: var(--accent-grad); }
.hero-timer.run i { animation: hero-timer 8s linear forwards; }
.hero.hover .hero-timer.run i { animation-play-state: paused; }
@keyframes hero-timer { to { width: 100%; } }
.hero-dots button { cursor: pointer; }

/* ======================================================================
   Movies / Series: discover section under the rows
   ====================================================================== */
.discover { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--border); scroll-margin-top: calc(var(--header) - 10px); }
.discover-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.discover-head h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; letter-spacing: -.03em; margin: 6px 0 4px; }
.cat-head h3 { margin: 0; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.cat-head h3 i { color: var(--accent-2); font-size: 15px; }
.section-head .cat-arrows .icon-btn { width: 36px; height: 36px; font-size: 14px; }
@media (max-width: 600px) {
  .discover-head { align-items: stretch; }
  .discover-head .type-switch { width: 100%; }
}

/* ======================================================================
   Viewer preferences sheet
   ====================================================================== */
.prefs-sheet { position: fixed; inset: 0; z-index: 95; display: flex; justify-content: flex-end; background: rgba(0, 0, 0, 0); transition: background .25s; }
.prefs-sheet.open { background: rgba(0, 0, 0, .5); }
.prefs-card {
  width: min(420px, 100%); height: 100%; overflow-y: auto; padding: 22px 22px 30px; background: var(--bg-2); border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform .3s var(--ease); display: flex; flex-direction: column; gap: 14px;
}
.prefs-sheet.open .prefs-card { transform: none; }
.prefs-head { display: flex; align-items: center; justify-content: space-between; }
.prefs-head h2 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.prefs-head h2 i { color: var(--accent-2); }
.prefs-card h3 { margin: 12px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.pref-row select { height: 38px; padding: 0 10px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--border-2); max-width: 55%; }
.prefs-card .shortcuts { grid-template-columns: 1fr; gap: 8px; }
.prefs-card kbd { min-width: 104px; }
.pref-link { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--border-2); color: var(--muted); font-weight: 600; font-size: 14px; }
.pref-link:hover { color: var(--text); border-color: var(--accent-2); }

/* ======================================================================
   Admin page (/admin)
   ====================================================================== */
.admin-page .admin { padding-top: 32px; }
.admin-page .admin-nav { top: 24px; }
.admin-nav .admin-exit, .admin-nav .admin-logout {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--muted); font-weight: 700; font-size: 14px;
  background: none; border: 0; text-align: left; margin-top: 4px;
}
.admin-nav .admin-exit { margin-top: 14px; border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; padding-top: 16px; }
.admin-nav .admin-exit:hover, .admin-nav .admin-logout:hover { color: var(--text); background: var(--surface); }
.admin-nav .admin-exit i, .admin-nav .admin-logout i { width: 18px; text-align: center; }
.lock-card small { margin-top: 8px; font-size: 12px; line-height: 1.5; }
@media (max-width: 900px) {
  .admin-page .admin-nav { top: 0; }
  .admin-nav .admin-exit { margin-top: 0; border-top: 0; padding-top: 11px; }
}

/* Carousel progress lives in the active dot (the bar would sit under the first row). */
.hero-timer { display: none; }
.hero-dots button.active { position: relative; overflow: hidden; background: rgba(255, 255, 255, .3); }
.hero-dots button.active::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: dot-fill 8s linear forwards; }
@keyframes dot-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ======================================================================
   Phones: watch page is all about the player
   ====================================================================== */
@media (max-width: 600px), (orientation: landscape) and (max-height: 500px) {
  body.on-watch .topbar, body.on-watch .tabbar { display: none; }
  body.on-watch .view { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  body.on-watch .theater { padding: 0; background: #000; }
  body.on-watch .ambient { display: none; }
  body.on-watch .cover { border-radius: 0; }
}
@media (max-width: 600px) {
  /* Player stays on screen while the details scroll underneath. */
  body.on-watch .theater { position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top); box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
  body.on-watch .player-frame { width: 100%; }
  body.on-watch .watch-body { padding-top: 0; }
  body.on-watch .details-hero { padding: 18px 0 20px; }
  body.on-watch .details-logo { max-height: 70px; margin-bottom: 10px; }
  /* Bigger touch targets */
  .btn { min-height: 44px; }
  .icon-btn { min-width: 42px; min-height: 42px; }
  .season-picker .chip, .chips .chip { min-height: 38px; }
  /* Preferences open as a bottom sheet */
  .prefs-sheet { align-items: flex-end; }
  .prefs-card {
    width: 100%; height: auto; max-height: 86vh; border-left: 0; border-top: 1px solid var(--border-2); border-radius: 22px 22px 0 0;
    padding: 26px 18px calc(24px + env(safe-area-inset-bottom)); transform: translateY(100%); position: relative;
  }
  .prefs-card::before { content: ""; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255, 255, 255, .22); }
}
@media (orientation: landscape) and (max-height: 500px) {
  /* Landscape phone: player fills the height. */
  body.on-watch .player-frame { width: min(100%, 100vh * 16 / 9); width: min(100%, 100dvh * 16 / 9); }
}
@media (hover: none) {
  .prefs-card .shortcuts, .prefs-card .kbd-head { display: none; }
}

@media (max-width: 600px) {
  /* Bullets would start a wrapped line; plain spacing reads cleaner on phones. */
  .meta-row { gap: 8px 14px; }
  .meta-row > span + span:not(.type-pill)::before { display: none; }
}
@media (hover: none) {
  .so-go { display: none; }
}

/* Carousel controls: arrows beside the progress dots (never over the slide content) */
.hero-controls {
  position: absolute; right: var(--gutter); bottom: clamp(52px, 11vh, 116px); z-index: 3;
  display: flex; align-items: center; gap: 12px;
}
.hero-controls .hero-dots { position: static; transform: none; }
.hero-controls .hero-nav {
  position: static; margin: 0; width: 38px; height: 38px; font-size: 14px; opacity: .8; transform: none;
}
.hero-controls .hero-nav:hover { opacity: 1; }
.hero.hover .hero-controls .hero-nav, .hero:focus-within .hero-controls .hero-nav { opacity: 1; transform: none; }
@media (max-width: 900px) {
  .hero-controls { left: 50%; right: auto; transform: translateX(-50%); bottom: 18px; gap: 10px; }
  .hero-controls .hero-nav { display: grid; width: 32px; height: 32px; font-size: 12px; }
}

/* ======================================================================
   Ads — title / player page only (ads.js). Every box keeps its ad's shape (aspect-ratio) and
   shrinks with the page, so ads never push the layout around.
   ====================================================================== */
.ad-unit { position: relative; width: 100%; margin: 0 auto; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .03); }
.ad-unit a, .ad-unit img, .ad-unit iframe { display: block; width: 100%; height: 100%; border: 0; }
/* the image fills its box (a creative of a slightly different shape is stretched a little) */
.ad-unit img { object-fit: fill; }
.ad-label { position: absolute; top: 4px; right: 6px; z-index: 1; padding: 1px 6px; border-radius: 4px; background: rgba(0, 0, 0, .55); color: rgba(255, 255, 255, .8); font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.watch-ads { padding: 0 var(--gutter); }
.watch-ads-top { padding-top: calc(var(--header) + 10px); }
.watch-ads-top + .theater { padding-top: 10px; }
.watch-ads-bottom { margin: 14px 0 6px; }
/* exactly as wide as the player (--frame-w from ads.js); guests: 2 side by side, members: 1 */
.ad-row { display: flex; gap: 10px; width: var(--frame-w, 100%); max-width: 100%; margin: 0 auto; }
.ad-row .ad-unit { flex: 1 1 0; min-width: 0; margin: 0; }
.ad-stack .ad-unit { max-width: none; }
.ad-stack { display: grid; gap: 8px; }
.ad-mobile { display: none; }
@media (max-width: 767px) {
  .ad-desktop { display: none; }
  .ad-mobile { display: grid; }
  .watch-ads { padding: 0 12px; }
  .watch-ads-top { padding-top: calc(var(--header) + 8px); }
  .watch-ads-bottom { margin: 10px 0; }
}
/* the vertical ads beside the player: inside its section, only where there's empty room (ads.js
   decides) — they never narrow or move the page */
.ad-side { position: absolute; z-index: 2; width: 160px; display: none; }
.ad-side.show { display: block; }
@media (max-width: 767px) { .ad-side { display: none !important; } }
.fields textarea { width: 100%; min-height: 70px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text); font: 12px/1.5 ui-monospace, Consolas, monospace; resize: vertical; }
.fields small.muted { display: block; margin-top: 6px; }

/* ======================================================================
   Branding preloader (first visit of the session, 5 s)
   ====================================================================== */
#splash {
  position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(ellipse at center, #14121a 0%, #07080b 70%); overflow: hidden;
  transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1), filter .7s ease;
}
.no-splash #splash { display: none; }
#splash.out { opacity: 0; transform: scale(1.08); filter: blur(6px); pointer-events: none; }
.splash-glow { position: absolute; width: 60vmin; height: 60vmin; border-radius: 50%; background: radial-gradient(circle, rgba(255, 90, 50, .28), transparent 65%); filter: blur(20px); animation: splash-glow 5s ease-in-out forwards; }
@keyframes splash-glow { 0% { opacity: 0; transform: scale(.5); } 40% { opacity: 1; } 100% { opacity: .7; transform: scale(1.25); } }
.splash-mark { position: relative; display: flex; align-items: center; gap: 18px; }
.splash-icon { width: clamp(64px, 11vmin, 96px); height: auto; overflow: visible; filter: drop-shadow(0 12px 40px rgba(255, 79, 56, .45)); }
.splash-tile { transform-origin: 32px 32px; animation: splash-tile 1s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes splash-tile { from { transform: scale(0) rotate(-35deg); } }
.splash-play { stroke-dasharray: 130; stroke-dashoffset: 130; fill-opacity: 0; animation: splash-draw 1s .55s ease forwards, splash-fill .4s 1.35s ease forwards; }
@keyframes splash-draw { to { stroke-dashoffset: 0; } }
@keyframes splash-fill { to { fill-opacity: 1; } }
.splash-word { display: flex; font: 800 clamp(46px, 9vmin, 78px)/1 Inter, system-ui, sans-serif; letter-spacing: -.04em; color: #fff; position: relative; overflow: hidden; padding: 4px 6px 8px 0; }
.splash-word span { display: inline-block; opacity: 0; transform: translateY(60%); animation: splash-letter .6s cubic-bezier(.2, .8, .2, 1) forwards; }
.splash-word span:nth-child(1) { animation-delay: 1.1s; }
.splash-word span:nth-child(2) { animation-delay: 1.18s; }
.splash-word span:nth-child(3) { animation-delay: 1.26s; }
.splash-word span:nth-child(4) { animation-delay: 1.34s; }
.splash-word span:nth-child(5) { animation-delay: 1.42s; }
@keyframes splash-letter { to { opacity: 1; transform: none; } }
.splash-word::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); animation: splash-sweep 1.2s 2.2s ease-in-out forwards; mix-blend-mode: overlay; }
@keyframes splash-sweep { to { transform: translateX(120%); } }
.splash-tag { position: relative; color: rgba(255, 255, 255, .6); font-size: clamp(13px, 1.8vmin, 16px); font-weight: 600; letter-spacing: .02em; opacity: 0; animation: splash-letter .7s 2s ease forwards; transform: translateY(8px); }
.splash-bar { position: absolute; bottom: max(40px, 8vh); width: min(220px, 50vw); height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff4f38, #ff9a3d); transform-origin: left; transform: scaleX(0); animation: splash-bar 4.6s .2s cubic-bezier(.4, .1, .3, 1) forwards; }
@keyframes splash-bar { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  #splash * { animation-duration: .01ms !important; animation-delay: 0s !important; }
}
body.splashing { overflow: hidden; }

/* ======================================================================
   Admin: Ön kontrol
   ====================================================================== */
.btn.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.pill.bad { background: rgba(255, 90, 90, .15); color: #ff8a8a; }
.pill.warn { background: rgba(255, 180, 60, .15); color: #ffc15e; }
.pill.tr { background: rgba(227, 10, 23, .16); color: #ff6b73; }
.pc-presets { flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.pc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px; align-items: center; gap: 2px 0; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.pc-grid > * { padding: 10px 14px; }
.pc-grid > b { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); text-align: center; }
.pc-grid > :nth-child(6n+4), .pc-grid > :nth-child(6n+5), .pc-grid > :nth-child(6n+6) { background: rgba(255, 255, 255, .02); }
.pc-list { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.pc-list i { width: 16px; color: var(--accent-2); }
.pc-prio { font-style: normal; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: rgba(227, 10, 23, .16); color: #ff6b73; margin-left: 4px; }
.pc-check { display: grid; place-items: center; cursor: pointer; }
.pc-check input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.pc-start { flex-wrap: wrap; align-items: center; gap: 12px; }
.pc-start select { height: 40px; }
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pc-head h2 { margin: 0; }
.pc-bar { height: 10px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.pc-bar i { display: block; height: 100%; width: 0; background: var(--accent-grad); border-radius: 10px; transition: width .6s var(--ease); }
.pc-progress-text { margin-top: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-current { min-height: 1.3em; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-speed { min-height: 1.3em; margin-top: 4px; font-size: 13px; }
.pc-mode { margin-bottom: 14px; }
.pc-all p { margin: 0 0 12px; max-width: 70ch; }
.pc-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.pc-controls { flex-wrap: wrap; gap: 8px; }
.pc-controls select { height: 40px; }
.pc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.pc-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.pc-stat b { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.pc-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.pc-stat.ok b { color: var(--ok); }
.pc-stat.bad b { color: #ff8a8a; }
.pc-stat.tr b { color: #ff6b73; }
.pc-tabs { margin-bottom: 12px; }
.pc-results { display: grid; gap: 4px; max-height: 560px; overflow-y: auto; }
.pc-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 10px; }
.pc-row:hover { background: rgba(255, 255, 255, .03); }
.pc-row img, .pc-noposter { width: 38px; height: 57px; object-fit: cover; border-radius: 6px; background: var(--surface-3); }
.pc-name { display: flex; flex-direction: column; min-width: 0; }
.pc-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-name span { font-size: 12px; }
.pc-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pc-time { font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .pc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-row { grid-template-columns: 38px minmax(0, 1fr); }
  .pc-badges, .pc-time { grid-column: 2; justify-content: flex-start; }
}

/* connection banner */
.net-banner { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 400; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
  padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 700; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); animation: rise .3s var(--ease); }
.net-banner.off { background: #3a1416; color: #ffb3b3; border: 1px solid rgba(255, 90, 90, .35); }
.net-banner.ok { background: #10301f; color: #8ef0bd; border: 1px solid rgba(62, 207, 142, .35); }
@media (max-width: 900px) { .net-banner { bottom: calc(84px + env(safe-area-inset-bottom)); } }
/* Ad slots take the content width (they were collapsing to 0 inside grid/flex parents). */
.ad-slot { width: calc(100% - 2 * var(--gutter)); box-sizing: border-box; }
.ad-slot > iframe { width: 100%; }
.ad-side { width: 160px; }
@media (max-width: 600px) { .ad-slot { width: calc(100% - 24px); } }
@media (min-width: 601px) {
  .with-ad-top { padding-top: 6px; }
  .with-ad-top .player-frame, .with-ad-top .ambient { width: min(100%, calc((100vh - var(--header) - 60px - 118px) * 16 / 9), 1500px); }
  .with-ad-top .ambient { top: 6px; }
}

/* ======================================================================
   Availability tags (Dublaj / Türkçe / Altyazı / Kontrol edilmedi)
   ====================================================================== */
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.card-poster .card-tags { position: absolute; left: 6px; bottom: 6px; right: 6px; z-index: 2; pointer-events: none; }
.avail-tag {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .01em; line-height: 1; white-space: nowrap;
  background: rgba(8, 9, 12, .78); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}
.avail-tag i { font-size: 10px; }
.avail-tag .mini-flag { display: inline-flex; }
.avail-tag .mini-flag svg { width: 14px; height: 10px; border-radius: 2px; }
.avail-tag.dub { box-shadow: 0 0 0 1px rgba(255, 90, 90, .45); }
.avail-tag.tr { box-shadow: 0 0 0 1px rgba(255, 90, 90, .45); }
.avail-tag.sub i { color: #7fb8ff; }
.avail-tag.check { color: rgba(255, 255, 255, .72); font-weight: 700; }
.avail-tag.check i { color: #ffc15e; }
/* admin only: titles hidden from visitors, with an in-place re-check */
.avail-tag.hidden-tag { color: #ffc15e; box-shadow: 0 0 0 1px rgba(255, 193, 94, .5); }
.avail-tag.recheck-tag { pointer-events: auto; cursor: pointer; border: 0; font: inherit; font-size: 10.5px; font-weight: 800; color: #fff; }
.avail-tag.recheck-tag:hover { background: var(--accent); }
.avail-tag.recheck-tag:disabled { cursor: progress; opacity: .8; }
.hero-meta .avail-tag.recheck-tag, .meta-row .avail-tag.recheck-tag { font-size: 12px; }
.card.is-hidden .card-poster img { opacity: .4; filter: grayscale(.7); }
.card.is-hidden .card-title { color: var(--muted); }
/* in text rows (hero, details, search) the tags sit inline */
.hero-meta .card-tags, .meta-row .card-tags, .so-row-text .card-tags, .so-top-meta .card-tags { display: inline-flex; }
.so-row-text .card-tags { margin-top: 4px; }
.hero-meta .avail-tag, .meta-row .avail-tag { height: 24px; font-size: 12px; padding: 0 9px; }
@media (max-width: 600px) {
  .card-poster .card-tags { left: 4px; bottom: 4px; gap: 3px; }
  .card-poster .avail-tag { height: 18px; padding: 0 5px; font-size: 9.5px; }
  .card-poster .avail-tag.check span { display: none; } /* just the icon on small cards */
}

/* ======================================================================
   Viewer accounts: header button, sign-in dialog, menu
   ====================================================================== */
.account-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-grad); color: #fff; font-weight: 900; font-size: 14px; }
.auth-overlay { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(4, 5, 8, 0); backdrop-filter: blur(0); transition: background .2s, backdrop-filter .2s; }
.auth-overlay.open { background: rgba(4, 5, 8, .7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.auth-card { position: relative; width: min(400px, 100%); padding: 28px 24px 22px; border-radius: 22px; background: var(--bg-2); border: 1px solid var(--border-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); transform: translateY(12px) scale(.97); opacity: 0; transition: transform .25s var(--ease), opacity .2s; }
.auth-overlay.open .auth-card { transform: none; opacity: 1; }
.auth-close { position: absolute; top: 12px; right: 12px; }
.auth-brand img { height: 30px; }
.auth-card h2 { margin: 16px 0 6px; font-size: 22px; }
.auth-reason { display: flex; gap: 6px; align-items: baseline; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 154, 61, .1); color: #ffcf9e; font-size: 13px; line-height: 1.5; }
.auth-tabs { margin: 12px 0 14px; width: 100%; }
.auth-tabs a { flex: 1; justify-content: center; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form input { height: 46px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-2); color: var(--text); font-size: 15px; }
.auth-form input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(255, 154, 61, .18); }
.auth-submit { height: 46px; justify-content: center; margin-top: 4px; }
.auth-hint { margin: 2px 0 0; font-size: 12px; }
.account-menu { position: fixed; z-index: 120; min-width: 200px; padding: 6px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); animation: rise .2s var(--ease); }
.account-name { padding: 10px 12px; font-weight: 800; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.account-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border-radius: 10px; background: none; border: 0; color: var(--muted); font-weight: 700; text-align: left; cursor: pointer; }
.account-menu button:hover { background: var(--surface); color: var(--text); }

/* admin notice banner on a title's page */
.page-notice { display: flex; gap: 14px; align-items: flex-start; margin: 18px 0 0; padding: 14px 18px; border-radius: 16px; background: rgba(255, 154, 61, .09); border: 1px solid rgba(255, 154, 61, .28); animation: rise .35s var(--ease); }
.page-notice.block { background: rgba(255, 90, 90, .08); border-color: rgba(255, 90, 90, .3); }
.page-notice-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .06); color: var(--accent-2); font-size: 16px; }
.page-notice.block .page-notice-icon { color: #ff8a8a; }
.page-notice b { font-size: 15px; }
.page-notice p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ======================================================================
   Admin: requests, notices, availability, custom torrents, users
   ====================================================================== */
.cm-list { display: grid; gap: 4px; max-height: 640px; overflow-y: auto; margin-top: 12px; }
.cm-row { display: grid; grid-template-columns: auto 38px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.cm-row:hover { background: rgba(255, 255, 255, .03); }
.cm-row > .cm-thumb:first-child, .cm-row > .account-avatar:first-child { grid-column: span 2; }
.cm-row-tall { align-items: start; }
.cm-thumb { width: 38px; height: 57px; object-fit: cover; border-radius: 6px; background: var(--surface-3); display: grid; place-items: center; color: var(--faint); flex: none; }
.cm-rank { width: 26px; text-align: center; font-weight: 900; font-size: 16px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cm-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cm-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-name small { font-size: 12px; }
.cm-hash { font-family: ui-monospace, Consolas, monospace; font-size: 11px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-notice-text { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-count { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: rgba(255, 79, 56, .14); color: #ffb09e; font-weight: 900; font-variant-numeric: tabular-nums; }
.cm-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cm-picker { position: relative; }
.cm-search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-2); color: var(--faint); }
.cm-search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; color: var(--text); font-size: 15px; outline: none; }
.cm-results { display: grid; gap: 4px; margin-top: 6px; }
.cm-result, .cm-chosen { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 12px; text-align: left; background: var(--surface); border: 1px solid var(--border); color: var(--text); cursor: pointer; }
.cm-result:hover { border-color: var(--accent-2); }
.cm-result span, .cm-chosen span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cm-result small, .cm-chosen small { color: var(--muted); font-size: 12px; }
.cm-chosen { cursor: default; border-color: rgba(62, 207, 142, .45); background: rgba(62, 207, 142, .06); }
.cm-form, .cm-editor { display: flex; flex-direction: column; gap: 12px; }
.cm-form textarea, .cm-editor textarea, .cm-form input[type=text], .cm-editor input[type=text], .cm-form select, .cm-editor select {
  width: 100%; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text); font: inherit; font-size: 14px; }
.cm-num { width: 70px; height: 38px; padding: 0 8px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text); font: inherit; }
.cm-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cm-torrent-name { padding: 10px 12px; border-radius: 12px; background: var(--surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-suggest { display: grid; gap: 4px; margin-bottom: 10px; }
.cm-files { display: grid; gap: 4px; max-height: 360px; overflow-y: auto; }
.cm-file { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 70px auto 70px; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 8px; background: var(--surface); font-size: 13px; }
.cm-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-preset { padding: 10px 12px; border-radius: 12px; background: rgba(255, 154, 61, .1); color: #ffcf9e; margin: 0; }
.cm-subs-box { margin: -4px 8px 10px 58px; padding: 12px; border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.cm-subs { display: grid; gap: 4px; }
.cm-sub { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.cm-sub span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 800px) {
  .cm-row { grid-template-columns: 38px minmax(0, 1fr); }
  .cm-row > .cm-rank { display: none; }
  .cm-row > .cm-thumb:first-child, .cm-row > .account-avatar:first-child { grid-column: auto; }
  .cm-count, .cm-actions, .cm-row .pc-badges { grid-column: 2; justify-content: flex-start; }
  .cm-grid3 { grid-template-columns: 1fr; }
  .cm-file { grid-template-columns: minmax(0, 1fr) auto 56px auto 56px; }
  .cm-file small { display: none; }
  .cm-subs-box { margin-left: 0; }
}

/* Custom torrent flow: ① torrent → ② content → ③ version → ④ subtitles */
.cm-flow { display: flex; flex-direction: column; gap: 14px; }
.cm-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; list-style: none; margin: 0 0 4px; padding: 0; counter-reset: none; }
.cm-steps li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--surface); color: var(--faint); font-weight: 700; font-size: 13px; }
.cm-steps li b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); color: var(--muted); font-size: 12px; flex: none; }
.cm-steps li.on { color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 110, 60, .55); }
.cm-steps li.on b { background: var(--accent-grad); color: #fff; }
.cm-steps li.done { color: var(--muted); }
.cm-steps li.done b { background: rgba(62, 207, 142, .2); color: var(--ok); }
.cm-nav { display: flex; justify-content: space-between; gap: 10px; padding-top: 4px; }
.cm-nav > :only-child { margin-left: auto; }
.cm-torrent-sum { display: flex; flex-direction: column; gap: 6px; }
.cm-vids { display: grid; gap: 2px; max-height: 180px; overflow-y: auto; font-size: 12px; color: var(--muted); padding: 8px 12px; border-radius: 10px; background: var(--bg-2); }
.cm-summary { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--surface); }
.cm-summary > div { display: flex; flex-direction: column; min-width: 0; }
.cm-done { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px; border-radius: 14px; background: rgba(62, 207, 142, .08); border: 1px solid rgba(62, 207, 142, .35); }
.cm-done > i { font-size: 26px; color: var(--ok); }
.cm-done > div { flex: 1; min-width: 200px; }
.cm-done p { margin: 2px 0 0; }
@media (max-width: 700px) { .cm-steps li span { display: none; } .cm-steps li { justify-content: center; } }

/* ======================================================================
   Lighter visuals (Safari on Mac/iPhone, TVs, low-memory phones — see device.js)
   Live blur (backdrop-filter) is re-rendered on every scroll frame there — dozens of poster tags
   make scrolling stutter. The backgrounds are already mostly opaque; they just get a bit more.
   ====================================================================== */
.lite *, .lite *::before, .lite *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.lite .avail-tag { background: rgba(8, 9, 12, .9); }
.lite .btn-glass { background: rgba(30, 32, 40, .82); }
.lite .so-backdrop { background: rgba(6, 7, 10, .94); }
.lite .auth-overlay.open { background: rgba(4, 5, 8, .88); }

/* ======================================================================
   TV (remote control — see tv.js): a clearly visible focus on whatever the arrows reach
   ====================================================================== */
.tv :focus { outline: none; }
.tv :is(a, button, input, select, textarea, [tabindex]):focus-visible,
.tv :is(a, button, input, select, textarea, [tabindex]):focus { outline: 3px solid #fff; outline-offset: 3px; border-radius: 10px; }
.tv .card:focus { outline: none; }
.tv .card:focus .card-poster { outline: 4px solid #fff; outline-offset: 3px; transform: scale(1.06); transition: transform .15s; }
.tv .card:focus .card-title { color: #fff; }
.tv .tp:focus { outline: none; }
.tv .tp .tp-btn:focus, .tv .tp .tp-cbtn:focus { outline: 3px solid #fff; outline-offset: 2px; background: rgba(255, 255, 255, .22); }
.tv .tp-seek:focus .tp-thumb { transform: translate(-50%, -50%) scale(1.4); }
.tv .skeleton, .tv .skeleton-line::after, .tv .skeleton-hero, .tv .skeleton-row { animation: none; }

/* ======================================================================
   Install the app (install.js): TV / preferences window, phone bar
   ====================================================================== */
.install-overlay { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; background: rgba(4, 5, 8, .82); animation: fade-in .2s; }
.install-card { width: min(520px, 100%); padding: 28px 26px 22px; border-radius: 22px; background: var(--surface, #15161d); border: 1px solid var(--border, rgba(255, 255, 255, .08)); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); text-align: center; }
.install-icon { border-radius: 18px; box-shadow: 0 10px 30px rgba(255, 79, 56, .35); }
.install-card h2 { margin: 16px 0 8px; font-size: 22px; }
.install-card p { margin: 0 0 18px; color: var(--muted, rgba(255, 255, 255, .65)); }
.install-steps { text-align: left; margin: 0 auto 8px; padding-left: 22px; max-width: 400px; display: grid; gap: 8px; }
.install-steps li { padding-left: 4px; }
.install-go { width: 100%; justify-content: center; }
.install-actions { margin-top: 10px; }
.install-later { width: 100%; justify-content: center; background: transparent; border-color: transparent; color: var(--muted, rgba(255, 255, 255, .7)); }
.tv .install-card { width: min(720px, 100%); padding: 40px 44px 30px; }
.tv .install-card h2 { font-size: 32px; }
.tv .install-card p, .tv .install-steps { font-size: 20px; }
.install-bar {
  position: fixed; left: 10px; right: 10px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 90;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 16px;
  background: var(--surface, #15161d); border: 1px solid var(--border, rgba(255, 255, 255, .08)); box-shadow: 0 12px 40px rgba(0, 0, 0, .5); animation: fade-in .25s;
}
.install-bar img { border-radius: 10px; flex: none; }
.install-bar-text { flex: 1; min-width: 0; display: grid; }
.install-bar-text span { font-size: 12.5px; color: var(--muted, rgba(255, 255, 255, .65)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.install-bar .btn { flex: none; height: 38px; }
button.pref-link { width: 100%; text-align: left; background: none; border: 0; font: inherit; cursor: pointer; }
@keyframes fade-in { from { opacity: 0; } }

/* Pre-rendered page content (search engines, and the first moment before the app starts). */
.ssr { max-width: 1100px; margin: 0 auto; padding: 90px 20px 40px; color: var(--muted, rgba(255, 255, 255, .7)); }
.ssr h1 { color: #fff; font-size: 28px; margin: 12px 0; }
.ssr h2 { color: #fff; font-size: 18px; margin: 22px 0 8px; }
.ssr img { float: right; width: 160px; height: auto; margin: 0 0 12px 16px; border-radius: 12px; }
.ssr a { color: inherit; }
.ssr-links { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; list-style: none; }
.ssr-crumbs { font-size: 13px; }

/* TV only: on-screen keyboard in the search panel (tv-keyboard.js) */
.so-keys:empty { display: none; }
.tvk { display: grid; gap: 8px; padding: 12px 16px 4px; }
.tvk-row { display: flex; gap: 8px; justify-content: center; }
.tvk-key { min-width: 54px; height: 54px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .07); color: #fff; font: inherit; font-size: 20px; font-weight: 700; cursor: pointer; display: inline-grid; place-items: center; }
.tvk-key:focus { background: #fff; color: #0a0b0f; outline: none !important; transform: scale(1.08); }
.tvk-wide { min-width: 260px; font-size: 17px; }
.tvk-go { background: linear-gradient(135deg, #ff4f38, #ff9a3d); border-color: transparent; }
.tvk-mic.on { background: #e30a17; animation: tvk-pulse 1.2s ease-in-out infinite; }
@keyframes tvk-pulse { 50% { box-shadow: 0 0 0 10px rgba(227, 10, 23, .25); } }
.tvk-status { min-height: 1.4em; text-align: center; color: rgba(255, 255, 255, .7); font-size: 16px; }

/* ======================================================================
   Admin: SEO
   ====================================================================== */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 16px; }
.serp { max-width: 600px; padding: 14px 16px; border-radius: 12px; background: #fff; color: #202124; font-family: Arial, sans-serif; }
.serp-url { font-size: 12.5px; color: #4d5156; }
.serp-title { font-size: 19px; color: #1a0dab; line-height: 1.3; margin: 3px 0; }
.serp-desc { font-size: 14px; line-height: 1.55; color: #4d5156; }
.seo-len { margin: 8px 0 14px; font-size: 12.5px; }
.seo-sub { margin: 18px 0 8px; font-size: 14px; }
.seo-ph { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.seo-ph small { opacity: .6; }
.seo-results, .seo-list { display: grid; gap: 4px; margin-top: 8px; }
.seo-result { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.seo-result:hover { background: rgba(255, 255, 255, .05); }
.seo-result img { width: 38px; border-radius: 6px; }
.seo-result span { display: grid; min-width: 0; }
.seo-result small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-media { margin-top: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255, 255, 255, .02); }
.seo-media-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.seo-media-head img { width: 46px; border-radius: 8px; }
.seo-media-head div { display: grid; }
.admin-main textarea { width: 100%; resize: vertical; font: inherit; }

/* ======================================================================
   Members: sign-in page, profiles, likes, comments, watch tracker (social.js)
   ====================================================================== */
.auth-box .auth-tabs { margin-bottom: 14px; }
.auth-more { display: inline-flex; gap: 6px; align-items: center; margin-top: 12px; font-size: 13px; color: var(--muted); }

.avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: linear-gradient(135deg, #ff4f38, #ff9a3d); }
.avatar-lg { width: 72px; height: 72px; font-size: 30px; }
.user-link { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.user-link { border-radius: 99px; padding: 2px 10px 2px 2px; margin-left: -2px; transition: background .2s; }
.user-link:hover, .user-link:focus-visible { background: rgba(255, 255, 255, .06); }
.user-link:hover b { color: #ffb35c; }
.user-link-go { font-size: 11px; color: var(--muted); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.user-link:hover .user-link-go, .user-link:focus-visible .user-link-go { opacity: 1; transform: none; }
@media (hover: none) { .user-link-go { opacity: .6; transform: none; } }

.profile-page { padding-top: 100px; padding-bottom: 60px; }
.profile-head { display: flex; align-items: center; gap: 18px; }
.profile-head h1 { margin: 0; font-size: 30px; }
.profile-head p { margin: 2px 0 0; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 24px 0; }
.pstat { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: grid; }
.pstat b { font-size: 24px; }
.pstat span { font-size: 12.5px; color: var(--muted); }
.profile-page h2 { font-size: 18px; margin: 26px 0 12px; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.mini-card { display: grid; gap: 4px; color: inherit; text-decoration: none; font-size: 13px; }
.mini-card img, .mini-noposter { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; background: var(--surface); }
.mini-noposter { display: grid; place-items: center; color: var(--muted); }
.mini-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.activity li { display: flex; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.activity-icon { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: #ff9a3d; }
.activity p { margin: 0 0 4px; }
.activity a { color: #fff; }

.votes { display: inline-flex; gap: 6px; }
.btn.vote.on, .details-actions .btn.on { background: rgba(255, 154, 61, .22); border-color: rgba(255, 154, 61, .6); color: #ffb35c; }

.comments-section { margin-top: 36px; }
.comment-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px dashed rgba(255, 154, 61, .45); margin-bottom: 16px; }
.comment-cta > i { font-size: 22px; color: #ff9a3d; }
.comment-cta > div { flex: 1; min-width: 200px; }
.comment-cta p { margin: 2px 0 0; font-size: 13px; }
.comment-form { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 18px; }
.comment-form-head { display: flex; align-items: center; gap: 8px; }
.comment-form textarea { width: 100%; resize: vertical; min-height: 80px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2, #0f1016); color: inherit; font: inherit; }
.comment-form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.comment-form-foot .btn { margin-left: auto; }
.spoiler-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.comment-list { display: grid; gap: 10px; }
.comment { padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.comment header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.comment time { margin-left: auto; font-size: 12.5px; }
.comment-ep { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .07); }
.comment-body { margin: 10px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.comment footer { display: flex; gap: 12px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.link-btn:hover { color: #fff; }
.comment-more { margin-top: 12px; }
/* spoilers: covered until tapped */
.spoiler { position: relative; }
.spoiler .comment-body.is-spoiler { filter: blur(7px); user-select: none; pointer-events: none; }
.spoiler.revealed .comment-body.is-spoiler { filter: none; user-select: text; pointer-events: auto; transition: filter .25s; }
.spoiler-cover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; background: rgba(10, 11, 15, .55); color: #ffcf8a; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.spoiler-cover:hover { background: rgba(10, 11, 15, .45); }

/* watch tracker: ticks on episodes */
.episode.watched .ep-still::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .35); pointer-events: none; }
.ep-mark { position: absolute; top: 6px; right: 6px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(10, 11, 15, .72); color: rgba(255, 255, 255, .85); cursor: pointer; }
.episode.watched .ep-mark { background: #1db954; color: #fff; }
.account-menu a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; color: inherit; text-decoration: none; border-radius: 8px; }
.account-menu a:hover { background: rgba(255, 255, 255, .06); }

/* Admin: ads */
.ad-card-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 360px); gap: 18px; align-items: start; }
.ad-preview { width: 100%; display: grid; place-items: center; border-radius: 10px; border: 1px dashed var(--border-2, rgba(255, 255, 255, .15)); overflow: hidden; background: rgba(255, 255, 255, .02); }
.ad-preview img { width: 100%; height: 100%; object-fit: contain; }
.ad-toggles { gap: 18px; margin-top: 8px; }
.ad-group { margin: 26px 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
@media (max-width: 700px) { .ad-card-body { grid-template-columns: 1fr; } }
.moderation { display: grid; gap: 10px; margin-top: 14px; }
.moderation .comment.reported { border-color: rgba(255, 180, 60, .5); }


.auth-perk { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: 13px; color: #ffcf8a; }
.premium-pill { margin-left: 8px; background: rgba(255, 213, 74, .18); color: #ffd54a; }
.video-ads { display: grid; gap: 12px; margin: 10px 0; } .video-ad { padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.02); }

/* ---------- /giris ---------- */
.login-page { max-width: 980px; margin-inline: auto; padding-top: 104px; padding-bottom: 64px; }
.login-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.login-main { padding: 40px 40px 34px; }
.login-main h1 { font-size: clamp(26px, 3vw, 32px); margin: 0 0 6px; letter-spacing: -.01em; }
.login-sub { margin: 0 0 18px; font-size: 14px; }
.login-main .auth-tabs { margin-top: 0; }
.login-main .auth-submit { height: 46px; margin-top: 4px; }
.login-side { padding: 40px 34px; background: radial-gradient(120% 90% at 100% 0%, rgba(255, 79, 56, .16), transparent 60%), radial-gradient(90% 80% at 0% 100%, rgba(255, 154, 61, .10), transparent 60%), rgba(255, 255, 255, .02); border-left: 1px solid var(--border); }
.login-side h2, .login-tiers h2 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 16px; }
.benefit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.benefit-list li { display: flex; gap: 12px; align-items: flex-start; }
.benefit-list b { display: block; font-size: 14.5px; }
.benefit-list small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 1px; }
.benefit-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 154, 61, .13); color: #ff9a3d; font-size: 14px; }
.login-done { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.login-done p { margin: 0; }
.login-tiers { margin-top: 34px; }
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tier { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.tier-name { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.tier-name em { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 3px 7px; border-radius: 6px; background: rgba(62, 207, 142, .15); color: #3ecf8e; }
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; color: var(--muted); }
.tier li { display: flex; align-items: center; gap: 9px; }
.tier li .fa-solid { width: 14px; text-align: center; font-size: 12px; }
.tier-member { border-color: rgba(255, 154, 61, .45); background: linear-gradient(180deg, rgba(255, 154, 61, .08), transparent 70%), var(--surface); }
.tier-member .tier-name span { color: #ffb35c; }
.tier-premium .tier-name span { color: #ffd54a; }
.tier-note { font-size: 12.5px; margin: 12px 2px 0; }
@media (max-width: 820px) {
  .login-page { padding-top: 80px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-main { padding: 28px 22px 24px; }
  .login-side { padding: 24px 22px; border-left: 0; border-top: 1px solid var(--border); }
  .benefit-list small { display: none; }
  .benefit-list { grid-template-columns: 1fr 1fr; gap: 12px 10px; }
  .benefit-list b { font-size: 13px; }
  .benefit-list li { align-items: center; }
  .tiers { grid-template-columns: 1fr; }
}
.auth-form .form-error:empty { display: none; }

/* ---------- Admin: one look for every form control ----------
   :where() keeps this at zero specificity, so a section's own styles (search boxes etc.) still win;
   it covers the controls that had none (password fields, SEO search / textareas …). */
:where(.admin-main) :where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=hidden]), select, textarea) {
  width: 100%; min-width: 0; height: 42px; padding: 0 13px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text);
  font: inherit; font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
:where(.admin-main) :where(textarea) { height: auto; min-height: 84px; padding: 10px 13px; line-height: 1.5; resize: vertical; }
:where(.admin-main) :where(select) { cursor: pointer; }
.admin-main :is(input, select, textarea)::placeholder { color: var(--faint); opacity: 1; letter-spacing: normal; }
.admin-main :is(input:not([type=checkbox], [type=radio]), select, textarea):focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(255, 154, 61, .15); }
.admin-main :is(.cm-search, .search-box) input:focus { box-shadow: none; }
.admin-main input[type=checkbox], .admin-main input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
.admin-main form > .btn, .admin-main .fields > .btn, .admin-main .card-panel > .btn { align-self: flex-start; }
.fields.narrow { max-width: 440px; gap: 10px; }
.setting-list { display: grid; gap: 8px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .025); border: 1px solid var(--border); cursor: pointer; }
.setting-row:hover { border-color: var(--border-2); }
.setting-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.setting-text b { font-size: 14.5px; }
.setting-text small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.setting-row > :last-child { flex: none; }
label.inline { align-items: center; cursor: pointer; }
.ad-card-body > div, .ad-card-body > div > div:not(.inline), .video-ad { display: grid; gap: 14px; align-content: start; }
.ad-card-body > div > div[hidden] { display: none; }
.video-ad .inline { align-items: center; flex-wrap: wrap; }
.admin-main .card-panel > p.muted:not(:last-child) { margin-bottom: 14px; }
.admin-main .card-panel > .btn, .admin-main .card-panel > .inline { margin-top: 4px; }
@media (max-width: 760px) { .ad-card-body { grid-template-columns: 1fr; } }
/* Admin panels: even spacing between everything inside a card, whatever the section. */
.admin-main .card-panel { display: flex; flex-direction: column; gap: 14px; }
.admin-main .card-panel > h2 { margin: 0 0 2px; }
.admin-main .card-panel > .muted, .admin-main .card-panel > p { margin: 0; }
.admin-main .card-panel > :is(.btn, a.btn, button) { align-self: flex-start; }
.admin-main .card-panel > .inline { flex-wrap: wrap; align-items: center; }
.admin-main .seo-media, .admin-main .seo-pick { display: grid; gap: 14px; }
.admin-main .seo-sub { margin: 6px 0 0; }
.admin-main .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.admin-main .seg::-webkit-scrollbar { display: none; }
.admin-main .seg a { white-space: nowrap; flex: none; }
.admin-main .grid-2 { gap: 14px 16px; }
.avail-tag.none { color: rgba(255, 255, 255, .78); font-weight: 700; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }
.avail-tag.none i { color: #ffb35c; }

/* ---------- footer + legal pages ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 26px 0 calc(28px + env(safe-area-inset-bottom)); margin-top: 20px; color: var(--muted); font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.site-footer nav a { color: var(--text); font-weight: 600; opacity: .85; }
.site-footer nav a:hover { color: var(--accent-2); opacity: 1; }
.site-footer p { margin: 0; max-width: 70ch; line-height: 1.5; }
.site-footer p a { color: inherit; text-decoration: underline; }
body.on-watch .site-footer { display: none; }
.tv .site-footer { display: none; }
@media (max-width: 760px) { .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); } }
.legal-page { max-width: 820px; margin-inline: auto; padding-top: 100px; padding-bottom: 60px; }
.legal { line-height: 1.65; font-size: 15px; }
.legal h1 { font-size: clamp(26px, 3vw, 34px); margin: 0 0 4px; letter-spacing: -.01em; }
.legal-updated { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.legal h2 { font-size: 17px; margin: 28px 0 8px; }
.legal p { margin: 0 0 12px; }
.legal ul, .legal ol { margin: 0 0 12px; padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--accent-2); }
.legal code { background: var(--surface); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.legal-nav a { padding: 7px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 700; font-size: 13px; }
.legal-nav a.on { background: var(--surface-3); color: var(--text); }
.auth-terms { font-size: 12px; margin: 0; }
.auth-terms a { color: var(--accent-2); }
@media (max-width: 760px) { .legal-page { padding-top: 80px; } }

/* ---------- "watch on" official providers (title page) ---------- */
.providers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 4px; }
.providers-label { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-right: 4px; width: 100%; }
.provider { display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 6px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); color: var(--text); text-decoration: none; transition: background .2s, transform .2s; }
.provider:hover { background: rgba(255, 255, 255, .13); transform: translateY(-1px); }
.provider img { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; }
.provider span { display: flex; flex-direction: column; line-height: 1.15; }
.provider b { font-size: 13px; }
.provider small { font-size: 11px; color: var(--muted); }
.providers-more { font-size: 11px; color: var(--muted); text-decoration: underline; margin-left: 2px; }

/* ---------- /uygulama (downloads) + header app link ---------- */
.app-link { width: auto; padding: 0 12px; gap: 8px; text-decoration: none; }
.app-link span { font-size: 13px; font-weight: 700; }
@media (max-width: 760px) { .app-link span { display: none; } .app-link { padding: 0; } }
.app-page { max-width: 900px; margin-inline: auto; padding-top: 100px; padding-bottom: 60px; }
.app-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.app-head img { border-radius: 18px; flex: none; }
.app-head h1 { margin: 0 0 4px; font-size: clamp(24px, 3vw, 32px); }
.app-head p { margin: 0; max-width: 60ch; }
.app-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.app-nav a { padding: 7px 13px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 700; color: var(--muted); }
.app-nav a:first-child { color: var(--text); border-color: rgba(62, 207, 142, .5); }
.app-cards { display: grid; gap: 14px; }
.app-card { padding: 20px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.app-card.mine { border-color: rgba(62, 207, 142, .5); box-shadow: 0 0 0 3px rgba(62, 207, 142, .08); }
.app-card header { display: flex; align-items: center; gap: 14px; }
.app-card header h2 { margin: 0; font-size: 18px; }
.app-card header p { margin: 2px 0 0; font-size: 13.5px; }
.app-card header .pill { margin-left: auto; flex: none; }
.app-card h3 { margin: 6px 0 0; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.app-card-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 13px; background: rgba(255, 154, 61, .14); color: #ff9a3d; font-size: 18px; }
.app-steps { margin: 0; padding-left: 22px; display: grid; gap: 7px; font-size: 14.5px; line-height: 1.5; }
.app-steps code { background: var(--bg-2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.app-btns { flex-wrap: wrap; align-items: center; }
.app-note { margin: 16px 2px 0; font-size: 13px; }
.install-apk { margin-top: 10px; }
.install-more { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); text-decoration: underline; }
.tv .app-page { padding-top: 60px; }

/* ---------- "Bildir" dialog + footer contact banner + live counters ---------- */
.fb-card { max-width: 560px; width: min(560px, calc(100vw - 32px)); }
.fb-form { display: flex; flex-direction: column; gap: 10px; }
.fb-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-kind { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.fb-kind.on { background: rgba(255, 79, 56, .14); border-color: rgba(255, 110, 60, .6); color: var(--text); }
.fb-hint { margin: 0; font-size: 12.5px; }
.fb-form textarea, .fb-form input { width: 100%; padding: 11px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-2); color: var(--text); font: inherit; font-size: 14.5px; resize: vertical; }
.fb-form textarea:focus, .fb-form input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(255, 154, 61, .18); }
.fb-actions { display: flex; justify-content: flex-end; gap: 8px; }
.fb-done { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 0 6px; text-align: center; }
.fb-done > i { font-size: 34px; color: #3ecf8e; }
.fb-done p { margin: 0; }
.contact-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; padding: 18px 22px; margin: 0 var(--gutter, 20px) 22px; max-width: 1400px; margin-inline: auto; border-radius: 18px; background: linear-gradient(135deg, rgba(255, 79, 56, .14), rgba(255, 154, 61, .08)); border: 1px solid rgba(255, 110, 60, .3); }
.contact-text { display: flex; flex-direction: column; gap: 2px; }
.contact-text b { color: var(--text); font-size: 16px; }
.contact-side { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.live-counters { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 99px; background: rgba(0, 0, 0, .3); border: 1px solid var(--border); font-size: 11px; line-height: 1.1; }
.live-counters .lc { display: inline-flex; flex-direction: column; align-items: center; min-width: 38px; }
.live-counters b { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; }
.live-counters small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.lc-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ecf8e; box-shadow: 0 0 0 3px rgba(62, 207, 142, .2); animation: lc-pulse 2s infinite; }
@keyframes lc-pulse { 50% { box-shadow: 0 0 0 6px rgba(62, 207, 142, .05); } }
@media (max-width: 600px) { .contact-banner { padding: 14px 16px; } .contact-side { width: 100%; } .live-counters { margin-left: auto; } }

/* /uygulama as tabs */
.app-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px 16px; scroll-snap-type: x proximity; }
.app-tabs::-webkit-scrollbar { display: none; }
.app-tab { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; scroll-snap-align: start; transition: background .2s, color .2s, border-color .2s; }
.app-tab:hover { color: var(--text); background: var(--surface-2); }
.app-tab.on { color: #fff; background: var(--accent-grad); border-color: transparent; box-shadow: 0 8px 22px rgba(255, 79, 56, .3); }
.app-tab-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ecf8e; box-shadow: 0 0 0 3px rgba(62, 207, 142, .25); }
.app-tab.on .app-tab-dot { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.app-panel { padding: 24px; border-radius: var(--radius-lg, 20px); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; animation: view-in .3s var(--ease); }
.app-panel-head { display: flex; align-items: center; gap: 14px; }
.app-panel-head h2 { margin: 0; font-size: 20px; }
.app-panel-head p { margin: 2px 0 0; font-size: 13.5px; }
.app-panel-head .pill { margin-left: auto; flex: none; }
.app-download { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px; border-radius: var(--radius, 16px); background: rgba(255, 79, 56, .08); border: 1px solid rgba(255, 110, 60, .3); }
.app-download small { font-size: 12.5px; }
.app-download small b { color: var(--text); font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.app-or { text-align: center; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.app-note-top { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm, 12px); background: rgba(255, 154, 61, .1); color: #ffcf9e; font-size: 14px; }
.tv .app-tab { height: 50px; font-size: 16px; }
@media (max-width: 600px) { .app-panel { padding: 16px; } .app-download { padding: 14px; } .app-download .btn { width: 100%; } }

.apk-log { max-height: 420px; overflow: auto; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); font: 12px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-word; margin: 0; }
/* /uygulama tabs: wrap, never a sideways scroll */
.app-tabs { flex-wrap: wrap; overflow: visible; scroll-snap-type: none; }

/* /uygulama: phone → TV transfer apps */
.transfer { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--border); }
.transfer h3 { margin: 0; }
.transfer-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.transfer-app { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 6px 12px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.transfer-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(255, 79, 56, .25), rgba(255, 154, 61, .25)); color: #ffb35c; font-size: 18px; grid-row: span 2; }
.transfer-text { display: flex; flex-direction: column; min-width: 0; }
.transfer-text b { font-size: 15px; }
.transfer-text small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.transfer-stores { display: flex; flex-wrap: wrap; gap: 8px; }
.store-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 9px; background: #000; border: 1px solid rgba(255, 255, 255, .25); color: #fff; text-decoration: none; line-height: 1.05; }
.store-badge i { font-size: 20px; }
.store-badge small { display: block; font-size: 9.5px; opacity: .8; }
.store-badge b { font-size: 13px; }
.store-badge:hover { border-color: #fff; }
