:root {
  --bg:#061019;
  --bg-deep:#030a10;
  --panel:#0b1722;
  --panel-2:#0e1c29;
  --panel-3:#132337;
  --line:rgba(149,171,211,.18);
  --line-strong:rgba(149,171,211,.34);
  --text:#f6f8ff;
  --muted:#9ca9bd;
  --muted-2:#718096;
  --violet:#7c4dff;
  --violet-2:#a55bff;
  --violet-soft:rgba(124,77,255,.18);
  --green:#42d98a;
  --orange:#ff8a37;
  --yellow:#ffd84d;
  --danger:#ff6475;
  --container:1380px;
  --header-h:64px;
  --radius:14px;
  --radius-sm:9px;
  --shadow:0 30px 90px rgba(0,0,0,.38);
}

* { box-sizing:border-box; }
html { scroll-behavior:smooth; background:var(--bg-deep); }
body {
  margin:0;
  min-height:100vh;
  color:var(--text);
  background:
    radial-gradient(900px 460px at 73% -120px, rgba(124,77,255,.16), transparent 68%),
    linear-gradient(180deg, #07121d, #04101a 45%, #030a10);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:15px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body.has-modal { overflow:hidden; }
a { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; height:auto; }
button,input,textarea,select { font:inherit; color:inherit; }
button { cursor:pointer; }
[hidden] { display:none !important; }

.container { width:min(calc(100% - 40px), var(--container)); margin-inline:auto; }
.page-shell { padding:24px 0 64px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:fixed; z-index:9999; top:12px; left:12px; padding:10px 14px; border-radius:8px; background:var(--violet); transform:translateY(-160%); }
.skip-link:focus { transform:none; }
:focus-visible { outline:2px solid #b892ff; outline-offset:3px; }

/* Header */
.site-header { position:sticky; top:0; z-index:200; background:rgba(4,12,20,.82); border-bottom:1px solid rgba(255,255,255,.05); backdrop-filter:blur(18px); }
.site-header.is-scrolled { box-shadow:0 10px 40px rgba(0,0,0,.28); }
.site-header__inner { min-height:var(--header-h); display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:28px; }
.brand { display:inline-flex; align-items:center; }
.brand img { width:150px; height:auto; }
.desktop-nav { display:flex; align-items:center; gap:26px; color:#d6deea; font-size:13px; font-weight:650; }
.desktop-nav a,.nav-button { position:relative; border:0; background:none; padding:22px 0; color:inherit; }
.desktop-nav a::after,.nav-button::after { content:""; position:absolute; left:0; right:0; bottom:0; height:2px; background:linear-gradient(90deg,var(--violet),var(--violet-2)); transform:scaleX(0); transform-origin:left; transition:.18s ease; }
.desktop-nav a:hover,.nav-button:hover { color:#fff; }
.desktop-nav a:hover::after,.nav-button:hover::after { transform:scaleX(1); }
.header-actions { display:flex; align-items:center; gap:10px; }
.header-search { width:315px; height:38px; display:grid; grid-template-columns:1fr 40px; align-items:center; border:1px solid var(--line); border-radius:9px; background:rgba(16,31,48,.72); overflow:hidden; }
.header-search input { width:100%; height:100%; padding:0 13px; border:0; outline:0; background:none; color:#e8eef7; }
.header-search input::placeholder { color:#708097; }
.header-search button,.account-button { border:0; background:none; display:grid; place-items:center; }
.header-search button { height:100%; }
.header-search svg,.account-button svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.account-button { width:38px; height:38px; border-radius:9px; color:#f4f5fa; }
.account-button:hover { background:rgba(255,255,255,.06); }
.login-popover { position:absolute; right:max(20px,calc((100% - var(--container))/2)); top:calc(100% + 8px); z-index:220; width:min(330px,calc(100vw - 32px)); padding:16px; border:1px solid var(--line); border-radius:12px; background:#0b1722; box-shadow:var(--shadow); }

.category-drawer { position:fixed; inset:0; z-index:300; display:flex; justify-content:flex-end; background:rgba(0,0,0,.65); backdrop-filter:blur(5px); }
.category-drawer__panel { width:min(520px,100%); height:100%; padding:24px; overflow:auto; background:#081522; border-left:1px solid var(--line); box-shadow:-24px 0 70px rgba(0,0,0,.38); }
.category-drawer__head { display:flex; justify-content:space-between; align-items:center; margin-bottom:22px; font-size:20px; }
.category-drawer__head button { width:38px; height:38px; border:1px solid var(--line); border-radius:9px; background:#101f2d; }
.category-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.category-grid a { padding:11px 12px; border:1px solid var(--line); border-radius:8px; background:#0d1b28; color:#cdd7e4; }
.category-grid a:hover { border-color:#7657d9; background:#142138; color:#fff; }

/* Generic */
.section-head,.section-title { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:14px; }
.section-head h2,.section-title h2 { margin:0; font-size:22px; line-height:1.15; letter-spacing:-.02em; }
.section-head p,.section-title p { margin:5px 0 0; color:var(--muted); font-size:12px; }
.section-head>a { color:#a991ff; font-size:12px; }
.section-head>a:hover { color:#fff; }
.btn,.watch-button { min-height:42px; padding:0 16px; border-radius:8px; border:1px solid var(--line); display:inline-flex; align-items:center; justify-content:center; font-weight:700; }
.btn--accent,.watch-button { color:#fff; background:linear-gradient(135deg,#6b45f5,#9658ff); border-color:#976fff; box-shadow:0 12px 30px rgba(124,77,255,.22); }
.btn--accent:hover,.watch-button:hover { filter:brightness(1.08); }
.btn--ghost { background:rgba(255,255,255,.04); }
.btn--ghost:hover { background:rgba(255,255,255,.08); }
.breadcrumbs { padding:14px 0 12px; color:#74849b; font-size:12px; }
.breadcrumbs a:hover { color:#bdabff; }

/* Home */
.home-shell { padding:16px 0 58px; }
.home-hero { margin-bottom:30px; }
.hero-card { min-height:510px; position:relative; overflow:hidden; border:1px solid var(--line); border-radius:16px; background-image:linear-gradient(90deg,rgba(3,10,17,.97) 0%,rgba(3,10,17,.82) 38%,rgba(3,10,17,.24) 72%,rgba(3,10,17,.4)),var(--hero-bg,linear-gradient(135deg,#172746,#160b30)); background-position:center; background-size:cover; box-shadow:var(--shadow); }
.hero-card__shade { position:absolute; inset:auto 0 0; height:35%; background:linear-gradient(transparent,rgba(3,9,15,.75)); pointer-events:none; }
.hero-card__content { position:relative; z-index:1; width:min(630px,56%); padding:56px 48px; }
.eyebrow { display:inline-flex; padding:5px 9px; border-radius:7px; border:1px solid rgba(166,120,255,.3); background:rgba(124,77,255,.12); color:#cdbdff; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.hero-card h1 { margin:14px 0 2px; font-size:clamp(38px,4.3vw,67px); line-height:.98; letter-spacing:-.045em; }
.hero-original { color:#bac4d3; font-size:20px; margin-bottom:14px; }
.hero-meta { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 16px; }
.hero-meta span,.tag-row span { padding:5px 9px; border:1px solid var(--line); border-radius:8px; background:rgba(16,30,45,.72); color:#c9d4e4; font-size:12px; }
.external-ratings { display:flex; gap:10px; margin:10px 0 14px; }
.external-rating { min-width:130px; padding:9px 12px; border:1px solid var(--line); border-radius:9px; background:rgba(7,17,27,.8); display:grid; grid-template-columns:auto 1fr; align-items:baseline; gap:2px 8px; }
.external-rating small { font-weight:800; color:#ff8c42; }
.external-rating--imdb small { color:#ffd84d; }
.external-rating strong { font-size:20px; }
.external-rating span { grid-column:1/-1; color:#8797ac; font-size:10px; }
.update-pill { display:inline-flex; align-items:center; gap:7px; padding:6px 9px; border:1px solid rgba(66,217,138,.4); border-radius:7px; background:rgba(34,157,101,.12); color:#8af0ba; font-size:11px; }
.hero-summary { max-width:570px; margin:15px 0 0; color:#c3cedb; }
.hero-actions { display:flex; gap:10px; margin-top:20px; }
.home-section { margin:0 0 30px; }
.poster-rail,.rating-rail,.continue-rail { display:grid; grid-auto-flow:column; grid-auto-columns:170px; gap:12px; overflow-x:auto; padding:2px 2px 10px; scroll-snap-type:x proximity; scrollbar-width:none; }
.poster-rail::-webkit-scrollbar,.rating-rail::-webkit-scrollbar,.continue-rail::-webkit-scrollbar { display:none; }
.poster-card,.rating-card,.continue-card { min-width:0; scroll-snap-align:start; }
.poster-card__media,.rating-card__media { position:relative; display:block; aspect-ratio:2/3; overflow:hidden; border-radius:10px; border:1px solid var(--line); background:#0b1722; transition:transform .18s ease,border-color .18s ease; }
.poster-card__media:hover,.rating-card__media:hover { transform:translateY(-4px); border-color:rgba(160,110,255,.65); }
.poster-card__media img,.rating-card__media img { width:100%; height:100%; object-fit:cover; }
.poster-score { position:absolute; top:7px; left:7px; padding:3px 6px; border-radius:6px; background:rgba(0,0,0,.72); color:#ffd45d; font-size:11px; font-weight:800; }
.poster-update { position:absolute; left:7px; right:7px; bottom:7px; padding:5px 6px; border-radius:6px; background:rgba(3,9,15,.82); color:#d8e0ea; font-size:9px; text-align:center; backdrop-filter:blur(6px); }
.poster-card h3,.rating-card h3,.continue-card h3 { margin:8px 0 2px; font-size:12px; line-height:1.3; }
.poster-card p,.rating-card p { margin:0; color:#7f8da0; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rating-rail { grid-auto-columns:190px; }
.rating-card { border:1px solid var(--line); border-radius:11px; padding:8px; background:rgba(10,23,34,.72); }
.rating-card__media { aspect-ratio:16/10; }
.rating-card__metric { display:flex; align-items:center; gap:8px; margin-top:8px; min-height:24px; }
.rating-card__score { color:#f6d36b; font-weight:900; }
.rating-card__score--positive { color:#70e6aa; }
.rating-card__metric small { color:#7f8da0; font-size:9px; }
.rating-readonly a { pointer-events:none; }
.continue-rail { grid-auto-columns:250px; }
.continue-card>a { position:relative; display:block; aspect-ratio:16/9; border-radius:10px; overflow:hidden; border:1px solid var(--line); }
.continue-card img { width:100%; height:100%; object-fit:cover; }
.continue-card__play { position:absolute; inset:50% auto auto 50%; transform:translate(-50%,-50%); width:40px; height:40px; display:grid; place-items:center; border-radius:50%; background:rgba(124,77,255,.85); }
.editorial-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:8px 0 28px; }
.editorial-card { min-height:76px; padding:13px; border:1px solid var(--line); border-radius:11px; background:linear-gradient(135deg,rgba(14,28,42,.9),rgba(9,20,31,.75)); display:flex; align-items:center; gap:12px; }
.editorial-card:hover { border-color:#6c55ba; transform:translateY(-2px); }
.editorial-card>strong { width:40px; height:40px; border-radius:10px; display:grid; place-items:center; background:var(--violet-soft); color:#bda7ff; }
.editorial-card span { display:grid; }
.editorial-card b { font-size:12px; }
.editorial-card small { color:#7f8da0; font-size:9px; }
.home-info-grid { display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:12px; }
.home-info-grid article { min-height:150px; padding:18px; border:1px solid var(--line); border-radius:12px; background:#0a1722; }
.home-info-grid h2 { margin:0 0 8px; font-size:17px; }
.home-info-grid p { color:#92a0b2; font-size:12px; }
.home-info-grid a { color:#ad94ff; font-size:11px; }
.feature-list { display:grid; grid-template-columns:1fr 1fr; gap:8px; color:#b7c4d4; font-size:11px; }

/* Full story */
.series-page { padding-bottom:30px; }
.series-hero { min-height:520px; position:relative; overflow:hidden; border:1px solid var(--line); border-radius:16px; background-image:linear-gradient(90deg,rgba(3,10,17,.99) 0%,rgba(3,10,17,.87) 38%,rgba(3,10,17,.25) 70%,rgba(3,10,17,.36)),var(--series-bg,linear-gradient(135deg,#16253b,#160b30)); background-position:center; background-size:cover; box-shadow:var(--shadow); }
.series-hero__veil { position:absolute; inset:auto 0 0; height:35%; background:linear-gradient(transparent,rgba(2,8,14,.78)); pointer-events:none; }
.series-hero__content { position:relative; z-index:1; width:min(700px,58%); padding:40px 38px; }
.series-hero h1 { margin:0 0 3px; font-size:clamp(40px,5vw,64px); line-height:.98; letter-spacing:-.04em; }
.series-original { font-size:21px; color:#c7cfdb; }
.tag-row { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0; }
.update-pill--hero { margin:0 0 10px; }
.update-pill i { opacity:.5; font-style:normal; }
.ratings-grid { display:flex; flex-wrap:wrap; gap:10px; margin:6px 0 14px; }
.rating-source,.user-rating { min-width:160px; min-height:82px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:rgba(5,15,24,.82); }
.rating-source { display:grid; grid-template-columns:1fr auto; align-items:start; }
.rating-source__brand { grid-column:1/-1; font-size:11px; font-weight:800; color:#c7d0dc; }
.rating-source strong { font-size:23px; color:#ff8b43; }
.rating-source--imdb strong { color:#ffd748; }
.rating-source strong small { font-size:11px; color:#c5ced9; }
.rating-source em { grid-column:1/-1; color:#8190a2; font-size:9px; font-style:normal; }
.user-rating { display:grid; grid-template-columns:1fr auto; gap:2px 10px; align-items:center; }
.user-rating__label { grid-column:1/-1; color:#c6d0dc; font-size:11px; font-weight:800; }
.user-rating__score { font-size:21px; font-weight:900; min-width:45px; }
.user-rating__score small { font-size:10px; color:#8896a9; }
.user-rating__actions { display:flex; gap:5px; align-items:center; }
.user-rating__actions>a { display:inline-flex; text-decoration:none; }
.rating-vote { min-width:32px; height:30px; padding:0 7px; display:inline-flex; align-items:center; justify-content:center; gap:4px; border:1px solid var(--line); border-radius:7px; background:#0f2030; transition:.16s ease; }
.rating-vote:hover { transform:translateY(-1px); border-color:#7059ba; background:#18263c; }
.rating-vote--up:hover { border-color:rgba(66,217,138,.55); }
.rating-vote--down:hover { border-color:rgba(255,100,117,.5); }
.rating-vote span { font-size:11px; font-weight:800; }
.user-rating__votes { grid-column:1/-1; color:#7f8da0; font-size:9px; }
.user-rating__native .rating,.user-rating__score .rating { display:inline-flex; align-items:center; }
.hero-description { margin-top:8px; }
.hero-description__text { max-height:72px; overflow:hidden; color:#c4cedb; position:relative; }
.hero-description:not(.is-expanded) .hero-description__text::after { content:""; position:absolute; left:0; right:0; bottom:0; height:28px; background:linear-gradient(transparent,rgba(3,10,17,.9)); }
.hero-description.is-expanded .hero-description__text { max-height:none; }
.story-toggle { margin-top:7px; border:1px solid var(--line); border-radius:8px; background:#102033; padding:7px 10px; color:#d7dfeb; font-size:11px; }
.watch-button { margin-top:14px; }
.content-section { margin-top:16px; padding:18px; border-top:1px solid var(--line); }
.player-shell { overflow:hidden; border:1px solid var(--line-strong); border-radius:12px; background:#030912; }
.player-stage { position:relative; min-height:0; aspect-ratio:16/9; overflow:hidden; display:grid; place-items:center; background:#02070c; }
.player-stage.is-loaded { display:block; }
.player-stage iframe,.player-stage video,.player-stage embed,.player-stage object { width:100% !important; height:100% !important; min-height:100%; border:0; }
.player-cover { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.62; filter:saturate(.85); }
.player-stage::after { content:""; position:absolute; inset:0; background:radial-gradient(circle at center,transparent 0 20%,rgba(0,0,0,.2) 60%,rgba(0,0,0,.65)); pointer-events:none; }
.player-stage.is-loaded::after { display:none; }
.player-launch { position:relative; z-index:2; border:0; background:none; display:grid; justify-items:center; gap:6px; color:#fff; }
.player-launch>span { width:72px; height:72px; display:grid; place-items:center; padding-left:5px; border:2px solid #c1a2ff; border-radius:50%; background:rgba(124,77,255,.32); box-shadow:0 0 40px rgba(124,77,255,.45); font-size:28px; }
.player-launch b { font-size:14px; }
.player-launch small { color:#a8b4c3; }
.player-tabs { min-height:50px; padding:8px 10px; display:flex; gap:8px; align-items:center; border-top:1px solid var(--line); background:#07111c; }
.player-tab { min-height:34px; padding:0 13px; border:1px solid var(--line); border-radius:7px; background:#111f30; color:#bcc7d5; }
.player-tab.is-active { color:#fff; border-color:#8e68ff; background:linear-gradient(135deg,#6340e8,#8e4eff); box-shadow:0 0 18px rgba(124,77,255,.3); }
.player-empty { padding:15px; color:#91a0b3; }
.creators-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.creator-card { min-height:120px; padding:16px; display:grid; grid-template-columns:38px 1fr; gap:12px; border:1px solid var(--line); border-radius:11px; background:#0a1722; }
.creator-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; background:rgba(124,77,255,.18); color:#c4afff; }
.creator-card h3 { margin:0 0 9px; font-size:14px; }
.creator-card p { margin:0; color:#b6c2d0; font-size:12px; }
.facts-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:9px; }
.fact { min-height:78px; padding:12px; display:flex; flex-direction:column; justify-content:center; border:1px solid var(--line); border-radius:10px; background:#0b1926; }
.fact small { color:#8493a6; font-size:9px; }
.fact strong { margin-top:3px; font-size:13px; }
.full-story { margin-top:14px; color:#c0cad7; font-size:13px; }
.full-story p { margin:0 0 12px; }
.related-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:10px; }
.related-card__media { display:block; aspect-ratio:2/3; overflow:hidden; border-radius:9px; border:1px solid var(--line); background:#0c1722; }
.related-card__media img { width:100%; height:100%; object-fit:cover; }
.related-card h3 { font-size:11px; margin:7px 0 0; line-height:1.35; }
.comments-section { margin-bottom:10px; }
.comment-compose { padding:16px; border:1px solid var(--line); border-radius:12px; background:#0a1722; }
.comment-form h3 { margin:0 0 13px; font-size:18px; }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:10px; }
.comment-form label>span { display:block; margin-bottom:5px; color:#8796aa; font-size:10px; }
.form-control,.editor-wrap textarea { width:100% !important; border:1px solid var(--line) !important; border-radius:8px !important; background:#06111c !important; color:#e7edf6 !important; padding:10px 12px !important; }
.editor-wrap { margin-bottom:10px; }
.editor-wrap textarea { min-height:145px !important; }
.check-row { display:flex !important; align-items:center; gap:8px; margin:10px 0; color:#99a7b8; font-size:11px; }
.check-row span { margin:0 !important; }
.captcha-row { display:flex; align-items:center; gap:12px; margin:10px 0; }
.comments-list { margin-top:12px; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#08141f; }
.comment-card { display:grid; grid-template-columns:42px 1fr; gap:11px; padding:14px; border-bottom:1px solid var(--line); }
.comment-card:last-child { border-bottom:0; }
.comment-card__avatar img { width:42px; height:42px; border-radius:50%; object-fit:cover; }
.comment-card__body header { display:flex; justify-content:space-between; gap:12px; }
.comment-card__body time { color:#7f8da0; font-size:9px; }
.comment-card__text { margin:7px 0; color:#c1cad7; }
.comment-card__body footer { display:flex; flex-wrap:wrap; gap:12px; color:#8d9caf; font-size:10px; }
.comment-action--danger { color:#ff7484; }
.comment-rating a { margin-right:8px; }

/* Category */
.catalog-shell { padding-top:24px; }
.catalog-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:16px; }
.catalog-card { min-width:0; }
.catalog-card__poster { position:relative; display:block; aspect-ratio:2/3; overflow:hidden; border:1px solid var(--line); border-radius:11px; background:#0a1722; transition:.18s ease; }
.catalog-card__poster:hover { transform:translateY(-4px); border-color:#7357c4; box-shadow:0 14px 34px rgba(0,0,0,.28); }
.catalog-card__poster img { width:100%; height:100%; object-fit:cover; }
.catalog-card__kp { position:absolute; top:8px; left:8px; padding:4px 7px; border-radius:6px; background:rgba(3,9,14,.86); color:#f4d56b; font-size:10px; font-weight:900; }
.catalog-card__episode { position:absolute; left:8px; right:8px; bottom:8px; padding:5px 6px; border-radius:6px; background:rgba(3,9,14,.84); text-align:center; color:#d7e0eb; font-size:9px; }
.catalog-card__body { padding:8px 2px 2px; }
.catalog-card h2 { margin:0; font-size:13px; line-height:1.35; }
.catalog-card__meta { margin:4px 0; color:#7e8da1; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.catalog-card__rating { display:flex; align-items:center; gap:8px; color:#c6d0dc; font-size:10px; }
.catalog-card__rating small { color:#718096; }
.catalog-likes { color:#70dfa7; }
.catalog-dislikes { color:#f18b98; }

/* DLE pages / forms */
.form-page,.content-page,.system-message,.profile-card,.poll-box { border:1px solid var(--line); border-radius:12px; background:#0a1722; padding:18px; }
.form-stack { display:grid; gap:12px; }
.login-box { display:grid; gap:10px; }
.login-box label span { display:block; margin-bottom:4px; color:#8795a8; font-size:10px; }
.login-links { display:flex; justify-content:space-between; gap:10px; color:#8f9eb0; font-size:11px; }
.pagination,.dle-comments-navigation { display:flex; justify-content:center; align-items:center; gap:7px; margin-top:24px; }
.pagination a,.pagination span,.dle-comments-navigation a,.dle-comments-navigation span { min-width:38px; height:38px; display:grid; place-items:center; padding:0 10px; border:1px solid var(--line); border-radius:8px; background:#0c1925; }

/* Footer */
.site-footer { margin-top:20px; padding:32px 0 18px; border-top:1px solid var(--line); background:#030b12; }
.footer-top { display:grid; grid-template-columns:1fr auto; gap:30px; align-items:start; }
.footer-brand img { width:145px; }
.footer-brand p { max-width:360px; color:#8493a6; font-size:11px; }
.footer-nav { display:grid; grid-template-columns:repeat(3,auto); gap:10px 30px; color:#a3afbe; font-size:11px; }
.footer-nav a:hover { color:#fff; }
.footer-bottom { display:flex; justify-content:space-between; margin-top:26px; padding-top:15px; border-top:1px solid var(--line); color:#68778b; font-size:10px; }
.mobile-nav { display:none; }

@media (max-width:1100px) {
  .header-search { width:240px; }
  .hero-card__content,.series-hero__content { width:68%; }
  .editorial-grid { grid-template-columns:1fr 1fr; }
  .home-info-grid { grid-template-columns:1fr 1fr; }
  .home-info-grid article:first-child { grid-column:1/-1; }
  .facts-grid { grid-template-columns:repeat(3,1fr); }
  .related-grid { grid-template-columns:repeat(4,1fr); }
  .catalog-grid { grid-template-columns:repeat(4,1fr); }
}

@media (max-width:800px) {
  :root { --header-h:58px; }
  body { padding-bottom:76px; }
  .container { width:calc(100% - 24px); }
  .site-header__inner { grid-template-columns:auto 1fr; gap:12px; }
  .desktop-nav { display:none; }
  .header-actions { justify-self:end; }
  .header-search { width:min(48vw,270px); }
  .hero-card { min-height:580px; background-image:linear-gradient(0deg,rgba(3,10,17,.98) 0%,rgba(3,10,17,.83) 45%,rgba(3,10,17,.18) 76%),var(--hero-bg,linear-gradient(135deg,#172746,#160b30)); background-position:65% center; }
  .hero-card__content { width:100%; padding:245px 22px 26px; }
  .hero-card h1 { font-size:42px; }
  .series-hero { min-height:650px; background-image:linear-gradient(0deg,rgba(3,10,17,.99) 0%,rgba(3,10,17,.88) 46%,rgba(3,10,17,.18) 76%),var(--series-bg,linear-gradient(135deg,#16253b,#160b30)); background-position:65% center; }
  .series-hero__content { width:100%; padding:270px 20px 24px; }
  .series-hero h1 { font-size:42px; }
  .ratings-grid { gap:8px; }
  .rating-source,.user-rating { min-width:145px; flex:1; }
  .creators-grid { grid-template-columns:1fr; }
  .related-grid { grid-template-columns:repeat(3,1fr); }
  .catalog-grid { grid-template-columns:repeat(3,1fr); gap:12px; }
  .footer-top { grid-template-columns:1fr; }
  .footer-nav { grid-template-columns:repeat(3,auto); justify-content:start; }
  .mobile-nav { position:fixed; z-index:190; left:10px; right:10px; bottom:max(10px,env(safe-area-inset-bottom)); min-height:58px; display:grid; grid-template-columns:repeat(4,1fr); border:1px solid var(--line-strong); border-radius:14px; background:rgba(7,18,29,.92); backdrop-filter:blur(18px); box-shadow:0 18px 50px rgba(0,0,0,.45); overflow:hidden; }
  .mobile-nav a,.mobile-nav button { border:0; background:none; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; color:#9cabbe; }
  .mobile-nav span { font-size:17px; color:#c5b1ff; }
  .mobile-nav small { font-size:8px; }
}

@media (max-width:560px) {
  body { font-size:14px; }
  .brand img { width:122px; }
  .header-search { width:42vw; }
  .header-search input { font-size:11px; padding-left:9px; }
  .account-button { display:none; }
  .hero-card { min-height:560px; }
  .hero-card__content { padding:220px 16px 20px; }
  .hero-card h1 { font-size:35px; }
  .hero-original { font-size:16px; }
  .hero-summary { max-height:65px; overflow:hidden; font-size:12px; }
  .external-rating { min-width:120px; }
  .poster-rail { grid-auto-columns:138px; }
  .rating-rail { grid-auto-columns:170px; }
  .editorial-grid,.home-info-grid { grid-template-columns:1fr; }
  .home-info-grid article:first-child { grid-column:auto; }
  .section-head h2,.section-title h2 { font-size:18px; }
  .series-hero { min-height:630px; }
  .series-hero__content { padding:235px 16px 18px; }
  .series-hero h1 { font-size:35px; }
  .series-original { font-size:16px; }
  .ratings-grid { display:grid; grid-template-columns:1fr 1fr; }
  .user-rating { grid-column:1/-1; }
  .content-section { padding:15px 0; }
  .facts-grid { grid-template-columns:1fr 1fr; }
  .related-grid { grid-template-columns:1fr 1fr; }
  .field-row { grid-template-columns:1fr; }
  .catalog-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .catalog-card h2 { font-size:12px; }
  .footer-nav { grid-template-columns:1fr 1fr; }
  .footer-bottom { flex-direction:column; gap:5px; }
  .category-drawer__panel { padding:16px; }
}

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

/* DLE navigation is emitted together with {content}; keep it out of poster columns. */
.catalog-grid > .pagination,.catalog-grid > .dle-comments-navigation{grid-column:1/-1;width:100%}

/* v1.2.0: navigation works without JavaScript */
.nav-details,.account-details{position:relative}
.nav-details>summary,.account-details>summary{list-style:none;cursor:pointer}
.nav-details>summary::-webkit-details-marker,.account-details>summary::-webkit-details-marker{display:none}
.nav-details__panel{position:absolute;top:calc(100% + 14px);left:50%;transform:translateX(-50%);width:min(760px,calc(100vw - 32px));padding:18px;background:#0d1822;border:1px solid rgba(255,255,255,.1);border-radius:18px;box-shadow:0 24px 70px rgba(0,0,0,.45);z-index:320}
.nav-details__panel .category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.nav-details__panel .category-grid a{display:block;padding:10px 12px;border-radius:10px;background:rgba(255,255,255,.045);color:#dce7f1;text-decoration:none}
.nav-details__panel .category-grid a:hover{background:rgba(255,255,255,.09)}
.account-details .login-popover{display:block;position:absolute;right:0;top:calc(100% + 14px);z-index:330;min-width:300px}
.continue-card__placeholder{display:block;aspect-ratio:16/9;background:#101b25}
@media(max-width:900px){.nav-details__panel .category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.desktop-nav{display:none}}

/* v1.2.0 home categories / catalog */
.home-category-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.home-category-grid a{padding:11px 12px;border:1px solid var(--line);border-radius:9px;background:#0d1b28;color:#cdd7e4;text-align:center;text-decoration:none}
.home-category-grid a:hover{border-color:#7657d9;background:#142138;color:#fff;transform:translateY(-1px)}
.home-catalog{margin-top:26px}
.catalog-sort{margin:0 0 16px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#091723}
@media(max-width:1100px){.home-category-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){.home-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* DLE may wrap {content} in #dle-content; expose its children to the grid. */
.catalog-grid>#dle-content,.catalog-grid #dle-content{display:contents}

/* OS_HOTFIX_CATEGORY_20260907
   Local fix: lastnews cards, category speedbar and DLE pagination.
   Safe to keep with existing user CSS overrides. */
.catalog-grid > #dle-content,
.catalog-grid #dle-content {
  display: contents;
}

.category-breadcrumbs {
  width: 100%;
  margin: 0 0 14px;
  padding-top: 0;
}

.pagination {
  flex-wrap: wrap;
}

.pagination > .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.pagination > .page-numbers > a,
.pagination > .page-numbers > span {
  margin: 0;
}

/* Compatibility if an older navigation.tpl still contains inner spans. */
.pagination > a > .page-link,
.pagination > a > span.page-link {
  min-width: 0;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: inline;
}

@media (max-width: 700px) {
  .pagination {
    gap: 6px;
  }
  .pagination > .page-numbers {
    width: 100%;
    order: 2;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 2px 2px 6px;
    scrollbar-width: none;
  }
  .pagination > .page-numbers::-webkit-scrollbar {
    display: none;
  }
  .pagination > a:first-child {
    margin-right: auto;
  }
  .pagination > a:last-child {
    margin-left: auto;
  }
}
