:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #181818;
  --surface-3: #242424;
  --text: #f6f7fb;
  --muted: #9aa3b2;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #e50914;
  --accent-2: #ff3e3e;
  --danger: #ff6b6b;
  --page-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.netflix-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 66px;
  padding: 0 max(14px, calc((100vw - var(--page-max)) / 2 + 18px));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0));
  transition: background 180ms ease, min-height 180ms ease;
}

.netflix-header.scrolled {
  min-height: 58px;
  background: rgba(10, 10, 10, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-link {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  padding: 8px 9px;
  font-weight: 600;
}

.nav-link.active,
.nav-link:hover {
  color: var(--accent);
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
  white-space: nowrap;
}

.brand-lockup strong {
  color: var(--accent);
  font-size: 20px;
  letter-spacing: 0.02em;
  line-height: 0.95;
}

.brand-lockup span,
small,
p {
  color: var(--muted);
}

.brand-lockup span {
  font-size: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 340px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.admin-link {
  flex: 0 0 auto;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.78);
  color: var(--text);
  padding: 0 10px;
}

.admin-link {
  display: none;
  align-items: center;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.language-select {
  flex: 0 0 auto;
  width: 104px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.9);
  color: var(--text);
  padding: 0 8px;
  outline: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.home-container {
  min-height: 100vh;
  padding-bottom: 82px;
  background: var(--bg);
}

.content-section {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: 14px;
}

.hero-app {
  position: relative;
  min-height: min(680px, 72vh);
  overflow: hidden;
  background: #111;
}

.hero-app img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.18) 58%, rgba(0, 0, 0, 0.78)),
    linear-gradient(180deg, rgba(8, 9, 11, 0.02), rgba(8, 9, 11, 0.92) 78%, var(--bg));
}

.hero-copy {
  position: absolute;
  left: max(16px, calc((100vw - var(--page-max)) / 2 + 18px));
  right: 16px;
  bottom: 58px;
  max-width: 620px;
}

.hero-kicker {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 8px 0 8px;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.05;
}

.hero-copy p {
  display: -webkit-box;
  margin: 0;
  max-width: 48ch;
  overflow: hidden;
  line-height: 1.45;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.primary-action,
.ghost-action,
.pill-btn,
.server-btn,
.episode-btn,
.quick-chip {
  border-radius: 8px;
  min-height: 38px;
}

.primary-action {
  border: 0;
  background: linear-gradient(45deg, var(--accent), var(--accent-2));
  color: white;
  padding: 0 16px;
  font-weight: 800;
}

.movie-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.movie-badges span,
.quality-badge {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.ghost-action {
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(17, 19, 24, 0.72);
  color: var(--text);
  padding: 0 14px;
}

.quick-row,
.chips,
.server-list,
.episode-grid,
.movie-rail {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.quick-row::-webkit-scrollbar,
.chips::-webkit-scrollbar,
.server-list::-webkit-scrollbar,
.episode-grid::-webkit-scrollbar,
.movie-rail::-webkit-scrollbar {
  display: none;
}

.quick-row {
  position: sticky;
  top: 58px;
  z-index: 12;
  padding: 10px max(14px, calc((100vw - var(--page-max)) / 2 + 18px));
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(12px);
}

.quick-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0 13px;
}

.quick-chip.active {
  border-color: var(--accent);
  background: rgba(229, 9, 20, 0.18);
  color: var(--accent);
}

.player-wrap {
  width: calc(100% - 28px);
  margin: 8px 14px 0;
  border-radius: 8px;
  background: #000;
  overflow: hidden;
}

.player-video-area {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  isolation: isolate;
  transform: translateZ(0);
}

.player-host,
.player-host iframe,
.player-host video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

.player-host {
  position: relative;
  z-index: 1;
}

.youtube-shell {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

.youtube-shell::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 55px;
  background: #000;
  pointer-events: none;
}

.youtube-frame,
.youtube-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
}

.youtube-tap-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  background: transparent;
}

.youtube-tap-layer:disabled {
  cursor: wait;
}

.youtube-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  transform: translate(-50%, -50%);
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.youtube-shell:not(.is-loading) .youtube-loading {
  display: none;
}

.youtube-control-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 8;
  display: grid;
  grid-template-columns: 38px auto 1fr auto 38px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.76);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.youtube-control-btn {
  width: 34px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.youtube-control-btn:disabled,
.youtube-seek:disabled {
  opacity: 0.55;
  cursor: wait;
}

.youtube-time {
  min-width: 38px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.youtube-seek {
  width: 100%;
  accent-color: var(--accent);
  touch-action: none;
}

.player-error {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #ffb4b4;
  text-align: center;
  font-weight: 700;
}

.poster-gate {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: #111;
}

.poster-gate.hidden {
  display: none;
}

.poster-gate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
}

.play-btn {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 30px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.46);
}

.ad-strip,
.ad-layout,
.movie-meta,
.server-box,
.episodes-box,
.content-section > section {
  padding: 14px 0;
}

.ad-layout {
  display: grid;
  gap: 10px;
}

.ad-slot {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 74px;
  padding: 12px;
  border: 1px dashed #56606f;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(229, 9, 20, 0.12), transparent),
    var(--surface);
  color: var(--text);
  text-align: center;
}

.ad-slot span,
.ad-slot small {
  color: var(--muted);
}

.ad-slot-leaderboard {
  min-height: 90px;
}

.ad-slot-native,
.ad-slot-wide {
  min-height: 110px;
}

.ad-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  margin: 12px 14px 0;
  border: 1px dashed #56606f;
  border-radius: 8px;
  background: var(--surface);
}

.watch-grid {
  display: grid;
  gap: 14px;
}

.watch-main {
  min-width: 0;
}

.ad-sidebar {
  display: none;
  gap: 12px;
}

.ad-slot-skyscraper {
  min-height: 600px;
  position: sticky;
  top: 76px;
}

.ad-slot-rectangle {
  min-height: 250px;
}

.movie-meta h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.movie-meta p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  line-height: 1.5;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.title-row,
.section-head,
.admin-head,
.ad-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.title-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.subtitle-select-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.subtitle-select-wrap[hidden] {
  display: none;
}

.subtitle-select-wrap select {
  max-width: 130px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

.player-settings {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.pill-btn,
.server-btn,
.episode-btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.pill-btn {
  flex: 0 0 auto;
  padding: 9px 12px;
}

.chips {
  margin-top: 12px;
}

.chip {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 13px;
}

.section-head h2,
.admin-head h2 {
  margin: 0;
  font-size: 18px;
}

.server-btn,
.episode-btn {
  flex: 0 0 auto;
  padding: 10px 12px;
}

.episode-btn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 200px;
  padding: 12px 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(20, 20, 20, 0.92);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.episode-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.episode-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.18), rgba(255, 62, 62, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff3f3;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.episode-copy {
  min-width: 0;
}

.episode-label {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
}

.server-btn.active,
.episode-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.episode-btn.active {
  background:
    linear-gradient(180deg, rgba(229, 9, 20, 0.14), rgba(255, 255, 255, 0.02)),
    rgba(20, 20, 20, 0.96);
  box-shadow:
    0 16px 32px rgba(229, 9, 20, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.episode-btn.active .episode-num {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
}

.episode-btn.active .episode-label {
  color: #fff;
}

.movie-card {
  position: relative;
  flex: 0 0 140px;
  min-width: 140px;
  border: 0;
  background: #181818;
  color: var(--text);
  padding: 0;
  text-align: left;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.movie-rail.large .movie-card {
  flex-basis: 170px;
  min-width: 170px;
}

.movie-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface);
  transition: transform 220ms ease;
}

.movie-card:hover img {
  transform: scale(1.05);
}

.movie-card-shade {
  position: absolute;
  inset: 0;
  margin: 0 !important;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.94));
  pointer-events: none;
}

.movie-card-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid !important;
  gap: 2px;
  margin: 0 !important;
  padding: 44px 9px 9px;
  color: var(--text) !important;
}

.quality-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
}

.movie-card strong {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.admin-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0f13;
  color: var(--text);
  padding: 11px 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.subtitle-editor {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.subtitle-editor legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.subtitle-track-list {
  display: grid;
  gap: 8px;
}

.subtitle-track-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.add-subtitle-track {
  justify-self: start;
  min-height: 38px;
  padding: 0 12px;
}

.submit-btn {
  border: 0;
  border-radius: 8px;
  background: linear-gradient(45deg, var(--accent), var(--accent-2));
  color: white;
  padding: 12px 14px;
  font-weight: 800;
}

.submit-btn:disabled {
  opacity: 0.5;
}

.admin-note {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #0d0f13;
}

.admin-note span {
  color: var(--muted);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 18;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(8, 9, 11, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.bottom-nav button,
.bottom-nav a {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}

.bottom-nav button span,
.bottom-nav a span {
  font-size: 11px;
}

.bottom-nav button.active,
.bottom-nav a.active {
  color: var(--accent);
}

.empty-state {
  margin: 0;
  padding: 18px 0;
}

.ad-modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.82);
  border-radius: 8px;
}

.ad-modal.open {
  display: grid;
}

.launch-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.launch-modal[hidden] {
  display: none;
}

.launch-card {
  width: min(340px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.96);
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
}

.launch-card strong,
.launch-card small {
  display: block;
}

.external-watch-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(10px);
}

.external-watch-modal[hidden] {
  display: none;
}

.external-watch-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.56);
}

.external-watch-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface-soft);
}

.external-watch-copy {
  display: grid;
  gap: 6px;
  text-align: center;
}

.external-watch-copy strong {
  font-size: 20px;
}

.external-watch-copy p {
  margin: 0;
  color: var(--muted);
}

.external-watch-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.launch-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ad-card {
  position: relative;
  width: min(100%, 380px);
  padding: 18px;
  border-radius: 8px;
  background: #111318;
  border: 1px solid var(--line);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.58);
}

.ad-card-head {
  align-items: flex-start;
  padding-right: 64px;
}

.ad-card-head strong {
  font-size: 18px;
  line-height: 1.2;
}

#adCountdown {
  flex: 0 0 auto;
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(229, 9, 20, 0.35);
}

.ad-close-x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ad-close-x::before {
  content: "X";
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.ad-close-x {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  transition: background 0.15s;
}

.ad-close-x:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ad-box {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 180px;
  margin: 14px 0;
  border: 1px dashed #56606f;
  border-radius: 8px;
  text-align: center;
}

.ad-modal-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.subtitle-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 78px;
  z-index: 100;
  min-height: 0;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: clamp(14px, 2.6vw, 20px);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 3px #000;
  white-space: pre-line;
  border-radius: 8px;
  pointer-events: none;
  transform: translateZ(0);
  mix-blend-mode: normal;
}

.player-wrap:fullscreen {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
}

.player-wrap:fullscreen .player-video-area {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.player-wrap:fullscreen .subtitle-bar {
  bottom: 92px;
  font-size: clamp(18px, 3vw, 30px);
}

.watch-page-shell {
  width: min(var(--page-max), 100%);
  margin: 0 auto;
  padding: 82px 14px 92px;
}

.watch-page .player-wrap {
  width: 100%;
  margin-inline: 0;
  margin-top: 0;
}

.watch-page .bottom-nav {
  grid-template-columns: repeat(2, 1fr);
}

.watch-player-section {
  display: grid;
  gap: 12px;
}

.watch-suggestions {
  padding: 10px 0 14px;
}

.watch-page .movie-meta h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(229, 9, 20, 0.18), transparent 34%),
    linear-gradient(180deg, #060606, var(--bg));
}

.ad-page-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 0%, rgba(229, 9, 20, 0.2), transparent 32%),
    linear-gradient(180deg, #08090b, var(--bg));
}

.ad-page {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 28px 14px 60px;
}

.ad-page-card {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.94);
}

.ad-page-card h1,
.ad-page-card p {
  margin: 0;
}

.ad-back-link {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  min-width: 160px;
}

.admin-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px 14px 60px;
}

.login-card,
.admin-dashboard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.92);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.login-card {
  width: min(430px, 100%);
  margin: 10vh auto 0;
  padding: 22px;
}

.admin-brand {
  display: inline-block;
  margin-bottom: 22px;
}

.login-card h1,
.admin-dashboard h1 {
  margin: 0 0 8px;
}

.login-card code {
  border-radius: 4px;
  background: #08090b;
  color: #fff;
  padding: 2px 5px;
}

.form-message {
  min-height: 20px;
  color: var(--accent-2);
  font-size: 13px;
}

.admin-dashboard {
  padding: 18px;
}

.admin-dashboard-head,
.admin-actions,
.stats-grid,
.admin-grid {
  display: grid;
  gap: 14px;
}

.admin-dashboard-head {
  align-items: start;
}

.admin-actions {
  grid-template-columns: 1fr 1fr;
}

.submit-btn.slim {
  padding-inline: 18px;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.stats-grid article,
.admin-editor,
.admin-side,
.movie-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0f13;
  padding: 14px;
}

.stats-grid span,
.movie-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stats-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.admin-grid {
  margin-top: 18px;
}

.admin-side {
  align-content: start;
}

.admin-side .admin-note {
  margin-top: 0;
}

.no-margin {
  margin: 0;
}

.movie-table-wrap {
  margin-top: 18px;
}

.movie-table {
  display: grid;
  gap: 10px;
}

.movie-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-2);
}

.movie-row img {
  width: 54px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.delete-movie-btn {
  border: 1px solid rgba(255, 107, 107, 0.45);
  border-radius: 6px;
  background: rgba(255, 107, 107, 0.1);
  color: var(--danger);
  padding: 8px 10px;
  cursor: pointer;
}

.delete-movie-btn:hover {
  background: rgba(255, 107, 107, 0.18);
}

@media (min-width: 860px) {
  .desktop-nav {
    display: flex;
  }

  .ad-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  }

  .content-section {
    padding-inline: 18px;
  }

  .bottom-nav {
    display: none;
  }

  .watch-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }

  .ad-sidebar {
    display: grid;
  }

  .admin-dashboard-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .admin-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  }
}

@media (max-width: 420px) {
  .brand-lockup span {
    display: none;
  }

  .episode-btn {
    min-width: 170px;
    gap: 10px;
    padding: 11px 12px;
  }

  .episode-num {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 13px;
  }

  .episode-label {
    font-size: 13px;
  }

  .subtitle-track-row {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .subtitle-track-row select {
    grid-column: 1 / -1;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .player-settings {
    justify-content: space-between;
    width: 100%;
  }

  .language-select {
    width: 82px;
    font-size: 13px;
  }

  .hero-app {
    min-height: 430px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .movie-rail.large .movie-card {
    flex-basis: 142px;
    min-width: 142px;
  }
}
