:root {
  --bg: #fff;
  --surface: #fff;
  --surface-2: #f7f6fb;
  --surface-3: #eeebf8;
  --text: #171627;
  --muted: #767386;
  --accent: #7557ff;
  --accent-2: #9d7dff;
  --accent-dark: #5f40df;
  --success: #198b67;
  --danger: #c9495f;
  --line: #e9e8ee;
  --shadow: 0 18px 55px rgba(31, 25, 66, .08);
  --shadow-soft: 0 8px 28px rgba(31, 25, 66, .06);
  --radius: 18px;
  --radius-sm: 12px;
  --page: 1390px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { display: block; }
[hidden] { display: none !important; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 999; padding: 10px 14px; border-radius: 10px; background: var(--text); color: #fff; transition: top .2s; }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid rgba(117, 87, 255, .35); outline-offset: 3px; }
.site-container { width: min(calc(100% - 40px), var(--page)); margin-inline: auto; }
.site-main { min-height: 58vh; padding-bottom: 24px; }
.muted { color: var(--muted); }
.honeypot { position: fixed !important; left: -10000px !important; opacity: 0 !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.text-link { color: var(--accent); font-weight: 750; }
.text-link:hover { color: var(--accent-dark); }

.site-header { position: sticky; top: 0; z-index: 70; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.header-inner { min-height: 72px; display: grid; grid-template-columns: auto auto minmax(280px, 1fr) auto; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: max-content; font-size: 22px; line-height: 1; font-weight: 850; letter-spacing: -.7px; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.nav-button, .account-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; background: transparent; font-weight: 700; }
.nav-button { padding: 0 12px; }
.nav-button:hover, .account-button:hover { background: var(--surface-2); }
.nav-button svg { width: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .2s; }
.nav-burger { display: none; }
.genres-menu.is-open .nav-chevron { transform: rotate(180deg); }
.genres-menu, .account-menu { position: relative; }
.genres-panel, .account-panel { position: absolute; top: calc(100% + 10px); z-index: 80; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .18s ease; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.genres-panel.is-open, .account-panel.is-open { opacity: 1; visibility: visible; transform: none; }
.genres-panel { left: 0; padding: 16px; }
.genres-grid { display: grid; grid-template-rows: repeat(6, auto); grid-auto-flow: column; grid-auto-columns: minmax(138px, 1fr); gap: 3px 8px; }
.genres-grid a, .account-panel a, .account-panel button { min-height: 38px; display: flex; align-items: center; border: 0; border-radius: 10px; background: transparent; padding: 8px 11px; white-space: nowrap; font-size: 14px; text-align: left; }
.genres-grid a:hover, .account-panel a:hover, .account-panel button:hover { background: var(--surface-2); color: var(--accent); }
.header-search { position: relative; height: 44px; display: grid; grid-template-columns: 20px minmax(0,1fr) 32px auto; align-items: center; gap: 8px; width: 100%; max-width: 520px; justify-self: center; margin-inline: auto; padding: 0 6px 0 15px; background: var(--surface-2); border-radius: 14px; transition: background .18s; }
.header-search:focus-within { background: #f3f2f7; }
.header-search > svg { grid-column: 1; width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.header-search input { grid-column: 2; min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: transparent; }
.header-search input:focus, .header-search input:focus-visible { outline: 0; box-shadow: none; }
.header-search input::-webkit-search-decoration, .header-search input::-webkit-search-cancel-button, .header-search input::-webkit-search-results-button, .header-search input::-webkit-search-results-decoration { display: none; -webkit-appearance: none; }
.header-search input::placeholder { color: #aaa6b6; }
.header-search button { height: 34px; border: 0; border-radius: 9px; }
.header-search > button[type="submit"] { grid-column: 4; min-width: 82px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; background: var(--accent); color: #fff; white-space: nowrap; font-size: 13px; font-weight: 750; }
.header-search > button[type="submit"] svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.search-clear { grid-column: 3; width: 32px; display: grid; place-items: center; padding: 0; background: transparent; color: var(--muted); }
.search-clear:hover { color: var(--text); background: #e9e7ef; }
.search-clear svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search-popover { position: absolute; left: 0; right: 0; top: calc(100% + 9px); z-index: 95; display: grid; gap: 3px; max-height: min(520px, 70vh); overflow-y: auto; padding: 8px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.search-popover > a:not(.search-all) { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; padding: 7px; border-radius: 11px; }
.search-popover > a:hover { background: var(--surface-2); }
.search-popover img, .mini-placeholder { width: 42px; height: 58px; display: grid; place-items: center; border-radius: 8px; object-fit: cover; background: var(--surface-3); color: var(--accent); font-size: 11px; font-weight: 900; }
.search-popover strong, .search-popover small { display: block; }
.search-popover small { color: var(--muted); }
.search-popover > a > b { color: var(--accent); }
.search-all { padding: 10px; border-radius: 9px; color: var(--accent); text-align: center; font-weight: 750; }
.search-empty { padding: 20px; color: var(--muted); text-align: center; }
.account-button { padding: 3px 5px 3px 8px; }
.account-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-panel { right: 0; width: 205px; padding: 8px; }
.account-panel button { width: 100%; }

.avatar { --avatar-color: var(--accent); width: 48px; height: 48px; flex: 0 0 auto; display: inline-grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--avatar-color); color: #fff; font-size: 18px; font-weight: 850; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-small { width: 36px; height: 36px; font-size: 14px; }

.breadcrumbs { min-height: 46px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span[aria-current] { color: var(--text); }

.home-hero { margin-top: 20px; padding: 24px 0 38px; }
.section-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.section-heading h1, .section-heading h2 { margin: 0; letter-spacing: -.6px; line-height: 1.12; }
.section-heading h1 { font-size: clamp(24px, 3vw, 34px); }
.section-heading h2 { font-size: clamp(22px, 2.4vw, 29px); }
.eyebrow { display: inline-block; margin-bottom: 7px; color: var(--accent); font-size: 11px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.hero-heading { justify-content: space-between; }
.carousel-controls { display: flex; gap: 8px; margin-left: auto; }
.carousel-controls button { width: 40px; height: 40px; border: 0; border-radius: 11px; background: var(--surface-2); color: var(--accent); font-size: 20px; }
.carousel-controls button:hover { background: var(--accent); color: #fff; }
.popular-carousel { overflow: hidden; }
.carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 70px) / 6); gap: 14px; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-cell { min-width: 0; scroll-snap-align: start; }
.carousel-cell .poster-card { width: 100%; }
.hero-empty { min-height: 280px; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 36px 0; }
.hero-empty img { width: 90px; height: 90px; }
.hero-empty h2 { margin: 0 0 6px; }
.hero-empty p { max-width: 620px; margin: 0 0 18px; color: var(--muted); }

.catalog-section { margin-top: 0; padding: 38px 0; }
.catalog-section .section-heading { flex-wrap: wrap; }
.section-more { margin-left: auto; color: var(--accent); font-weight: 750; font-size: 13px; }
.section-more:hover { color: var(--accent-dark); }
.sort-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.sort-tabs button, .sort-tabs a { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; padding: 0 12px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; }
.sort-tabs .is-active { background: var(--accent); color: #fff; box-shadow: 0 5px 15px rgba(117,87,255,.2); }
.poster-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 14px; min-width: 0; }
.poster-card { min-width: 0; }
.poster-image { position: relative; overflow: hidden; aspect-ratio: 2 / 3; border-radius: 14px; background: linear-gradient(135deg, #ede9fb, #ddd6f5); }
.poster-image > img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.poster-link:hover .poster-image > img { transform: scale(1.025); }
.poster-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; color: #4d426a; background: radial-gradient(circle at 30% 20%, #f7f3ff, #ddd4fa); }
.poster-placeholder img { width: 58px; height: 58px; object-fit: contain; }
.poster-placeholder span { font-size: 13px; font-weight: 800; }
.poster-card h3 { margin: 9px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 1.25; }
.poster-link:hover h3 { color: var(--accent); }
.site-rating { position: absolute; left: 9px; bottom: 9px; min-width: 47px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 5px 7px; border-radius: 9px; background: rgba(17,15,28,.84); color: #fff; backdrop-filter: blur(8px); }
.site-rating b { font-size: 13px; }
.site-rating small { color: #bdaeff; font-size: 9px; font-weight: 900; }
.season-badge { position: absolute; right: 9px; top: 9px; max-width: calc(100% - 18px); padding: 5px 8px; border-radius: 8px; background: rgba(255,255,255,.9); color: var(--text); font-size: 10px; font-weight: 800; backdrop-filter: blur(8px); }
.card-meta { min-height: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.card-meta b { font-weight: 900; }
.kp { color: #ed8a18; }
.imdb { color: #d4a719; }
.empty-state { grid-column: 1 / -1; min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 30px 0; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--text); font-size: 17px; }
.empty-state.compact { min-height: 110px; }

.seo-section { margin-top: 0; margin-bottom: 0; padding: 38px 0; }
.seo-section { position: relative; }
.seo-copy { overflow: visible; }
.seo-copy h2 { margin: 0 0 10px; }
.seo-copy p { margin: 0 0 14px; color: var(--muted); }
.seo-copy a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(117,87,255,.28); text-underline-offset: 3px; }
.seo-copy a:hover { color: var(--accent-dark); text-decoration-color: currentColor; }
.seo-benefits { display: grid; gap: 9px; max-width: 1050px; margin: 20px 0; padding: 0; list-style: none; color: #4f4d59; }
.seo-benefits li { position: relative; padding-left: 22px; }
.seo-benefits li::before { content: "✦"; position: absolute; left: 0; color: var(--accent); }
.text-button { border: 0; background: transparent; color: var(--accent); padding: 8px 0 0; font-weight: 750; }

.page-heading { padding: 28px 0 18px; }
.page-heading h1 { margin: 0 0 8px; font-size: clamp(31px, 5vw, 52px); line-height: 1.04; letter-spacing: -1.5px; }
.page-heading p { max-width: 740px; margin: 0; color: var(--muted); }
.taxonomy-sort { margin-top: 20px; width: max-content; max-width: 100%; overflow-x: auto; }
.taxonomy-grid { margin-top: 24px; padding: 0; }
[data-search-page] { padding-top: 24px; }
.pagination { display: flex; justify-content: center; gap: 7px; margin: 26px 0 40px; }
.pagination a { min-width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: transparent; font-weight: 750; }
.pagination a:hover, .pagination a.is-active { background: var(--accent); color: #fff; }

.series-layout { display: grid; grid-template-columns: 270px minmax(0,1fr) 265px; gap: 30px; padding: 28px 0 40px; }
.series-poster { overflow: hidden; align-self: start; aspect-ratio: 2 / 3; border-radius: 16px; background: var(--surface-2); }
.series-poster > img { width: 100%; height: 100%; object-fit: cover; }
.series-copy h1 { margin: 3px 0 6px; font-size: clamp(31px, 4vw, 50px); line-height: 1.05; letter-spacing: -1.4px; }
.original-title { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.series-description-wrap { position: relative; margin-top: 18px; }
.series-description { max-height: calc(1.65em * 5); overflow: hidden; color: #52505d; line-height: 1.65; transition: max-height .45s cubic-bezier(.22,.61,.36,1); }
.series-description-wrap.can-collapse:not(.is-expanded)::after, .seo-section.can-collapse:not(.is-expanded)::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; height: 46px; pointer-events: none; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 82%); }
.series-description-wrap.can-collapse:not(.is-expanded)::after { bottom: 34px; }
.seo-section.can-collapse:not(.is-expanded)::after { bottom: 30px; }
.series-description-wrap .text-button, .seo-section .text-button { position: relative; z-index: 2; }
.series-facts { align-self: start; padding: 6px 0 6px 24px; border-left: 1px solid var(--line); }
.series-facts > div { padding: 12px 16px 12px 0; }
.series-facts span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.series-facts strong { display: block; font-size: 13px; font-weight: 750; }
.ratings-row { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.rating-primary, .rating-secondary { display: flex; flex-direction: column; justify-content: center; min-height: 82px; padding: 13px 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rating-primary span, .rating-secondary span { color: var(--muted); font-size: 11px; }
.rating-primary strong { color: var(--accent); font-size: 30px; line-height: 1; }
.rating-primary small { color: var(--muted); font-size: 10px; }
.rating-secondary strong { font-size: 22px; }
.rating-kp { border-color: rgba(240,137,28,.24); background: #fffaf3; }
.rating-kp span { color: #a85f0e; font-weight: 800; }
.rating-kp strong { color: #e67f12; }
.rating-imdb { border-color: rgba(214,174,0,.28); background: #fffdf2; }
.rating-imdb span { color: #8b7200; font-weight: 800; }
.rating-imdb strong { color: #a98800; }
.vote-actions { display: flex; gap: 7px; align-items: stretch; }
.vote-actions button { min-width: 72px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); font-weight: 800; }
.vote-actions button:hover { color: var(--accent); background: #efebff; }
.vote-actions svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.watch-section { margin-top: 0; padding: 38px 0 0; }
.watch-section .section-heading { justify-content: center; text-align: center; }
.watch-section .section-heading h2 { width: 100%; max-width: none; overflow: visible; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.player-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 590px; margin-inline: auto; overflow: hidden; border-radius: 16px; background: #0f0e15; }
.player-frame video-player { display: block; width: 100%; height: 100%; }
.player-frame.has-player-error video-player { visibility: hidden; }
.player-empty { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 30px; color: #fff; text-align: center; }
.player-empty img { width: 68px; height: 68px; }
.player-empty span { max-width: 560px; color: rgba(255,255,255,.6); }
.player-error-inline { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 30px; color: #fff; text-align: center; background: #0f0e15; }
.player-error-inline img { width: 60px; height: 60px; margin-bottom: 4px; }
.player-error-inline span { max-width: 560px; color: rgba(255,255,255,.62); }
.adlook-section { margin-block: 12px 0; }
.adlook-pc-wrapper { display: flex; flex-wrap: nowrap; justify-content: center; gap: 5px; width: 100%; max-width: 1200px; margin: 0 auto; min-height: 0; overflow-x: hidden; }
.adlook-mob-wrapper { display: none; width: 100%; padding: 0; min-height: 0; }

.comments-section { margin-top: 0; margin-bottom: 36px; padding: 38px 0; }
.comment-form { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: start; padding: 18px 0; }
.comment-fields { display: grid; gap: 8px; }
.comment-fields input, .comment-fields textarea { width: 100%; border: 0; border-radius: 11px; outline: 0; background: #fff; padding: 11px 13px; }
.comment-fields textarea { min-height: 92px; }
.comment-list { display: grid; gap: 6px; margin-top: 18px; }
.comment-fields textarea { resize: none; }
.comment-item { display: grid; grid-template-columns: auto 1fr; gap: 13px; padding: 16px 12px; border-radius: 14px; transition: background .2s; }
.comment-item.comment-positive { background: #edf9f3; }
.comment-item.comment-negative { background: #fff0f2; }
.comment-meta { display: flex; align-items: center; gap: 10px; }
.comment-meta time { color: var(--muted); font-size: 11px; }
.comment-item p { margin: 6px 0 0; color: #504e59; }
.comment-votes { display: flex; gap: 6px; margin-top: 10px; }
.comment-votes button { min-width: 54px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 800; }
.comment-votes button:hover, .comment-votes button.is-active { background: #ebe6ff; color: var(--accent); }
.comment-votes button:disabled { opacity: .55; }
.comment-votes svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 11px; padding: 0 17px; font-weight: 780; transition: .16s; }
.button:disabled { opacity: .55; cursor: wait; }
.button-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(117,87,255,.19); }
.button-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.button-soft { background: var(--surface-2); color: var(--text); }
.button-soft:hover { background: var(--surface-3); color: var(--accent); }
.button-danger { background: #fff0f2; color: var(--danger); }
.button-small { min-height: 34px; padding-inline: 11px; font-size: 12px; }
.button-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button-row { display: flex; gap: 9px; flex-wrap: wrap; }

.narrow-page { width: min(calc(100% - 40px), 860px); min-height: 60vh; margin: 28px auto 46px; }
.panel { padding: 25px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.narrow-page > .panel { padding-inline: 0; border: 0; border-radius: 0; background: transparent; }
.panel h1 { margin: 4px 0 10px; font-size: clamp(30px, 5vw, 48px); line-height: 1.05; }
.panel h2 { margin: 0 0 16px; font-size: 21px; }
.prose p { color: #595663; }
.stack-form { display: grid; gap: 15px; margin-top: 22px; }
.stack-form label, .admin-form label, .inline-form label { display: grid; gap: 6px; color: #575463; font-size: 12px; font-weight: 760; }
input, textarea, select { width: 100%; border: 0; border-radius: 11px; outline: 0; background: var(--surface-2); padding: 11px 13px; box-shadow: inset 0 0 0 1px transparent; }
input:focus, textarea:focus, select:focus { background: #fff; box-shadow: 0 0 0 3px rgba(117,87,255,.14); }
textarea { resize: vertical; }
.form-hint { margin: 0; color: var(--muted); font-size: 12px; }
.notice { margin: 16px 0; padding: 13px 15px; border-radius: 12px; }
.notice-success { background: #eaf8f2; color: #166c51; }
.notice-error { background: #fff0f2; color: #a93b50; }
.avatar-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 11px; margin: 0; padding: 18px 0; border: 0; background: transparent; }
.avatar-picker legend { padding: 0 5px; font-weight: 800; }
.avatar-choice { position: relative; display: grid !important; place-items: center; gap: 5px !important; cursor: pointer; }
.avatar-choice input { position: absolute; opacity: 0; }
.avatar-choice .avatar { width: 64px; height: 64px; }
.avatar-choice input:checked + .avatar { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--accent); }

.site-footer { margin-top: 36px; border-top: 1px solid var(--line); background: #fff; color: var(--text); }
.footer-grid { min-height: 170px; display: grid; grid-template-columns: auto minmax(260px,1fr) auto; align-items: center; gap: 50px; }
.footer-brand img { width: 38px; height: 38px; }
.footer-grid p { max-width: 720px; margin: 0; color: var(--muted); font-size: 13px; }
.footer-grid nav { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.footer-grid nav a:hover { color: var(--accent); }

.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(13,12,21,.56); opacity: 0; visibility: hidden; transition: .2s; backdrop-filter: blur(6px); }
.modal-backdrop.is-open { opacity: 1; visibility: visible; }
.modal-card { position: relative; width: min(100%, 440px); max-height: calc(100vh - 40px); overflow: auto; padding: 28px; border-radius: 22px; background: #fff; box-shadow: 0 40px 120px rgba(12,10,25,.28); transform: translateY(12px) scale(.98); transition: .2s; text-align: center; }
.modal-backdrop.is-open .modal-card { transform: none; }
.modal-close { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--surface-2); font-size: 22px; }
.modal-logo { width: 58px; height: 58px; margin: 0 auto 8px; }
.modal-card h2 { margin: 0 0 8px; }
.modal-card .stack-form { text-align: left; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 18px 0; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.auth-tabs button { min-height: 36px; border: 0; border-radius: 9px; background: transparent; font-weight: 750; }
.auth-tabs button.is-active { background: #fff; color: var(--accent); box-shadow: var(--shadow-soft); }
.modal-message { text-align: center; }
.modal-status-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 50%; background: #e9f8f2; color: var(--success); font-size: 29px; font-weight: 900; }
.modal-message.is-error .modal-status-icon { background: #fff0f2; color: var(--danger); }

.admin-nav { background: #27243a; color: #fff; }
.admin-nav-inner { display: flex; gap: 3px; overflow-x: auto; padding-block: 7px; scrollbar-width: none; }
.admin-nav a { flex: 0 0 auto; padding: 8px 11px; border-radius: 8px; color: rgba(255,255,255,.7); font-size: 12px; font-weight: 730; }
.admin-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-main { min-height: 65vh; padding: 30px 0 50px; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.admin-heading h1 { margin: 0; font-size: clamp(30px,4vw,44px); letter-spacing: -1px; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.stats-grid a { padding: 22px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-soft); }
.stats-grid strong { display: block; color: var(--accent); font-size: 34px; }
.stats-grid span { color: var(--muted); }
.admin-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.status-list { margin: 0; }
.status-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; }
.status-list dt { color: var(--muted); }
.status-list dd { margin: 0; font-weight: 700; text-align: right; }
.table-wrap { overflow-x: auto; padding: 8px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 780px; }
.admin-table th, .admin-table td { padding: 13px 12px; text-align: left; vertical-align: middle; }
.admin-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.admin-table tbody tr:nth-child(odd) { background: var(--surface-2); }
.admin-table tbody tr { border-radius: 12px; }
.admin-table td:first-child { border-radius: 11px 0 0 11px; }
.admin-table td:last-child { border-radius: 0 11px 11px 0; }
.admin-table small { display: block; margin-top: 3px; color: var(--muted); }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; }
.status { display: inline-flex; padding: 4px 8px; border-radius: 7px; background: var(--surface-3); font-size: 11px; font-weight: 800; }
.status-published { background: #e8f7f0; color: #177556; }
.status-draft { background: #fff4dd; color: #9a6810; }
.status-trash { background: #fff0f2; color: var(--danger); }
.admin-form { display: grid; gap: 16px; }
.admin-form-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(280px,1fr); gap: 16px; align-items: start; }
.form-section { display: grid; gap: 13px; }
.form-section h2 { margin-bottom: 1px; }
.form-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.check { display: flex !important; grid-template-columns: none !important; flex-direction: row; align-items: center; gap: 8px !important; }
.check input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--accent); }
.checkbox-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.admin-poster-preview { width: 150px; border-radius: 12px; }
.sticky-save { position: sticky; bottom: 14px; z-index: 20; display: flex; gap: 9px; width: max-content; padding: 8px; border-radius: 14px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.admin-list { display: grid; gap: 12px; }
.moderation-card { display: grid; gap: 12px; }
.moderation-meta { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 12px; }
.moderation-meta strong { color: var(--text); }
.moderation-meta a { color: var(--accent); font-weight: 750; }
.moderation-meta time { margin-left: auto; white-space: nowrap; }
.moderation-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 15px; padding-bottom: 2px; }
.moderation-tabs a { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); white-space: nowrap; font-size: 13px; font-weight: 750; }
.moderation-tabs a span { min-width: 21px; padding: 2px 6px; border-radius: 10px; background: #fff; color: var(--text); text-align: center; font-size: 11px; }
.moderation-tabs a.is-active { background: var(--accent); color: #fff; }
.moderation-list { display: grid; }
.moderation-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; align-items: center; padding: 17px 4px; }
.moderation-row p { margin: 7px 0 9px; color: #4f4d59; white-space: normal; }
.moderation-stats { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.moderation-vote { display: inline-flex; align-items: center; gap: 5px; }
.moderation-vote svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.moderation-edit { margin-top: 10px; }
.moderation-edit summary { width: max-content; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); cursor: pointer; font-size: 12px; font-weight: 750; list-style: none; }
.moderation-edit summary::-webkit-details-marker { display: none; }
.moderation-edit summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.moderation-edit-form { display: grid; grid-template-columns: minmax(170px,.45fr) minmax(280px,1fr) auto; gap: 9px; align-items: end; margin-top: 11px; }
.moderation-edit-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 750; }
.moderation-edit-form input, .moderation-edit-form textarea { min-height: 40px; }
.moderation-edit-form textarea { height: 74px; resize: vertical; }
.moderation-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.status-pending { background: #fff4dd; color: #94620c; }
.status-approved { background: #e8f7f0; color: #177556; }
.status-rejected { background: #fff0f2; color: var(--danger); }
.feedback-card h2 { margin-top: 14px; }
.feedback-card p { white-space: normal; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.error-page { min-height: 68vh; display: grid; align-items: center; padding-block: 64px; }
.error-layout { display: grid; grid-template-columns: minmax(230px, .7fr) minmax(320px, 1fr); align-items: center; gap: clamp(42px, 8vw, 120px); width: min(100%, 980px); margin-inline: auto; }
.error-visual { min-height: 280px; display: grid; place-items: center; align-content: center; gap: 12px; }
.error-visual img { width: 76px; height: 76px; }
.error-visual strong { color: var(--accent); font-size: clamp(76px, 12vw, 148px); font-weight: 900; letter-spacing: -.08em; line-height: .85; }
.error-copy h1 { margin: 0 0 12px; font-size: clamp(36px, 6vw, 68px); line-height: 1; letter-spacing: -.045em; }
.error-copy > p { max-width: 620px; margin: 0 0 10px; color: var(--muted); font-size: 17px; }
.error-copy .error-hint { font-size: 14px; }
.error-search { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 24px; }
.error-search input { min-height: 46px; border: 1px solid var(--line); background: #fff; }
.error-actions { align-items: center; margin-top: 18px; }

@media (max-width: 1260px) {
  .header-inner { grid-template-columns: auto auto minmax(260px,1fr) auto; }
  .poster-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .carousel-track { grid-auto-columns: calc((100% - 56px) / 5); }
  .series-layout { grid-template-columns: 240px 1fr; }
  .series-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4,1fr); padding: 8px 16px; }
}

@media (max-width: 980px) {
  .header-inner { grid-template-columns: auto auto minmax(240px,520px) auto; gap: 10px; justify-content: space-between; }
  .header-search { max-width: 520px; }
  .poster-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .carousel-track { grid-auto-columns: calc((100% - 42px) / 4); }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; padding-block: 35px; }
  .footer-grid nav { display: flex; flex-wrap: wrap; gap: 14px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .admin-panels { grid-template-columns: 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: repeat(3,1fr); }
  .adlook-pc-wrapper { display: none !important; }
  .adlook-mob-wrapper { display: block !important; }
}

@media (max-width: 720px) {
  .site-container { width: min(calc(100% - 24px), var(--page)); }
  .site-header { position: relative; }
  .header-inner { min-height: 64px; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; padding-block: 8px; }
  .brand { grid-column: 1; grid-row: 1; }
  .genres-menu { grid-column: 2; grid-row: 1; justify-self: end; }
  .genres-menu > .nav-button { width: 40px; min-height: 40px; padding: 0; border-radius: 11px; background: var(--surface-2); }
  .genres-menu > .nav-button:hover { background: var(--surface-3); }
  .nav-label, .nav-chevron { display: none; }
  .nav-burger { display: block !important; width: 21px !important; height: 21px; stroke-width: 2 !important; stroke-linecap: round; }
  .genres-menu.is-open .nav-burger { transform: none; }
  .genres-panel { top: calc(100% + 60px); left: auto; right: -50px; width: min(calc(100vw - 24px),420px); max-height: calc(100vh - 130px); overflow-y: auto; padding: 10px; border-radius: 14px; }
  .account-menu { grid-column: 3; grid-row: 1; }
  .brand span { font-size: 19px; }
  .brand img { width: 38px; height: 38px; }
  .header-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .genres-grid { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: none; grid-auto-flow: row; grid-auto-columns: auto; gap: 3px 6px; overflow: visible; }
  .genres-grid a { white-space: normal; }
  .account-name { display: none; }
  .home-hero, .catalog-section, .taxonomy-grid, .watch-section, .comments-section { padding-inline: 0; border-radius: 0; }
  .hero-heading { align-items: end; }
  .poster-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px 10px; }
  .carousel-track { grid-auto-columns: calc((100% - 20px) / 3); gap: 10px; }
  .sort-tabs { order: 3; width: 100%; overflow-x: auto; }
  .sort-tabs button, .sort-tabs a { flex: 1 0 auto; }
  .section-more { margin-left: auto; }
  .series-layout { grid-template-columns: 110px 1fr; gap: 16px; padding: 20px 0 32px; }
  .series-copy h1 { font-size: 27px; }
  .series-description-wrap, .ratings-row { grid-column: 1 / -1; }
  .series-facts { grid-template-columns: repeat(2,1fr); }
  .ratings-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rating-primary { grid-column: 1 / -1; width: auto; }
  .rating-secondary { min-width: 0; }
  .vote-actions { grid-column: 1 / -1; }
  .vote-actions button { flex: 1; min-height: 54px; }
  .comment-form { grid-template-columns: auto 1fr; }
  .comment-form .button { grid-column: 2; }
  .avatar-picker { grid-template-columns: repeat(4,1fr); }
  .form-grid-3 { grid-template-columns: repeat(2,1fr); }
  .checkbox-grid { grid-template-columns: repeat(2,1fr); }
  .inline-form { grid-template-columns: 1fr; }
  .moderation-row { grid-template-columns: 1fr; gap: 10px; }
  .moderation-meta { flex-wrap: wrap; }
  .moderation-meta time { width: 100%; margin-left: 0; }
  .moderation-actions { justify-content: flex-start; }
  .moderation-edit-form { grid-template-columns: 1fr; }
  .error-page { padding-block: 34px; }
  .error-layout { grid-template-columns: 1fr; gap: 28px; }
  .error-visual { min-height: 190px; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .header-inner { gap: 7px; }
  .brand { gap: 6px; }
  .brand span { max-width: none; overflow: visible; font-size: 17px; text-overflow: clip; }
  .brand img { width: 35px; height: 35px; }
  .header-search > button[type="submit"] { padding-inline: 10px; }
  .poster-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .carousel-track { grid-auto-columns: calc((100% - 10px) / 2); }
  .hero-empty { flex-direction: column; text-align: center; }
  .section-heading { align-items: flex-start; }
  .series-layout { grid-template-columns: 90px 1fr; }
  .series-copy h1 { font-size: 22px; }
  .series-poster { border-radius: 11px; }
  .series-description-wrap, .ratings-row, .series-facts { grid-column: 1 / -1; }
  .series-facts { grid-template-columns: 1fr 1fr; }
  .vote-actions { width: 100%; }
  .vote-actions button { flex: 1; min-height: 54px; }
  .comment-form { grid-template-columns: 1fr; }
  .comment-form .avatar { display: none; }
  .comment-form .button { grid-column: auto; }
  .comment-item { grid-template-columns: 38px 1fr; }
  .comment-item .avatar { width: 38px; height: 38px; }
  .avatar-picker { grid-template-columns: repeat(3,1fr); }
  .form-row, .form-grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid a { padding: 16px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .sticky-save { width: 100%; bottom: 7px; }
  .sticky-save .button { flex: 1; }
  .error-search { grid-template-columns: 1fr; }
}

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