/* ═══════════════════════════════════════════
   Komorebi — Red & Black Cinema Theme
   Exact replica of reference UI layout (All 5 Views)
═══════════════════════════════════════════ */

:root {
  --bg:             #06070a;
  --bg-gradient:    radial-gradient(ellipse at 50% 0%, #15080c 0%, #06070a 75%);
  --surface:        #0c0d14;
  --surface-glass:  rgba(16, 18, 26, 0.82);
  --card:           #11131c;
  --card-hover:     #181a26;
  --border:         rgba(255, 255, 255, 0.08);
  --border-light:   rgba(255, 255, 255, 0.14);
  --accent:         #e50914;
  --accent-rgb:     229, 9, 20;
  --accent-glow:    rgba(229, 9, 20, 0.5);
  --accent-hover:   #ff1f2d;
  --text:           #f2f4fd;
  --text-dim:       #b0b5cc;
  --muted:          #717691;
  --gold:           #f5c518;
  --hd-green:       #00e676;
  --season-green:   #22c55e;
  --r:              14px;
  --r-sm:           8px;
  --r-pill:         999px;
  --shadow-card:    0 12px 35px rgba(0, 0, 0, 0.8);
  --shadow-glow:    0 0 25px rgba(229, 9, 20, 0.45);
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

select {
  font-family: inherit;
}

.container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 36px;
}

/* ── Scrollbar ─────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #202336;
  border-radius: 4px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: #313652;
}

/* ══════════════════════════════════════
   TOP BAR (Brand in Corner + Floating Pill Nav)
══════════════════════════════════════ */
#site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 10;
}

.nav-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.nav-back-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-2px);
}

/* Komorebi Logo in Corner */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
  text-transform: none;
  cursor: pointer;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e50914 0%, #8b0007 100%);
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.6);
  flex-shrink: 0;
}

.brand-icon svg {
  display: block;
}

.brand-text span {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(229, 9, 20, 0.7);
}

/* Right Floating Pill Navbar */
.pill-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(14, 16, 25, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7);
}

.pill-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dim);
  padding: 7px 16px;
  border-radius: var(--r-pill);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.pill-nav a:hover {
  color: #fff;
}

/* Active Nav Tab (White Pill with Black Text) */
.pill-nav a.active {
  background: #ffffff;
  color: #06070a;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.35);
}

.pill-nav a.active svg {
  fill: #06070a;
}

.pill-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.16);
  margin: 0 2px;
}

.pill-btn {
  color: var(--text-dim);
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

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

/* ══════════════════════════════════════
   HERO BANNER
══════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 80vh;
  padding-top: 135px;
  padding-bottom: 50px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  transition: background-image 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(6, 7, 10, 0.88) 25%, rgba(6, 7, 10, 0.35) 60%, transparent 100%),
    linear-gradient(to right, var(--bg) 0%, rgba(6, 7, 10, 0.92) 40%, rgba(6, 7, 10, 0.2) 80%, transparent 100%);
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
}

.hero-content {
  max-width: 640px;
}

/* Huge Bold Red/White Title */
.hero-title {
  font-size: clamp(40px, 6.2vw, 76px);
  font-weight: 900;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin-bottom: 16px;
  text-shadow: 0 4px 25px rgba(229, 9, 20, 0.5), 0 2px 10px rgba(0, 0, 0, 0.9);
}

.hero-title.hero-title-light {
  color: #fff;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.8);
}

/* Metadata Row: ★ 7.3/10 • 📅 2026 • 🏷️ Horror */
.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-meta-rating {
  color: #fff;
  font-weight: 800;
}

.hero-meta-dot {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.8rem;
}

.hero-desc {
  font-size: clamp(14px, 1.35vw, 16px);
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 26px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

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

/* White Pill "Play" Button */
.btn-play-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #06070a;
  font-weight: 800;
  font-size: 15px;
  padding: 11px 30px;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-play-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.4);
  background: #f0f2f5;
}

.btn-play-white svg {
  fill: #06070a;
}

/* Dark Pill "+ | ⓘ" Actions */
.btn-action-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-pill);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.btn-action-icon {
  padding: 11px 16px;
  color: #fff;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

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

.btn-action-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
}

/* Carousel Dots on the Right: ● ○ ○ ○ ○ ○ ○ */
.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.25s ease;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.hero-dot.active {
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  transform: scale(1.25);
}

/* ══════════════════════════════════════
   FILTER PILLS BAR (From Image 4 & Image 5)
══════════════════════════════════════ */
.browse-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 28px;
  padding-top: 10px;
}

.browse-page-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
}

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

.filter-pill {
  position: relative;
  background: #141724;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-pill);
  padding: 8px 18px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  background: #1c2133;
  border-color: rgba(255, 255, 255, 0.25);
}

.filter-pill select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.filter-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
}

/* ══════════════════════════════════════
   BROWSE BY PROVIDER (With Official SVGs)
══════════════════════════════════════ */
.providers-section {
  margin-bottom: 44px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 18px;
}

.providers-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.providers-row::-webkit-scrollbar {
  height: 6px;
}

.provider-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: transform 0.2s ease;
}

.provider-item:hover {
  transform: translateY(-4px);
}

.provider-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.provider-item:hover .provider-icon,
.provider-item.active .provider-icon {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.55);
}

.provider-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-align: center;
  white-space: nowrap;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══════════════════════════════════════
   PROVIDER VIEW OVERLAY (Image 2)
══════════════════════════════════════ */
.provider-view {
  display: none;
  min-height: 100vh;
  padding-top: 100px;
  padding-bottom: 80px;
  background: radial-gradient(ellipse at 50% 0%, #0d2818 0%, #06070a 75%);
}

.provider-view.open {
  display: block;
}

.provider-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.provider-header-logo {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

.provider-header-title {
  font-size: 2.4rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}

.provider-type-toggle {
  display: inline-flex;
  gap: 4px;
  background: rgba(18, 22, 34, 0.8);
  padding: 4px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 32px;
}

.provider-type-btn {
  padding: 7px 20px;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.provider-type-btn.active {
  background: #ffffff;
  color: #06070a;
}

/* ══════════════════════════════════════
   MY LISTS VIEW (Image 3)
══════════════════════════════════════ */
.mylists-view {
  display: none;
  min-height: 100vh;
  padding-top: 110px;
  padding-bottom: 80px;
  background: radial-gradient(ellipse at 50% 0%, #0a2014 0%, #06070a 75%);
}

.mylists-view.open {
  display: block;
}

.mylists-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.mylists-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
}

.mylists-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-new-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--season-green);
  color: #06070a;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}

.btn-import-list {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.mylists-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 38, 26, 0.55);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 16px 24px;
  border-radius: 12px;
  margin-bottom: 28px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.mylists-banner:hover {
  border-color: rgba(34, 197, 94, 0.6);
}

.mylists-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mylists-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.2);
  color: var(--season-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.mylists-banner-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.mylists-banner-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.mylists-box {
  background: rgba(14, 18, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 70px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.mylists-box-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.mylists-box-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.mylists-box-sub {
  font-size: 0.86rem;
  color: var(--muted);
  max-width: 440px;
  line-height: 1.55;
}

/* ══════════════════════════════════════
   SHELVES WITH WIDE LANDSCAPE CARDS
══════════════════════════════════════ */
.main {
  padding-bottom: 90px;
}

.shelf {
  margin-bottom: 46px;
}

.shelf-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.shelf-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.shelf-title .shelf-arrow-indicator {
  font-size: 0.85rem;
  color: var(--muted);
}

.shelf-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.shelf-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(14, 16, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
  transition: all 0.2s ease;
  opacity: 0.8;
}

.shelf-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.7);
}

.shelf-arrow-left {
  left: -18px;
}

.shelf-arrow-right {
  right: -18px;
}

.shelf-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  width: 100%;
}

.shelf-row::-webkit-scrollbar {
  height: 6px;
}

/* ══════════════════════════════════════
   WIDE CARDS (16:9 Cinema Aspect Ratio)
══════════════════════════════════════ */
.card {
  position: relative;
  flex-shrink: 0;
  width: 270px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  scroll-snap-align: start;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: var(--accent);
  box-shadow: var(--shadow-card), 0 0 25px rgba(229, 9, 20, 0.35);
  z-index: 10;
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9.5;
  overflow: hidden;
  background: #0d0f17;
}

.card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.card-poster-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #131728 0%, #1a2038 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: var(--muted);
}

/* Badges */
.card-quality-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--hd-green);
  color: #060911;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.card-type-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(14, 18, 30, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 2;
}

.card-season-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--season-green);
  color: #06070a;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.card-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 7, 10, 0.95) 0%, rgba(6, 7, 10, 0.3) 50%, transparent 100%);
  z-index: 1;
}

.card-bottom-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  z-index: 2;
}

.card-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--text-dim);
}

.card-rating {
  color: var(--gold);
  font-weight: 800;
}

.card-year {
  color: var(--text-dim);
}

/* Center Play Hover Button */
.card-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 10, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: opacity 0.2s ease;
  z-index: 3;
}

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

.card-play-center {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(229, 9, 20, 0.8);
  transform: scale(0.85);
  transition: all 0.2s ease;
}

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

.card-play-center:hover {
  transform: scale(1.1);
  background: var(--accent-hover);
}

.card-info-btn {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid var(--border-light);
  backdrop-filter: blur(4px);
  transition: all 0.15s ease;
}

.card-info-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* ══════════════════════════════════════
   VERTICAL POSTER CARDS (Grid View)
══════════════════════════════════════ */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 22px;
}

.card-vertical {
  width: 100%;
}

.card-vertical .card-media {
  aspect-ratio: 2/3;
}

/* ══════════════════════════════════════
   SEARCH MODAL
══════════════════════════════════════ */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.search-modal.open {
  display: flex;
}

.search-modal-box {
  width: 100%;
  max-width: 680px;
  margin: 0 20px;
}

.search-modal-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-modal-input-wrap svg {
  position: absolute;
  left: 20px;
  color: var(--muted);
}

.search-modal-input {
  width: 100%;
  background: #121420;
  border: 2px solid rgba(229, 9, 20, 0.6);
  border-radius: var(--r-pill);
  padding: 16px 24px 16px 56px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  outline: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(229, 9, 20, 0.25);
}

.search-modal-results {
  margin-top: 14px;
  background: #10121d;
  border: 1px solid var(--border-light);
  border-radius: var(--r);
  max-height: 420px;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.search-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}

.search-item:hover {
  background: rgba(229, 9, 20, 0.1);
}

.search-item img {
  width: 44px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.search-item-info {
  flex: 1;
  min-width: 0;
}

.search-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.search-item-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 3px;
}

.search-item-type {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   PLAYER MODAL
══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 8, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #0d0f18;
  border: 1.5px solid rgba(229, 9, 20, 0.4);
  border-radius: 18px;
  width: 100%;
  max-width: 980px;
  overflow: hidden;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.95), 0 0 40px rgba(229, 9, 20, 0.25);
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { transform: scale(0.94) translateY(24px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: #111422;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--accent);
  color: #fff;
  transform: rotate(90deg);
}

.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.player-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #05060b;
  z-index: 3;
  transition: opacity 0.3s;
}

.player-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.player-loader p {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

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

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

.player-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Source bar */
.source-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #0f121d;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.source-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}

.source-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}

.server-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hd-green);
  box-shadow: 0 0 6px var(--hd-green);
}

.source-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.source-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.6);
}

.source-btn.active .server-dot {
  background: #fff;
  box-shadow: none;
}

/* TV Controls */
.tv-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: #111422;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.tv-controls label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tv-controls select {
  background: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  outline: none;
  cursor: pointer;
}

.tv-controls select:focus {
  border-color: var(--accent);
}

/* ══════════════════════════════════════
   INFO MODAL
══════════════════════════════════════ */
.modal-info-box {
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-info-box .modal-close {
  position: sticky;
  top: 14px;
  float: right;
  margin: 14px 14px 0 0;
  z-index: 5;
}

.info-inner {
  padding: 0 0 32px;
}

.info-backdrop {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.info-backdrop-placeholder {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, #131728, #1c223a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.info-body {
  padding: 26px 28px 0;
}

.info-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 12px;
}

.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.info-tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
}

.info-tag-rating {
  color: var(--gold);
  border-color: rgba(245, 197, 24, 0.35);
  background: rgba(245, 197, 24, 0.1);
}

.info-tag-genre {
  color: #fff;
}

.info-overview {
  font-size: 0.94rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 22px;
}

.info-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.info-detail-lbl {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.info-detail-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

/* Skeletons */
.skeleton {
  background: linear-gradient(90deg, #121524 25%, #1c223a 50%, #121524 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r);
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.skel-poster {
  width: 100%;
  aspect-ratio: 16/9.5;
}

.skel-line {
  height: 12px;
  border-radius: 4px;
  margin-top: 10px;
}

.skel-line-sm {
  width: 60%;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.page-btn {
  background: var(--card);
  border: 1px solid var(--border-light);
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--border);
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
  background: #07080d;
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 600;
}

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

.footer-note {
  font-size: 0.74rem !important;
  max-width: 540px;
  line-height: 1.6;
  color: var(--muted);
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  #site-header { padding: 18px 24px; }
  .pill-nav a:not(.active) { display: none; }
  .hero-layout { flex-direction: column; align-items: flex-start; }
  .hero-dots { margin-top: 20px; }
  .shelf-arrow { display: none; }
}

@media (max-width: 768px) {
  .hero { min-height: 70vh; padding-top: 110px; }
  .card { width: 220px; }
  .poster-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
}

@media (max-width: 480px) {
  #site-header { padding: 14px 18px; }
  .brand-logo { font-size: 1.25rem; }
  .card { width: 190px; }
  .hero-title { font-size: 32px; }
}
