:root {
  --bg-main: #06080e;
  --bg-elevated: #0d121d;
  --bg-card: #131a29;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #facc15;
  --accent-emerald: #10b981;
  --accent-red: #e50914;
  --focus-ring: #facc15;
  --border-subtle: rgba(255, 255, 255, 0.09);
  --in-oklab: ;
}

@supports (background: linear-gradient(in oklab, white, black)) {
  :root {
    --in-oklab: in oklab;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-color: var(--bg-main);
  overflow-x: hidden;
  padding-bottom: 90px;
}

/* ==================================================
   FOCUS STATES FOR BOTH CURSOR & REMOTE KEYS
   ================================================== */
[data-focusable] {
  transition: transform 0.18s ease,
              box-shadow 0.18s ease,
              background-color 0.16s ease,
              border-color 0.16s ease;
  outline: none;
}

[data-focusable]:focus-visible,
[data-focusable].tv-focused {
  outline: 3px solid var(--focus-ring) !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(250, 204, 21, 0.24),
              0 16px 36px rgba(0, 0, 0, 0.85) !important;
  z-index: 25;
}

/* ==================================================
   STICKY SMART HEADER
   ================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 8, 14, 0.88);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 12px 3.5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 14px var(--accent-red);
}

.search-box-wrap {
  flex: 1;
  max-width: 520px;
  min-width: 220px;
}

.smart-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.smart-search-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.11);
  outline: none;
}

.smart-search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.smart-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.smart-action-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.smart-action-pill.primary {
  background: rgba(250, 204, 21, 0.15);
  border-color: rgba(250, 204, 21, 0.4);
  color: var(--accent);
}

.smart-action-pill.primary:hover {
  background: var(--accent);
  color: #050608;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ==================================================
   MAIN CONTAINER & FEATURED SPOTLIGHT BANNER
   ================================================== */
.app-main {
  max-width: 1500px;
  margin: 0 auto;
  padding: 22px 3.5vw 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-banner {
  position: relative;
  width: 100%;
  min-height: 430px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  display: grid;
  grid-template-columns: 1fr 290px;
  align-items: end;
  padding: 36px 38px;
  gap: 28px;
  isolation: isolate;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}

.hero-backdrop-wrap {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: brightness(0.75) contrast(1.08);
  transition: opacity 0.3s ease;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top var(--in-oklab),
      rgba(6, 8, 14, 0.97) 0%,
      rgba(6, 8, 14, 0.65) 46%,
      rgba(6, 8, 14, 0.25) 100%
    ),
    linear-gradient(
      to right var(--in-oklab),
      rgba(6, 8, 14, 0.95) 0%,
      rgba(6, 8, 14, 0.72) 48%,
      rgba(6, 8, 14, 0.55) 100%
    );
}

.hero-content {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.eyebrow-badge {
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(250, 204, 21, 0.18);
  color: var(--accent);
  border: 1px solid rgba(250, 204, 21, 0.35);
  text-transform: uppercase;
}

.eyebrow-badge.green {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.hero-title {
  font-size: clamp(2rem, 3.8vw, 3.3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: #ffffff;
}

.hero-orig {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.6);
}

.hero-meta {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-top: 2px;
}

.hero-overview {
  font-size: 0.94rem;
  line-height: 1.55;
  color: rgba(248, 250, 252, 0.76);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 660px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.play-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 26px;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  color: #050608;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.play-cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.secondary-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 20, 32, 0.78);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.secondary-cta:hover,
.secondary-cta.saved {
  border-color: var(--accent);
  color: var(--accent);
}

.stage-platforms {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(14, 18, 28, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.platform-pill:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.38);
}

.platform-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--plat-color, #94a3b8);
  box-shadow: 0 0 8px var(--plat-color, transparent);
}

/* Right-side Featured Movie Selector List inside Hero */
.hero-rail-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(8, 11, 18, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 12px;
}

.hero-rail-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 0 4px;
}

.hero-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-item-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.hero-item-btn img {
  width: 36px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.hero-item-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero-item-btn.active {
  background: rgba(250, 204, 21, 0.15);
  border-color: rgba(250, 204, 21, 0.45);
  color: #fff;
}

.hero-item-title {
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-item-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* ==================================================
   CONTINUE WATCHING BAR
   ================================================== */
.continue-section {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(13, 18, 29, 0.9));
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.continue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.continue-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(8, 11, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.continue-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-emerald);
}

.continue-card img {
  width: 52px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.continue-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.continue-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}

.continue-bar-fill {
  height: 100%;
  background: var(--accent-emerald);
}

.text-link-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.text-link-btn:hover {
  color: #fff;
}

/* ==================================================
   SMART FILTER HUB (TOPICS + PLATFORMS + SORT)
   ================================================== */
.smart-filter-hub {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-row-topics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topic-pills-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topic-pill {
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 252, 0.82);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.topic-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.topic-pill.active {
  background: #ffffff;
  color: #050608;
  border-color: #ffffff;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.18);
}

.filter-row-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.platform-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-group-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.platform-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.plat-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.plat-filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.plat-filter-chip.active {
  background: rgba(250, 204, 21, 0.18);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 800;
}

.sort-control-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-counter {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.smart-sort-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

/* ==================================================
   SMART MOVIE GRID & CARDS
   ================================================== */
.catalog-container {
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.topic-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.section-sub-hint {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.section-count {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 24px 20px;
}

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
}

.poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.poster-trigger {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: block;
}

.movie-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

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

.poster-rating-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(6, 8, 14, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  border: 1px solid rgba(250, 204, 21, 0.35);
  pointer-events: none;
}

.card-watchlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(6, 8, 14, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.card-watchlist-btn:hover {
  transform: scale(1.12);
  background: rgba(255, 255, 255, 0.2);
}

.card-watchlist-btn.saved {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #fff;
}

.poster-stream-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.92);
  color: #032219;
  font-size: 0.7rem;
  font-weight: 800;
  pointer-events: none;
}

.poster-stream-badge.trailer-only {
  background: rgba(15, 23, 42, 0.88);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.poster-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 14, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.poster-trigger:hover .poster-play-overlay,
.poster-trigger:focus-visible .poster-play-overlay {
  opacity: 1;
}

.play-circle-badge {
  padding: 10px 18px;
  border-radius: 999px;
  background: #ffffff;
  color: #050608;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.poster-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
}

.poster-progress-fill {
  height: 100%;
  background: var(--accent-emerald);
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 2px;
}

.card-title-btn {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title-btn:hover {
  color: var(--accent);
}

.card-sub {
  font-size: 0.77rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.card-plat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 0.71rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.card-plat-chip:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* ==================================================
   ALL-IN-ONE CINEMA THEATER & QUICK-ADD MODALS
   ================================================== */
dialog {
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: #090c14;
  color: var(--text-primary);
  width: min(1180px, 95vw);
  max-height: 94vh;
  padding: 0;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.92);
}

#quickAddDialog {
  width: min(820px, 94vw);
}

dialog:modal {
  /* MANDATORY per prevent-page-scroll-under-modal-dialog */
  overscroll-behavior: contain;
}

dialog::backdrop {
  /* MANDATORY per prevent-page-scroll-under-modal-dialog & light-dismiss-a-dialog */
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(2, 3, 6, 0.88);
  backdrop-filter: blur(12px);
}

.theater-modal,
.quick-add-shell {
  display: flex;
  flex-direction: column;
  padding: 18px 22px 22px;
  gap: 14px;
  max-height: 94vh;
  overflow-y: auto;
}

.theater-topbar,
.quick-add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.theater-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.theater-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.theater-sub {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.source-selector,
.theater-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.source-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
}

.source-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.source-btn.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #050608;
  font-weight: 800;
}

.close-modal-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.close-modal-btn:hover {
  background: var(--accent-red);
  color: #fff;
}

.resume-notice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  font-size: 0.83rem;
  font-weight: 600;
}

.resume-restart-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  background: rgba(6, 8, 14, 0.6);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.player-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.player-stage video,
.player-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.modal-info-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.modal-info-left {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-meta-line {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
}

.modal-overview-text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(248, 250, 252, 0.8);
}

.modal-credits-line {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.modal-platforms-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-platforms-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-related-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.related-mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.related-mini-card:hover {
  border-color: var(--accent);
}

.related-mini-card img {
  width: 40px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Quick Add Modal Styles */
.quick-add-search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-add-search-row .smart-search-input {
  flex: 1;
  min-width: 220px;
}

.quick-status-text {
  font-size: 0.84rem;
  color: #34d399;
  min-height: 20px;
}

.quick-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  max-height: 360px;
  overflow-y: auto;
}

.quick-result-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  align-items: center;
}

.quick-result-card img {
  width: 52px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #000;
}

.app-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  background: #ffffff;
  color: #050608;
  font-weight: 800;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
  display: none;
}

.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  background: var(--bg-elevated);
  border-radius: 16px;
  border: 1px dashed var(--border-subtle);
}

/* ==================================================
   SHARED ADMIN UTILITY CLASSES
   ================================================== */
.tv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--bg-card);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.tv-btn-primary {
  background: var(--accent-red);
  border-color: var(--accent-red);
}
.tv-btn-amber {
  background: #ffffff;
  border-color: #ffffff;
  color: #050608;
  font-weight: 700;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
}
.badge-featured {
  background: var(--accent);
  color: #050608;
}

@media (max-width: 960px) {
  .hero-banner {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }
  .hero-rail-wrap {
    display: none;
  }
  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 16px 12px;
  }
}
