@font-face { font-family:Roboto; font-style:normal; font-weight:400 700; font-display:swap; src:url('../fonts/roboto-v51-cyrillic.woff2') format('woff2'); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:Roboto; font-style:normal; font-weight:400 700; font-display:swap; src:url('../fonts/roboto-v51-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  color-scheme: light;
  --color-primary: #0d6efd;
  --color-primary-hover: #0b5ed7;
  --color-background: #f4f4f4;
  --color-surface: #ffffff;
  --color-text: #4c5258;
  --color-heading: #32393f;
  --color-muted: #606a75;
  --color-border: #e2e6eb;
  --color-danger: #b42318;
  --color-link: #0b5ed7;
  --color-soft: #f6f8fb;
  --color-active: #e8f0ff;
  --color-scrollbar: #a5adb7;
  --color-scrollbar-hover: #7c8794;
  --color-on-primary: #ffffff;
  --font-body: Roboto, Arial, sans-serif;
  --text-body: 14px;
  --text-heading: 28px;
  --leading-body: 1.5;
  --radius: 4px;
  --radius-control: 4px;
  --sidebar-width: 250px;
  --header-height: 60px;
  --page-max: 1440px;
  --gap: 24px;
  --shadow-panel: 0 2px 6px rgb(30 42 60 / 8%);
}

[data-theme="dark"] {
  color-scheme: dark;
  --color-background: #171c24;
  --color-surface: #222a35;
  --color-text: #e6ebf1;
  --color-heading: #e6ebf1;
  --color-muted: #b1bdcc;
  --color-border: #3b4655;
  --color-danger: #ffb4aa;
  --color-link: #91baff;
  --color-soft: #293340;
  --color-active: #293e5c;
  --color-scrollbar: #66778b;
  --color-scrollbar-hover: #91a2b7;
  --shadow-panel: 0 2px 6px rgb(0 0 0 / 10%);
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--color-scrollbar) var(--color-background); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--color-background); }
*::-webkit-scrollbar-thumb { background: var(--color-scrollbar); border: 2px solid var(--color-background); border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: var(--color-scrollbar-hover); }
*::-webkit-scrollbar-thumb:active { background: var(--color-muted); }
html { min-width: 320px; scroll-padding-top: calc(var(--header-height) + 16px); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--color-background); color: var(--color-text); font: var(--text-body)/var(--leading-body) var(--font-body); letter-spacing: .5px; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url("../../images/selezen-background.webp") center top / cover; opacity: .045; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--color-link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--color-link); outline-offset: 3px; }
[hidden] { display: none !important; }
svg { display: inline-block; width: 20px; height: 20px; flex: 0 0 20px; vertical-align: middle; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--color-heading); line-height: 1.3; font-weight: 500; letter-spacing: .2px; }
h2 { font-size: 20px; }
p { margin-bottom: 16px; }
code { font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 100; padding: 10px 16px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-control); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: var(--sidebar-width); overflow-y: auto; background: var(--color-surface); border-right: 1px solid var(--color-border); }
.brand { display: flex; align-items: center; gap: 10px; min-height: var(--header-height); padding: 12px 20px; color: var(--color-link); font-size: 22px; font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-subtitle { display: block; margin: 5px 0 0; color: var(--color-muted); font-size: 12px; font-weight: 400; }
.nav-label { margin: 0; padding: 8px 22px; color: var(--color-muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.nav-list { margin: 0; padding: 0 10px; list-style: none; }
.nav-list li { margin: 3px 0; }
.nav-list a, .nav-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: var(--radius); background: transparent; color: var(--color-text); text-align: left; text-decoration: none; font-size: 15px; }
.nav-list .is-active, .nav-list [aria-current="page"] { color: var(--color-link); background: var(--color-active); font-weight: 600; }
.sidebar-bottom { margin-top: auto; padding: 24px 20px; color: var(--color-muted); font-size: 12px; }
.sidebar-bottom p:last-child { margin-bottom: 0; }
.site-header { position: fixed; top: 0; right: 0; left: var(--sidebar-width); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-height); padding: 0 28px; background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.header-title { display: inline-flex; align-items: center; gap: 8px; color: var(--color-text); font-size: 15px; font-weight: 500; text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius-control); background: transparent; color: var(--color-text); font-size: 14px; text-decoration: none; }
.menu-toggle { display: none; }
.site-main { flex: 1; min-width: 0; margin-left: var(--sidebar-width); padding: calc(var(--header-height) + 24px) 24px 32px; }
.page-container { width: 100%; max-width: var(--page-max); margin: 0 auto; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--color-muted); font-size: 13px; }
.breadcrumb a { color: var(--color-muted); text-decoration: none; }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { margin-bottom: 8px; font-size: var(--text-heading); line-height: 1.25; overflow-wrap: anywhere; }
.page-heading p { margin-bottom: 0; color: var(--color-muted); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--gap); align-items: start; }
.panel { min-width: 0; margin-bottom: var(--gap); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-panel); }
.content-grid > .panel { margin-bottom: 0; }
.panel-header { padding: 16px; border-bottom: 1px solid var(--color-border); }
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-body { padding: 16px; }
.panel-body > :last-child { margin-bottom: 0; }
.search-form { margin: 0; }
.field-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.field-row { display: flex; align-items: stretch; gap: 8px; }
.field-row input { min-width: 0; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-text); }
.field-row input::placeholder { color: var(--color-muted); opacity: 1; }
.field-row input[aria-invalid="true"] { border-color: var(--color-danger); }
.clear-search { flex: 0 0 44px; width: 44px; min-height: 44px; padding: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-control); color: var(--color-muted); background: var(--color-surface); }
.field-help { margin: 8px 0 0; color: var(--color-muted); font-size: 13px; }
.field-error { margin: 8px 0 0; color: var(--color-danger); font-size: 14px; }
.field-error:empty { display: none; }
.search-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--color-muted); font-size: 12px; }
.search-divider::before, .search-divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
.button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 100px; padding: 10px 18px; border: 1px solid var(--color-primary); border-radius: var(--radius-control); background: var(--color-primary); color: var(--color-on-primary); font-weight: 500; line-height: 1.4; text-align: center; text-decoration: none; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.button-secondary { border-color: var(--color-border); background: var(--color-surface); color: var(--color-text); }
.button:disabled, .button[aria-disabled="true"] { opacity: .7; cursor: wait; }
.help-list { margin: 0; padding-left: 20px; }
.help-list li + li { margin-top: 12px; }
.help-list li::marker { color: var(--color-muted); }
.note { margin-top: 20px; padding: 14px 16px; border-left: 3px solid var(--color-primary); background: var(--color-soft); color: var(--color-muted); font-size: 13px; }
.note p:last-child { margin-bottom: 0; }
details > summary { min-height: 44px; padding: 8px 0; color: var(--color-link); cursor: pointer; }
.site-footer { margin-left: var(--sidebar-width); padding: 20px 24px; border-top: 1px solid var(--color-border); color: var(--color-muted); font-size: 13px; }
.site-footer .page-container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer p { margin-bottom: 0; }

.results-list { margin: 0; padding: 0; list-style: none; }
.results-list li + li { border-top: 1px solid var(--color-border); }
.results-list a { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 16px 20px; color: var(--color-text); text-decoration: none; }
.result-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.result-year { color: var(--color-muted); font-size: 13px; white-space: nowrap; }
.result-arrow { color: var(--color-link); }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.page-number { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); text-decoration: none; }
.page-number[aria-current="page"], .page-number.is-active { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-on-primary); }
.status-message { margin-bottom: 24px; padding: 16px 20px; border: 1px solid var(--color-border); border-left: 3px solid var(--color-primary); border-radius: var(--radius); background: var(--color-surface); overflow-wrap: anywhere; }
.status-message h2 { margin-bottom: 8px; font-size: 18px; }
.status-message p:last-child { margin-bottom: 0; }
.status-message.is-error { border-left-color: var(--color-danger); }
.player-frame { display: block; width: 100%; min-height: 240px; aspect-ratio: 16 / 9; border: 0; background: #101318; }
.player-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.player-heading h2 { margin: 0; overflow-wrap: anywhere; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--color-link); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.home-note { margin-top: var(--gap); }
.home-note h2 { font-size: 18px; }
.ad-slot { position: relative; display: flex; align-items: center; justify-content: center; min-height: 120px; margin: 24px 0; overflow: hidden; }
.ad-label { position: absolute; top: 4px; left: 0; width: 100%; color: var(--color-muted); font-size: 10px; text-align: center; }
.image-preview { text-align: center; }
.image-link { display: inline-block; max-width: 100%; }
.image-link img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: var(--radius); }

.site-dialog { width: min(560px, calc(100% - 32px)); max-width: none; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-text); overflow-y: auto; }
.site-dialog::backdrop { background: rgb(10 18 30 / 60%); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--color-border); }
.dialog-header h2 { margin: 0; font-size: 20px; }
.dialog-close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 8px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--color-muted); }
.dialog-body { padding: 20px; overflow-wrap: anywhere; }
.dialog-body > :last-child { margin-bottom: 0; }
.dialog-body img { max-width: 100%; height: auto; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--color-border); }

@media (hover: hover) {
  .nav-list a:hover, .nav-list button:hover, .icon-button:hover, .dialog-close:hover, .clear-search:hover { background: var(--color-soft); }
  .nav-list .is-active:hover, .nav-list [aria-current="page"]:hover { background: var(--color-active); }
  .button:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: var(--color-on-primary); text-decoration: none; }
  .button-secondary:hover { background: var(--color-soft); border-color: var(--color-border); color: var(--color-text); }
  .results-list a:hover { background: var(--color-soft); }
  a.page-number:hover { border-color: var(--color-primary); color: var(--color-link); }
}

@media (max-width: 1000px) {
  .site-header { position: sticky; order: -1; left: 0; flex: 0 0 var(--header-height); padding: 0 20px; }
  .sidebar { position: static; width: 100%; max-height: none; border-right: 0; border-bottom: 1px solid var(--color-border); }
  .js .sidebar:not(.is-open) { display: none; }
  .js .menu-toggle { display: inline-flex; }
  .brand { min-height: 56px; padding-bottom: 8px; }
  .brand-subtitle { margin-bottom: 0; }
  .nav-list { padding-bottom: 12px; }
  .sidebar-bottom { padding-top: 12px; padding-bottom: 16px; }
  .site-main { margin-left: 0; padding: 24px 20px 32px; }
  .site-footer { margin-left: 0; padding: 20px; }
}

@media (max-width: 760px) {
  :root { --text-heading: 24px; --gap: 20px; }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .header-title { font-size: 14px; }
  .theme-label { display: none; }
  .page-heading { margin-bottom: 20px; }
  .results-list a { padding: 14px 16px; }
}

@media (max-width: 480px) {
  .site-header { gap: 8px; padding: 0 12px; }
  .header-actions { gap: 0; }
  .site-main { padding: 20px 12px 28px; }
  .site-footer { padding: 18px 12px; }
  .panel-header, .panel-body { padding: 16px; }
  .field-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .field-row .button { grid-column: 1 / -1; width: 100%; }
  .field-row input:only-child { grid-column: 1 / -1; }
  .result-year { font-size: 12px; }
  .dialog-header, .dialog-body, .dialog-actions { padding: 16px; }
}

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

@media (forced-colors: active) {
  * { scrollbar-color: auto; }
  *::-webkit-scrollbar-track { background: Canvas; }
  *::-webkit-scrollbar-thumb { background: ButtonText; border-color: Canvas; }
  body::before { display: none; }
  :focus-visible { outline-color: Highlight; }
  .button, .page-number, .panel, .status-message, .site-dialog { border-color: ButtonText; box-shadow: none; }
  .nav-list .is-active, .nav-list [aria-current="page"] { outline: 1px solid Highlight; outline-offset: -1px; }
}

html:not(.js) [data-dialog], html:not(.js) [data-theme-toggle] { display: none; }
.results-panel .panel-header h1 { margin-bottom: 6px; font-size: var(--text-heading); }
.results-panel .panel-header p { margin-bottom: 0; color: var(--color-muted); overflow-wrap: anywhere; }
.results-panel .panel-body > h2 { font-size: 18px; }
.button[aria-busy="true"] { cursor: wait; }
.movie-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:var(--gap); }
.movie-card { display:flex; flex-direction:column; min-width:0; border:1px solid var(--color-border); border-radius:var(--radius); background:var(--color-surface); overflow:hidden; }
.movie-poster { display:block; background:var(--color-soft); }
.movie-poster img,img.movie-poster { display:block; width:100%; height:auto; aspect-ratio:2/3; object-fit:cover; }
.movie-card > a h3 { margin:16px 0; padding:0 16px; font-size:16px; }
.filter-field input { width:100%; min-height:44px; padding:9px 12px; border:1px solid var(--color-border); border-radius:var(--radius-control); background:var(--color-surface); color:var(--color-text); font:inherit; }
.movie-card-body { display:flex; flex:1; flex-direction:column; padding:16px; overflow-wrap:anywhere; }
.movie-card h2 { margin:0 0 8px; font-size:16px; line-height:1.4; }
.movie-card h2 a,.movie-card > a { color:var(--color-heading); text-decoration:none; }
.movie-card h2 a:hover,.movie-card > a:hover { color:var(--color-link); text-decoration:underline; }
.movie-card > .button { margin:0 16px 16px; margin-top:auto; }
.movie-card p { margin:0 0 8px; }
.movie-meta,.movie-original { color:var(--color-muted); font-size:13px; }
.movie-card .movie-meta { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.movie-rating { font-size:14px; font-weight:600; }
.movie-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:auto; padding-top:12px; }
.movie-actions .button { white-space:normal; }
.section-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin:24px 0 16px; }
.section-heading h2 { margin:0; }
.home-collection { margin-top:32px; }
.collection-links { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:24px; }
.collection-links a { display:inline-flex; align-items:center; min-height:44px; padding:8px 14px; border:1px solid var(--color-border); border-radius:var(--radius); background:var(--color-surface); text-decoration:none; }
.collection-links a:hover { background:var(--color-active); border-color:var(--color-link); }
.filter-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-top:16px; }
.filter-field { display:flex; min-width:0; flex-direction:column; gap:6px; }
select { width:100%; min-height:44px; padding:9px 12px; border:1px solid var(--color-border); border-radius:var(--radius-control); background:var(--color-surface); color:var(--color-text); font:inherit; }
.filter-actions,.active-filters { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:20px 0; }
.filter-chip { padding:4px 10px; border-radius:var(--radius); background:var(--color-active); overflow-wrap:anywhere; }
.movie-detail { display:grid; grid-template-columns:220px minmax(0,1fr); gap:24px; }
.movie-detail-poster { display:block; width:100%; height:auto; aspect-ratio:2/3; object-fit:cover; }
.movie-facts { margin:0; }
.movie-facts > div { margin-bottom:10px; }
.movie-facts dt { color:var(--color-muted); font-size:13px; }
.movie-facts dd { margin:0; overflow-wrap:anywhere; }
.movie-description { white-space:normal; overflow-wrap:anywhere; }
.movie-play-controls { display:flex; flex-wrap:wrap; gap:16px; align-items:end; margin-bottom:20px; }
.movie-play-controls .filter-field { min-width:160px; max-width:100%; }
.movie-play-controls select { max-width:100%; }
.field-row input,.filter-field input,select { font-size:16px; line-height:1.5; }
.field-row input:focus,.filter-field input:focus,select:focus { border-color:var(--color-link); }
@media(max-width:1200px) { .movie-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:760px) { .movie-grid,.filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .movie-detail { grid-template-columns:160px minmax(0,1fr); gap:18px; } }
@media(max-width:480px) { .movie-grid,.filter-grid,.movie-detail { grid-template-columns:minmax(0,1fr); } .movie-detail-poster { max-width:200px; } .movie-play-controls > * { width:100%; } }
