@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url('/static/fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-display: swap; src: url('/static/fonts/space-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url('/static/fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 400; font-display: swap; src: url('/static/fonts/sora-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 500; font-display: swap; src: url('/static/fonts/sora-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 600; font-display: swap; src: url('/static/fonts/sora-latin-600-normal.woff2') format('woff2'); }

[hidden] { display: none !important; }

:root {
  --Bg: #0a0b0f;
  --Card: #131419;
  --Card2: #171922;
  --Raised: #1c1e28;
  --Line: #23252f;
  --Line2: #191b22;
  --Text: #eceef4;
  --Muted: #888ea0;
  --Faint: #545b6e;
  --Accent: #ff4d8d;
  --Accent2: #ff70a5;
  --AccentDim: rgba(255, 77, 141, 0.13);
  --Danger: #f0556b;
  --Display: 'Space Grotesk', system-ui, sans-serif;
  --Body: 'Sora', system-ui, -apple-system, sans-serif;
  --Mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--Bg); color: var(--Text);
  font-family: var(--Body); font-size: 14.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { display: block; flex: none; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--Accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--Display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
::selection { background: var(--Accent); color: #fff; }

/* Header */
.SiteHeader {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 11, 15, 0.82); backdrop-filter: blur(12px) saturate(150%);
  border-bottom: 1px solid var(--Line2);
}
.HeaderInner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 22px; padding: 0 22px; height: 58px; }
.Brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--Display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; white-space: nowrap; }
.Brand .Mark { color: var(--Accent); }
.BrandDot { width: 7px; height: 7px; border-radius: 50%; background: var(--Accent); box-shadow: 0 0 9px var(--Accent); }
.MainNav { display: flex; align-items: center; gap: 4px; }
.NavLink { font-size: 13.5px; font-weight: 500; color: var(--Muted); padding: 7px 11px; border-radius: 7px; transition: color 0.13s, background 0.13s; }
.NavLink:hover { color: var(--Text); background: var(--Card); }
.NavLink.Active { color: var(--Text); }
.SearchForm { margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--Card); border: 1px solid var(--Line); border-radius: 8px; padding: 0 12px; transition: border-color 0.13s, background 0.13s; }
.SearchForm:focus-within { border-color: var(--Accent); background: var(--Card2); }
.SearchIcon { color: var(--Faint); }
.SearchInput { width: 220px; background: transparent; border: none; color: var(--Text); padding: 9px 0; font-family: var(--Body); font-size: 13.5px; }
.SearchInput::placeholder { color: var(--Faint); }
.SearchInput:focus { outline: none; }
.TgBtn { display: inline-flex; align-items: center; gap: 7px; background: var(--Accent); color: #fff; font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: 8px; white-space: nowrap; transition: background 0.13s; }
.TgBtn:hover { background: var(--Accent2); }

/* Layout */
.Page { max-width: 1240px; margin: 0 auto; padding: 30px 22px 56px; width: 100%; flex: 1; }
.Section { margin-bottom: 40px; }
.SectionHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 16px; }
.Eyebrow { font-family: var(--Mono); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--Accent); display: inline-flex; align-items: center; gap: 8px; }
.Eyebrow::before { content: ''; width: 14px; height: 3px; background: var(--Accent); border-radius: 2px; }
.SeeAll { font-family: var(--Mono); font-size: 12px; font-weight: 500; color: var(--Muted); text-transform: uppercase; letter-spacing: 0.04em; transition: color 0.13s; }
.SeeAll:hover { color: var(--Accent); }

/* Episode grid */
.EpGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 20px 16px; }
.EpThumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--Card2); border: 1px solid var(--Line); transition: transform 0.15s ease, border-color 0.15s ease; }
.EpThumb img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.15s ease, transform 0.3s ease; }
.EpCard:hover .EpThumb { transform: translateY(-3px); border-color: var(--Accent); }
.EpCard:hover .EpThumb img { filter: brightness(0.62); transform: scale(1.04); }
.EpPlay { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 0.15s ease; }
.EpCard:hover .EpPlay { opacity: 1; }
.EpPlay span { width: 46px; height: 46px; border-radius: 50%; background: rgba(10, 11, 15, 0.72); border: 1.5px solid var(--Accent); display: grid; place-items: center; }
.EpPlay span::after { content: ''; margin-left: 3px; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent var(--Accent); }
.EpDur { position: absolute; right: 7px; bottom: 7px; background: rgba(8, 9, 12, 0.9); color: #dfe2ea; font-size: 11px; padding: 2px 6px; border-radius: 5px; font-family: var(--Mono); letter-spacing: 0.01em; }
.EpNew { position: absolute; left: 7px; top: 7px; display: inline-flex; align-items: center; gap: 5px; background: var(--Accent); color: #fff; font-size: 10px; font-weight: 700; font-family: var(--Mono); letter-spacing: 0.08em; padding: 2px 7px; border-radius: 5px; }
.EpBody { padding: 10px 1px 0; }
.EpAnime { font-family: var(--Display); font-weight: 600; font-size: 14px; line-height: 1.3; margin-bottom: 5px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.13s; }
.EpCard:hover .EpAnime { color: var(--Accent); }
.EpMeta { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--Muted); }
.Tag { font-family: var(--Mono); font-weight: 600; color: var(--Accent); font-size: 11.5px; letter-spacing: 0.02em; }
.Dot { width: 2.5px; height: 2.5px; border-radius: 50%; background: var(--Faint); flex: none; }
.EpTitleLine { font-size: 12px; color: var(--Faint); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* Poster grid */
.PosterGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 20px 15px; }
.Poster { position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--Line); background: var(--Card2); transition: transform 0.15s ease, border-color 0.15s ease; }
.Poster img { width: 100%; height: 100%; object-fit: cover; }
.PosterCard:hover .Poster { transform: translateY(-3px); border-color: var(--Accent); }
.PosterFallback { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(155deg, #191b24, #221926); font-family: var(--Display); font-weight: 700; font-size: 30px; color: rgba(236, 238, 244, 0.2); letter-spacing: 0.03em; }
.PosterCount { position: absolute; right: 6px; top: 6px; background: rgba(8, 9, 12, 0.88); color: #dfe2ea; font-size: 10.5px; font-weight: 600; font-family: var(--Mono); padding: 2px 7px; border-radius: 5px; }
.PosterName { font-family: var(--Display); font-weight: 600; font-size: 13.5px; margin-top: 9px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.13s; }
.PosterCard:hover .PosterName { color: var(--Accent); }
.PosterSub { font-size: 11.5px; color: var(--Faint); margin-top: 2px; font-family: var(--Mono); letter-spacing: 0.02em; }

/* Anime detail */
.AnimeHero { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--Line); margin-bottom: 36px; }
.HeroBg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(30px) brightness(0.32) saturate(1.15); transform: scale(1.2); }
.HeroShade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,11,15,0.96), rgba(10,11,15,0.72) 55%, rgba(10,11,15,0.88)); }
.HeroInner { position: relative; display: flex; gap: 26px; padding: 30px; align-items: flex-end; }
.AnimeArt { flex: 0 0 176px; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--Line); box-shadow: 0 20px 44px -22px rgba(0,0,0,0.8); }
.AnimeArt img, .AnimeArt .PosterFallback { width: 100%; height: 100%; object-fit: cover; }
.AnimeInfo { flex: 1; min-width: 0; }
.AnimeKicker { font-family: var(--Mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--Accent); margin-bottom: 10px; }
.AnimeName { font-size: 32px; font-weight: 700; line-height: 1.1; margin-bottom: 12px; letter-spacing: -0.02em; }
.AnimeDesc { color: var(--Muted); max-width: 620px; margin-bottom: 16px; font-size: 14px; }
.AnimeStats { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.Chip { display: inline-flex; align-items: center; gap: 6px; background: var(--Card); border: 1px solid var(--Line); border-radius: 7px; padding: 5px 11px; font-size: 12px; color: var(--Muted); font-family: var(--Mono); }
.Chip strong { color: var(--Text); font-weight: 700; }
.SeasonBlock { margin-bottom: 32px; }
.SeasonHead { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.SeasonHead h2 { font-size: 16px; font-weight: 600; }
.SeasonHead .Rule { flex: 1; height: 1px; background: var(--Line2); }
.SeasonHead .Count { font-size: 11.5px; color: var(--Faint); font-family: var(--Mono); letter-spacing: 0.03em; }

/* Buttons */
.Btn { display: inline-flex; align-items: center; gap: 7px; justify-content: center; background: var(--Accent); color: #fff; font-family: var(--Body); font-weight: 600; font-size: 13.5px; border: none; border-radius: 8px; padding: 10px 18px; cursor: pointer; transition: background 0.13s; }
.Btn:hover { background: var(--Accent2); }
.Btn:disabled { opacity: 0.45; cursor: default; }
.BtnOutline { background: transparent; border: 1px solid var(--Line); color: var(--Text); }
.BtnOutline:hover { border-color: var(--Accent); background: var(--Card); }
.BtnGhost { background: transparent; border: 1px solid var(--Line); color: var(--Muted); border-radius: 8px; padding: 7px 13px; font-family: var(--Body); font-size: 13px; cursor: pointer; transition: color 0.13s, border-color 0.13s; }
.BtnGhost:hover { color: var(--Text); border-color: var(--Faint); }
.BtnDanger { background: transparent; border: 1px solid rgba(240, 85, 107, 0.45); color: var(--Danger); border-radius: 7px; padding: 5px 12px; font-family: var(--Body); font-size: 12.5px; cursor: pointer; transition: background 0.13s, color 0.13s; }
.BtnDanger:hover { background: var(--Danger); color: #fff; border-color: var(--Danger); }

/* Watch */
.WatchWrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.Stage { background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--Line); }
.VideoWrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; background: #000; border-radius: inherit; }
.VideoWrap video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
.VideoWrap.Fullscreen, .VideoWrap:fullscreen, .VideoWrap:-webkit-full-screen { padding-bottom: 0; height: 100%; width: 100%; display: flex; align-items: center; justify-content: center; }
.VideoWrap:fullscreen video, .VideoWrap:-webkit-full-screen video { position: static; }
.VideoWrap video::cue { background: rgba(0, 0, 0, 0.78); color: #fff; font-family: Arial, Helvetica, sans-serif; font-size: 1.15em; line-height: 1.4; }
.BigPlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 74px; height: 74px; border-radius: 50%; border: none; background: rgba(255, 77, 141, 0.92); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.15s, background 0.15s; z-index: 3; }
.BigPlay:hover { background: var(--Accent); transform: translate(-50%, -50%) scale(1.06); }
.BigPlay svg { width: 34px; height: 34px; margin-left: 3px; }
.Controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; background: linear-gradient(to top, rgba(0,0,0,0.78), transparent); opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; z-index: 4; pointer-events: none; }
.VideoWrap.ShowControls .Controls, .VideoWrap:not(.Playing) .Controls { opacity: 1; transform: translateY(0); pointer-events: auto; }
.Scrubber { position: relative; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.25); cursor: pointer; margin-bottom: 10px; transition: height 0.12s; }
.Scrubber:hover { height: 7px; }
.ScrubBuffer { position: absolute; top: 0; left: 0; height: 100%; border-radius: 3px; background: rgba(255,255,255,0.3); width: 0; }
.ScrubFill { position: absolute; top: 0; left: 0; height: 100%; border-radius: 3px; background: var(--Accent); width: 0; }
.ScrubHandle { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--Accent); transform: translate(-50%, -50%) scale(0); transition: transform 0.12s; }
.Scrubber:hover .ScrubHandle { transform: translate(-50%, -50%) scale(1); }
.CtrlRow { display: flex; align-items: center; gap: 4px; }
.CtrlBtn { background: none; border: none; color: #fff; cursor: pointer; padding: 6px; border-radius: 7px; display: flex; align-items: center; justify-content: center; transition: color 0.13s, background 0.13s; }
.CtrlBtn svg { width: 22px; height: 22px; display: block; }
.CtrlBtn:hover { color: var(--Accent); background: rgba(255,255,255,0.1); }
.CtrlBtn.Active { color: var(--Accent); }
.VolWrap { display: flex; align-items: center; }
.VolSlider { width: 0; opacity: 0; transition: width 0.18s, opacity 0.18s; height: 4px; accent-color: var(--Accent); cursor: pointer; }
.VolWrap:hover .VolSlider { width: 72px; opacity: 1; margin: 0 6px; }
.TimeLabel { font-family: var(--Mono); font-size: 12px; color: #fff; margin-left: 8px; white-space: nowrap; }
.Spacer { flex: 1; }
.MenuWrap { position: relative; }
.Menu { position: absolute; bottom: 46px; right: 0; background: rgba(18, 20, 27, 0.97); border: 1px solid var(--Line); border-radius: 10px; padding: 6px; min-width: 130px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.MenuHead { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--Faint); padding: 5px 10px 6px; }
.MenuItem { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--Text); font-family: var(--Body); font-size: 13px; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.MenuItem:hover { background: rgba(255,255,255,0.07); }
.MenuItem.Active { color: var(--Accent); font-weight: 600; }
.Stage video::cue { background: rgba(0, 0, 0, 0.78); color: #fff; font-family: Arial, Helvetica, sans-serif; font-size: 1.15em; line-height: 1.4; padding: 3px 8px; border-radius: 2px; }
.EmbedWrap { position: relative; aspect-ratio: 16 / 9; background: #000; }
.EmbedWrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.SubOverlay { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); max-width: 88%; text-align: center; background: rgba(0, 0, 0, 0.78); color: #fff; font-family: Arial, Helvetica, sans-serif; font-size: 1.25em; line-height: 1.45; padding: 4px 14px; border-radius: 4px; pointer-events: none; opacity: 0; transition: opacity 0.12s; white-space: pre-line; z-index: 5; }
.SubControls { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.SubBtn { background: var(--Card); border: 1px solid var(--Line); color: var(--Muted); border-radius: 7px; padding: 6px 12px; font-family: var(--Mono); font-size: 12px; cursor: pointer; transition: color 0.13s, border-color 0.13s, background 0.13s; }
.SubBtn:hover { color: var(--Text); border-color: var(--Faint); }
.SubBtn.Active { color: var(--Accent); border-color: var(--Accent); }
.SubOffset { font-family: var(--Mono); font-size: 12px; color: var(--Faint); min-width: 40px; }
.StreamError { padding: 18px 16px; text-align: center; color: var(--Danger); font-size: 13.5px; background: var(--Card); border: 1px solid var(--Line); border-radius: 10px; margin-top: 8px; display: none; }
.PlaybackHint { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 11px 14px; background: rgba(255, 77, 141, 0.08); border: 1px solid rgba(255, 77, 141, 0.3); border-radius: 10px; font-size: 13px; color: var(--Text); line-height: 1.45; }
.PlaybackHint[hidden] { display: none !important; }
.PlaybackHint strong { color: var(--Accent); font-weight: 600; }
.HintClose { flex-shrink: 0; background: none; border: none; color: var(--Muted); cursor: pointer; font-size: 14px; padding: 4px 6px; border-radius: 6px; }
.HintClose:hover { color: var(--Text); background: rgba(255,255,255,0.06); }
.WatchMeta { margin-top: 18px; }
.WatchAnime { font-family: var(--Mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--Accent); transition: color 0.13s; }
.WatchAnime:hover { color: var(--Accent2); }
.WatchTitleRow { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin: 7px 0 10px; flex-wrap: wrap; }
.WatchTitle { font-size: 23px; line-height: 1.15; letter-spacing: -0.01em; }
.WatchTitle .Ep { color: var(--Accent); font-family: var(--Mono); font-size: 16px; font-weight: 500; }
.WatchStats { display: flex; align-items: center; gap: 9px; color: var(--Muted); font-size: 13px; flex-wrap: wrap; font-family: var(--Mono); }
.EpNav { display: flex; gap: 8px; flex-shrink: 0; }
.NavBtn { display: inline-flex; align-items: center; gap: 6px; background: var(--Card); border: 1px solid var(--Line); color: var(--Text); border-radius: 8px; padding: 8px 13px; font-size: 13px; font-weight: 500; transition: border-color 0.13s, background 0.13s; }
.NavBtn:hover { border-color: var(--Accent); background: var(--Card2); }
.NavBtn.Disabled { opacity: 0.3; pointer-events: none; }
.AutoplayRow { display: inline-flex; align-items: center; gap: 8px; margin-top: 15px; color: var(--Muted); font-size: 13px; cursor: pointer; }
.AutoplayRow input { accent-color: var(--Accent); width: 15px; height: 15px; }
.SpeedRow { display: inline-flex; align-items: center; gap: 7px; }
.SpeedRow select { background: var(--Card); color: var(--Text); border: 1px solid var(--Line); border-radius: 7px; padding: 5px 8px; font-family: var(--Mono); font-size: 12px; }
.Aside { background: var(--Card); border: 1px solid var(--Line); border-radius: 12px; overflow: hidden; }
.AsideHead { padding: 13px 15px; border-bottom: 1px solid var(--Line2); font-family: var(--Display); font-weight: 600; font-size: 13.5px; display: flex; justify-content: space-between; align-items: center; }
.AsideHead span { color: var(--Faint); font-size: 11.5px; font-family: var(--Mono); }
.UpList { max-height: 552px; overflow-y: auto; }
.UpItem { display: flex; gap: 11px; padding: 9px 13px; border-bottom: 1px solid var(--Line2); transition: background 0.12s; align-items: center; }
.UpItem:last-child { border-bottom: none; }
.UpItem:hover { background: var(--Card2); }
.UpItem.Current { background: var(--AccentDim); box-shadow: inset 2px 0 0 var(--Accent); }
.UpThumb { position: relative; flex: 0 0 104px; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: var(--Card2); }
.UpThumb img { width: 100%; height: 100%; object-fit: cover; }
.UpNum { position: absolute; left: 4px; top: 4px; background: rgba(8,9,12,0.9); color: #fff; font-family: var(--Mono); font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 4px; }
.UpInfo { min-width: 0; }
.UpInfoTitle { font-size: 12.5px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.UpInfoMeta { font-size: 11px; color: var(--Faint); margin-top: 3px; font-family: var(--Mono); }

/* Auth */
.AuthShell { flex: 1; display: grid; place-items: center; padding: 40px 20px; }
.AuthCard { width: 100%; max-width: 372px; background: var(--Card); border: 1px solid var(--Line); border-radius: 14px; padding: 30px; }
.AuthCard .Eyebrow { margin-bottom: 12px; }
.AuthCard h1 { font-size: 21px; margin-bottom: 20px; }
.AuthCard .Btn { width: 100%; margin-top: 6px; }
.AuthCard .Status { text-align: center; }

/* Forms / admin */
.Panel { background: var(--Card); border: 1px solid var(--Line); border-radius: 14px; padding: 24px; margin-bottom: 22px; }
.PanelHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 14px; }
.PanelHead h1, .PanelHead h2 { font-size: 18px; }
.Field { margin-bottom: 15px; }
.Field label { display: block; font-size: 12.5px; font-weight: 500; color: var(--Muted); margin-bottom: 6px; }
.Field .Hint { color: var(--Faint); font-weight: 400; }
.FieldRow { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.Input, input[type="text"], input[type="password"], input[type="number"] { width: 100%; background: var(--Card2); border: 1px solid var(--Line); color: var(--Text); border-radius: 8px; padding: 10px 12px; font-family: var(--Body); font-size: 13.5px; transition: border-color 0.13s; }
.Input:focus, input:focus { border-color: var(--Accent); outline: none; }
input[type="file"] { width: 100%; background: var(--Card2); border: 1px dashed var(--Line); color: var(--Muted); border-radius: 8px; padding: 10px 12px; font-family: var(--Body); font-size: 12.5px; cursor: pointer; }
input[type="file"]::file-selector-button { background: var(--Raised); color: var(--Text); border: none; border-radius: 6px; padding: 5px 11px; margin-right: 11px; font-family: var(--Body); font-size: 12.5px; cursor: pointer; }
input::placeholder { color: var(--Faint); }
.NewSeriesFields { border-left: 2px solid var(--Accent); padding-left: 15px; margin: 2px 0; }
.SourceToggle { display: inline-flex; border: 1px solid var(--Line); border-radius: 8px; overflow: hidden; }
.ToggleBtn { background: transparent; color: var(--Muted); border: none; padding: 8px 16px; font-family: var(--Body); font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.13s, color 0.13s; }
.ToggleBtn.Active { background: var(--Accent); color: #fff; }
.ToggleBtn:not(.Active):hover { background: var(--Card2); color: var(--Text); }
.ExtRow { display: flex; gap: 10px; align-items: center; }
.ExtRow .Input { flex: 1; }
.DiagnoseOut { margin-top: 10px; background: var(--Card2); border: 1px solid var(--Line); border-radius: 8px; padding: 12px 14px; font-family: var(--Mono); font-size: 12px; color: var(--Muted); overflow-x: auto; white-space: pre-wrap; word-break: break-all; max-height: 260px; }
textarea.Area { resize: vertical; min-height: 42px; line-height: 1.5; }
.AnimeAlts { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: -4px 0 14px; }
.AnimeAlts span { font-size: 12.5px; color: var(--Muted); background: var(--Card); border: 1px solid var(--Line); border-radius: 6px; padding: 3px 9px; }
.RowActions { display: flex; align-items: center; gap: 8px; }
.PosterPreview { margin-bottom: 10px; }
.PosterPreview img { width: 90px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--Line); }
.Combo { position: relative; }
.ComboList { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 25; background: var(--Card2); border: 1px solid var(--Line); border-radius: 8px; box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.65); max-height: 244px; overflow-y: auto; padding: 4px; }
.ComboItem { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; color: var(--Text); cursor: pointer; }
.ComboItem:hover, .ComboItem.Active { background: var(--AccentDim); }
.ComboItem .Hl { color: var(--Accent); font-weight: 600; }
.ComboItem .Ct { font-family: var(--Mono); font-size: 11px; color: var(--Faint); flex: none; }

.Progress { align-items: center; gap: 11px; margin: 4px 0 15px; }
.Progress:not([hidden]) { display: flex; }
.ProgressTrack { flex: 1; height: 7px; background: var(--Card2); border: 1px solid var(--Line); border-radius: 999px; overflow: hidden; }
.ProgressBar { width: 0; height: 100%; background: var(--Accent); transition: width 0.15s ease; }
.ProgressText { font-size: 12.5px; color: var(--Muted); min-width: 40px; text-align: right; font-family: var(--Mono); }
.Status { font-size: 13px; color: var(--Muted); margin: 11px 0 0; min-height: 17px; }
.Status.Err { color: var(--Danger); }

.Table { width: 100%; border-collapse: collapse; font-size: 13px; }
.Table th, .Table td { text-align: left; padding: 10px 11px; border-bottom: 1px solid var(--Line2); }
.Table th { color: var(--Faint); font-weight: 600; font-family: var(--Mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.Table tbody tr { transition: background 0.1s; }
.Table tbody tr:hover { background: var(--Card2); }
.Table td a:hover { color: var(--Accent); }
.Mono { font-family: var(--Mono); color: var(--Muted); font-size: 12px; }
.InlineForm { display: inline; margin: 0; }

/* Empty + error */
.Empty { text-align: center; padding: 44px 20px; color: var(--Muted); background: var(--Card); border: 1px dashed var(--Line); border-radius: 12px; }
.Empty h3 { font-size: 16px; color: var(--Text); margin-bottom: 6px; }
.ErrorPage { flex: 1; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.ErrorCode { font-family: var(--Display); font-weight: 700; font-size: 80px; line-height: 1; color: var(--Accent); }
.ErrorMsg { color: var(--Muted); margin: 6px 0 22px; }

/* Footer */
.SiteFooter { border-top: 1px solid var(--Line2); }
.FooterInner { max-width: 1240px; margin: 0 auto; padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.FooterBrand { font-family: var(--Display); font-weight: 700; font-size: 14.5px; letter-spacing: -0.02em; }
.FooterBrand .Mark { color: var(--Accent); }
.FooterNote { color: var(--Faint); font-size: 12px; font-family: var(--Mono); }
.FooterTg { display: inline-flex; align-items: center; gap: 7px; color: var(--Muted); font-size: 13px; font-weight: 500; transition: color 0.13s; }
.FooterTg:hover { color: var(--Accent); }

@media (max-width: 900px) {
  .WatchWrap { grid-template-columns: 1fr; }
  .Aside { order: 2; }
}
@media (max-width: 680px) {
  .HeaderInner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px 14px; }
  .SearchForm { order: 3; margin-left: 0; width: 100%; }
  .SearchInput { flex: 1; width: auto; }
  .Page { padding: 22px 16px 44px; }
  .HeroInner { flex-direction: column; align-items: flex-start; padding: 20px; }
  .AnimeArt { flex-basis: auto; width: 120px; }
  .AnimeName { font-size: 25px; }
  .EpGrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 11px; }
  .PosterGrid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px 11px; }
  .FieldRow { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
