/* ==========================================================================
   OurTV+ Cinema • Xbox Edition Stylesheet
   Desktop App UI/UX Parity • Netflix Obsidian Theme • Video Trailer Engine
   ========================================================================== */

:root {
  /* Netflix & OurTV+ Signature Palette */
  --bg-primary: #141414;           /* Netflix Grey-900 */
  --bg-deep: #0f0f0f;
  --bg-surface: #181818;          /* Elevated Grey */
  --bg-surface-elevated: #242424; /* Card/Modal Surface */
  --bg-surface-highlight: #2f2f2f;
  --bg-glass: rgba(20, 20, 20, 0.88);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-medium: rgba(255, 255, 255, 0.2);

  /* Brand Accents */
  --brand-red: #E50914;           /* Netflix Signature Red */
  --brand-red-hover: #f40612;
  --brand-red-glow: rgba(229, 9, 20, 0.45);
  --match-green: #46D369;         /* Netflix Match Green */
  --rating-gold: #F5C518;         /* IMDb Gold */
  --xbox-green: #107C10;          /* Xbox Accent */

  /* Text Hierarchy */
  --text-primary: #ffffff;
  --text-secondary: #e5e5e5;
  --text-muted: #a3a3a3;
  --text-dim: #737373;

  /* Typography & Transitions */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-long: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Universal Box-Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}

body.cinema-body {
  position: relative;
  min-height: 100vh;
}

/* Clean TV Aesthetics: Hide scrollbars while retaining full programmatic/touch scrolling */
::-webkit-scrollbar {
  display: none;
}
* {
  scrollbar-width: none;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   GLOBAL FOCUS ENGINE STATES (Xbox Focus Halo & Glowing Green Border)
   ========================================================================== */
.focusable {
  outline: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.focusable:focus,
.focusable.focused {
  outline: 2px solid #ffffff !important;
  outline-offset: 1px;
  border-color: #107C10 !important;
  box-shadow: 0 0 0 3px #107C10, 0 0 24px rgba(16, 124, 16, 0.7) !important;
  transform: scale(1.05) translateY(-3px);
  z-index: 100 !important;
}

button.focusable:focus,
button.focusable.focused {
  filter: brightness(1.2);
}

/* ==========================================================================
   AUTHENTIC XBOX CONTROLLER GLYPHS & ICONS (Xbox System Specs)
   ========================================================================== */
.xbox-btn-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}

.xbox-bumper-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 4px;
  background: linear-gradient(180deg, #3d4a5d 0%, #1e2633 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Fallback Xbox Buttons */
.xbox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.xbox-btn.btn-a {
  background: linear-gradient(135deg, #107C10 0%, #0b540b 100%);
}
.xbox-btn.btn-b {
  background: linear-gradient(135deg, #E81123 0%, #a80c19 100%);
}
.xbox-btn.btn-x {
  background: linear-gradient(135deg, #0078D7 0%, #004e8c 100%);
}
.xbox-btn.btn-y {
  background: linear-gradient(135deg, #FFB900 0%, #c48e00 100%);
}
.xbox-btn.btn-view {
  background: #334155;
  border-radius: 4px;
  font-size: 12px;
}

.xbox-btn-dpad {
  font-size: 14px;
  color: #94a3b8;
}

.xbox-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 4px;
  background: #334155;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   SCREEN 1: PIN SECURITY GATE (0372)
   ========================================================================== */
.pin-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1f1f1f 0%, #0a0a0a 100%);
  z-index: 10000;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pin-screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
}

.pin-card {
  width: 90%;
  max-width: 420px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 36px 30px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(229, 9, 20, 0.1);
}

.pin-header {
  margin-bottom: 22px;
}

.pin-logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  margin-bottom: 12px;
}

.pin-logo {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.xbox-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #1e293b;
  border-radius: 50%;
  border: 1px solid rgba(16, 124, 16, 0.4);
}

.pin-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.pin-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* PIN Slots */
.pin-dots-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 18px 0 10px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pin-dot.filled {
  background: var(--brand-red);
  border-color: #ff3b47;
  box-shadow: 0 0 12px var(--brand-red-glow);
  transform: scale(1.15);
}

.pin-error-msg {
  height: 22px;
  font-size: 13px;
  color: #ef4444;
  font-weight: 600;
  margin-bottom: 14px;
}

/* PIN Pad Grid */
.pin-pad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.pin-btn {
  height: 54px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.pin-action-btn {
  font-size: 14px;
  color: var(--text-muted);
}

.pin-controller-hints {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.hint-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Shake Animation */
@keyframes shakeAnimation {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.shake {
  animation: shakeAnimation 0.4s ease;
}

/* ==========================================================================
   SCREEN 2: MAIN CINEMA HUB
   ========================================================================== */
.hub-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-primary);
}

/* Xbox Dynamic Ambient Aurora Ribbon */
.xbox-aurora-bg {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 130vw;
  height: 480px;
  background: radial-gradient(ellipse at 50% 15%, rgba(16, 124, 16, 0.2) 0%, rgba(0, 120, 215, 0.08) 45%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: auroraBreath 14s ease-in-out infinite alternate;
}

@keyframes auroraBreath {
  0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  100% { opacity: 0.95; transform: translateX(-48%) scale(1.06); }
}

/* Desktop-grade Top Navbar */
.hub-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 54px;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.95) 0%, rgba(20, 20, 20, 0.7) 60%, transparent 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 500;
  transition: background 0.3s ease;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.nav-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.35);
}

.brand-text {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.brand-plus {
  color: var(--brand-red);
}

/* Navigation Links */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
}

.tab-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 6px 4px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.tab-item:hover {
  color: #ffffff;
}

.tab-item.active {
  color: #ffffff;
  font-weight: 700;
}

.my-list-badge {
  font-size: 10px;
  font-weight: 800;
  background: var(--brand-red);
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.nav-icon-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.live-clock {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Xbox Profile Widget (Gamertag & Gamerscore) */
.xbox-profile-widget {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.xbox-profile-widget:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(16, 124, 16, 0.5);
}

.gamerpic-wrap {
  position: relative;
  width: 24px;
  height: 24px;
}

.gamerpic-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.gamerpic-online-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 7px;
  height: 7px;
  background: #107C10;
  border-radius: 50%;
  border: 1.5px solid #141414;
  box-shadow: 0 0 4px #107C10;
}

.gamertag-col {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.gamertag-name {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.gamerscore-val {
  font-size: 10px;
  font-weight: 800;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 3px;
}

.gamerscore-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #107C10;
  color: #ffffff;
  font-size: 7px;
  font-weight: 900;
}

/* Xbox Profile Dropdown Overlay */
.xbox-profile-dropdown {
  position: fixed;
  top: 74px;
  right: 54px;
  width: 320px;
  background: rgba(24, 24, 24, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 20px rgba(16, 124, 16, 0.15);
  z-index: 1500;
  overflow: hidden;
  padding: 18px;
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-card-pic {
  position: relative;
  width: 44px;
  height: 44px;
}

.profile-card-pic img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.profile-card-details {
  display: flex;
  flex-direction: column;
}

.profile-card-gamertag {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.profile-card-status {
  font-size: 11px;
  color: #10b981;
  font-weight: 600;
}

.profile-card-score {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-card-body {
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setting-info {
  display: flex;
  flex-direction: column;
}

.setting-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.setting-desc {
  font-size: 10px;
  color: var(--text-muted);
}

.xbox-toggle-btn {
  padding: 4px 12px;
  border-radius: 4px;
  border: none;
  font-size: 11px;
  font-weight: 800;
  background: #107C10;
  color: #ffffff;
  cursor: pointer;
}

.xbox-switch-btn {
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.xbox-switch-btn:hover {
  background: var(--brand-red, #e50914);
  border-color: var(--brand-red, #e50914);
}

.xbox-status-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(16, 124, 16, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 124, 16, 0.4);
}

/* Xbox Store Badges */
.badge-xbox-opt {
  background: #107C10;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.badge-hdr {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
}

/* Xbox Quick Resume Card Ribbon */
.card-quick-resume-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(16, 124, 16, 0.95);
  color: #ffffff;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.3px;
  z-index: 5;
}

.card-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  z-index: 5;
}

.card-progress-fill {
  height: 100%;
  background: #107C10;
  box-shadow: 0 0 6px rgba(16, 124, 16, 0.8);
}

/* Scrollable Main Area */
.hub-scrollable {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 70px;
  scroll-behavior: smooth;
}

/* ==========================================================================
   HERO BILLBOARD (With Auto-Playing Video Trailer)
   ========================================================================== */
.hero-billboard {
  position: relative;
  width: 100%;
  height: 580px;
  display: flex;
  align-items: flex-end;
  padding: 0 54px 70px;
  overflow: hidden;
  background: #000000;
}

/* Static Backdrop */
.hero-backdrop-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.7);
  z-index: 1;
}

/* Multi-stop Netflix Vignette Gradient Overlay */
.hero-vignette-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(0deg, var(--bg-primary) 0%, rgba(20, 20, 20, 0.8) 25%, rgba(20, 20, 20, 0.1) 60%, transparent 100%),
    linear-gradient(90deg, rgba(20, 20, 20, 0.95) 0%, rgba(20, 20, 20, 0.6) 40%, transparent 75%);
  z-index: 3;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 4;
  max-width: 680px;
}

.hero-meta-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.badge-4k {
  background: #333333;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.badge-match {
  color: var(--match-green);
  font-size: 14px;
  font-weight: 700;
}

.badge-rating {
  color: var(--rating-gold);
  font-size: 13px;
  font-weight: 700;
}

.badge-year,
.badge-duration,
.badge-genre {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.hero-title {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 14px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-synopsis {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 600px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* Desktop App Action Buttons (Exact Dimensions) */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-hero-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-hero-play:hover {
  background: #e6e6e6;
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: rgba(109, 109, 110, 0.7);
  backdrop-filter: blur(10px);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
}

.btn-hero-secondary:hover {
  background: rgba(109, 109, 110, 0.9);
}

/* Hero Corner Controls (Mute & Age Badge) */
.hero-corner-controls {
  position: absolute;
  bottom: 70px;
  right: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 4;
}

.hero-sound-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.hero-sound-btn:hover {
  border-color: #ffffff;
  background: rgba(0, 0, 0, 0.7);
}

.hero-maturity-badge {
  background: rgba(51, 51, 51, 0.6);
  border-left: 3px solid #dcdcdc;
  padding: 4px 14px 4px 10px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

/* ==========================================================================
   HORIZONTAL RAILS & 2:3 PORTRAIT CARDS (Smooth 60fps Scrolling & Categories)
   ========================================================================== */
.rails-container {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 20px 0 60px;
}

.category-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 54px;
  margin-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-filter-bar::-webkit-scrollbar {
  display: none;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.category-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.category-pill.active {
  background: var(--brand-red, #e50914);
  color: #ffffff;
  border-color: var(--brand-red, #e50914);
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

.category-pill-count {
  font-size: 11px;
  opacity: 0.75;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 6px;
  border-radius: 10px;
}

.rail-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 54px;
}

.rail-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.rail-count-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 10px;
}

.rail-track-wrapper {
  position: relative;
  width: 100%;
}

.rail-nav-btn {
  position: absolute;
  top: 10px;
  bottom: 20px;
  width: 44px;
  background: rgba(15, 15, 15, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease, transform 0.2s ease;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

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

.rail-nav-btn:hover {
  background: rgba(229, 9, 20, 0.85);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: scale(1.05);
}

.rail-nav-btn:active {
  transform: scale(0.95);
}

.rail-nav-prev {
  left: 8px;
}

.rail-nav-next {
  right: 8px;
}

.rail-nav-btn.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}

.rail-scroll-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 54px 20px;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
  will-change: scroll-position;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.rail-scroll-track::-webkit-scrollbar {
  height: 4px;
}

.rail-scroll-track::-webkit-scrollbar-track {
  background: transparent;
}

.rail-scroll-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.rail-scroll-track::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.rail-scroll-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

/* 2:3 Portrait Content Card */
.content-card {
  flex: 0 0 180px;
  height: 270px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateZ(0);
  will-change: transform;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  contain: layout style paint;
}

.content-card:hover,
.content-card.focused {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.9), 0 0 15px rgba(229, 9, 20, 0.2);
  z-index: 2;
}

.card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #1a1a1a;
  display: block;
}

.card-genre-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  z-index: 1;
}

.card-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 15, 15, 0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px 12px;
  pointer-events: none;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.card-subline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

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

.card-type-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  text-transform: uppercase;
}

.card-type-series {
  border-left: 2px solid #3b82f6;
}
.card-type-channel {
  border-left: 2px solid var(--brand-red);
}

/* My List Empty State */
.my-list-empty-card {
  padding: 30px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 54px;
}

/* ==========================================================================
   RESUME PLAYBACK MODAL (Desktop App Feature)
   ========================================================================== */
.resume-dialog {
  width: 90%;
  max-width: 440px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  text-align: center;
}

.resume-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.resume-icon {
  font-size: 22px;
  color: var(--brand-red);
}

.resume-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.resume-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

.resume-timestamp {
  color: var(--brand-red);
  font-weight: 700;
}

.resume-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-resume-primary {
  padding: 12px;
  background: var(--brand-red);
  border: none;
  border-radius: 6px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.btn-resume-secondary {
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

/* ==========================================================================
   PERSISTENT BOTTOM XBOX CONTROLLER LEGEND BAR (Sleek Dark Console Strip)
   ========================================================================== */
.xbox-legend-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  padding: 0 40px;
}

.legend-group {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 600;
}

/* ==========================================================================
   MODAL OVERLAY & DETAIL DIALOG
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 1;
  transition: opacity var(--transition-fast);
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-close-btn {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  z-index: 100;
  position: relative;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.modal-close-btn:active {
  transform: scale(0.96);
}

/* Detail Modal */
.detail-dialog {
  width: 90%;
  max-width: 960px;
  max-height: 88vh;
  background: #181818;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.9);
}

.detail-backdrop-wrap {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #0f0f0f;
}

.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.7);
}

.detail-backdrop-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #181818 0%, rgba(24, 24, 24, 0.3) 60%, transparent 100%);
}

.detail-backdrop-wrap .modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 10;
}

.detail-body {
  display: flex;
  gap: 32px;
  padding: 0 36px 36px;
  margin-top: -60px;
  position: relative;
  z-index: 5;
}

.detail-poster-wrap {
  flex: 0 0 180px;
  height: 270px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-subtle);
  background: #1e1e1e;
}

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

.detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.detail-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.detail-title {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.detail-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.detail-meta-row {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.meta-label {
  font-weight: 700;
  color: #ffffff;
  margin-right: 6px;
}

.detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

/* Series Browser */
.series-browser-wrap {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.series-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #ffffff;
}

.season-tabs-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.season-tab-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.season-tab-btn.active {
  background: var(--brand-red);
  border-color: #ff3b47;
  color: #ffffff;
}

.episodes-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 6px;
}

.episode-card {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.episode-card:hover,
.episode-card.focused {
  background: rgba(229, 9, 20, 0.15);
  border-color: var(--brand-red) !important;
}

.ep-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-red);
  text-transform: uppercase;
}

.ep-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   FULLSCREEN TV VIDEO PLAYER (Desktop App Parity)
   ========================================================================== */
.player-overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tv-video-element {
  width: 100vw;
  height: 100vh;
  object-fit: fill;
  background: #000000;
}

.tv-video-element.fit-fill {
  object-fit: fill !important;
}

.tv-video-element.fit-cover {
  object-fit: cover !important;
}

.tv-video-element.fit-contain {
  object-fit: contain !important;
}

/* Buffering Spinner */
.player-spinner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  z-index: 10005;
}

.spinner-circle {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--brand-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Volume HUD Toast */
.player-volume-hud {
  position: absolute;
  top: 40px;
  right: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(12px);
  padding: 10px 18px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  z-index: 10010;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.vol-hud-bar {
  width: 100px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.vol-hud-fill {
  height: 100%;
  background: var(--brand-red);
  width: 100%;
  transition: width 0.1s ease;
}

.vol-hud-text {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  min-width: 36px;
}

/* Next Episode Countdown Overlay Card */
.next-ep-countdown-card {
  position: absolute;
  bottom: 120px;
  right: 60px;
  background: rgba(24, 24, 24, 0.95);
  backdrop-filter: blur(16px);
  border: 2px solid var(--brand-red);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.85);
  padding: 22px 26px;
  border-radius: 12px;
  z-index: 10015;
  width: 320px;
}

.countdown-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand-red);
  letter-spacing: 1px;
}

.next-ep-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 6px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.countdown-timer-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.countdown-card-actions {
  display: flex;
  gap: 10px;
}

.btn-countdown-play {
  flex: 1;
  padding: 10px;
  background: var(--brand-red);
  border: none;
  border-radius: 6px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.btn-countdown-cancel {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

/* Pixel-Perfect Custom Subtitles Overlay */
.custom-subtitles-overlay {
  position: absolute;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 86vw;
  text-align: center;
  pointer-events: none;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  user-select: none;
}

.custom-sub-cue {
  display: inline-block;
  font-family: 'Tajawal', 'Segoe UI', 'Cairo', sans-serif;
  font-weight: 600;
  line-height: 1.35;
  padding: 4px 12px;
  border-radius: 6px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9), -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  transition: all 0.15s ease;
  white-space: pre-wrap;
}

/* Desktop-Grade Subtitle Manager Drawer */
.subtitles-drawer {
  position: absolute;
  bottom: 110px;
  right: 50px;
  background: rgba(18, 18, 18, 0.96);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 18px 20px;
  width: 320px;
  max-height: 75vh;
  overflow-y: auto;
  z-index: 10020;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.subtitles-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.sub-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.sub-header-title h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.subtitles-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.subtitles-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.sub-section {
  margin-bottom: 14px;
}

.sub-section-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.sub-section-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.sub-sync-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-red);
  background: rgba(229, 9, 20, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
}

.subtitles-options-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.sub-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sub-option-item:hover,
.sub-option-item.active {
  background: rgba(229, 9, 20, 0.18);
  border-color: var(--brand-red);
  color: #ffffff;
}

.sub-sync-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.sub-btn-sync {
  padding: 7px 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.sub-btn-sync:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
}

.sub-btn-reset {
  color: var(--text-muted);
}

.sub-chip-group {
  display: flex;
  gap: 6px;
}

.sub-chip-btn {
  flex: 1;
  padding: 6px 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.sub-chip-btn:hover,
.sub-chip-btn.active {
  background: rgba(229, 9, 20, 0.18);
  border-color: var(--brand-red);
  color: #ffffff;
}

.sub-color-group {
  display: flex;
  gap: 8px;
}

.sub-color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.sub-color-btn:hover {
  transform: scale(1.1);
}

.sub-color-btn.active {
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Player Controls Overlay */
.player-controls-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 54px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, transparent 30%, transparent 70%, rgba(0, 0, 0, 0.9) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10002;
}

.player-controls-layer.active {
  opacity: 1;
  pointer-events: auto;
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.player-title-box {
  text-align: center;
}

.player-now-playing {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.player-engine-tag {
  font-size: 11px;
  color: var(--text-muted);
}

.player-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.player-action-btn.active {
  background: rgba(229, 9, 20, 0.2);
  border-color: rgba(229, 9, 20, 0.6);
  color: #ffffff;
}

.player-family-toast {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 21, 27, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-family-toast.hidden {
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
}

/* Center Transport Controls */
.player-center-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
}

.transport-btn {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transport-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.play-pause-btn {
  width: 80px;
  height: 80px;
  background: #ffffff;
  color: #000000;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.play-pause-btn:hover {
  background: #e6e6e6;
}

/* Bottom Seekbar & Controls (Netflix Parity) */
.player-bottom-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.seekbar-row {
  width: 100%;
}

.seekbar-track-container {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  overflow: visible;
}

.seekbar-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  width: 0%;
  pointer-events: none;
}

.seekbar-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--brand-red, #e50914);
  border-radius: 3px;
  width: 0%;
  pointer-events: none;
}

.player-seekbar {
  position: absolute;
  top: -4px;
  left: 0;
  width: 100%;
  height: 14px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  cursor: pointer;
  margin: 0;
  z-index: 5;
}

.player-seekbar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  border: 2px solid var(--brand-red, #e50914);
}

.player-seekbar::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  border: 2px solid var(--brand-red, #e50914);
}

.player-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-controls-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.player-time-display {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.player-volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vol-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
}

.player-volume-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
}

.player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
}

.player-controls-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-action-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 4px;
}

.player-action-icon-btn:hover {
  color: #ffffff;
}

.status-chip {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  color: #cbd5e1;
}

.chip-quality {
  background: #333333;
  color: #ffffff;
}

/* Search Modal Dialog */
.search-dialog {
  width: 90%;
  max-width: 1040px;
  height: 82vh;
  background: #181818;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
}

.search-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 30px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.search-icon {
  font-size: 22px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  outline: none;
  font-family: inherit;
}

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

.search-results-grid {
  flex: 1;
  overflow-y: auto;
  padding: 24px 30px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

.search-results-grid .content-card {
  flex: none;
  width: 100%;
  height: 250px;
}

.search-results-grid .content-card.channel-card {
  height: 200px;
}

.search-empty-hint {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dim);
  font-size: 15px;
  margin-top: 60px;
}

/* Desktop App Parity: Search Category Tabs */
.search-category-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 30px;
  background: #141414;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.search-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.search-tab-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.search-tab-pill.active {
  background: #107c10;
  border-color: #52b043;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(16, 124, 16, 0.45);
}

.search-tab-pill:focus,
.search-tab-pill.gamepad-focused {
  outline: 2px solid #52b043;
  outline-offset: 2px;
  box-shadow: 0 0 16px rgba(16, 124, 16, 0.6);
}

.stab-badge {
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
}

.search-tab-pill.active .stab-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.search-tabs-hint {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
}

.search-hint-text {
  opacity: 0.8;
}

/* Search Section Headers (For 'All' tab) */
.search-section-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  padding: 16px 0 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 10px;
}

.search-section-badge {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-series {
  background: #3b82f6;
  color: #ffffff;
}

.badge-movie {
  background: #107c10;
  color: #ffffff;
}

.badge-channel {
  background: #ef4444;
  color: #ffffff;
}

/* ========================================================================== */
/* DESKTOP-PARITY CHANNEL CARD DESIGN & LIVE TV SECTION                       */
/* ========================================================================== */
.content-card.channel-card {
  flex: 0 0 165px;
  height: 200px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 10px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.content-card.channel-card:hover,
.content-card.channel-card.gamepad-focused {
  transform: translateY(-4px) scale(1.03);
  border-color: #107c10;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.85), 0 0 16px rgba(16, 124, 16, 0.45);
}

.channel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 6px;
}

.pulsing-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 2px 6px;
  border-radius: 4px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 6px #ef4444;
  animation: liveDotPulse 1.4s infinite ease-in-out;
}

@keyframes liveDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.channel-category-tag {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  max-width: 75px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-logo-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 8px;
  overflow: hidden;
}

.channel-logo-img {
  max-width: 90%;
  max-height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.channel-card-bottom {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.channel-card-title {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-package-tag {
  font-size: 10px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Category Quick Bar for Live TV */
.live-tv-category-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 54px;
  overflow-x: auto;
  margin-bottom: 8px;
}

.live-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.live-cat-pill:hover,
.live-cat-pill:focus,
.live-cat-pill.gamepad-focused {
  background: rgba(16, 124, 16, 0.2);
  border-color: #107c10;
  color: #ffffff;
}

.live-cat-count {
  font-size: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 6px;
  border-radius: 8px;
  color: var(--text-dim);
}

