:root {
  --bg: #0c0e12;
  --bg-elevated: #10141c;
  --surface: #151922;
  --surface2: #1c2230;
  --border: #2a3344;
  --border-soft: rgba(42, 51, 68, 0.65);
  --text: #eef2f7;
  --muted: #8b96a8;
  --accent: #00d4e8;
  --accent2: #0099aa;
  --accent-dim: rgba(0, 212, 232, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.25);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --content-gutter: clamp(1.05rem, 4.5vw, 1.5rem);
  --wrap-pad: max(var(--content-gutter), var(--safe-left), var(--safe-right));
  --player-inline-pad: max(1rem, var(--content-gutter));
  --touch-min: 44px;
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  background:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(0, 212, 232, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #5ce9f7; }

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--wrap-pad);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-accent { color: var(--accent); }

/* ——— Skip link ——— */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--accent);
  color: #001014;
  padding: 0.75rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700;
}
.skip-link:focus {
  left: var(--safe-left);
  top: var(--safe-top);
}

/* ——— Panels ——— */
.panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.panel-compact {
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.75rem;
}
.panel-player {
  padding: 0;
  overflow: hidden;
}
.panel-player .player-chrome,
.panel-player .player-foot {
  padding-left: var(--player-inline-pad);
  padding-right: var(--player-inline-pad);
}
.panel-player .player-chrome {
  padding-top: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-soft);
}
.panel-player .player-foot {
  padding-top: 0.65rem;
  padding-bottom: 0.85rem;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-elevated);
}
.panel-meta {
  padding: 1.15rem;
}
.panel-meta .info-poster-wrap {
  margin: 0 0 1rem;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: var(--safe-top);
  background: rgba(12, 14, 18, 0.88);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(14px);
}

.header-shell {
  padding-top: 0.85rem;
  padding-bottom: 0.65rem;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: min(100%, 220px);
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  box-shadow: 0 0 24px rgba(0, 212, 232, 0.25);
  flex-shrink: 0;
}

.brand-main {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.brand-sub {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.1rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  max-width: 440px;
  position: relative;
}
.search-form input {
  flex: 1;
  min-width: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-form input:focus {
  outline: none;
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-submit,
.search-form button {
  background: var(--accent2);
  color: #fff;
  border: none;
  padding: 0 1.15rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  min-height: var(--touch-min);
  white-space: nowrap;
}

.btn {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  font-size: 0.92rem;
  transition: filter 0.15s, border-color 0.15s, background 0.15s;
}
.btn-lg { padding: 0.75rem 1.35rem; font-size: 0.95rem; }
.btn.primary {
  background: var(--accent);
  color: #001014;
  border-color: transparent;
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
}
.btn:hover,
.search-submit:hover {
  filter: brightness(1.06);
  text-decoration: none;
}

.nav-cats {
  margin-top: 0.65rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-padding-inline: var(--content-gutter);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
.nav-cats::-webkit-scrollbar { display: none; }

.nav-cats-list {
  list-style: none;
  margin: 0;
  padding: 0 var(--content-gutter) 0.35rem 0.15rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-elevated);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-pill:hover {
  color: var(--text);
  border-color: var(--border);
  text-decoration: none;
}

/* ——— Breadcrumbs ——— */
.breadcrumbs {
  padding: 0.85rem 0 0.35rem;
}
.breadcrumbs-list {
  list-style: none;
  margin: 0;
  padding: 0 var(--player-inline-pad) 0.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  scroll-padding-inline: var(--player-inline-pad);
}
.breadcrumbs-item:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  color: var(--border);
  font-weight: 600;
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs-item span[aria-current] {
  color: var(--text);
  font-weight: 600;
}

.main-content {
  padding: 1.25rem 0 3.5rem;
  min-height: 55vh;
}

/* ——— Hero ——— */
.hero {
  text-align: center;
  padding: 2.5rem 1.5rem 2.75rem;
  margin-bottom: 2.25rem;
  background:
    linear-gradient(180deg, rgba(0, 212, 232, 0.06) 0%, transparent 42%),
    var(--surface);
}
.hero-eyebrow,
.page-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.65rem;
}
.hero-title {
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  max-width: 16ch;
  margin: 0 auto 0.85rem;
}
.hero-text {
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto 1.5rem;
  font-size: 1.02rem;
}
.hero-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ——— Page head ——— */
.page-head h1 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin-bottom: 0.35rem;
}
.page-lead {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}
.search-page {
  max-width: 100%;
  margin-top: 1rem;
}

/* ——— Sections ——— */
.section { margin-bottom: 2.75rem; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
}
.section-head-tight { margin-bottom: 1rem; }
.section-title h2 {
  font-size: 1.2rem;
  position: relative;
  padding-left: 0.85rem;
}
.section-title h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.section-sub {
  margin: 0.25rem 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.link-more {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  padding: 0.35rem 0;
}
.link-more:hover { text-decoration: underline; }

/* ——— Grid & cards ——— */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 1.15rem;
}
.grid-sm {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s, box-shadow 0.18s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 212, 232, 0.35);
  box-shadow: var(--shadow);
}
.card-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card-link:hover { text-decoration: none; }

.card-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  flex-shrink: 0;
  background: #080a0e;
  overflow: hidden;
}
.card-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.card-poster-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, var(--surface2), var(--bg));
}
.card-poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.75) 100%);
  pointer-events: none;
}
.card-badge {
  position: absolute;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
.card-year { top: 8px; left: 8px; }
.card-kp {
  top: 8px;
  right: 8px;
  color: var(--accent);
}
.card-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s;
}
.card-play-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 212, 232, 0.9);
  color: #001014;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding-left: 3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.card:hover .card-play { opacity: 1; }

.card-body {
  padding: 0.75rem 0.85rem 0.85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.card-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ——— Movie page ——— */
.movie-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  padding-inline: var(--player-inline-pad);
}
.movie-head-text {
  min-width: 0;
  flex: 1 1 12rem;
}
.movie-head-text h1 {
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  overflow-wrap: anywhere;
}
.badge {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(0, 212, 232, 0.25);
}

.movie-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.25rem;
  align-items: start;
}

.info-poster-wrap {
  position: relative;
  margin: 0 0 1rem;
  aspect-ratio: 2 / 3;
  width: 100%;
  max-width: 240px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #080a0e;
  border: 1px solid var(--border-soft);
}
.info-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.meta-dl { margin: 0; }
.meta-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.86rem;
}
.meta-row:last-child { border-bottom: none; }
.meta-row dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}
.meta-row dd {
  margin: 0;
  color: var(--text);
}

.movie-desc {
  margin-top: 1.75rem;
  padding: 1.35rem 1.5rem;
}
.movie-desc .section-title h2 { font-size: 1.1rem; }
.prose {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}
.prose p { margin: 0; }

/* ——— Player ——— */
.player-chrome.hidden {
  display: none;
}

.player-chrome {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}

.player-series {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem 0.85rem;
  width: 100%;
}

.player-series.hidden {
  display: none;
}

.player-series-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1 1 8.5rem;
  max-width: 100%;
}

.player-series-field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 0.45rem;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
}

.player-series-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.player-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
  padding: 0.1rem 0.2rem 0.15rem;
  scroll-padding-inline: 0.5rem;
}

.player-tab {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-tab:hover { color: var(--text); }
.player-tab[aria-selected="true"],
.player-tab.active {
  background: var(--accent-dim);
  border-color: rgba(0, 212, 232, 0.45);
  color: var(--accent);
}
.player-tab-alt { opacity: 0.88; }
.player-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sk-player {
  position: relative;
  background: #000;
  width: 100%;
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
  max-height: min(72vh, 820px);
  margin: 0 auto;
}
.sk-player:fullscreen,
.sk-player:-webkit-full-screen {
  max-height: none;
  aspect-ratio: auto;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

.sk-viewport {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.sk-player:fullscreen .sk-viewport,
.sk-player:-webkit-full-screen .sk-viewport {
  position: absolute;
  inset: 0;
  flex: 1;
}

.sk-media-pane {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  max-height: 100%;
  background: #000;
}
.sk-player:fullscreen .sk-media-pane,
.sk-player:-webkit-full-screen .sk-media-pane {
  flex: 1 1 auto;
  aspect-ratio: auto;
  min-height: 0;
  max-height: none;
}

.sk-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.sk-stage video.sk-media {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border: 0;
  display: block;
  object-fit: contain;
  object-position: center center;
  background: #000;
}
.sk-stage iframe.sk-media {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

.sk-big-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(56px, 14vw, 76px);
  height: clamp(56px, 14vw, 76px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: #001014;
  background: rgba(0, 212, 232, 0.92);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, filter 0.15s;
}
.sk-big-play:hover { filter: brightness(1.06); transform: translate(-50%, -50%) scale(1.04); }
.sk-big-play.hidden { display: none; }

.sk-skip-intro {
  position: absolute;
  z-index: 4;
  right: max(0.65rem, var(--safe-right));
  bottom: max(4.5rem, calc(3.5rem + var(--safe-bottom)));
  max-width: min(92%, 220px);
  padding: 0.48rem 0.85rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #001014;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s, filter 0.15s, opacity 0.2s;
}
.sk-skip-intro:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.sk-skip-intro.hidden { display: none; }
.sk-player.is-idle .sk-skip-intro {
  opacity: 0;
  pointer-events: none;
}
body.tg-webapp .sk-skip-intro {
  bottom: max(4.25rem, calc(3.25rem + var(--safe-bottom)));
  font-size: 0.76rem;
}

.sk-loader {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(2px);
}
.sk-loader.hidden { display: none; }
.sk-loader[aria-busy="false"] .sk-spinner { animation: none; opacity: 0.5; }

.sk-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: skspin 0.75s linear infinite;
}
.sk-loader-text {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}
@keyframes skspin { to { transform: rotate(360deg); } }

.sk-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.35rem max(0.55rem, var(--safe-left), var(--content-gutter))
    calc(0.5rem + var(--safe-bottom))
    max(0.55rem, var(--safe-right), var(--content-gutter));
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.45) 18%,
    rgba(0, 0, 0, 0.92) 100%
  );
  border-top: none;
  opacity: 1;
  transition: opacity 0.28s ease;
  pointer-events: auto;
}
.sk-player:fullscreen .sk-controls,
.sk-player:-webkit-full-screen .sk-controls {
  padding-bottom: calc(0.65rem + var(--safe-bottom));
}
.sk-controls.hidden { display: none; }
.sk-player.is-idle .sk-controls {
  opacity: 0;
  pointer-events: none;
}

.sk-progress-row {
  padding: 0.25rem 0.15rem 0.15rem;
}
.sk-progress-wrap {
  cursor: pointer;
  padding: 0.45rem 0;
  touch-action: none;
}
.sk-progress-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
  transition: height 0.12s;
}
.sk-progress-wrap:hover .sk-progress-track,
.sk-progress-wrap:focus-visible .sk-progress-track {
  height: 7px;
}
.sk-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 999px;
  pointer-events: none;
}

.sk-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-height: var(--touch-min);
  max-width: 100%;
}
.sk-controls-left,
.sk-controls-right {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
}
.sk-controls-left {
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sk-controls-left::-webkit-scrollbar {
  display: none;
}
.sk-controls-right {
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 0.35rem;
}

.sk-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.35rem;
  min-width: 40px;
  min-height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.sk-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
}
.sk-btn-play {
  min-width: 44px;
  min-height: 44px;
  color: var(--accent);
}
.sk-btn-play:hover {
  background: rgba(0, 212, 232, 0.15);
  color: #5ce9f7;
}
.sk-btn-seek {
  min-width: 38px;
  min-height: 38px;
  opacity: 0.95;
}
.sk-icon-seek {
  width: 26px;
  height: 26px;
}
.sk-seek-icon {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
}
.sk-seek-num {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  pointer-events: none;
}

.sk-icon {
  width: 22px;
  height: 22px;
  display: block;
}
.sk-icon-xl {
  width: 32px;
  height: 32px;
  margin-left: 3px;
}

.sk-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.88);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding: 0 0.35rem 0 0.15rem;
  margin-left: 0.15rem;
}
.sk-time-sep { opacity: 0.55; }

.sk-quality:not(.hidden) {
  display: inline-flex;
}

.sk-controls-main {
  padding: 0.1rem 0 0.05rem;
}
.sk-controls-main-actions {
  gap: 0.15rem;
}
.sk-controls-tools {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.35rem 0 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.15rem;
  -webkit-overflow-scrolling: touch;
}
.sk-controls-tools::-webkit-scrollbar {
  display: none;
}
.sk-ctl-tool {
  flex: 1 1 0;
  min-width: 5.5rem;
  max-width: 9rem;
}
.sk-controls-tools .sk-ctl-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 212, 232, 0.85);
  padding-left: 0.2rem;
  margin-bottom: 0.12rem;
}
.sk-controls-tools .sk-ctl select {
  width: 100%;
  max-width: none;
  min-height: 36px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 212, 232, 0.35);
  border-radius: 8px;
  color: #fff;
  padding: 0.35rem 0.5rem;
}
.sk-controls-tools .sk-ctl select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 212, 232, 0.25);
}

.sk-ctl {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.65);
}
.sk-ctl-label {
  display: none;
}
.sk-ctl select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 6px;
  font-size: 0.72rem;
  padding: 0.3rem 0.35rem;
  font-family: inherit;
  min-height: 34px;
  max-width: 6.25rem;
}
.sk-quality.hidden,
.sk-audio.hidden,
.quality-wrap.hidden,
.hidden { display: none !important; }

.player-foot .player-status {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}
.player-status.error { color: #ff8a8a; }

.quality-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.quality-wrap select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  font-family: inherit;
}

@media (min-width: 992px) {
  .movie-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
  .movie-layout .player-section {
    grid-column: 1;
    grid-row: 1 / span 2;
  }
  .movie-layout .movie-info {
    grid-column: 2;
    grid-row: 1;
  }
  .sk-player { max-height: min(76vh, 880px); }
}

html.env-touch .sk-progress-track { height: 7px; }
html.env-touch .sk-player.is-idle .sk-controls { opacity: 1; pointer-events: auto; }

html.env-tv .sk-player {
  max-height: min(80vh, 960px);
}
html.env-tv .sk-player.is-idle .sk-controls {
  opacity: 1;
  pointer-events: auto;
}
html.env-tv .sk-btn {
  min-width: 52px;
  min-height: 52px;
}
html.env-tv .sk-icon { width: 26px; height: 26px; }

body.tg-webapp .sk-player {
  max-height: min(62vh, 560px);
}
body.tg-webapp .sk-controls {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 640px) and (orientation: landscape) {
  .sk-player {
    max-height: none;
  }
  .sk-media-pane {
    aspect-ratio: auto;
    height: min(58vh, calc(100dvh - 160px));
    max-height: min(58vh, calc(100dvh - 160px));
  }
}

@media (max-width: 640px) {
  :root {
    --content-gutter: clamp(1.1rem, 5vw, 1.45rem);
  }
  .panel-player .player-chrome,
  .panel-player .player-foot {
    padding-top: 0.9rem;
    padding-bottom: 0.85rem;
  }
  .player-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.35rem;
    mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
  }
  .player-tab { flex-shrink: 0; max-width: none; }
  .sk-player { max-height: none; }
  .sk-controls-right {
    gap: 0.25rem;
  }
  .sk-ctl-tool {
    min-width: 4.75rem;
    max-width: 7.5rem;
  }
  .sk-controls-tools .sk-ctl select {
    min-height: 38px;
    font-size: 0.74rem;
  }
  .sk-time {
    font-size: 0.68rem;
    padding: 0;
    margin-left: 0.05rem;
  }
  .sk-btn-seek {
    min-width: 36px;
    min-height: 36px;
  }
}

@media (max-width: 640px) {
  .sk-player:fullscreen,
  .sk-player:-webkit-full-screen {
    display: flex;
    max-height: none;
  }
  .sk-player:fullscreen .sk-media-pane,
  .sk-player:-webkit-full-screen .sk-media-pane {
    flex: 1 1 auto;
    aspect-ratio: auto;
    height: auto;
    max-height: none;
  }
}

@media (max-width: 380px) {
  .sk-controls-right .sk-speed { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .sk-controls { transition: none; }
  .sk-spinner { animation: none; border-top-color: var(--accent); }
}

/* ——— Search suggest ——— */
.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 200;
  max-height: 320px;
  overflow: auto;
}
.search-suggest a {
  display: block;
  padding: 0.65rem 0.85rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-soft);
}
.search-suggest a:hover {
  background: var(--surface2);
  color: var(--accent);
}
.search-suggest .search-all {
  color: var(--accent);
  font-weight: 700;
}

/* ——— Pagination & empty ——— */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.pagination-btn {
  background: var(--surface);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}
.pagination-btn:hover {
  border-color: var(--accent2);
  text-decoration: none;
}
.pagination-status {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--muted);
}
.empty-state h1 {
  color: var(--text);
  margin: 0.35rem 0 0.75rem;
}
.empty-state .btn { margin-top: 1.25rem; }

.error-box { max-width: 480px; margin: 2rem auto; }

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 1.75rem 0 calc(1.75rem + var(--safe-bottom));
  background: var(--bg-elevated);
}
.footer-grid {
  display: grid;
  gap: 1rem;
}
.footer-logo {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
}
.footer-tagline {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-copy {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 42rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
}
.footer-nav a {
  color: var(--muted);
  text-decoration: none;
}
.footer-nav a:hover {
  color: var(--accent);
}

.mirror-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 0 0.85rem;
  font-size: 0.82rem;
}
.mirror-bar-label {
  color: var(--muted);
  font-weight: 600;
}
.mirror-bar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
}
.mirror-bar-links a {
  color: var(--accent);
  text-decoration: none;
}
.mirror-bar-links a.is-current {
  color: var(--text);
  font-weight: 700;
}
.mirror-bar-all {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8rem;
}
.mirror-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mirror-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.mirror-item:last-child {
  border-bottom: none;
}
.mirror-link {
  display: block;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.mirror-link:hover {
  color: var(--accent);
}
.mirror-url {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-all;
}
.mirror-bot-hint {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ——— Focus ——— */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.player-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .movie-layout {
    grid-template-columns: 1fr;
  }
  .panel-meta {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 1rem;
    align-items: start;
  }
  .panel-meta .info-poster-wrap {
    margin: 0;
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .header-row {
    flex-direction: column;
    align-items: stretch;
  }
  .brand { justify-content: center; text-align: center; }
  .brand-text { text-align: center; }
  .search-form { max-width: none; }
  .hero { padding: 1.75rem 1rem 2rem; }
  .hero-title { max-width: none; }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 0.85rem;
  }
  .panel-meta {
    grid-template-columns: 1fr;
  }
  .meta-row {
    grid-template-columns: 4.75rem 1fr;
  }
  .movie-head { margin-bottom: 1rem; }
  .breadcrumbs-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-inline-end: max(var(--player-inline-pad), 1.25rem);
  }
  .footer-grid { text-align: center; }
  .footer-copy { margin: 0 auto; }
}

@media (min-width: 1280px) {
  .wrap { max-width: 1320px; }
  .movie-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; }
}

@media (min-width: 1600px) {
  .wrap { max-width: 1480px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); }
}

body.tg-webapp .brand-sub { display: none; }
body.tg-webapp .hero { padding-top: 1.5rem; }
body.tg-webapp {
  --content-gutter: clamp(1.15rem, 5.5vw, 1.55rem);
}
body.tg-webapp .main-content {
  padding-bottom: calc(3.5rem + var(--safe-bottom));
}

html.env-touch .card:hover { transform: none; }
html.env-touch .card-play { opacity: 1; }
html.env-touch .card-play-icon {
  width: 40px;
  height: 40px;
  opacity: 0.92;
}

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

@media (prefers-contrast: more) {
  :root {
    --border: #4a5870;
    --muted: #b8c2d4;
  }
}
