:root {
  --bg: #080b14;
  --bg-soft: #0e1220;
  --panel: #121727;
  --panel-2: #171d30;
  --panel-3: #202842;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #f5f7ff;
  --muted: #99a3ba;
  --faint: #667087;
  --primary: #8b5cf6;
  --primary-light: #ad8aff;
  --cyan: #38d9c5;
  --pink: #ff5da2;
  --blue: #62a0ff;
  --danger: #ff6474;
  --amber: #ffb454;
  --violet: #9b7bff;
  --teal: #38d9c5;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 30px 70px rgba(0, 0, 0, .38);
  --display: 'Onest', sans-serif;
  --body: 'Manrope', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); min-width: 320px; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(circle at 85% -10%, rgba(139, 92, 246, .16), transparent 34%), radial-gradient(circle at -10% 45%, rgba(56, 217, 197, .07), transparent 28%); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }
::selection { background: var(--primary); color: #fff; }
:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 3px; }
.wrap { width: min(100% - 48px, 1380px); margin-inline: auto; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.7; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; height: 76px; border-bottom: 1px solid transparent; transition: .25s ease; }
.site-header::before { content: ""; position: absolute; inset: 0; background: rgba(8, 11, 20, .76); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border-bottom: 1px solid var(--line); }
.header-inner { position: relative; width: min(100% - 48px, 1380px); height: 100%; margin: auto; display: flex; align-items: center; gap: 32px; }
.logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; font: 800 20px/1 var(--display); letter-spacing: -.04em; }
.logo > span:last-child > span { color: var(--muted); font-weight: 600; }
.logo-symbol { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--primary), #6d44db); box-shadow: 0 8px 24px rgba(139, 92, 246, .35); }
.logo-symbol svg { width: 21px; height: 21px; }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link { display: flex; align-items: center; gap: 7px; padding: 10px 13px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 700; white-space: nowrap; transition: .18s; }
.nav-link:hover, .nav-link.is-active, .nav-dropdown:focus-within > .nav-link { color: var(--text); background: rgba(255,255,255,.055); }
.nav-link svg { width: 10px; transition: transform .2s; }
.nav-dropdown { position: relative; }
.nav-dropdown:hover .dropdown-panel, .nav-dropdown:focus-within .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown:hover .nav-dropdown-toggle svg, .nav-dropdown:focus-within .nav-dropdown-toggle svg { transform: rotate(180deg); }
.dropdown-panel { position: absolute; top: calc(100% + 15px); left: 0; padding: 16px; background: rgba(18, 23, 39, .97); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s ease; }
.dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 13px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.dropdown-head span { font: 700 13px var(--display); }
.dropdown-head small { color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.genre-panel { width: 560px; }
.genre-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 8px; }
.genre-grid a { display: flex; justify-content: space-between; gap: 8px; padding: 8px; border-radius: 9px; color: var(--muted); font-size: 12.5px; }
.genre-grid a:hover, .simple-panel a:hover { background: var(--panel-3); color: var(--text); }
.genre-grid small { color: var(--faint); }
.simple-panel { width: 210px; display: grid; }
.simple-panel a { padding: 10px; border-radius: 9px; color: var(--muted); font-size: 13px; }
.header-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.header-search { width: 245px; height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 10px 0 13px; border: 1px solid var(--line); background: rgba(255,255,255,.045); border-radius: 12px; transition: .2s; }
.header-search:focus-within { width: 280px; border-color: rgba(139,92,246,.65); background: var(--panel); }
.header-search svg { width: 17px; color: var(--faint); flex-shrink: 0; }
.header-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12.5px; }
.header-search input::placeholder { color: var(--faint); }
.header-search kbd { padding: 3px 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--faint); font-size: 8px; font-family: inherit; }
.login-button { padding: 10px 18px; border-radius: 11px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 800; }
.profile-link { display: flex; align-items: center; gap: 8px; padding: 4px 9px 4px 4px; border-radius: 12px; }
.profile-link:hover { background: rgba(255,255,255,.05); }
.avatar { width: 34px; height: 34px; display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--pink)); color: #fff; font: 800 13px var(--display); }
.profile-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 10px; color: var(--muted); }
.icon-button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.icon-button svg { width: 19px; }
.mobile-toggle { display: none; width: 38px; height: 38px; padding: 9px; border: 0; background: transparent; margin-left: auto; }
.mobile-toggle span { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--text); transition: .2s; }
.toast { position: fixed; top: 92px; left: 50%; z-index: 120; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: #182b29; border: 1px solid rgba(56,217,197,.32); border-radius: 12px; box-shadow: var(--shadow); color: #b7fff5; font-size: 13px; }
.toast svg { width: 18px; }

/* Common */
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid rgba(255,255,255,.055); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin-bottom: 8px; color: var(--primary-light); font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.section-title { font: 700 clamp(25px, 3vw, 34px)/1.12 var(--display); letter-spacing: -.035em; }
.section-subtitle { margin-top: 10px; color: var(--muted); font-size: 13px; }
.text-link { color: var(--muted); font-size: 13px; font-weight: 700; }
.text-link span { color: var(--primary-light); margin-left: 5px; }
.text-link:hover { color: var(--text); }
.result-count { padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px; font-size: 12.5px; font-weight: 800; transition: transform .18s, background .18s, border-color .18s; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 18px; }
.button-primary { background: linear-gradient(135deg, var(--primary), #7443e5); color: #fff; box-shadow: 0 10px 30px rgba(139,92,246,.25); }
.button-primary:hover { background: linear-gradient(135deg, #9c70ff, #8050eb); }
.button-ghost { background: rgba(255,255,255,.055); border-color: var(--line-strong); color: var(--text); backdrop-filter: blur(12px); }
.button-ghost:hover { background: rgba(255,255,255,.1); }
.button-large { min-height: 48px; padding-inline: 23px; border-radius: 14px; }
.button-wide { width: 100%; }
.empty-state { min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 30px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty-state strong { color: var(--text); font: 700 18px var(--display); }
.empty-state.small { min-height: 110px; font-size: 13px; }
.grad-1 { background: linear-gradient(145deg,#433071,#e0608d); }
.grad-2 { background: linear-gradient(145deg,#183b5e,#30b9a7); }
.grad-3 { background: linear-gradient(145deg,#612844,#f57651); }
.grad-4 { background: linear-gradient(145deg,#272e68,#627df5); }
.grad-5 { background: linear-gradient(145deg,#65441b,#d69b43); }
.grad-6 { background: linear-gradient(145deg,#2c1f61,#8b5cf6); }
.grad-7 { background: linear-gradient(145deg,#17463e,#38d9c5); }
.grad-8 { background: linear-gradient(145deg,#5b1e32,#ff6474); }

/* Home hero */
.hero { position: relative; min-height: 660px; margin-top: -76px; padding-top: 76px; overflow: hidden; background: #0a0d16; }
.hero-backdrop { position: absolute; inset: 0; }
.hero-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 27%; filter: saturate(.88); transform: scale(1.03); }
.hero-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,11,20,.98) 0%, rgba(8,11,20,.9) 34%, rgba(8,11,20,.42) 70%, rgba(8,11,20,.72) 100%); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 0%, transparent 38%), radial-gradient(circle at 78% 46%, rgba(139,92,246,.12), transparent 33%); }
.hero-inner { position: relative; min-height: 584px; display: grid; grid-template-columns: minmax(0, 760px) 270px; align-items: center; justify-content: space-between; gap: 70px; padding-top: 46px; padding-bottom: 46px; }
.hero-content { max-width: 760px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 20px; color: #cbb9ff; font-size: 10.5px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(56,217,197,.1), 0 0 18px rgba(56,217,197,.65); }
.hero h1 { max-width: 800px; font: 800 clamp(42px, 5.2vw, 74px)/1.02 var(--display); letter-spacing: -.055em; text-wrap: balance; }
.hero-original { margin-top: 11px; color: rgba(255,255,255,.53); font-size: 15px; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 24px 0 18px; }
.hero-meta > span { padding: 6px 10px; background: rgba(8,11,20,.42); border: 1px solid rgba(255,255,255,.11); border-radius: 8px; color: #ced4e5; font-size: 11.5px; font-weight: 700; backdrop-filter: blur(8px); }
.hero-meta .score { display: inline-flex; align-items: center; gap: 5px; color: #ffe099; }
.hero-meta .score svg { width: 13px; }
.hero-description { max-width: 650px; color: #b2bbce; font-size: 14px; line-height: 1.75; }
.hero-genres { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.hero-genres a { color: #d3daea; font-size: 11px; font-weight: 700; }
.hero-genres a:not(:last-child)::after { content: "•"; margin-left: 7px; color: var(--faint); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.hero-poster { position: relative; width: 250px; aspect-ratio: 2/3; border: 1px solid rgba(255,255,255,.15); border-radius: 20px; box-shadow: 0 35px 80px rgba(0,0,0,.55); transform: rotate(2.5deg); transition: .3s ease; }
.hero-poster:hover { transform: rotate(0) translateY(-5px); }
.hero-poster img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.poster-glow { position: absolute; z-index: -1; inset: 12% -15% -8%; background: rgba(139,92,246,.33); filter: blur(42px); }
.hero-empty { min-height: 520px; background: radial-gradient(circle at 75% 40%, rgba(139,92,246,.32), transparent 25%), linear-gradient(145deg,#0a0d16,#10152a); }
.hero-empty .hero-inner { min-height: 444px; grid-template-columns: 1fr; }

/* Home content */
.catalog-stats { position: relative; z-index: 4; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: -30px; padding: 18px 0; background: rgba(18,23,39,.88); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 18px 50px rgba(0,0,0,.25); backdrop-filter: blur(20px); }
.catalog-stats div { display: flex; flex-direction: column; padding: 6px 25px; border-right: 1px solid var(--line); }
.catalog-stats div:last-child { border: 0; }
.catalog-stats strong { font: 700 22px var(--display); letter-spacing: -.03em; }
.catalog-stats span { margin-top: 5px; color: var(--faint); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.episode-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 225px; gap: 16px; overflow-x: auto; padding: 2px 2px 13px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--panel-3) transparent; }
.update-card { scroll-snap-align: start; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; transition: transform .2s, border-color .2s; }
.update-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.update-image { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--panel-2); }
.update-image img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform .35s; }
.update-card:hover .update-image img { transform: scale(1.05); }
.update-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,11,20,.75), transparent 55%); }
.update-play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: .2s; }
.update-play svg { width: 42px; height: 42px; padding: 10px; border-radius: 50%; color: #fff; background: rgba(139,92,246,.86); backdrop-filter: blur(8px); }
.update-card:hover .update-play { opacity: 1; }
.update-episodes { position: absolute; right: 9px; bottom: 9px; padding: 4px 7px; border-radius: 6px; background: rgba(8,11,20,.8); font-size: 9.5px; font-weight: 800; }
.update-body { padding: 12px 13px 14px; }
.update-body > a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 12.5px var(--display); }
.update-body p { margin-top: 6px; color: var(--faint); font-size: 10.5px; }
.update-body p span { color: #e9ca7d; float: right; }
.filter-bar { position: relative; display: grid; grid-template-columns: 1.35fr repeat(4, minmax(120px, .72fr)) auto auto; align-items: center; gap: 8px; padding: 10px; margin-bottom: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.filter-search { min-width: 0; height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 12px; background: var(--bg-soft); border: 1px solid transparent; border-radius: 10px; }
.filter-search:focus-within { border-color: rgba(139,92,246,.55); }
.filter-search svg { width: 17px; color: var(--faint); flex-shrink: 0; }
.filter-search input { width: 100%; min-width: 0; color: var(--text); background: transparent; border: 0; outline: 0; font-size: 12px; }
.filter-bar select, .player-controls select, .stack-form select { min-width: 0; height: 42px; padding: 0 30px 0 11px; border: 1px solid transparent; border-radius: 10px; outline: 0; background-color: var(--bg-soft); color: var(--muted); font-size: 11.5px; font-weight: 700; }
.filter-bar select:focus, .player-controls select:focus, .stack-form select:focus { border-color: rgba(139,92,246,.55); color: var(--text); }
.filter-bar option, .player-controls option, .stack-form option { background: var(--panel); color: var(--text); }
.clear-filter { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); font-size: 22px; }
.clear-filter:hover { background: var(--panel-3); color: var(--text); }
.catalog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 17px; }
.anime-card { min-width: 0; }
.anime-poster { position: relative; display: block; aspect-ratio: 2/3; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); isolation: isolate; }
.anime-poster > img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .4s; }
.anime-card:hover .anime-poster > img { transform: scale(1.045); filter: brightness(.72); }
.poster-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.7); font: 800 48px var(--display); }
.poster-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,11,20,.75), transparent 30%); pointer-events: none; }
.rating-badge, .episode-badge { position: absolute; z-index: 2; padding: 5px 7px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; background: rgba(8,11,20,.75); backdrop-filter: blur(7px); font-size: 9.5px; font-weight: 800; }
.rating-badge { top: 9px; left: 9px; display: flex; align-items: center; gap: 4px; color: #ffe09a; }
.rating-badge svg { width: 11px; }
.episode-badge { right: 9px; bottom: 9px; }
.card-play { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; opacity: 0; transform: scale(.8); transition: .25s; }
.card-play svg { width: 50px; height: 50px; padding: 14px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--primary), #7040df); box-shadow: 0 12px 35px rgba(0,0,0,.4); }
.anime-card:hover .card-play { opacity: 1; transform: scale(1); }
.anime-card-body { padding: 11px 3px 0; }
.anime-card-title { display: -webkit-box; min-height: 38px; overflow: hidden; font: 700 13.5px/1.4 var(--display); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.anime-card-title:hover { color: var(--primary-light); }
.anime-card-meta { display: flex; align-items: center; gap: 5px; margin-top: 7px; color: var(--faint); font-size: 10px; }
.status-marker { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--faint); }
.status-marker.is-airing { background: var(--cyan); box-shadow: 0 0 8px rgba(56,217,197,.5); }
.status-marker.is-announced { background: var(--violet); }
.anime-card-body > p { margin-top: 6px; overflow: hidden; color: var(--faint); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-empty { grid-column: 1 / -1; min-height: 350px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 15px; margin-top: 38px; }
.pager-button { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.pager-button:hover { color: var(--text); border-color: var(--line-strong); }
.pager-button.is-disabled { opacity: .35; }
.pager-current { color: var(--faint); font-size: 11px; }
.ranking { position: sticky; top: 96px; padding: 18px; overflow: hidden; background: linear-gradient(160deg, rgba(139,92,246,.075), transparent 34%), var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 20px 55px rgba(0,0,0,.16); }
.ranking-head { display: flex; align-items: end; justify-content: space-between; padding: 2px 2px 16px; }
.ranking-head .eyebrow { margin-bottom: 5px; }
.ranking-head h3 { font: 700 18px var(--display); }
.ranking-head > a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; transition: .18s; }
.ranking-head > a span { color: var(--primary-light); font-size: 13px; }
.ranking-head > a:hover { color: var(--text); }
.ranking-leader { display: block; margin-bottom: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); transition: transform .22s, border-color .22s; }
.ranking-leader:hover { transform: translateY(-2px); border-color: rgba(139,92,246,.4); }
.leader-poster { position: relative; display: block; height: 150px; overflow: hidden; background: var(--panel-3); }
.leader-poster > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform .35s; }
.ranking-leader:hover .leader-poster > img { transform: scale(1.045); }
.leader-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,11,20,.78), transparent 55%); }
.leader-place, .leader-score { position: absolute; z-index: 2; top: 10px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; backdrop-filter: blur(8px); font-size: 9px; }
.leader-place { left: 10px; background: linear-gradient(135deg, var(--primary), #7545df); color: #fff; letter-spacing: .04em; }
.leader-score { right: 10px; display: inline-flex; align-items: center; gap: 4px; background: rgba(8,11,20,.78); color: #ffe09a; }
.leader-score svg { width: 11px; }
.leader-info { display: grid; gap: 5px; padding: 12px 13px 13px; }
.leader-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 13px var(--display); }
.leader-info small, .leader-info > span { overflow: hidden; color: var(--faint); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.leader-info > span { color: var(--muted); }
.ranking-list { display: grid; }
.ranking-row { display: flex; align-items: center; gap: 9px; padding: 9px 5px; border-bottom: 1px solid var(--line); border-radius: 9px; transition: background .18s, padding .18s; }
.ranking-row:last-child { border-bottom: 0; }
.ranking-row:hover { padding-inline: 8px; background: rgba(255,255,255,.04); }
.rank-number { width: 19px; flex-shrink: 0; color: var(--faint); font: 700 9px var(--display); }
.ranking-row:nth-child(-n+2) .rank-number { color: var(--primary-light); }
.rank-poster { width: 34px; height: 45px; overflow: hidden; flex-shrink: 0; border-radius: 7px; background: var(--panel-3); }
.rank-poster img { width: 100%; height: 100%; object-fit: cover; }
.rank-info { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 4px; }
.rank-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 10.5px var(--display); }
.rank-info small { color: var(--faint); font-size: 9px; }
.rank-score { min-width: 32px; color: var(--text); font-size: 9px; font-weight: 800; text-align: right; white-space: nowrap; }
.rank-score span { color: #eacb7e; }
.ranking-empty { padding: 25px 5px; text-align: center; }
.premiere-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; border-top: 1px solid var(--line); }
.premiere-row { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 15px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.premiere-row time { color: var(--primary-light); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.premiere-row > span:not(.arrow) { min-width: 0; display: grid; gap: 4px; }
.premiere-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 12.5px var(--display); }
.premiere-row small { color: var(--faint); font-size: 9.5px; }
.premiere-row .arrow { color: var(--faint); transition: .2s; }
.premiere-row:hover .arrow { color: var(--primary-light); transform: translate(2px,-2px); }

/* Anime detail */
.anime-masthead { position: relative; min-height: 520px; margin-top: -76px; padding: 116px 0 55px; overflow: hidden; }
.anime-backdrop { position: absolute; inset: 0; opacity: .28; }
.anime-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; filter: blur(5px) saturate(.75); transform: scale(1.08); }
.anime-backdrop-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,11,20,.96), rgba(8,11,20,.72)), linear-gradient(0deg, var(--bg), transparent 60%); }
.anime-masthead .wrap { position: relative; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; color: var(--faint); font-size: 10.5px; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span:last-child { max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.anime-hero { display: grid; grid-template-columns: 215px minmax(0, 850px); gap: 36px; align-items: end; }
.detail-poster { position: relative; aspect-ratio: 2/3; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 17px; box-shadow: 0 25px 60px rgba(0,0,0,.45); }
.detail-poster > img { width: 100%; height: 100%; object-fit: cover; }
.detail-score { position: absolute; left: 12px; bottom: 12px; padding: 7px 10px; border-radius: 9px; background: rgba(8,11,20,.82); color: #ffe09a; font-size: 11px; font-weight: 800; backdrop-filter: blur(8px); }
.anime-summary { padding-bottom: 3px; }
.anime-status-line { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--muted); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.live-label { display: inline-flex; align-items: center; gap: 7px; color: #9ff9ec; }
.live-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
.anime-summary h1 { max-width: 900px; font: 800 clamp(35px,4.6vw,62px)/1.04 var(--display); letter-spacing: -.05em; text-wrap: balance; }
.original-title { margin-top: 9px; color: var(--faint); font-size: 13px; }
.anime-facts { display: flex; flex-wrap: wrap; gap: 7px; margin: 19px 0 16px; }
.anime-facts span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: #cad1e0; font-size: 10px; font-weight: 700; }
.anime-description { max-width: 780px; color: var(--muted); font-size: 13px; line-height: 1.72; }
.genre-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.genre-chips a { padding: 6px 9px; background: rgba(255,255,255,.055); border-radius: 7px; color: #bdc5d7; font-size: 9.5px; font-weight: 700; }
.genre-chips a:hover { background: rgba(139,92,246,.2); color: #d9cdff; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.watch-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 24px; align-items: start; }
.watch-main, .watch-sidebar { display: grid; gap: 20px; }
.watch-sidebar { position: sticky; top: 96px; }
.player-card, .content-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.player-card { overflow: hidden; }
.player-header { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 21px; }
.player-header .eyebrow { margin-bottom: 5px; }
.player-header h2, .card-heading h2 { font: 700 21px var(--display); letter-spacing: -.025em; }
.player-tags { display: flex; gap: 6px; }
.player-tags span { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 9px; font-weight: 800; }
.player-shell { position: relative; width: 100%; aspect-ratio: 16/9; background: #03050a; }
.player-shell iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.empty-player { min-height: 430px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 30px; background: #050710; text-align: center; }
.empty-player-icon { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 5px; border-radius: 19px; color: var(--primary-light); background: rgba(139,92,246,.12); }
.empty-player-icon svg { width: 32px; }
.empty-player strong { font: 700 16px var(--display); }
.empty-player p { color: var(--faint); font-size: 11px; }
.player-controls { display: grid; grid-template-columns: .65fr 1.4fr .8fr auto; align-items: end; gap: 9px; padding: 15px; }
.player-controls label, .stack-form > label, .auth-form > label { display: grid; gap: 7px; }
.player-controls label > span, .stack-form label > span, .auth-form label > span { color: var(--faint); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.content-card { padding: 20px; }
.card-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.card-heading.compact { align-items: center; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.card-heading.compact h3 { font: 700 14px var(--display); }
.card-heading > span { color: var(--faint); font-size: 10px; font-weight: 700; }
.episode-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; max-height: 360px; overflow-y: auto; padding-right: 3px; }
.episode-grid a { display: grid; gap: 4px; padding: 12px 10px; background: var(--bg-soft); border: 1px solid transparent; border-radius: 10px; }
.episode-grid a:hover { border-color: var(--line-strong); }
.episode-grid a.is-active { background: rgba(139,92,246,.14); border-color: rgba(139,92,246,.45); }
.episode-grid strong { font: 700 13px var(--display); }
.episode-grid span { color: var(--faint); font-size: 8.5px; }
.version-list { display: grid; }
.version-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 7px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.version-list a:last-child { border-bottom: 0; }
.version-list a:hover, .version-list a.is-active { padding-inline: 10px; background: var(--panel-2); }
.version-list a.is-active { box-shadow: inset 2px 0 var(--primary); }
.version-list a > span { min-width: 0; display: grid; gap: 4px; }
.version-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.version-list small { color: var(--faint); font-size: 8.5px; }
.version-list b { padding: 4px 6px; border-radius: 5px; background: var(--panel-3); color: var(--muted); font-size: 8.5px; }
.stack-form { display: grid; gap: 13px; }
.check-row { display: flex !important; align-items: center; gap: 9px !important; color: var(--muted); font-size: 11px; }
.check-row input { width: 16px; height: 16px; accent-color: var(--primary); }
.check-row span { color: var(--muted) !important; font-size: 11px !important; text-transform: none !important; letter-spacing: 0 !important; }
.anime-info-card dl { display: grid; gap: 10px; margin: 0; }
.anime-info-card dl div { display: flex; justify-content: space-between; gap: 15px; font-size: 10.5px; }
.anime-info-card dt { color: var(--faint); }
.anime-info-card dd { margin: 0; color: #cbd2e2; text-align: right; }
.comments-layout { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
.comment-form-card { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.comment-author { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.comment-author > div { display: grid; gap: 3px; }
.comment-author strong { font-size: 11px; }
.comment-author small { color: var(--faint); font-size: 9px; }
.stack-form textarea { min-height: 120px; padding: 13px; resize: vertical; outline: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-soft); color: var(--text); font-size: 12px; line-height: 1.6; }
.stack-form textarea:focus { border-color: rgba(139,92,246,.55); }
.field-error { color: #ff9ba7; font-size: 10px; }
.login-prompt { display: grid; gap: 9px; }
.login-prompt strong { font: 700 15px var(--display); }
.login-prompt p { color: var(--muted); font-size: 11px; }
.comment-list { display: grid; gap: 10px; }
.comment { display: flex; gap: 12px; padding: 17px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.comment > div { min-width: 0; flex: 1; }
.comment header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 8px; }
.comment header strong { font-size: 11px; }
.comment time { color: var(--faint); font-size: 9px; }
.comment p { color: #b1b9ca; font-size: 11.5px; line-height: 1.65; white-space: pre-line; }
.related-grid { grid-template-columns: repeat(6, minmax(0,1fr)); }

/* Lists */
.account-page { padding-top: 42px; }
.profile-hero { display: flex; align-items: center; gap: 18px; padding: 30px; background: linear-gradient(135deg, rgba(139,92,246,.13), rgba(56,217,197,.05)); border: 1px solid var(--line); border-radius: 20px; }
.profile-avatar { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 20px; background: linear-gradient(135deg,var(--primary),var(--pink)); box-shadow: 0 15px 40px rgba(139,92,246,.24); font: 800 27px var(--display); }
.profile-hero h1 { font: 700 27px var(--display); letter-spacing: -.03em; }
.profile-hero > div > p:last-child { margin-top: 7px; color: var(--muted); font-size: 11px; }
.list-stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 20px; }
.list-stat-grid a { display: flex; align-items: center; gap: 12px; padding: 17px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; transition: .2s; }
.list-stat-grid a:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--status-color) 13%, transparent); }
.stat-icon i { width: 8px; height: 8px; border-radius: 50%; background: var(--status-color); box-shadow: 0 0 12px var(--status-color); }
.list-stat-grid a > span:nth-child(2) { display: grid; gap: 3px; }
.list-stat-grid small { color: var(--muted); font-size: 9px; font-weight: 700; }
.list-stat-grid strong { font: 700 18px var(--display); }
.list-stat-grid b { margin-left: auto; color: var(--faint); font-size: 12px; }
.list-section { scroll-margin-top: 85px; }
.empty-list { min-height: 130px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 17px; padding: 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-list > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: color-mix(in srgb, var(--status-color) 12%, transparent); }
.empty-list i { width: 9px; height: 9px; border-radius: 50%; background: var(--status-color); }
.empty-list strong { font: 700 14px var(--display); }
.empty-list p { margin-top: 5px; color: var(--faint); font-size: 10px; }

/* Authentication */
.auth-page { min-height: calc(100vh - 76px); display: grid; place-items: center; padding: 42px 24px; }
.auth-shell { width: min(100%, 980px); min-height: 590px; display: grid; grid-template-columns: .95fr 1.05fr; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.auth-aside { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 42px; background: radial-gradient(circle at 50% 34%, rgba(139,92,246,.36), transparent 32%), linear-gradient(145deg,#141932,#0b0f1c); }
.auth-aside::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px); background-size: 30px 30px; mask-image: linear-gradient(to bottom,#000,transparent 80%); }
.auth-aside > div { position: relative; }
.auth-art { height: 290px; display: grid; place-items: center; }
.auth-art > svg { width: 126px; color: #bea9ff; filter: drop-shadow(0 15px 30px rgba(139,92,246,.35)); }
.orbit { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(173,138,255,.18); border-radius: 50%; transform: translate(-50%,-50%); }
.orbit-one { width: 215px; height: 215px; }
.orbit-two { width: 300px; height: 300px; }
.auth-aside h1 { max-width: 390px; font: 700 27px/1.25 var(--display); letter-spacing: -.035em; }
.auth-aside > div:last-child > p:last-child { margin-top: 13px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.auth-form-panel { display: grid; place-items: center; padding: 45px; }
.auth-form-inner { width: min(100%, 360px); }
.auth-form-inner h2 { font: 700 28px var(--display); letter-spacing: -.035em; }
.auth-lead { margin: 10px 0 25px; color: var(--muted); font-size: 11px; }
.auth-form { display: grid; gap: 15px; }
.auth-form input:not([type=checkbox]) { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: var(--bg-soft); color: var(--text); font-size: 12px; }
.auth-form input:not([type=checkbox]):focus { border-color: rgba(139,92,246,.6); box-shadow: 0 0 0 3px rgba(139,92,246,.08); }
.auth-form input::placeholder { color: var(--faint); }
.auth-switch { margin-top: 22px; color: var(--muted); font-size: 11px; text-align: center; }
.auth-switch a { color: var(--primary-light); font-weight: 800; }
.error-list { display: grid; gap: 4px; margin: 0 0 17px; padding: 11px 13px; border: 1px solid rgba(255,100,116,.25); border-radius: 10px; background: rgba(255,100,116,.08); color: #ffabb5; font-size: 10px; line-height: 1.5; }

/* Footer */
.site-footer { margin-top: 45px; border-top: 1px solid var(--line); background: rgba(5,7,13,.6); }
.footer-main { display: grid; grid-template-columns: 1fr auto; gap: 50px; padding: 48px 0 35px; }
.footer-brand p { max-width: 460px; margin-top: 15px; color: var(--faint); font-size: 11px; line-height: 1.7; }
.footer-nav { display: grid; grid-template-columns: repeat(2,150px); gap: 35px; }
.footer-nav > div { display: grid; align-content: start; gap: 9px; }
.footer-nav h3 { margin-bottom: 5px; color: var(--faint); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.footer-nav a { color: var(--muted); font-size: 11px; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 25px; padding: 18px 0 25px; border-top: 1px solid var(--line); color: var(--faint); font-size: 9.5px; }

@media (max-width: 1180px) {
  .main-nav { gap: 0; }
  .nav-link { padding-inline: 9px; }
  .header-search { width: 190px; }
  .header-search:focus-within { width: 220px; }
  .hero-inner { grid-template-columns: minmax(0,1fr) 220px; gap: 45px; }
  .hero-poster { width: 210px; }
  .catalog-layout { grid-template-columns: minmax(0,1fr) 295px; }
  .catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .filter-bar { grid-template-columns: 1.2fr repeat(2,.75fr) auto auto; }
  .filter-bar select:nth-of-type(3), .filter-bar select:nth-of-type(4) { grid-row: 2; }
  .filter-bar select:nth-of-type(3) { grid-column: 2; }
  .filter-bar select:nth-of-type(4) { grid-column: 3; }
  .related-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .episode-grid { grid-template-columns: repeat(5,1fr); }
}

@media (max-width: 960px) {
  .mobile-toggle { display: block; order: 2; }
  .header-inner { gap: 13px; }
  .main-nav { position: absolute; top: 67px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; padding: 12px; background: rgba(18,23,39,.98); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
  .main-nav.is-open { display: flex; }
  .nav-link { width: 100%; justify-content: space-between; padding: 11px 12px; }
  .nav-dropdown { width: 100%; }
  .dropdown-panel { position: static; display: none; width: 100%; margin: 4px 0; opacity: 1; visibility: visible; transform: none; box-shadow: none; }
  .nav-dropdown:focus-within .dropdown-panel { display: block; }
  .genre-grid { grid-template-columns: repeat(2,1fr); }
  .header-actions { order: 3; }
  .header-search { width: 220px; }
  .profile-name { display: none; }
  .hero { min-height: 590px; }
  .hero-inner { min-height: 514px; grid-template-columns: 1fr; }
  .hero-poster { display: none; }
  .catalog-stats { grid-template-columns: repeat(2,1fr); }
  .catalog-stats div:nth-child(2) { border-right: 0; }
  .catalog-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
  .catalog-stats div:nth-child(n+3) { padding-top: 14px; }
  .catalog-layout { grid-template-columns: 1fr; }
  .ranking { position: static; }
  .ranking-list { grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .watch-layout { grid-template-columns: 1fr; }
  .watch-sidebar { position: static; grid-template-columns: repeat(2,1fr); align-items: start; }
  .watch-sidebar .anime-info-card { grid-column: 1/-1; }
  .related-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .comments-layout { grid-template-columns: 300px 1fr; }
}

@media (max-width: 720px) {
  .wrap, .header-inner { width: min(100% - 28px, 1380px); }
  .site-header { height: 68px; }
  .header-search { display: none; }
  .login-button { padding: 9px 14px; }
  .icon-button { display: none; }
  .section { padding: 52px 0; }
  .hero { min-height: 600px; margin-top: -68px; padding-top: 68px; }
  .hero-inner { min-height: 532px; padding-top: 70px; }
  .hero h1 { font-size: clamp(36px,11vw,55px); }
  .hero-description { font-size: 12px; }
  .catalog-stats { margin-top: -20px; }
  .catalog-stats div { padding-inline: 16px; }
  .catalog-stats strong { font-size: 18px; }
  .episode-strip { grid-auto-columns: 210px; }
  .catalog-heading { align-items: flex-start; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-search { grid-column: 1/-1; }
  .filter-bar select { width: 100%; }
  .filter-bar select:nth-of-type(3), .filter-bar select:nth-of-type(4) { grid-row: auto; grid-column: auto; }
  .filter-bar .button { grid-column: 1/-1; }
  .clear-filter { position: absolute; right: 27px; margin-top: 50px; }
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 13px; }
  .ranking-list { grid-template-columns: 1fr; }
  .premiere-grid { grid-template-columns: 1fr; }
  .premiere-row:nth-child(n+7) { display: none; }
  .anime-masthead { margin-top: -68px; padding-top: 100px; }
  .anime-hero { grid-template-columns: 145px minmax(0,1fr); gap: 20px; align-items: start; }
  .anime-summary h1 { font-size: clamp(28px,7vw,42px); }
  .anime-description { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
  .player-header { align-items: flex-start; }
  .player-controls { grid-template-columns: 1fr 1fr; }
  .player-controls .button { grid-column: 1/-1; }
  .episode-grid { grid-template-columns: repeat(4,1fr); }
  .watch-sidebar { grid-template-columns: 1fr; }
  .watch-sidebar .anime-info-card { grid-column: auto; }
  .comments-layout { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .list-stat-grid { grid-template-columns: repeat(2,1fr); }
  .empty-list { grid-template-columns: auto 1fr; }
  .empty-list .button { grid-column: 1/-1; }
  .auth-page { padding: 24px 14px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-form-panel { padding: 38px 24px; }
  .footer-main { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
  .profile-link { display: none; }
  .hero-meta > span:nth-child(n+4) { display: none; }
  .hero-actions .button { width: 100%; }
  .catalog-stats span { font-size: 8px; }
  .section-head { align-items: flex-start; }
  .section-title { font-size: 25px; }
  .anime-card-title { font-size: 12px; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-search, .filter-bar .button { grid-column: auto; }
  .clear-filter { display: none; }
  .anime-hero { grid-template-columns: 105px minmax(0,1fr); gap: 15px; }
  .anime-status-line { margin-bottom: 7px; font-size: 8px; }
  .anime-summary h1 { font-size: 25px; }
  .original-title, .anime-description, .genre-chips { display: none; }
  .anime-facts { margin: 11px 0; }
  .anime-facts span { font-size: 8px; padding: 5px 7px; }
  .detail-actions { margin-top: 12px; }
  .detail-actions .button { min-height: 39px; padding-inline: 12px; font-size: 10px; }
  .detail-actions .button-ghost { display: none; }
  .player-header { padding: 15px; }
  .player-tags { display: none; }
  .player-shell { aspect-ratio: 16/10; }
  .empty-player { min-height: 240px; }
  .episode-grid { grid-template-columns: repeat(3,1fr); }
  .content-card { padding: 15px; }
  .related-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .list-stat-grid { grid-template-columns: 1fr; }
  .profile-hero { padding: 20px; }
  .profile-avatar { width: 56px; height: 56px; border-radius: 16px; font-size: 21px; }
  .profile-hero h1 { font-size: 21px; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
}

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