/* ==========================================================================
   AURORA CINEMA - Premium MacCMS v10 Theme
   Dark Luxury Streaming Aesthetic (Apple TV+ / Netflix / Criterion Inspired)
   ========================================================================== */

:root {
  --bg-canvas: #07090e;
  --bg-elevated: #0e121b;
  --bg-surface: #141926;
  --bg-surface-hover: #1b2233;
  --bg-glass: rgba(14, 18, 27, 0.78);
  --bg-glass-heavy: rgba(9, 12, 19, 0.92);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.13);
  --border-accent: rgba(245, 183, 59, 0.42);

  --text-primary: #f5f7fb;
  --text-secondary: #a1abbe;
  --text-muted: #697489;

  --accent-gold: #f5b73b;
  --accent-gold-hover: #ffc857;
  --accent-gold-glow: rgba(245, 183, 59, 0.25);
  --accent-grad: linear-gradient(135deg, #f59e0b 0%, #f5b73b 55%, #ffd36e 100%);
  --accent-crimson: #e53935;
  --accent-emerald: #10b981;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 20px 44px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(245, 183, 59, 0.28);
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, 0.75);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 68px;
  --container-max: 1440px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg-canvas);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease-out), background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

img {
  display: block;
  max-width: 100%;
  border: 0;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 183, 59, 0.45);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}

.main-wrap {
  flex: 1 0 auto;
  padding-top: var(--header-h);
}

.main-wrap--hero {
  padding-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ==========================================================================
   Header / Glass Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 900;
  transition: background-color 0.35s var(--ease-out), backdrop-filter 0.35s var(--ease-out), border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.88) 0%, rgba(7, 9, 14, 0.45) 65%, rgba(7, 9, 14, 0) 100%);
  border-bottom: 1px solid transparent;
}

.site-header.is-solid,
.site-header.is-scrolled {
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #090b10;
  box-shadow: 0 6px 18px var(--accent-gold-glow);
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #fff;
}

.brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(245, 247, 251, 0.78);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.is-active {
  color: #090b10;
  background: var(--accent-grad);
  font-weight: 600;
  box-shadow: 0 4px 14px var(--accent-gold-glow);
}

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

/* Search Bar in Header */
.search-box {
  position: relative;
  width: 260px;
  transition: width 0.3s var(--ease-out);
}

.search-box:focus-within {
  width: 310px;
}

.search-form {
  display: flex;
  align-items: center;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-pill);
  padding: 0 6px 0 14px;
  transition: all 0.25s var(--ease-out);
}

.search-form:focus-within {
  background: rgba(14, 18, 27, 0.95);
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(245, 183, 59, 0.12);
}

.search-input {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #fff;
  background: transparent;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.search-btn:hover {
  color: #090b10;
  background: var(--accent-gold);
}

.search-btn svg {
  width: 15px;
  height: 15px;
}

/* Search Suggest Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  padding: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.22s var(--ease-out);
  z-index: 950;
}

.search-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-drop-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hot-tag {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.hot-tag:hover {
  color: var(--accent-gold);
  border-color: var(--border-accent);
  background: rgba(245, 183, 59, 0.08);
}

.suggest-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  color: var(--text-primary);
}

.suggest-item:hover {
  background: var(--bg-surface-hover);
  color: var(--accent-gold);
}

/* Header Action Icon Buttons */
.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-secondary);
  transition: all 0.2s var(--ease-out);
}

.icon-btn:hover,
.icon-btn.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* History Popover */
.history-wrap {
  position: relative;
}

.history-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-height: 440px;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.22s var(--ease-out);
  z-index: 950;
  overflow: hidden;
}

.history-popover.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.popover-head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.popover-clear {
  font-size: 12px;
  color: var(--text-muted);
}

.popover-clear:hover {
  color: var(--accent-crimson);
}

.history-list {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.history-item:hover {
  background: var(--bg-surface-hover);
}

.history-thumb {
  width: 44px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-surface);
  flex-shrink: 0;
}

.history-meta {
  min-width: 0;
  flex: 1;
}

.history-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-ep {
  font-size: 12px;
  color: var(--accent-gold);
  margin-top: 3px;
}

.history-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.history-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Mobile Header Toggle */
.mobile-menu-btn {
  display: none;
}

/* ==========================================================================
   Hero Cinema Stage (Homepage Banner)
   ========================================================================== */
.hero-stage {
  position: relative;
  width: 100%;
  min-height: 580px;
  height: 76vh;
  max-height: 740px;
  overflow: hidden;
  background: #05070b;
  margin-bottom: 24px;
}

.hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
  z-index: 1;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* Atmospheric blurred cinema backdrop (looks stunning with both vertical & horizontal posters) */
.hero-backdrop {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center 25%;
  filter: blur(36px) saturate(145%) brightness(0.45);
  transform: scale(1.08);
  transition: transform 7s ease-out;
}

.hero-slide.is-active .hero-backdrop {
  transform: scale(1.0);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 72% 45%, rgba(7, 9, 14, 0.12) 0%, rgba(7, 9, 14, 0.86) 85%),
    linear-gradient(90deg, rgba(7, 9, 14, 0.94) 0%, rgba(7, 9, 14, 0.72) 45%, rgba(7, 9, 14, 0.25) 100%),
    linear-gradient(180deg, rgba(7, 9, 14, 0.45) 0%, rgba(7, 9, 14, 0) 28%, rgba(7, 9, 14, 0.75) 82%, var(--bg-canvas) 100%);
  z-index: 2;
}

.hero-content-wrap {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  padding-bottom: 56px;
}

.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) auto;
  align-items: center;
  gap: 48px;
}

.hero-info {
  max-width: 680px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(245, 183, 59, 0.14);
  border: 1px solid rgba(245, 183, 59, 0.35);
  color: var(--accent-gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.55);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--text-secondary);
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: #eef2fa;
  font-weight: 500;
}

.meta-pill--gold {
  background: rgba(245, 183, 59, 0.18);
  color: var(--accent-gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hero-desc {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(235, 240, 250, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 28px;
  max-width: 580px;
}

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

/* Primary & Secondary Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 26px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.25s var(--ease-out);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent-grad);
  color: #090b10;
  box-shadow: 0 10px 26px var(--accent-gold-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(245, 183, 59, 0.42);
  filter: brightness(1.06);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  color: #fff;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
}

.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
}

/* Hero Floating Showcase Poster */
.hero-poster-card {
  position: relative;
  width: 270px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(255, 255, 255, 0.14);
  transform: perspective(1000px) rotateY(-6deg);
  transition: transform 0.6s var(--ease-out);
  background: var(--bg-surface);
}

.hero-poster-card:hover {
  transform: perspective(1000px) rotateY(0deg) scale(1.03);
}

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

/* Hero Thumbnail Switcher Bar */
.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 5;
}

.hero-thumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.hero-thumbs::-webkit-scrollbar {
  display: none;
}

.hero-thumb-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-sm);
  background: rgba(14, 18, 27, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  min-width: 175px;
  max-width: 210px;
  text-align: left;
  transition: all 0.25s var(--ease-out);
  flex-shrink: 0;
  overflow: hidden;
}

.hero-thumb-btn:hover {
  background: rgba(25, 32, 48, 0.85);
  border-color: rgba(255, 255, 255, 0.24);
}

.hero-thumb-btn.is-active {
  background: rgba(25, 32, 48, 0.92);
  border-color: var(--accent-gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.hero-thumb-btn.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent-grad);
  animation: heroProgress 6s linear forwards;
}

@keyframes heroProgress {
  from { width: 0%; }
  to { width: 100%; }
}

.hero-thumb-img {
  width: 34px;
  height: 46px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-surface);
}

.hero-thumb-info {
  min-width: 0;
  flex: 1;
}

.hero-thumb-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-thumb-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* ==========================================================================
   Quick Channel Pills & Section Headers
   ========================================================================== */
.quick-channels {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 0 22px;
}

.quick-channels::-webkit-scrollbar {
  display: none;
}

.channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.channel-pill:hover {
  color: #fff;
  background: var(--bg-surface-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.channel-pill .pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-gold);
}

.section-block {
  margin-bottom: 44px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  border-radius: 4px;
  background: var(--accent-grad);
  display: inline-block;
}

.section-subtabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.subtab-link {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.subtab-link:hover {
  color: var(--accent-gold);
  border-color: var(--border-accent);
  background: rgba(245, 183, 59, 0.08);
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.section-more:hover {
  color: var(--accent-gold);
  border-color: var(--border-accent);
}

.section-more svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   Cinema Poster Grid & Cards
   ========================================================================== */
.vod-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px 18px;
}

.vod-grid--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Horizontal Rail (for Continue Watching / Featured Rail) */
.rail-wrap {
  position: relative;
}

.vod-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 4px 2px 10px;
}

.vod-rail::-webkit-scrollbar {
  display: none;
}

.vod-rail .vod-card {
  flex: 0 0 198px;
  scroll-snap-align: start;
}

.rail-nav-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(14, 18, 27, 0.88);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: all 0.25s var(--ease-out);
}

.rail-wrap:hover .rail-nav-btn {
  opacity: 1;
}

.rail-nav-btn:hover {
  background: var(--accent-gold);
  color: #090b10;
  border-color: var(--accent-gold);
}

.rail-nav-btn--prev { left: -14px; }
.rail-nav-btn--next { right: -14px; }

/* Individual Movie Card */
.vod-card {
  display: flex;
  flex-direction: column;
  group: card;
}

.vod-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(145deg, #131825 0%, #1c2436 100%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s;
}

.vod-card:hover .vod-poster {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-accent);
}

.vod-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease-out), filter 0.35s;
}

.vod-card:hover .vod-poster img {
  transform: scale(1.06);
  filter: brightness(0.86);
}

.vod-poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 62%, rgba(5, 7, 12, 0.88) 100%);
  pointer-events: none;
}

/* Play overlay icon on hover */
.vod-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.vod-card:hover .vod-play-overlay {
  opacity: 1;
}

.vod-play-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(245, 183, 59, 0.92);
  color: #090b10;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.82);
  transition: transform 0.3s var(--ease-out);
  box-shadow: 0 10px 26px rgba(245, 183, 59, 0.45);
}

.vod-card:hover .vod-play-circle {
  transform: scale(1);
}

.vod-play-circle svg {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

/* Badges on Poster */
.badge-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(7, 9, 14, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 183, 59, 0.35);
  color: var(--accent-gold);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.badge-type {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(7, 9, 14, 0.72);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 600;
}

.badge-remarks {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.vod-card-info {
  padding-top: 10px;
}

.vod-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

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

.vod-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}

/* Continue Watch Card */
.cw-section {
  display: none;
  margin-bottom: 36px;
}
.cw-section.is-visible {
  display: block;
}

/* ==========================================================================
   Channel Block with Sidebar Rank (Homepage Spotlight Layout)
   ========================================================================== */
.channel-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: start;
}

.rank-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.rank-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.rank-panel-title {
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rank-panel-title svg {
  width: 17px;
  height: 17px;
  color: var(--accent-gold);
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
}

.rank-row:hover {
  background: var(--bg-surface-hover);
}

.rank-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  flex-shrink: 0;
}

.rank-num--1 {
  background: linear-gradient(135deg, #f59e0b, #ffd36e);
  color: #090b10;
}
.rank-num--2 {
  background: linear-gradient(135deg, #94a3b8, #e2e8f0);
  color: #090b10;
}
.rank-num--3 {
  background: linear-gradient(135deg, #b45309, #f59e0b);
  color: #fff;
}

.rank-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-row:hover .rank-name {
  color: var(--accent-gold);
}

.rank-remark {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Filter Library Page (vod/show & vod/type)
   ========================================================================== */
.page-banner {
  padding: 28px 0 22px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  background: radial-gradient(ellipse 60% 100% at 15% 0%, rgba(245, 183, 59, 0.08) 0%, transparent 70%);
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.filter-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.filter-label {
  width: 56px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 6px;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.filter-chip {
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
}

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

.filter-chip.is-active {
  color: #090b10;
  background: var(--accent-grad);
  font-weight: 600;
}

.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 14px;
  flex-wrap: wrap;
}

.sort-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.sort-tab {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.sort-tab.is-active {
  background: var(--bg-surface-hover);
  color: var(--accent-gold);
}

.result-count {
  font-size: 13px;
  color: var(--text-muted);
}

.result-count strong {
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 42px 0 24px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.page-btn:hover {
  color: #fff;
  border-color: var(--border-accent);
  background: var(--bg-surface-hover);
}

.page-btn.is-active {
  background: var(--accent-grad);
  color: #090b10;
  border-color: transparent;
}

.page-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ==========================================================================
   Detail Page (vod/detail)
   ========================================================================== */
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 32px) 0 42px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-backdrop {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center 20%;
  filter: blur(42px) saturate(140%) brightness(0.32);
  z-index: 0;
}

.detail-backdrop-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.55) 0%, rgba(7, 9, 14, 0.86) 70%, var(--bg-canvas) 100%);
  z-index: 1;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.14);
  background: var(--bg-surface);
}

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

.detail-title {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.detail-sub-title {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  margin-bottom: 20px;
  font-size: 13.5px;
}

.detail-meta-item {
  display: flex;
  gap: 8px;
  line-height: 1.6;
}

.detail-meta-item--full {
  grid-column: 1 / -1;
}

.detail-meta-label {
  color: var(--text-muted);
  flex-shrink: 0;
}

.detail-meta-val {
  color: var(--text-secondary);
}

.detail-meta-val a {
  color: #dce3f2;
}

.detail-meta-val a:hover {
  color: var(--accent-gold);
}

.detail-synopsis {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(235, 240, 250, 0.82);
  margin-bottom: 24px;
  background: rgba(14, 18, 27, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Playlist / Episode Selector */
.playlist-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 36px;
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.source-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.source-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.source-tab:hover {
  color: #fff;
  border-color: var(--border-light);
}

.source-tab.is-active {
  background: var(--accent-grad);
  color: #090b10;
  border-color: transparent;
}

.source-count {
  font-size: 11px;
  opacity: 0.78;
}

.playlist-panel {
  display: none;
}

.playlist-panel.is-active {
  display: block;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.ep-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-btn:hover {
  color: #fff;
  background: var(--bg-surface-hover);
  border-color: var(--border-accent);
}

.ep-btn.is-active {
  background: rgba(245, 183, 59, 0.16);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 700;
}

/* ==========================================================================
   Theater Play Page (vod/play)
   ========================================================================== */
.theater-wrap {
  background: #040508;
  border-bottom: 1px solid var(--border-subtle);
  padding: 20px 0 28px;
  margin-bottom: 34px;
}

.theater-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: stretch;
}

.player-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.player-frame-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.75);
  z-index: 20;
}

.player-frame-box .MacPlayer,
.player-frame-box iframe,
.player-frame-box video {
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.player-gate {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  background: radial-gradient(circle at center, rgba(20, 25, 38, 0.92), rgba(5, 7, 12, 0.98));
  gap: 14px;
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.player-now {
  min-width: 0;
  flex: 1;
}

.player-now-title {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.player-now-ep {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(245, 183, 59, 0.16);
  color: var(--accent-gold);
}

.player-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.tool-btn:hover {
  color: #fff;
  border-color: var(--border-accent);
  background: var(--bg-surface-hover);
}

.tool-btn svg {
  width: 14px;
  height: 14px;
}

/* Theater Right Sidebar */
.theater-sidebar {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 610px;
}

.sidebar-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-vod-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-vod-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-sources {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-sources::-webkit-scrollbar {
  display: none;
}

.sidebar-source-btn {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.sidebar-source-btn.is-active {
  background: var(--accent-grad);
  color: #090b10;
  border-color: transparent;
}

.sidebar-ep-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-episodes {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px 16px;
}

.sidebar-ep-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

/* Lights-Off Mode */
body.lights-off::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 15;
}

body.lights-off .player-frame-box {
  position: relative;
  z-index: 25;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.95);
}

body.lights-off .player-toolbar {
  position: relative;
  z-index: 25;
}

/* ==========================================================================
   Search Result Page
   ========================================================================== */
.search-hero-box {
  max-width: 720px;
  margin: 0 auto 28px;
}

.search-hero-form {
  display: flex;
  align-items: center;
  height: 54px;
  padding: 6px 6px 6px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
}

.search-hero-form:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 4px rgba(245, 183, 59, 0.14);
}

.search-hero-input {
  flex: 1;
  font-size: 15px;
  color: #fff;
}

.search-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all 0.25s var(--ease-out);
}

.search-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-surface);
  transform: translateY(-2px);
}

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

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

.search-card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.search-card-title {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
}

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

.search-card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Rankings & Map & Gbook & Comments
   ========================================================================== */
.rank-grid-boards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.glass-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: #fff;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--accent-gold);
}

.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.comment-item:last-child {
  border-bottom: 0;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}

.comment-author {
  font-weight: 600;
  color: var(--accent-gold);
}

.comment-time {
  color: var(--text-muted);
  font-size: 12px;
}

.comment-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-lg);
}

.empty-state h3 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: 64px;
  background: #05070c;
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 14px;
  max-width: 380px;
}

.footer-col-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Back to Top & Toast */
.back-top-btn {
  position: fixed;
  right: 24px;
  bottom: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-glass-heavy);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s var(--ease-out);
  z-index: 800;
}

.back-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top-btn:hover {
  background: var(--accent-gold);
  color: #090b10;
}

.aurora-toast {
  position: fixed;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%) translateY(16px);
  background: rgba(20, 25, 38, 0.96);
  border: 1px solid var(--border-accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  visibility: hidden;
  transition: all 0.28s var(--ease-out);
  z-index: 2000;
}

.aurora-toast.is-show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Mobile Drawer & Bottom Tab Bar */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  visibility: hidden;
  pointer-events: none;
}

.mobile-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  opacity: 0;
  transition: opacity 0.3s;
}

.mobile-drawer.is-open .mobile-drawer-mask {
  opacity: 1;
}

.mobile-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 82vw;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-light);
  padding: 20px;
  transform: translateX(-100%);
  transition: transform 0.32s var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.mobile-drawer.is-open .mobile-drawer-panel {
  transform: translateX(0);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}

.mobile-nav-list a.is-active,
.mobile-nav-list a:hover {
  background: rgba(245, 183, 59, 0.14);
  color: var(--accent-gold);
}

.mobile-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(58px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(9, 12, 19, 0.94);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-subtle);
  z-index: 880;
}

.mobile-tabbar-inner {
  height: 58px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  color: var(--text-muted);
}

.mobile-tab svg {
  width: 20px;
  height: 20px;
}

.mobile-tab.is-active {
  color: var(--accent-gold);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1280px) {
  .container { padding: 0 24px; }
  .vod-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .channel-split { grid-template-columns: minmax(0, 1fr) 280px; }
  .theater-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .channel-split { grid-template-columns: 1fr; }
  .theater-grid { grid-template-columns: 1fr; }
  .theater-sidebar { max-height: 400px; }
  .rank-grid-boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-poster-card { width: 210px; }
  .vod-grid, .vod-grid--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  body { padding-bottom: 64px; }
  .container { padding: 0 16px; }
  .search-box { width: 170px; }
  .search-box:focus-within { width: 205px; }
  .search-dropdown { width: 290px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 15px; }

  .hero-stage { height: auto; min-height: 460px; max-height: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-poster-card { display: none; }
  .hero-content-wrap { padding-top: 84px; padding-bottom: 104px; }
  .hero-title { font-size: 26px; }
  .hero-desc { font-size: 13.5px; -webkit-line-clamp: 2; margin-bottom: 20px; }
  .btn { height: 42px; padding: 0 20px; font-size: 13.5px; }

  .vod-grid, .vod-grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; }
  .vod-rail .vod-card { flex: 0 0 138px; }
  .rail-nav-btn { display: none; }
  .section-title { font-size: 18px; }

  .detail-hero-inner { grid-template-columns: 1fr; gap: 22px; }
  .detail-poster { width: 170px; margin: 0 auto; }
  .detail-meta-grid { grid-template-columns: 1fr; }

  .search-card { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .search-card-title { font-size: 16px; }

  .rank-grid-boards { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .mobile-tabbar { display: block; }
  .back-top-btn { bottom: 76px; right: 16px; width: 40px; height: 40px; }
}

@media (max-width: 460px) {
  .vod-grid, .vod-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .search-box { width: 136px; }
  .search-box:focus-within { width: 166px; }
  .episode-grid { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
}
