/* ==========================================================================
   Otaku World v3 — starfield background, floating sheet, community features.
   Loaded after style.css.
   ========================================================================== */
:root { --sheet: rgba(13, 18, 36, .94); --sheet-border: rgba(255, 255, 255, .07); --sheet-pad: clamp(16px, 2.4vw, 40px); }
:root[data-theme="light"] { --sheet: rgba(245, 246, 250, .97); --sheet-border: rgba(255, 255, 255, .5); }

/* The starfield is a fixed layer (much smoother to scroll than background-attachment: fixed). */
body { background: #070b18; }
body::after { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: #070b18 url("../img/starfield.jpg") center top / cover no-repeat; }
body::before { /* slow twinkle layer */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5; will-change: opacity;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 72% 12%, #cfe0ff, transparent),
    radial-gradient(1.5px 1.5px at 88% 64%, #fff, transparent), radial-gradient(1px 1px at 33% 82%, #e3d9ff, transparent),
    radial-gradient(1.5px 1.5px at 55% 40%, #fff, transparent), radial-gradient(1px 1px at 8% 58%, #fff, transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .15; } to { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { body::before, .hero-slide.active .bg { animation: none; } }

/* header always dark (sits on the starfield) */
.site-header { background: rgba(7, 11, 24, .6); border-bottom-color: rgba(255, 255, 255, .06); --text: #f1f4ff; --text-2: #c3c9e0; --muted: #8b93b3;
  --surface: rgba(255,255,255,.07); --surface-2: rgba(255,255,255,.12); --border: rgba(255,255,255,.1); color: #f1f4ff; }
.site-header .dropdown-menu { --surface: #141a2f; --surface-2: #1b2240; --border: rgba(255,255,255,.08); }
.site-header .header-search input { color: #fff; }

main { padding-block: clamp(14px, 2vw, 28px) 56px; }
.sheet { background: var(--sheet); border: 1px solid var(--sheet-border); border-radius: 24px; padding: var(--sheet-pad);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);   /* no backdrop blur: it made scrolling slow on big screens */
  max-width: 1760px; margin-inline: auto; }

/* hero + detail hero live inside the sheet now (rounded, not full-bleed) */
.hero { margin: 0 0 22px; border-radius: 18px; height: clamp(380px, 56vh, 600px); }
.hero-content { inset-inline-start: clamp(20px, 3vw, 48px); bottom: clamp(40px, 7vh, 72px); }
.hero-dots { inset-inline-end: clamp(20px, 3vw, 48px); }
.detail-hero { margin: 0 0 28px; border-radius: 18px; }
.detail-inner { padding: 36px clamp(20px, 3vw, 44px) 32px; }

/* section heading */
.section-head h2 { display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ""; width: 4px; height: 18px; border-radius: 3px; background: linear-gradient(180deg, var(--accent-text), var(--violet)); }
.pill-link { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border);
  font-size: .8rem; color: var(--text-2) !important; background: var(--surface); }
.pill-link:hover { border-color: var(--border-strong); color: var(--text) !important; }
.section-head .sub { color: var(--muted); font-size: .8rem; }

/* editor picks */
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 22px; }
.pick { position: relative; display: flex; gap: 14px; padding: 14px; border-radius: 16px; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #141a2f, #0b1020); border: 1px solid rgba(255,255,255,.06); min-height: 168px; }
.pick .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .28; filter: blur(2px); }
.pick::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--hero-dir, 90deg), rgba(11,16,32,.95) 35%, rgba(11,16,32,.5)); }
.pick > * { position: relative; z-index: 1; }
.pick img { width: 96px; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; flex: none; box-shadow: var(--shadow); }
.pick-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pick-body h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.pick-body .muted { color: rgba(255,255,255,.6); font-size: .82rem; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.1); color: #fff; }
.tag-gold { background: rgba(245,196,81,.18); color: #f5c451; }
.tag-blue { background: rgba(91,140,255,.2); color: #b4c8ff; }
.tag-imdb { background: #f5c518; color: #000; }
.tag-heart { background: rgba(248,113,113,.18); color: #fca5a5; }
.pick-more { display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at 30% 20%, rgba(91,140,255,.25), transparent 60%), linear-gradient(135deg, #1b2240, #0b1020); }
.pick-more::after { display: none; }
.pick-more strong { display: block; font-size: 1.9rem; color: #8aabff; }

/* quick category buttons + filter bar */
.quick-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.quick-cats a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.quick-cats a:hover { color: var(--text); border-color: var(--border-strong); }
.quick-cats a.primary { background: var(--accent); color: #fff; border-color: transparent; }
.quick-cats a.primary:hover { background: var(--accent-hover); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--border); margin-bottom: 30px; }
.filter-bar select, .filter-bar input[type=search] { height: 38px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-2);
  padding-inline: 14px; outline: none; color: var(--text); }
.filter-bar input[type=search] { flex: 1; min-width: 160px; }
.filter-bar .seg { padding: 2px; }
.filter-bar .seg label { padding: 5px 14px; }
.filter-bar .go { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; }
.filter-bar .go:hover { background: var(--accent-hover); }
.toggle-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 12px; border-radius: 999px; border: 1px solid var(--border);
  cursor: pointer; font-size: .86rem; color: var(--text-2); margin: 0; }
.toggle-chip input { display: none; }
.toggle-chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }

/* new-for-you mini cards */
.mini-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.mini { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.mini:hover { border-color: var(--border-strong); }
.mini img, .mini .ph { width: 44px; height: 62px; object-fit: cover; border-radius: 7px; flex: none; background: var(--surface-3); }
.mini > div { min-width: 0; }
.mini b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini small { color: var(--accent-text); font-weight: 600; }
.mini .play { margin-inline-start: auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); flex: none; }
.mini .play .icon { width: 13px; height: 13px; }

/* cards v3: bookmark + dual ratings + episode badge */
.card-link { display: block; }
.card-rates { position: absolute; top: 8px; inset-inline-end: 8px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; z-index: 2; }
.rate { font-size: .7rem; font-weight: 800; padding: 1px 6px; border-radius: 5px; line-height: 1.6; direction: ltr; }
.rate-imdb { background: #f5c518; color: #000; }
.rate-site { background: rgba(11,16,32,.82); color: #fca5a5; backdrop-filter: blur(4px); }
.card-ep { position: absolute; bottom: 8px; inset-inline-start: 8px; z-index: 2; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 6px;
  background: rgba(11,16,32,.85); color: #fff; }
.bookmark { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 3; width: 30px; height: 30px; border-radius: 8px; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(11,16,32,.7); color: #fff; backdrop-filter: blur(6px); transition: background .15s, transform .15s; }
.bookmark:hover { background: rgba(11,16,32,.92); transform: scale(1.06); }
.bookmark.is-active { background: var(--accent); }
.bookmark .icon { width: 15px; height: 15px; }
.card .card-badges { top: 44px; }
.card-sub { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* spotlight */
.spotlight { position: relative; display: grid; grid-template-columns: 1fr 200px; gap: 28px; align-items: center; border-radius: 20px; overflow: hidden;
  padding: clamp(20px, 3vw, 40px); margin-bottom: 40px; color: #fff; background: #0b1020; min-height: 280px; }
.spotlight .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; }
.spotlight::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--hero-dir, 90deg), rgba(11,16,32,.96) 30%, rgba(11,16,32,.55)); }
.spotlight > * { position: relative; z-index: 1; }
.spotlight h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2.3rem); }
.spotlight p { color: rgba(255,255,255,.78); max-width: 680px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.spotlight img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow-lg); }
.spotlight .close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer; font-size: 1rem; }

/* trailers */
.trailer-card { display: block; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); cursor: pointer;
  text-align: start; padding: 0; width: 100%; color: var(--text); }
.trailer-card .thumb { position: relative; aspect-ratio: 16/9; background: var(--surface-3) center/cover; }
.trailer-card .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.5), transparent 60%); }
.trailer-card .playbtn { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.92); color: #0b1020;
  display: grid; place-items: center; z-index: 1; transition: transform .2s; }
.trailer-card:hover .playbtn { transform: scale(1.08); }
.trailer-card .tlabel { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 1; font-size: .72rem; font-weight: 700; background: rgba(11,16,32,.8);
  color: #fff; padding: 2px 8px; border-radius: 6px; }
.trailer-card .info { padding: 10px 12px; }
.trailer-card b { display: block; font-size: .92rem; }
.trailer-card small { color: var(--muted); }
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: rgba(3,5,12,.85); padding: 16px; backdrop-filter: blur(6px); }
.modal.open { display: grid; }
.modal-box { width: min(1000px, 100%); aspect-ratio: 16/9; background: #000; border-radius: 14px; position: relative; }
.modal-box iframe, .modal-box video { width: 100%; height: 100%; border: 0; border-radius: 14px; }
.modal-close { position: absolute; top: -46px; inset-inline-end: 0; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15);
  color: #fff; cursor: pointer; font-size: 1.1rem; }

/* collections + genres */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tile { position: relative; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; min-height: 92px;
  display: flex; flex-direction: column; justify-content: flex-end; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.tile .cover { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .3; }
.tile > *:not(.cover) { position: relative; }
.tile b { font-size: 1rem; }
.tile small { font-size: .7rem; letter-spacing: .12em; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.genre-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); text-align: center; transition: border-color .15s, transform .15s; }
.genre-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.genre-tile .emoji { font-size: 1.6rem; line-height: 1; }
.genre-tile b { font-size: .92rem; }
.genre-tile small { color: var(--muted); font-size: .75rem; }

/* archive stats */
.archive { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.archive h3 { grid-column: 1 / -1; margin: 0 0 4px; text-align: center; font-size: 1rem; }
.archive .box { padding: 18px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); text-align: center; }
.archive .big { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.archive .box.dub .big { color: var(--gold); }
.archive .label { color: var(--text-2); font-weight: 600; }
.archive .meta { color: var(--muted); font-size: .8rem; margin-top: 6px; }
.archive .foot { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: .85rem; }
.archive .foot b { color: var(--text); }

/* notifications */
.bell { position: relative; }
.bell .count { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 17px; height: 17px; border-radius: 999px; background: #ef4444; color: #fff;
  font-size: .65rem; font-weight: 800; display: grid; place-items: center; padding-inline: 4px; border: 2px solid #0b1020; }
.notif-menu { width: min(360px, 92vw); padding: 0 !important; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.notif-head b { color: var(--text); }
.notif-head button { width: auto !important; padding: 4px 8px !important; color: var(--accent-text) !important; font-size: .82rem; }
.notif-list { max-height: 380px; overflow-y: auto; }
.dropdown-menu .notif { display: flex; gap: 10px; padding: 12px 14px; border-radius: 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.notif .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; flex: none; font-size: 1rem; }
.notif b { display: block; color: var(--text); font-size: .88rem; line-height: 1.4; }
.notif p { margin: 2px 0 0; font-size: .8rem; color: var(--muted); line-height: 1.5; }
.notif time { font-size: .72rem; color: var(--muted); }
.notif.unread { background: rgba(91,140,255,.12); }
.notif-foot { display: block !important; text-align: center !important; padding: 10px !important; color: #8aabff !important; font-weight: 600; font-size: .88rem; }
.notif-page .notif { display: flex; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 8px; }

/* user panel layout */
.panel-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.panel-side { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.panel-side .who { text-align: center; padding: 22px 16px 16px; border-bottom: 1px solid var(--border); }
.panel-side .who .avatar { margin: 0 auto 8px; }
.panel-side .who b { display: block; font-size: 1.05rem; }
.panel-side .who .status { font-size: .82rem; color: var(--muted); }
.panel-side .who .status.vip { color: var(--gold); font-weight: 700; }
.panel-nav { padding: 8px; display: grid; gap: 2px; }
.panel-nav a, .panel-nav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); border: 0; background: none;
  width: 100%; cursor: pointer; font-size: .92rem; text-align: start; }
.panel-nav a:hover, .panel-nav button:hover { background: var(--surface-2); color: var(--text); }
.panel-nav a.active { background: var(--accent); color: #fff; }
.panel-nav .emoji { width: 22px; text-align: center; }
.panel-nav hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }
.panel-nav .badge-n { margin-inline-start: auto; background: #ef4444; color: #fff; font-size: .7rem; font-weight: 800; padding: 0 7px; border-radius: 999px; }
.welcome { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  margin-bottom: 18px; position: relative; overflow: hidden; }
.welcome::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--violet)); }
.welcome.vip { border-color: rgba(245,196,81,.35); }
.welcome.vip::before { background: linear-gradient(90deg, #f5c451, #f59e0b); }
.welcome h1 { margin: 0; font-size: 1.4rem; }
.welcome .hi { color: var(--muted); font-size: .88rem; }
.welcome .sub-info { margin-inline-start: auto; text-align: end; }
.welcome .sub-info b { font-size: 1.6rem; display: block; line-height: 1.1; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 24px; }
.quick { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); position: relative; }
.quick:hover { border-color: var(--border-strong); }
.quick .emoji { font-size: 1.3rem; }
.quick b { font-size: .98rem; }
.quick small { color: var(--muted); font-size: .8rem; }
.quick::after { content: "›"; position: absolute; top: 12px; inset-inline-end: 14px; color: var(--muted); font-size: 1.2rem; }
[dir="rtl"] .quick::after { content: "‹"; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 11px 10px; border-bottom: 1px solid var(--border); text-align: start; font-size: .9rem; }
.table th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.status-pill { font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.st-paid, .st-answered { background: rgba(52,211,153,.15); color: var(--success); }
.st-pending, .st-open { background: rgba(251,191,36,.15); color: var(--warning); }
.st-failed, .st-closed { background: rgba(148,163,184,.15); color: var(--muted); }
.msg { padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 10px; }
.msg.staff { background: var(--accent-soft); border-color: rgba(91,140,255,.3); }
.msg .meta { font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.msg p { margin: 0; white-space: pre-wrap; }

/* public profile + badges */
.profile-card { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 14px; }
.profile-card h1 { margin: 0; font-size: 1.5rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-card .since { color: var(--muted); font-size: .86rem; }
.pstats { display: flex; gap: 6px; margin-inline-start: auto; flex-wrap: wrap; align-items: center; }
.pstat { text-align: center; padding: 8px 16px; border-inline-start: 1px solid var(--border); }
.pstat:first-child { border: 0; }
.pstat b { display: block; font-size: 1.35rem; }
.pstat small { color: var(--muted); font-size: .78rem; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.bdg { padding: 16px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); text-align: center; }
.bdg .emoji { font-size: 1.8rem; line-height: 1; filter: grayscale(1); opacity: .5; }
.bdg.t1 .emoji, .bdg.t2 .emoji, .bdg.t3 .emoji { filter: none; opacity: 1; }
.bdg.t1 { border-color: rgba(205,127,50,.5); } .bdg.t1 .lvl { color: #e0a36b; }
.bdg.t2 { border-color: rgba(192,200,215,.55); } .bdg.t2 .lvl { color: #94a3b8; }
.bdg.t3 { border-color: rgba(245,196,81,.6); box-shadow: 0 0 24px rgba(245,196,81,.12); } .bdg.t3 .lvl { color: var(--gold); }
.bdg b { display: block; margin-top: 8px; font-size: .92rem; }
.bdg .lvl { font-size: .78rem; font-weight: 700; }
.bdg small { display: block; color: var(--muted); font-size: .74rem; margin-top: 4px; }
.meter { height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--success); border-radius: 999px; }
.bdg.next { border-style: dashed; }

/* lists */
.list-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.list-card { padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: flex; gap: 14px; align-items: center; }
.list-card:hover { border-color: var(--border-strong); }
.list-card .covers { display: flex; flex: none; }
.list-card .covers img, .list-card .covers span { width: 40px; height: 58px; object-fit: cover; border-radius: 6px; border: 2px solid var(--surface); background: var(--surface-3); display: block; }
.list-card .covers > * + * { margin-inline-start: -14px; }
.list-card b { display: block; }
.list-card small { color: var(--muted); }
.list-menu { min-width: 250px; }
.list-menu label { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; border-radius: 8px; color: var(--text-2); margin: 0; }
.list-menu label:hover { background: var(--surface-2); }
.list-menu input[type=checkbox] { accent-color: var(--accent); }
.list-menu form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--border); margin-top: 4px; }
.list-menu form input { flex: 1; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); padding-inline: 10px; min-width: 0; color: var(--text); }
.detail-hero .list-menu { color: var(--text); }

/* footer v3 (always dark, on the starfield) */
.site-footer { background: rgba(7, 11, 24, .85); backdrop-filter: blur(10px); border-top-color: rgba(255,255,255,.06); color: #8b93b3; margin-top: 8px; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 24px; padding-block: 12px 24px; }
.footer-grid h4 { margin: 0 0 12px; color: #f1f4ff; font-size: .95rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-brand .logo { margin-bottom: 10px; }
.footer-brand .logo-text { color: #f1f4ff; }
.footer-brand p { margin: 0; max-width: 340px; line-height: 1.8; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.06); padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; }

@media (max-width: 1024px) {
  .panel-layout { grid-template-columns: 1fr; }
  .panel-side { position: static; }
  .panel-nav { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .spotlight { grid-template-columns: 1fr; }
  .spotlight img { display: none; }
}
@media (max-width: 720px) {
  .sheet { border-radius: 18px; padding: 12px; }
  .container { padding-inline: 8px; }
  .hero { height: 66vh; min-height: 420px; border-radius: 14px; }
  .archive { grid-template-columns: 1fr; }
  .pstats { margin-inline-start: 0; width: 100%; justify-content: space-between; }
  .pstat { padding: 6px 8px; }
  .filter-bar .seg, .filter-bar select { flex: 1; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
}

/* ---------------------------------------------------------------- logo + about (v4) */
.logo-img { height: 40px; width: auto; display: block; }
.logo-img.lg { height: 64px; }
@media (max-width: 720px) { .logo-img { height: 34px; } }

.about { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface); margin-top: 8px; }
.about-brand { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px 20px;
  background: radial-gradient(circle at 30% 25%, rgba(91,140,255,.22), transparent 60%), radial-gradient(circle at 80% 85%, rgba(139,124,246,.2), transparent 55%), #0b1020;
  color: #fff; }
.about-brand img { width: min(240px, 80%); height: auto; }
.about-tag { font-size: .75rem; font-weight: 700; letter-spacing: .14em; color: #8aabff; text-transform: uppercase; }
.about-text { padding: clamp(20px, 3vw, 40px); }
.about-text h2 { margin: 0 0 14px; font-size: 1.35rem; }
.about-text p { margin: 0 0 14px; color: var(--text-2); line-height: 2; }
.about-sign { color: var(--accent-text); font-weight: 700; margin-top: 6px; }
.badge-free { background: rgba(11, 16, 32, .78) !important; color: #6ee7b7; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about-brand { padding: 24px; } }

/* ---------------------------------------------------------------- header brand (v5) */
.logo { gap: 11px; }
.logo-o { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, #8b5cf6, #5b3cd6); box-shadow: 0 6px 18px rgba(124, 92, 246, .35), inset 0 0 0 1px rgba(255,255,255,.12); }
.logo-o img { width: 24px; height: auto; }
.logo-words { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.logo-words b { font-size: 1.12rem; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.logo-words small { font-size: .7rem; color: #a9b1d6; font-weight: 500; white-space: nowrap; }
@media (max-width: 1280px) { .logo-words small { display: none; } }
@media (max-width: 380px) { .logo-words b { font-size: 1rem; } .logo-o { width: 38px; height: 38px; } }

/* ---------------------------------------------------------------- live search (v5) */
.header-search { position: relative; }
.suggest { position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 70; background: #141a2f; border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; box-shadow: 0 18px 48px rgba(0,0,0,.55); padding: 6px; max-height: min(70vh, 520px); overflow-y: auto; color: #f1f4ff; }
.suggest .note { padding: 8px 10px 4px; font-size: .8rem; color: #fbbf24; }
.suggest .empty-note { padding: 14px 10px; font-size: .88rem; color: #8b93b3; text-align: center; }
.suggest a.item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: #f1f4ff; }
.suggest a.item:hover, .suggest a.item.active { background: rgba(255,255,255,.08); }
.suggest a.item img, .suggest a.item .ph { width: 36px; height: 52px; object-fit: cover; border-radius: 6px; flex: none; background: #232b4d; }
.suggest a.item b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest a.item small { color: #8b93b3; font-size: .76rem; }
.suggest a.item .imdb { margin-inline-start: auto; background: #f5c518; color: #000; font-size: .7rem; font-weight: 800; padding: 1px 6px; border-radius: 4px; direction: ltr; }
.suggest a.all { display: block; text-align: center; padding: 9px; margin-top: 4px; border-top: 1px solid rgba(255,255,255,.08); color: #8aabff; font-weight: 600; font-size: .86rem; }
.search-toggle { display: none; }
@media (max-width: 720px) {
  .search-toggle { display: grid; }
  .header-search.open { display: block; position: absolute; top: 100%; inset-inline: 0; max-width: none; margin: 0; padding: 10px 12px;
    background: rgba(7, 11, 24, .97); border-bottom: 1px solid rgba(255,255,255,.08); }
  .header-search.open .icon { inset-inline-start: 26px; }
  .header-search.open input { font-size: 16px; height: 44px; }
  .header-search.open .suggest { inset-inline: 12px; }
}

/* ---------------------------------------------------------------- browse filters (v5) */
.fpanel { position: relative; border-radius: 20px; padding: 18px; margin-bottom: 22px; overflow: hidden;
  background: radial-gradient(circle at 0% 0%, rgba(91,140,255,.16), transparent 45%), radial-gradient(circle at 100% 100%, rgba(139,124,246,.14), transparent 45%), var(--surface);
  border: 1px solid var(--border); display: grid; gap: 14px; }
.fpanel-search { display: flex; gap: 8px; flex-wrap: wrap; }
.fsearch { position: relative; flex: 1 1 280px; }
.fsearch .icon { position: absolute; top: 50%; inset-inline-start: 16px; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.fsearch input { width: 100%; height: 50px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text);
  padding-inline: 46px 16px; font-size: 1rem; outline: none; transition: border-color .15s, box-shadow .15s; }
.fsearch input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.fpanel-search select { height: 50px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); padding-inline: 14px; outline: none; }
.fpanel-search .btn { height: 50px; border-radius: 14px; padding-inline: 26px; }
.frow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.flabel { font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.flabel:not(:first-child) { margin-inline-start: 10px; padding-inline-start: 14px; border-inline-start: 1px solid var(--border); }
.fseg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.fseg a { padding: 6px 14px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.fseg a:hover { color: var(--text); }
.fseg a.on { background: var(--accent); color: #fff; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { padding: 6px 13px; border-radius: 999px; font-size: .84rem; font-weight: 600; color: var(--text-2); border: 1px solid var(--border); background: var(--bg-2);
  transition: border-color .15s, color .15s, background .15s; }
.fchip:hover { border-color: var(--border-strong); color: var(--text); }
.fchip.on { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.fgenres { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.fgenres::-webkit-scrollbar { display: none; }
.fgenre { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 12px; font-size: .88rem; font-weight: 600;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2); transition: transform .15s, border-color .15s; }
.fgenre span { font-size: 1.05rem; }
.fgenre:hover { transform: translateY(-1px); border-color: var(--border-strong); color: var(--text); }
.fgenre.on { background: linear-gradient(135deg, var(--accent), #6d5ce8); border-color: transparent; color: #fff; }
.factive { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 12px; border-top: 1px dashed var(--border); }
.ftag { padding: 4px 11px; border-radius: 8px; font-size: .8rem; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); }
.ftag:hover { background: rgba(248,113,113,.15); color: var(--danger); }
.fclear { font-size: .8rem; color: var(--muted); margin-inline-start: 4px; text-decoration: underline; text-underline-offset: 3px; }
.add-home { display: flex; gap: 6px; }
.add-home .input { height: 34px; width: 170px; }
.fuzzy-note { padding: 12px 16px; border-radius: 12px; background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.3); color: var(--text-2); margin-bottom: 16px; font-size: .92rem; }
@media (max-width: 720px) {
  .fpanel { padding: 12px; border-radius: 16px; }
  .fpanel-search select { flex: 1; }
  .fpanel-search .btn { flex: none; }
  .flabel { width: 100%; margin: 0 !important; padding: 0 !important; border: 0 !important; }
  .fchips, .fseg { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; scrollbar-width: none; }
  .add-home { width: 100%; } .add-home .input { flex: 1; width: auto; }
}

/* ---------------------------------------------------------------- anime page (v5) */
.score-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.score-strip .sc { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(6px); }
.score-strip .sc b { font-size: 1.05rem; font-weight: 800; }
.score-strip .sc small { font-size: .74rem; color: rgba(255,255,255,.6); }
.score-strip .heart { color: #fca5a5; font-size: 1rem; }
.score-strip .imdb-logo { font-size: .7rem; padding: 1px 5px; }
.rating-stars.mini { gap: 0; }
.rating-stars.mini button { font-size: 1rem; padding: 1px; color: rgba(255,255,255,.25); }
.rating-stars.mini button.on, .rating-stars.mini:hover button { color: var(--gold); }
.rating-stars.mini button:hover ~ button { color: rgba(255,255,255,.25); }
.rate-mini .mine { font-size: .9rem !important; color: var(--gold); min-width: 14px; }
.btn.icon-only { padding-inline: 12px; gap: 6px; }
.detail-actions { align-items: center; }
.detail-actions .react { display: inline-flex; gap: 6px; }

.tabs.big { margin-bottom: 18px; }
.tabs.big button { font-size: .95rem; padding: 12px 16px; }
.vswitch { margin-bottom: 14px; }
.fseg button { border: 0; background: none; cursor: pointer; padding: 6px 14px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.fseg button small { opacity: .7; margin-inline-start: 4px; }
.fseg button.active { background: var(--accent); color: #fff; }

.dl-list { display: grid; gap: 8px; }
.dl-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border);
  flex-wrap: wrap; transition: border-color .15s; }
.dl-row:hover { border-color: var(--border-strong); }
.dl-ep { display: flex; align-items: center; gap: 10px; min-width: 170px; flex: 1 1 170px; }
.dl-ep b { display: block; font-size: .9rem; }
.dl-ep small { color: var(--muted); font-size: .76rem; }
.dl-files { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.qbtn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 10px; font-size: .8rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); transition: background .15s, border-color .15s, transform .15s; }
.qbtn .icon { width: 14px; height: 14px; color: var(--accent-text); }
.qbtn small { color: var(--muted); font-weight: 500; }
.qbtn:hover { border-color: var(--accent); transform: translateY(-1px); }
.qbtn.q1080, .qbtn.q2160 { border-color: rgba(91,140,255,.45); }
.qbtn.sub { color: var(--text-2); }
.qbtn.soft { color: var(--accent-text); border-style: dashed; background: transparent; }
.dl-row.locked .ep-num { background: var(--surface-3); color: var(--muted); }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0; }
.facts div { padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.facts dt { font-size: .76rem; color: var(--muted); margin-bottom: 2px; }
.facts dd { margin: 0; font-weight: 600; }
@media (max-width: 720px) {
  .dl-files { justify-content: flex-start; width: 100%; }
  .score-strip .sc { padding: 5px 10px; }
  .detail-actions .btn { height: 40px; }
}

/* ---------------------------------------------------------------- responsive fixes (v5) */
.hero .bg-m { display: none; }
.fchip, .fseg a, .fgenre { white-space: nowrap; }
.fmore { display: grid; gap: 14px; }
.ftoggle { display: none; }
@media (max-width: 720px) {
  .hero .bg:not(.bg-m) { display: none; }
  .hero .bg-m { display: block; background-position: center 20%; }
  .ftoggle { display: inline-flex; height: 50px; border-radius: 14px; }
  .fpanel:not(.open) .fmore { display: none; }
}
/* phones: comfortable tap targets, no iOS zoom on inputs */
@media (max-width: 720px) {
  input, select, textarea { font-size: 16px !important; }
  .icon-btn { width: 40px; height: 40px; }
}
/* use the dynamic viewport height on mobile browsers (iOS address bar) */
@supports (height: 100dvh) {
  @media (max-width: 720px) { .hero { height: 66dvh; } }
}
/* respect notches / home indicator */
.site-header .header-inner { padding-inline: max(clamp(16px, 3.5vw, 64px), env(safe-area-inset-left)); }
@media (hover: none) { .card-play { display: none; } }
@media (max-width: 720px) {
  .hero-slide::after { background: linear-gradient(0deg, rgba(11,16,32,.98) 8%, rgba(11,16,32,.72) 42%, rgba(11,16,32,.08) 78%, rgba(11,16,32,.25) 100%); }
  .hero .bg-m { background-position: center top; }
  .hero-content { inset-inline: 18px; max-width: none; }
}
/* locked player: let the message grow instead of overflowing on phones */
.player-wrap:has(> .player-locked) { aspect-ratio: auto; min-height: clamp(260px, 56.25vw, 640px); }
.player-locked { position: absolute; }
@media (max-width: 720px) { .player-locked h2 { font-size: 1.15rem; } .player-locked p { font-size: .9rem; } .player-locked .icon { width: 38px; height: 38px; } }

/* ---------------------------------------------------------------- anime page v6 (download-page layout) */
.ad-hero { position: relative; border-radius: 20px; overflow: hidden; margin-bottom: 30px; color: #fff; background: #0b1020; }
.ad-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center 25%; opacity: .45; filter: blur(1px); transform: scale(1.04); }
.ad-hero::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(var(--hero-dir, 90deg), rgba(11,16,32,.97) 0%, rgba(11,16,32,.86) 45%, rgba(11,16,32,.55) 100%), linear-gradient(0deg, rgba(11,16,32,.95), transparent 45%); }
.ad-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 34px; padding: clamp(20px, 3vw, 40px); align-items: start; }
.ad-poster { border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.6); aspect-ratio: 2/3; background: rgba(255,255,255,.06); }
.ad-poster img { width: 100%; height: 100%; object-fit: cover; }
.ad-info h1 { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.7rem); line-height: 1.2; font-weight: 800; }
.ad-info h1 .yr { font-weight: 400; opacity: .6; font-size: .75em; }
.ad-alt { color: rgba(255,255,255,.6); margin: 6px 0 16px; font-size: 1.02rem; }
.ad-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ad-badges > span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px; font-size: .8rem; font-weight: 700;
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.08); }
.ad-badges small { opacity: .75; font-weight: 600; }
.ad-badges .bdg-site { background: rgba(239, 68, 68, .9); border-color: transparent; }
.ad-badges .bdg-imdb { background: #f5c518; color: #000; border-color: transparent; }
.ad-badges .bdg-age { background: rgba(245, 196, 81, .18); color: #f5c451; border-color: rgba(245,196,81,.35); }
.ad-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ad-genres a { padding: 5px 14px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: .86rem; font-weight: 600; }
.ad-genres a:hover { background: rgba(255,255,255,.22); }
.ad-desc { color: rgba(255,255,255,.85); line-height: 2; margin: 0 0 12px; max-width: 900px; }
.ad-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; color: rgba(255,255,255,.6); font-size: .88rem; margin-bottom: 18px; }
.ad-meta b { color: #fff; font-weight: 600; border-bottom: 1px dashed rgba(255,255,255,.35); }
.ad-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.btn-lg { height: 52px; padding-inline: 22px; border-radius: 14px; font-size: .98rem; }
.btn-light { background: #fff; color: #0b1020; border-color: transparent; }
.btn-light:hover { background: #e8ecf8; color: #0b1020; }
.btn-light .icon { color: #3b6ef5; }
.btn-light.is-active { background: var(--accent) !important; color: #fff !important; }
.btn-light.is-active .icon { color: #fff; }
.ad-hero .btn-primary.btn-lg { padding-inline: 28px; box-shadow: 0 10px 28px rgba(59,110,245,.4); }
.ad-rate { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 16px; border-radius: 999px; background: #fff; color: #0b1020; }
.ad-rate > span:first-child { font-weight: 700; font-size: .9rem; }
.ad-rate .rating-stars button { color: #cbd2e4; font-size: 1.2rem; }
.ad-rate .rating-stars button.on, .ad-rate .rating-stars:hover button { color: #f5b301; }
.ad-rate .rating-stars button:hover ~ button { color: #cbd2e4; }
.ad-rate b[data-my-score] { color: #b7791f; min-width: 12px; }
.ad-rate .react { display: inline-flex; gap: 6px; padding-inline-start: 10px; border-inline-start: 1px solid #e3e7f1; }
.ad-rate .vote-btn { background: #f3f5fb; border-color: #e3e7f1; color: #4b5563; }
.ad-hero .list-menu { color: var(--text); }

.ad-note { padding: 14px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 12px; color: var(--text-2); }
.ad-note b { color: var(--text); margin-inline-end: 6px; }
.ad-help { color: var(--muted); font-size: .9rem; margin: 0 0 16px; line-height: 1.9; }
.ad-help a { color: var(--accent-text); font-weight: 600; }

.dlc { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); margin-bottom: 18px; }
.dlc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px;
  background: linear-gradient(90deg, rgba(91,140,255,.14), rgba(139,124,246,.08)); border-bottom: 1px solid var(--border); }
.dlc-title { display: block; font-size: 1.05rem; color: var(--accent-text); }
.dlc-head small { color: var(--muted); }
.dlc-q { display: inline-flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.dlc-q button { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: .84rem; padding: 6px 14px; border-radius: 999px; cursor: pointer; direction: ltr; }
.dlc-q button.on { background: var(--accent); color: #fff; }
.dlr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 20px; border-top: 1px solid var(--border); }
.dlc-head + .dlr { border-top: 0; }
.dlr:hover { background: rgba(255,255,255,.02); }
.dlr-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dlr-name b { display: block; font-size: .95rem; }
.dlr-name small { color: var(--muted); font-size: .8rem; }
.dlr.locked .ep-num { background: var(--surface-3); color: var(--muted); }
.dlr-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ab { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 14px; border-radius: 999px; font-size: .84rem; font-weight: 700;
  border: 1px solid transparent; transition: transform .15s, filter .15s; white-space: nowrap; }
.ab[hidden] { display: none !important; }
.ab:hover { transform: translateY(-1px); filter: brightness(1.08); }
.ab .icon { width: 15px; height: 15px; }
.ab small { font-weight: 500; opacity: .8; }
.ab-sub { background: rgba(91,140,255,.1); border-color: rgba(91,140,255,.35); color: var(--accent-text); }
.ab-watch { background: #7c5cff; color: #fff; }
.ab-dl { background: var(--accent); color: #fff; }
.ab-alt { background: transparent; border-color: var(--border-strong); color: var(--text-2); }
.ab-soft { background: transparent; border: 1px dashed var(--border-strong); color: var(--accent-text); }
.ab-none { color: var(--muted); font-weight: 500; }

.ad-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-tags a { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .86rem; color: var(--text-2); }
.ad-tags a:hover { border-color: var(--accent); color: var(--text); }

@media (max-width: 900px) {
  .ad-inner { grid-template-columns: 1fr; }
  .ad-poster { width: 160px; }
}
@media (max-width: 720px) {
  .ad-inner { padding: 18px; gap: 18px; }
  .ad-poster { width: 130px; }
  .ad-actions .btn-lg { height: 46px; padding-inline: 16px; font-size: .9rem; flex: 1 1 auto; }
  .ad-rate { border-radius: 16px; width: 100%; }
  .dlr { padding: 12px 14px; }
  .dlr-actions { width: 100%; }
}

/* ---------------------------------------------------------------- downloads v7 (versions + subtitle chips + seasons) */
.vrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 18px; border-top: 1px solid var(--border); }
.vrow-name { display: flex; align-items: baseline; gap: 10px; }
.vrow-name b { font-size: .95rem; }
.vrow-name small { color: var(--muted); font-size: .8rem; }
.subs-row { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.subs-row[hidden] { display: none; }
.subchip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; border: 1px solid; }
.subchip .icon { width: 14px; height: 14px; }
.sub-fa { color: #8aabff; border-color: rgba(91,140,255,.45); background: rgba(91,140,255,.1); }
.sub-en { color: #f5c451; border-color: rgba(245,196,81,.45); background: rgba(245,196,81,.1); }
.sub-ja { color: #f9a8d4; border-color: rgba(249,168,212,.45); background: rgba(249,168,212,.1); }
.sub-zh { color: #fca5a5; border-color: rgba(252,165,165,.45); background: rgba(252,165,165,.1); }
.sub-ar { color: #6ee7b7; border-color: rgba(110,231,183,.45); background: rgba(110,231,183,.1); }
.subchip:hover { filter: brightness(1.15); }
.ab-sub.is-open { background: var(--accent); color: #fff; border-color: transparent; }
.ab-dl-dub { background: #10b981; }

.mcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.mcard { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.mcard-head { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.mcard-head b { display: block; font-size: 1.05rem; }
.mcard-head small { color: var(--muted); }
.mcard.dub { border-color: rgba(16,185,129,.35); }
.mcard.dub .mcard-head { background: rgba(16,185,129,.1); }
.mcard.dub .mcard-head b { color: #34d399; }
.mcard.orig { border-color: rgba(91,140,255,.35); }
.mcard.orig .mcard-head { background: rgba(91,140,255,.1); }
.mcard.orig .mcard-head b { color: var(--accent-text); }
.mcard-head + .vrow { border-top: 0; }

.season-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.season-tabs button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 18px; border-radius: 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.season-tabs button small { color: var(--muted); font-size: .76rem; }
.season-tabs button.active { background: var(--accent); border-color: transparent; color: #fff; }
.season-tabs button.active small { color: rgba(255,255,255,.8); }
.season-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .88rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.tool-btn:hover { border-color: var(--border-strong); }
.tool-btn.is-active { border-color: #10b981; color: #34d399; }
.tool-hint { color: var(--muted); font-size: .82rem; }

.epbox { border-radius: 16px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 10px; overflow: hidden; }
.epbox summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; user-select: none; }
.epbox summary::-webkit-details-marker { display: none; }
.epbox .ep-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epbox .ep-tags { display: inline-flex; gap: 5px; }
.epbox .ep-tags span { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid; }
.t-dub { color: #34d399; border-color: rgba(16,185,129,.45); background: rgba(16,185,129,.1); }
.t-sub { color: #8aabff; border-color: rgba(91,140,255,.45); background: rgba(91,140,255,.1); }
.t-free { color: #f5c451; border-color: rgba(245,196,81,.45); background: rgba(245,196,81,.1); }
.wcircle { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border-strong); background: transparent; color: transparent;
  display: grid; place-items: center; cursor: pointer; flex: none; transition: background .15s, border-color .15s; }
.wcircle .icon { width: 16px; height: 16px; }
.wcircle:hover { border-color: #10b981; }
.wcircle.on { background: #10b981; border-color: #10b981; color: #fff; }
.epbox .chev { color: var(--muted); transition: transform .2s; flex: none; }
[dir="rtl"] .epbox .chev { transform: rotate(180deg); }
.epbox[open] .chev { transform: rotate(90deg); }
.epbox.done summary .ep-title b { color: var(--muted); }
.vhead { display: flex; align-items: center; gap: 8px; padding: 10px 18px; font-weight: 700; font-size: .9rem; border-top: 1px solid var(--border); }
.vhead small { font-weight: 500; color: var(--muted); }
.vhead.dub { background: rgba(16,185,129,.1); color: #34d399; }
.vhead.orig { background: rgba(91,140,255,.1); color: var(--accent-text); }
.vhead + .vrow { border-top: 0; }

.toast { position: fixed; z-index: 200; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #141a2f; color: #fff; border: 1px solid rgba(255,255,255,.12); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg);
  transition: opacity .2s, transform .2s; font-size: .9rem; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 720px) {
  .vrow { padding: 12px 14px; }
  .vrow .dlr-actions { width: 100%; }
  .epbox summary { padding: 12px 14px; flex-wrap: wrap; }
  .epbox .ep-title { flex-basis: calc(100% - 90px); }
  .tool-hint { display: none; }
}

/* ---------------------------------------------------------------- card hover preview (v8) */
.card-hover { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 12px;
  background: linear-gradient(0deg, rgba(8,11,24,.97) 0%, rgba(8,11,24,.9) 55%, rgba(8,11,24,.55) 100%);
  backdrop-filter: blur(2px); opacity: 0; transform: translateY(8px); transition: opacity .22s ease, transform .22s ease; pointer-events: none; color: #fff; }
.card:hover .card-hover, .card-link:focus-visible .card-hover { opacity: 1; transform: none; }
.card:hover .card-rates, .card:hover .card-ep, .card:hover .card-ver { opacity: 0; }
.card-rates, .card-ep, .card-ver { transition: opacity .2s; }
.ch-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ch-tags span { font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.v-dub { background: rgba(16,185,129,.9); color: #fff; }
.v-sub { background: rgba(59,110,245,.9); color: #fff; }
.ch-title { font-size: .88rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-meta { font-size: .7rem; color: rgba(255,255,255,.65); }
.ch-desc { margin: 0; font-size: .72rem; line-height: 1.75; color: rgba(255,255,255,.82);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ch-go { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; padding: 5px 12px; border-radius: 999px;
  background: #fff; color: #0b1020; font-size: .74rem; font-weight: 800; }
.ch-go .icon { width: 11px; height: 11px; }
.card-hover ~ .card-play, .card .card-play { display: none; }
/* small permanent version tags, mainly for touch screens */
.card-ver { position: absolute; z-index: 1; bottom: 8px; inset-inline-end: 8px; display: flex; gap: 3px; }
.card-ver i { font-style: normal; font-size: .62rem; font-weight: 800; padding: 1px 6px; border-radius: 5px; }
@media (hover: hover) { .card-ver { display: none; } }
@media (hover: none) { .card-hover { display: none; } }
/* wide (episode) cards keep their own layout */
.ep-card .card-hover { display: none; }

.card-hover { padding-top: 46px; }            /* keep clear of the bookmark button */
.ch-desc { -webkit-line-clamp: 3; }

/* ---------------------------------------------------------------- security question (captcha) */
.captcha-box { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.captcha-img { border-radius: 12px; border: 1px solid var(--border-strong); display: block; max-width: calc(100% - 56px); height: auto; user-select: none; }
.captcha-refresh { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); cursor: pointer; font-size: 1.1rem; flex: none; }
.captcha-refresh:hover { border-color: var(--accent); }
.captcha-input { text-align: center; font-size: 1.15rem !important; font-weight: 700; letter-spacing: .1em; }

/* ---------------------------------------------------------------- header auth + footer v9 */
.auth-btns { display: inline-flex; align-items: center; gap: 2px; height: 36px; padding-inline: 4px; border-radius: 999px; background: var(--accent);
  color: #fff; font-weight: 700; font-size: .88rem; }
.auth-btns a { padding: 6px 10px; border-radius: 999px; color: #fff; }
.auth-btns a:hover { background: rgba(255,255,255,.16); }
.auth-btns i { font-style: normal; opacity: .7; transform: skewX(-12deg); }
.footer-tag { color: #c3c9e0; font-weight: 600; margin: 0 0 14px !important; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.soc { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08); color: #e5e9f8 !important; font-size: .84rem; font-weight: 600; transition: transform .15s, background .15s; }
.soc:hover { transform: translateY(-2px); }
.soc.insta:hover { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.soc.tg:hover, .soc.bot:hover { background: #229ed9; }
.soc .icon { width: 18px; height: 18px; }
.gift-chip { font-size: .8rem; }
.footer-legal { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
  font-size: .8rem; color: #8b93b3; line-height: 1.9; }
