/* --- Ultra-Premium Luxury Minimal Styling System & Variables --- */
:root {
  --font-family: 'Outfit', sans-serif;
  
  /* Refined Onyx & Champagne Palette (Sophisticated Luxury, No Cheap Neons) */
  --bg-deep: 240 10% 3.8%;       /* Rich warm charcoal/onyx */
  --bg-card: 240 6% 7.5%;        /* Luxury matte black */
  --bg-glass: 240 6% 7.5% / 0.65; /* Pure Apple-style blurred glass */
  --bg-glass-hover: 240 6% 11% / 0.85;
  
  --border-glass: 240 5% 15% / 0.35; /* Razor thin subtle border */
  --border-glass-hover: 240 5% 30% / 0.6; /* Crisp soft silver-gray outline */
  
  --color-primary: 36 28% 65%;   /* Sophisticated Champagne Gold */
  --color-accent: 0 0% 90%;      /* Soft Platinum/White */
  --color-text-main: 0 0% 98%;   /* Pure Crisp White */
  --color-text-muted: 240 5% 65%; /* Muted Slate Gray */
  
  --gold: 36 28% 65%;
  
  /* High-Fidelity Soft Shadows & Minimal Transitions */
  --luxury-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.75);
  --gold-glow-subtle: 0 0 25px hsla(36, 28%, 65%, 0.1);
  
  --transition-luxury: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
}

/* --- Global Resets & Typography --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: hsl(var(--bg-deep));
}

body {
  font-family: var(--font-family);
  background-color: hsl(var(--bg-deep));
  color: hsl(var(--color-text-main));
  overflow-x: hidden;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: hsl(var(--bg-deep));
}
::-webkit-scrollbar-thumb {
  background: hsla(240, 5%, 20%, 0.5);
  border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--color-primary));
}

/* --- Luxury Vignette & Soft Gradient Backgrounds --- */
.ambient-mesh {
  display: none; /* Removed cheap cyberpunk grids */
}
.ambient-glow {
  display: none; /* Removed cheap neon glow circles */
}

/* Luxury Soft Background Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at top, rgba(20, 20, 25, 0.3) 0%, rgba(10, 10, 12, 0) 70%);
  pointer-events: none;
  z-index: -1;
}

/* --- Premium Typography Utilities --- */
.highlight {
  background: linear-gradient(135deg, #fff 30%, hsl(var(--color-primary)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Typographic Logo & Header --- */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: hsl(var(--bg-glass));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid hsl(var(--border-glass));
  transition: var(--transition-luxury);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Typographic Logo P I K A . */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* Removed cheap lightning bolt and spinning stars logo icon wrapper */
.logo-icon-wrapper {
  display: none; 
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 7px;
  color: #fff;
  transition: var(--transition-luxury);
}

.logo-text::after {
  content: '.';
  color: hsl(var(--color-primary));
}

.logo:hover .logo-text {
  color: hsl(var(--color-primary));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  text-decoration: none;
  color: hsl(var(--color-text-muted));
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-luxury);
}

.nav-links a i {
  font-size: 0.8rem;
  opacity: 0.7;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.nav-links a.active {
  color: hsl(var(--color-primary));
}

.custom-embed-btn {
  background: transparent;
  border: 1px solid hsl(var(--border-glass));
  color: #fff;
  padding: 0.55rem 1.2rem;
  border-radius: 4px;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-luxury);
}

.custom-embed-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
  transform: translateY(-1px);
}

.search-bar {
  position: relative;
  width: 300px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--color-text-muted));
  font-size: 0.9rem;
}

.search-bar input {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid hsl(var(--border-glass));
  color: #fff;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  border-radius: 4px;
  font-family: var(--font-family);
  font-size: 0.9rem;
  transition: var(--transition-luxury);
}

.search-bar input:focus {
  outline: none;
  border-color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
}

/* --- Cinematic Featured Hero Banner --- */
.hero-section {
  position: relative;
  height: 75vh;
  min-height: 550px;
  display: flex;
  align-items: center;
  padding: 0 4rem;
  margin-bottom: 4rem;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center 15%;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(to right, hsl(var(--bg-deep)) 22%, rgba(9, 9, 11, 0.3) 65%, hsl(var(--bg-deep)) 98%),
    linear-gradient(to top, hsl(var(--bg-deep)) 0%, rgba(9, 9, 11, 0) 50%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 650px;
}

.featured-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: hsl(var(--color-primary));
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.35rem 0.75rem;
  border-radius: 2px;
  letter-spacing: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 4.2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -1px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 1rem;
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: hsl(var(--color-primary));
}

.hero-type-badge {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.hero-description {
  color: hsl(var(--color-text-muted));
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions-container {
  display: flex;
  gap: 1rem;
}

/* --- Luxury Premium Buttons --- */
.btn {
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  transition: var(--transition-luxury);
}

.btn-primary {
  background-color: #fff;
  color: #000;
  border: 1px solid #fff;
}

.btn-primary:hover {
  background-color: hsl(var(--color-primary));
  border-color: hsl(var(--color-primary));
  color: #000;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid hsl(var(--border-glass));
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
}

/* --- Layout Grid --- */
.content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.watchlist-section {
  background: rgba(255, 255, 255, 0.02);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid hsl(var(--border-glass));
  margin-bottom: 4rem;
}

.watchlist-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 2rem;
}

/* Homepage rows mode */
.movie-grid.homepage-rows-mode {
  display: flex !important;
  flex-direction: column !important;
  gap: 2.5rem !important;
}

.premium-genre-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.genre-row-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.genre-movies-scroll {
  display: flex !important;
  gap: 1.5rem !important;
  overflow-x: auto !important;
  padding: 0.5rem 0.2rem 1.2rem 0.2rem !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.genre-movies-scroll::-webkit-scrollbar {
  display: none !important;
}

/* Ensure the movie cards inside scrolling row don't shrink */
.movie-grid.homepage-rows-mode .movie-card {
  flex: 0 0 210px !important;
  width: 210px !important;
  margin: 0 !important;
}

@media (max-width: 768px) {
  .movie-grid.homepage-rows-mode .movie-card {
    flex: 0 0 145px !important;
    width: 145px !important;
  }
  .genre-row-title {
    font-size: 1.1rem;
  }
  .premium-genre-row {
    gap: 0.8rem;
  }
}

/* --- Exquisite Minimalist Movie Card --- */
.movie-card {
  position: relative;
  background-color: hsl(var(--bg-card));
  border-radius: var(--border-radius-lg);
  border: 1px solid hsl(var(--border-glass));
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-luxury);
  display: flex;
  flex-direction: column;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glass-hover);
  box-shadow: var(--luxury-shadow);
}

.card-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background-color: #070709;
}

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

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

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.1) 60%, rgba(0, 0, 0, 0) 100%);
  opacity: 0;
  transition: var(--transition-luxury);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

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

.play-icon-overlay {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  transform: scale(0.85);
  transition: var(--transition-luxury);
}

.movie-card:hover .play-icon-overlay {
  transform: scale(1);
}

.card-rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: hsl(var(--color-primary));
  z-index: 3;
}

.card-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 3;
}

.card-details {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: hsl(var(--bg-card));
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  color: #fff;
}

.movie-card:hover .card-title {
  color: hsl(var(--color-primary));
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: hsl(var(--color-text-muted));
  font-size: 0.8rem;
  font-weight: 600;
}

/* --- Catalog Filter Controls --- */
.catalog-controls {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid hsl(var(--border-glass));
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  margin-bottom: 3rem;
}

.filter-tabs {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
}

.filter-tab {
  background-color: transparent;
  border: 1px solid hsl(var(--border-glass));
  color: hsl(var(--color-text-muted));
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-luxury);
}

.filter-tab:hover,
.filter-tab.active {
  background-color: #fff;
  color: #000;
  border-color: #fff;
}

.genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.genre-btn {
  background-color: transparent;
  border: 1px solid hsl(var(--border-glass));
  color: hsl(var(--color-text-muted));
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-luxury);
}

.genre-btn:hover,
.genre-btn.active {
  border-color: #fff;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}

.results-count {
  color: hsl(var(--color-text-muted));
  font-size: 0.95rem;
  font-weight: 600;
}

/* --- TV Select & Iframe Player Wrappers --- */
.tv-controls-container, #tv-controls {
  display: none !important;
}

.tv-selector-group {
  display: flex;
  gap: 1.5rem;
}

.selector-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.selector-field label {
  font-size: 0.75rem;
  font-weight: 700;
  color: hsl(var(--color-text-muted));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.premium-select {
  background-color: #000;
  border: 1px solid hsl(var(--border-glass));
  color: #fff;
  padding: 0.55rem 2.2rem 0.55rem 1rem;
  border-radius: 4px;
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-luxury);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

.premium-select:focus {
  outline: none;
  border-color: #fff;
}

.tv-navigation-buttons {
  display: flex;
  gap: 0.75rem;
}

/* --- High-Fidelity Loading Video Skeleton Panel --- */
.skeleton-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0c0c0e;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.4s ease-in-out;
}

.skeleton-shimmer {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    #0c0c0e 0%,
    #18181b 50%,
    #0c0c0e 100%
  );
  background-size: 200% 100%;
  animation: shimmerAnim 1.8s infinite linear;
}

@keyframes shimmerAnim {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.skeleton-spinner {
  font-size: 2.2rem;
  color: hsl(var(--color-primary));
}

.skeleton-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: hsl(var(--color-text-muted));
}

.skeleton-video.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* --- Cinematic Player Drawer Modal --- */
.player-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: flex-start; /* Align to top to scroll down naturally */
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-luxury);
  overflow-y: auto; /* Enable scroll inside the modal wrapper! */
  padding: 3rem 1.5rem; /* Elegant padding on scroll viewports */
}

.player-modal.active {
  opacity: 1;
  pointer-events: all;
}

.player-modal-backdrop {
  position: fixed; /* Fixed so backdrop covers scrolling behind container */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 15, 20, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1;
}

.player-container {
  position: relative;
  z-index: 10;
  width: 92%;
  max-width: 1250px;
  background-color: #0c0c0e;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.95);
  transform: scale(0.94);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-modal.active .player-container {
  transform: scale(1);
}

.close-modal-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  z-index: 100;
  transition: var(--transition-luxury);
}

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

.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- Server Overlay on Video --- */
.server-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.server-pills {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fs-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.fs-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.server-pill {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-family);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.server-pill.active {
  background: #fff;
  color: #000;
}

/* --- Player Details with Backdrop --- */
.player-details {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, rgba(20,20,20,0.8) 0%, hsl(var(--bg-card)) 40%);
}

.player-details-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center top;
  opacity: 0.3;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
  z-index: 0;
  transition: opacity 0.6s ease;
}

.player-details-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
}

/* --- Cast & Info Section --- */
.info-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: hsl(var(--color-text-muted));
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.75rem;
}

.player-genres {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid hsl(var(--border-glass));
}

.genres-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.genre-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: hsl(var(--color-text-muted));
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  transition: var(--transition-fast);
}

.genre-tag:hover {
  border-color: hsl(var(--color-primary));
  color: hsl(var(--color-primary));
}

.cast-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.cast-grid {
  display: flex !important;
  gap: 1.25rem !important;
  overflow-x: auto !important;
  padding: 0.8rem 0.2rem !important;
  scroll-behavior: smooth !important;
  scrollbar-width: none !important; /* Hide scrollbars */
}
.cast-grid::-webkit-scrollbar {
  display: none !important; /* Hide chrome scrollbars */
}

.cast-card {
  background: transparent !important;
  border: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  width: 90px !important;
  flex-shrink: 0 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.cast-card:hover {
  transform: translateY(-4px) scale(1.05) !important;
  box-shadow: none !important;
}

.cast-photo {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border: 2px solid rgba(255, 255, 255, 0.12) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 6px 15px rgba(0,0,0,0.55) !important;
}

.cast-card:hover .cast-photo {
  border-color: #e50914 !important;
  box-shadow: 0 6px 18px rgba(229, 9, 20, 0.4) !important;
}

.cast-info {
  padding: 0.5rem 0 0 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  gap: 0.15rem !important;
}

.cast-name {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #fff !important;
  text-align: center !important;
  width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.cast-character {
  font-size: 0.68rem !important;
  color: #888 !important;
  text-align: center !important;
  width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  gap: 2rem;
}

.player-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.player-meta-badges {
  display: flex;
  gap: 0.75rem;
}

.player-meta-badges .badge {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid hsl(var(--border-glass));
  color: #fff;
  border-radius: 2px;
}

.ad-block-badge {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: hsl(var(--color-primary)) !important;
  font-weight: 700;
}

.player-synopsis {
  color: hsl(var(--color-text-muted));
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Custom ID Streamer Modal --- */
.custom-modal-container {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 480px;
  background-color: hsl(var(--bg-card));
  border-radius: var(--border-radius-lg);
  border: 1px solid hsl(var(--border-glass));
  padding: 2.5rem;
  box-shadow: var(--luxury-shadow);
  transform: scale(0.93);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-modal.active .custom-modal-container {
  transform: scale(1);
}

.custom-modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-h3 {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-p {
  color: hsl(var(--color-text-muted));
  font-size: 0.95rem;
}

.custom-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.custom-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: hsl(var(--color-text-muted));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.custom-type-switch {
  display: flex;
  background-color: #000;
  padding: 0.25rem;
  border-radius: 4px;
  border: 1px solid hsl(var(--border-glass));
}

.type-switch-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: hsl(var(--color-text-muted));
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem;
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition-luxury);
}

.type-switch-btn.active {
  background-color: #fff;
  color: #000;
}

.premium-input {
  background-color: #000;
  border: 1px solid hsl(var(--border-glass));
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  transition: var(--transition-luxury);
}

.premium-input:focus {
  outline: none;
  border-color: #fff;
}

.custom-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* --- Minimal Footer --- */
.main-footer {
  border-top: 1px solid hsl(var(--border-glass));
  padding: 2.5rem 2rem;
  background-color: rgba(0, 0, 0, 0.4);
  margin-top: auto;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo-icon {
  display: none; /* Removed cheap lighting bolt from footer */
}

.footer-copy {
  color: hsl(var(--color-text-muted));
  font-size: 0.88rem;
}

/* --- Loader Spinner --- */
.loader-container {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 0;
}

.loader-icon {
  color: hsl(var(--color-primary)) !important;
}

/* --- Responsive Layout Rules --- */
@media (max-width: 1024px) {
  .hero-section {
    height: 70vh;
    padding: 0 2rem;
  }
  .hero-title {
    font-size: 3.2rem;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0.7rem 0.85rem;
  }
  .logo-text {
    font-size: 1rem;
    letter-spacing: 4px;
  }
  .search-bar {
    width: 120px;
  }
  .search-bar input {
    font-size: 0.72rem;
    padding: 0.4rem 0.6rem 0.4rem 1.8rem;
  }
  .search-icon {
    left: 0.55rem;
    font-size: 0.7rem;
  }
  .player-modal {
    padding: 0.35rem;
  }
  .player-container {
    border-radius: 10px;
  }
  .player-title {
    font-size: 1.1rem;
  }
  .player-details-content {
    padding: 0.85rem;
  }
  .player-synopsis {
    font-size: 0.82rem;
  }
  .player-meta-badges .badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }
  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.85rem;
  }
  .hero-section {
    padding: 4.5rem 0.85rem 1.75rem;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .hero-content {
    margin-top: 140px;
  }
  .hero-actions-container {
    flex-direction: column;
  }
  .hero-actions-container .btn {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
  }
  .hero-carousel-dots {
    right: 0.85rem;
    bottom: 1rem;
  }
  .cast-grid {
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  }
  .lobby-heading {
    font-size: 1.3rem;
  }
  .lobby-content {
    gap: 0.75rem;
  }
  .lobby-waiting-screen {
    padding: 1rem 0.75rem;
  }
  .sidebar-header {
    padding: 0.75rem;
  }
  .sidebar-header h3 {
    font-size: 0.85rem;
  }
  .sidebar-header button {
    font-size: 0.6rem !important;
    padding: 0.2rem 0.4rem !important;
  }

  /* Meet modal mobile */
  .meet-container {
    padding: 0.75rem;
    width: 95%;
  }
  .meet-title {
    font-size: 0.7rem;
    letter-spacing: 1px;
  }
  .meet-header-btn {
    font-size: 0.65rem;
    padding: 0.3rem 0.5rem;
  }
  .meet-btn {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
  .meet-controls {
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .meet-video-grid-parent .video-feed-box {
    height: 200px !important;
    min-height: 200px !important;
  }

  /* Floating widget mobile */
  .floating-call-container {
    width: calc(100vw - 16px) !important;
    max-width: 320px;
    right: 8px !important;
    left: auto !important;
    bottom: 8px !important;
  }

  /* Custom modal mobile */
  .custom-modal-container {
    padding: 1.25rem;
    width: 95%;
  }
  .party-action-card {
    padding: 1rem;
  }
  .party-action-card h4 {
    font-size: 0.9rem;
  }

  /* General text helpers */
  .section-title {
    font-size: 1rem;
  }
  .modal-h3 {
    font-size: 1.1rem;
  }
  .modal-p {
    font-size: 0.8rem;
  }

  /* Movie card adjustments */
  .movie-card .card-title {
    font-size: 0.75rem;
  }
  .movie-card .card-meta {
    font-size: 0.6rem;
  }

  /* Skeleton text */
  .skeleton-text {
    font-size: 0.6rem;
    letter-spacing: 1px;
  }
  .skeleton-spinner {
    font-size: 1.6rem;
  }

  /* Guest waiting area */
  .guest-waiting-box {
    padding: 1rem;
  }
  .guest-waiting-box h3 {
    font-size: 0.8rem;
  }
  .guest-waiting-box p {
    font-size: 0.65rem;
  }

  /* Fullscreen overlay mobile */
  .fs-overlay {
    top: 8px;
    right: 8px;
  }
  .fs-exit {
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
  }
  .fs-pill {
    font-size: 0.55rem;
    padding: 0.2rem 0.4rem;
  }
  .fs-call-btn {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
}

/* --- Extreme High-Fidelity Additions --- */

/* 1. Hero Banner dot paginator indicators */
.hero-carousel-dots {
  position: absolute;
  bottom: 2rem;
  right: 4rem;
  display: flex;
  gap: 0.6rem;
  z-index: 10;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  transition: var(--transition-luxury);
  padding: 0;
}

.hero-dot.active {
  background-color: hsl(var(--color-primary));
  width: 24px; /* Apple-style active capsule expanding state */
  border-radius: 4px;
}

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

/* 2. History card progress badge and title details */
.history-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.history-card-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  z-index: 3;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.history-card-badge i {
  color: hsl(var(--color-primary));
}

/* 3. Player Modal Tagline styling */
.player-tagline {
  font-size: 1.1rem;
  font-weight: 500;
  font-style: italic;
  color: hsl(var(--color-primary));
  margin-bottom: 0.75rem;
  border-left: 2px solid hsl(var(--color-primary));
  padding-left: 0.75rem;
}

/* 4. Luxury micro-interaction highlights */
.movie-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0) 50%);
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
}

.card-genres {
  font-size: 0.75rem;
  color: hsl(var(--color-primary));
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  opacity: 0.8;
}

/* --- PIKA LOUNGE WATCH PARTY STYLING --- */

/* Dual-Column player layout */
.player-lounge-layout {
  display: grid;
  grid-template-columns: 1fr;
  transition: var(--transition-luxury);
}

@media (min-width: 1025px) {
  /* Widescreen activates sidebar adjacent to video player */
  .player-lounge-layout.has-sidebar {
    grid-template-columns: 1fr 350px;
  }
}

.player-main-view {
  position: relative;
  width: 100%;
}

/* Exquisite Sidebar Panel */
.player-lounge-sidebar {
  background-color: hsla(240, 6%, 6%, 0.98);
  border-left: 1px solid hsl(var(--border-glass));
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 500px;
  max-height: 100%;
}

@media (min-width: 1025px) {
  .player-lounge-sidebar {
    height: 100%;
    max-height: calc(100vh - 6rem); /* Align with player boundaries */
    width: 350px;
  }
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid hsl(var(--border-glass));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.active-room-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: hsl(var(--color-primary));
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid hsla(36, 28%, 65%, 0.2);
  letter-spacing: 0.5px;
}

.sidebar-roster {
  padding: 1rem 1.5rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid hsl(var(--border-glass));
}

.roster-header {
  font-size: 0.72rem;
  font-weight: 800;
  color: hsl(var(--color-text-muted));
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.roster-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 60px;
  overflow-y: auto;
}

.roster-member {
  font-size: 0.78rem;
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid hsl(var(--border-glass));
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.roster-member.host {
  border-color: hsl(var(--color-primary));
  color: hsl(var(--color-primary));
}

.roster-member::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981; /* Green online dot */
}

/* Chat display logs scrollbar */
.chat-display {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 85%;
}

.chat-msg.self {
  align-self: flex-end;
}

.chat-msg.system {
  align-self: center;
  max-width: 100%;
  text-align: center;
}

.msg-sender {
  font-size: 0.72rem;
  font-weight: 800;
  color: hsl(var(--color-text-muted));
  letter-spacing: 0.5px;
}

.chat-msg.self .msg-sender {
  align-self: flex-end;
  color: hsl(var(--color-primary));
}

.msg-bubble {
  padding: 0.65rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 8px;
  line-height: 1.4;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid hsl(var(--border-glass));
}

.chat-msg.self .msg-bubble {
  background-color: hsl(var(--bg-deep));
  border-color: hsl(var(--color-primary));
}

.chat-msg.system .msg-bubble {
  background-color: rgba(255, 255, 255, 0.02);
  border: none;
  color: hsl(var(--color-text-muted));
  font-style: italic;
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
}

/* Input Area */
.chat-input-area {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid hsl(var(--border-glass));
  display: flex;
  gap: 0.75rem;
}

.chat-input-area input {
  flex: 1;
  background-color: #000;
  border: 1px solid hsl(var(--border-glass));
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  font-family: var(--font-family);
  font-size: 0.9rem;
}

.chat-input-area input:focus {
  outline: none;
  border-color: hsl(var(--color-primary));
}

.btn-chat-send {
  background-color: #fff;
  border: 1px solid #fff;
  color: #000;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-luxury);
}

.btn-chat-send:hover {
  background-color: hsl(var(--color-primary));
  border-color: hsl(var(--color-primary));
}

/* 2. Watch Party Creator Cards */
.party-modal-container {
  max-width: 680px; /* Spacious horizontal room to fit both columns beautifully! */
}

.party-split-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

@media (min-width: 600px) {
  .party-split-actions {
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch; /* Stretch children to make columns perfectly equal in height! */
  }
}

.party-action-card {
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid hsl(var(--border-glass));
  padding: 1.75rem 1.5rem;
  border-radius: var(--border-radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Secure perfect spacing between title, text, and buttons */
  align-items: stretch;
  height: 100%;
}

.party-action-card h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #fff;
}

.party-action-card p {
  font-size: 0.82rem;
  color: hsl(var(--color-text-muted));
  margin-bottom: 1.25rem;
  line-height: 1.45;
  flex-grow: 1; /* Allows text block to expand and align buttons to the bottom */
}

.party-action-card .premium-input {
  width: 100%;
  margin-bottom: 0;
}

.party-divider {
  font-size: 0.8rem;
  font-weight: 800;
  color: hsl(var(--color-text-muted));
  text-align: center;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 600px) {
  .party-divider {
    padding: 0 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
  }
  
  .party-divider::before,
  .party-divider::after {
    content: '';
    position: absolute;
    left: 50%;
    width: 1px;
    height: 60px; /* Refined visual division line height */
    background-color: hsl(var(--border-glass));
    transform: translateX(-50%);
  }
  
  .party-divider::before { top: 0; }
  .party-divider::after { bottom: 0; }
}

/* --- WEBRTC VIDEO CALLING SUITE STYLES --- */

.video-call-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.5rem;
  background-color: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid hsl(var(--border-glass));
}

@media (min-width: 1025px) {
  .video-call-grid {
    grid-template-columns: 1fr; /* Stack vertically inside the 350px sidebar for perfect sizing */
  }
}

.video-feed-box {
  position: relative;
  aspect-ratio: 16 / 10; /* Sleek widescreen camera aspect ratio */
  background-color: #070709;
  border-radius: var(--border-radius-md);
  border: 1px solid hsl(var(--border-glass));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-luxury);
}

.video-feed-box:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.video-feed-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  position: absolute;
  top: 0;
  left: 0;
}

.video-feed-label {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  text-transform: uppercase;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: hsl(var(--color-text-muted));
  z-index: 1;
  transition: var(--transition-luxury);
}

.video-placeholder i {
  font-size: 1.5rem;
  opacity: 0.5;
}

.video-placeholder span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Call Control Panel */
.call-control-panel {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid hsl(var(--border-glass));
  display: flex;
  justify-content: center;
  gap: 1rem;
  background-color: rgba(0, 0, 0, 0.2);
}

.control-btn {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid hsl(var(--border-glass));
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition-luxury);
}

.control-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.control-btn.active {
  background-color: #ef4444; /* Red warning highlight for mute/off camera */
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.call-action-btn.connect {
  background-color: #10b981; /* Green active call icon */
  border-color: #10b981;
  color: #000;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.call-action-btn.connect:hover {
  background-color: #34d399;
  border-color: #34d399;
  transform: scale(1.05);
}

.call-action-btn.disconnect {
  background-color: #ef4444; /* Red disconnect icon */
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.call-action-btn.disconnect:hover {
  background-color: #f87171;
  border-color: #f87171;
  transform: scale(1.05);
}

/* Call Event logging stream list */
.call-logs {
  min-height: 120px !important;
  max-height: 200px;
  background-color: rgba(0, 0, 0, 0.05);
  border-top: none;
  font-family: monospace;
}

/* --- LOBBY WAITING SCREEN STYLES --- */
.lobby-waiting-screen {
  background-color: hsla(240, 6%, 4%, 0.97);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem;
  min-height: 480px;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid hsl(var(--border-glass));
}

.lobby-content {
  max-width: 600px;
  width: 100%;
  text-align: center;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lobby-badge {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: hsl(var(--color-primary));
  font-weight: 800;
  background-color: rgba(212, 163, 89, 0.1);
  border: 1px solid rgba(212, 163, 89, 0.2);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.lobby-heading {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  margin: 0;
  background: linear-gradient(135deg, #fff 30%, hsl(var(--color-primary)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lobby-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.lobby-status-card {
  background-color: hsla(240, 6%, 8%, 0.5);
  border: 1px solid hsl(var(--border-glass));
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.lobby-status-card .card-icon {
  font-size: 1.5rem;
  color: hsl(var(--color-primary));
  background-color: rgba(255, 255, 255, 0.03);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lobby-status-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 0.25rem 0;
  letter-spacing: 0.5px;
}

.lobby-status-card p {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.lobby-invite-section {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px dashed hsl(var(--border-glass));
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.invite-instruction {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
}

.invite-link-wrapper {
  display: flex;
  gap: 0.5rem;
}

.invite-link-wrapper input {
  flex: 1;
  font-family: monospace;
  font-size: 0.8rem;
  background-color: #0c0c0e !important;
  color: hsl(var(--color-primary)) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.lobby-call-trigger {
  background-color: hsla(240, 6%, 8%, 0.8);
  border: 1px solid hsl(var(--border-glass));
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.lobby-call-trigger h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.lobby-call-trigger p {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0 0 0.5rem 0;
  max-width: 450px;
  line-height: 1.5;
}

.lobby-footer-tips {
  font-size: 0.78rem;
  color: hsl(var(--color-primary));
  font-style: italic;
  opacity: 0.9;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

/* --- FLOATING WATCH PARTY STATUS BAR --- */
.floating-lounge-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: hsla(240, 6%, 6%, 0.95);
  border: 1px solid hsl(var(--color-primary));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 15px rgba(212, 163, 89, 0.15);
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  z-index: 9999;
  pointer-events: auto !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 90vw;
}

.flb-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.flb-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.flb-text {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.flb-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-xs {
  padding: 0.25rem 0.6rem !important;
  font-size: 0.72rem !important;
  border-radius: 30px !important;
  height: auto !important;
  min-height: auto !important;
}

.btn-danger {
  background-color: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
}

.btn-danger:hover {
  background-color: #ef4444 !important;
  color: #fff !important;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* --- PREMIUM CO-WATCH SIDEBAR CLASH OVERRIDES --- */

/* Force hide the persistent floating bar whenever any modal is actively displayed */
.player-modal.active ~ .floating-lounge-bar,
body.modal-open .floating-lounge-bar {
  display: none !important;
}

/* Offset close button to top-left when watch sidebar is visible to prevent header collision */
.player-lounge-layout.has-sidebar .close-modal-btn {
  right: auto;
  left: 20px;
  top: 20px;
}

/* Polish Lobby layout to feel extremely spacious even with right sidebar adjacent */
.lobby-waiting-screen {
  padding: 4rem 2.5rem;
  justify-content: flex-start;
  align-items: stretch;
  overflow-y: auto;
  max-height: calc(100vh - 6rem);
}

.lobby-content {
  max-width: 550px;
  margin: 0 auto;
}

/* Roster items fine-tuning */
.active-room-tag {
  background: rgba(212, 163, 89, 0.15);
  border: 1px solid rgba(212, 163, 89, 0.3);
  color: hsl(var(--color-primary));
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: monospace;
}

/* --- LOBBY CINEMATIC CATALOG & SELECTION SYSTEM --- */
.lobby-movie-selection {
  margin-top: 1.5rem;
  border-top: 1px solid hsl(var(--border-glass));
  padding-top: 1.5rem;
  text-align: left;
}

.lobby-section-header {
  margin-bottom: 1rem;
}

.lobby-section-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lobby-section-header .section-desc {
  font-size: 0.82rem;
  color: hsl(var(--color-text-muted));
  margin-top: 0.15rem;
}

.lobby-movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.85rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.4rem;
}

/* Custom Scrollbar for Lobby movie grid */
.lobby-movie-grid::-webkit-scrollbar {
  width: 4px;
}
.lobby-movie-grid::-webkit-scrollbar-thumb {
  background: hsla(36, 28%, 65%, 0.3);
  border-radius: 4px;
}
.lobby-movie-grid::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--color-primary));
}

.lobby-movie-card {
  position: relative;
  background-color: hsla(240, 6%, 8%, 0.55);
  border: 1px solid hsl(var(--border-glass));
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-luxury);
  display: flex;
  flex-direction: column;
}

.lobby-movie-card:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--color-primary));
  box-shadow: var(--gold-glow-subtle);
}

.lobby-card-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-bottom: 1px solid hsl(var(--border-glass));
  transition: transform 0.4s ease;
}

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

.lobby-card-info {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.lobby-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  color: hsl(var(--color-text-muted));
}

.lobby-card-badge {
  background: rgba(212, 163, 89, 0.12);
  color: hsl(var(--color-primary));
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
  font-weight: 700;
  font-size: 0.6rem;
  text-transform: uppercase;
}

/* Guest waiting area */
.lobby-guest-placeholder {
  margin-top: 1.5rem;
  border-top: 1px solid hsl(var(--border-glass));
  padding-top: 1.5rem;
}

.guest-waiting-box {
  background-color: hsla(240, 6%, 8%, 0.4);
  border: 1px solid hsl(var(--border-glass));
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
}

.pulse-loader {
  font-size: 1.75rem;
  animation: pulse 1.5s infinite;
}

.guest-waiting-box h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: hsl(var(--color-primary));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.guest-waiting-box p {
  font-size: 0.75rem;
  color: hsl(var(--color-text-muted));
  line-height: 1.5;
  max-width: 420px;
}

/* --- FLOATING CALL WIDGET SYSTEM --- */
.floating-call-container {
  position: fixed;
  /* top/left are set by JS on first show — do NOT set bottom/right here */
  width: 280px;
  min-width: 200px;
  min-height: 160px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 0;
  pointer-events: auto;
  transition: box-shadow 0.3s ease;
  background-color: hsla(240, 6%, 6%, 0.97);
  border: 1px solid hsl(var(--color-primary));
  border-radius: 12px;
  overflow: visible; /* must be visible so resize handle corner isn't clipped */
  box-shadow: 0 24px 60px rgba(0,0,0,0.8), 0 0 20px rgba(212,163,89,0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  user-select: none;
}

/* Inner video area clips to rounded corners */
.floating-call-container .video-call-grid {
  border-radius: 0 0 11px 11px;
  overflow: hidden;
}

/* Toolbar at top of floating widget */
.floating-call-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.6rem;
  background: linear-gradient(90deg, rgba(212,163,89,0.12) 0%, rgba(0,0,0,0.3) 100%);
  border-bottom: 1px solid rgba(212,163,89,0.2);
  cursor: grab;
  flex-shrink: 0;
}

.floating-call-toolbar:active {
  cursor: grabbing;
}

.floating-drag-handle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: hsl(var(--color-primary));
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.floating-drag-handle i {
  font-size: 0.75rem;
  opacity: 0.8;
}

.floating-toolbar-actions {
  display: flex;
  gap: 0.3rem;
}

.floating-tool-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.floating-tool-btn:hover {
  background: rgba(212,163,89,0.25);
  border-color: hsl(var(--color-primary));
  transform: scale(1.12);
}

.floating-tool-btn.active {
  background: rgba(239,68,68,0.3);
  border-color: #ef4444;
  color: #ef4444;
}

/* Resize handle at the bottom-right corner */
.floating-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  cursor: nwse-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(212,163,89,0.5);
  font-size: 0.6rem;
  z-index: 10;
  transition: color 0.2s;
  background: rgba(0,0,0,0.3);
  border-top-left-radius: 6px;
}

.floating-resize-handle:hover {
  color: hsl(var(--color-primary));
}

/* Minimized state: only show toolbar, collapse video */
.floating-call-container.minimized .video-call-grid {
  display: none !important;
}

.floating-call-container.minimized {
  min-height: unset;
  min-width: unset;
  width: auto !important;
  height: auto !important;
}

.floating-call-container.minimized .floating-resize-handle {
  display: none;
}

/* Adjust the video call grid when reparented into the floating container */
.floating-call-container .video-call-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.6rem;
  width: 100%;
  flex: 1;
  overflow: hidden;
}

/* Each feed box inside floating widget should auto-fill available height */
.floating-call-container .video-feed-box {
  flex: 1;
  min-height: 80px;
}

/* Hide-my-video state: local feed hidden, remote fills full width */
.floating-call-container .video-call-grid.hide-my-video #local-feed-container,
.meet-video-grid-parent .video-call-grid.hide-my-video #local-feed-container {
  display: none !important;
}

.floating-call-container .video-call-grid.hide-my-video,
.meet-video-grid-parent .video-call-grid.hide-my-video {
  flex-direction: column;
}

.meet-video-grid-parent .video-call-grid.hide-my-video {
  grid-template-columns: 1fr !important;
}

/* Active state for hide-my-video button in meet modal */
#meet-hide-self-video.active-gold {
  background-color: hsl(var(--color-primary)) !important;
  border-color: hsl(var(--color-primary)) !important;
  color: hsl(var(--bg-deep)) !important;
}

/* --- GOOGLE MEET STYLE VIDEO POPUP MODAL --- */
.meet-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.meet-modal.hidden {
  display: none !important;
}

.meet-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(6, 6, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1;
}

.meet-container {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 900px;
  background-color: hsla(240, 6%, 6%, 0.98);
  border: 1px solid hsl(var(--border-glass));
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.9), 0 0 40px hsla(36, 28%, 65%, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transform: scale(0.93);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.meet-modal.active .meet-container {
  transform: scale(1);
}

.meet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid hsl(var(--border-glass));
  padding-bottom: 0.8rem;
}

.meet-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
}

.meet-header-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid hsl(var(--border-glass));
  color: hsl(var(--color-text-muted));
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.meet-header-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: hsl(var(--color-primary));
}

.meet-video-grid-parent {
  width: 100%;
}

/* Override the video call grid structure when inside Google Meet popup modal */
.meet-video-grid-parent .video-call-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 1rem !important;
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 600px) {
  .meet-video-grid-parent .video-call-grid {
    grid-template-columns: 1fr !important;
  }
}

.meet-video-grid-parent .video-feed-box {
  height: 280px !important;
  min-height: 280px !important;
  background-color: hsla(240, 6%, 10%, 0.65) !important;
  border: 1px solid hsl(var(--border-glass)) !important;
  border-radius: 12px !important;
}

.meet-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  padding-top: 0.5rem;
}

.meet-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.meet-btn:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
}

.meet-btn.active {
  background-color: #ef4444 !important;
  border-color: #ef4444 !important;
}

.meet-btn.active-gold {
  background-color: hsl(var(--color-primary)) !important;
  border-color: hsl(var(--color-primary)) !important;
  color: hsl(var(--bg-deep)) !important;
  box-shadow: 0 0 15px hsla(36, 28%, 65%, 0.4) !important;
}

.meet-btn.active-gold:hover {
  transform: scale(1.08);
  opacity: 0.9;
}

/* Hide Self-View Call layout logic */
.video-call-grid.hide-self #local-feed-container {
  display: none !important;
}

.meet-video-grid-parent .video-call-grid.hide-self {
  grid-template-columns: 1fr !important;
}

.meet-btn-danger {
  background-color: #ef4444;
  border-color: #ef4444;
}

.meet-btn-danger:hover {
  background-color: #dc2626;
  border-color: #dc2626;
}

/* --- Fullscreen Floating Overlay --- */
.fs-overlay {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.fs-overlay > * {
  pointer-events: auto;
}

.fs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fs-label {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  padding-right: 2px;
}

.fs-pills {
  display: flex;
  gap: 3px;
}

.fs-pill {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-family);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

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

.fs-pill.active {
  background: #fff;
  color: #000;
}

.fs-call-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.fs-call-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.fs-call-btn.fs-end-call {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.fs-call-btn.fs-end-call:hover {
  background: #ef4444;
  color: #fff;
}

.fs-call-btn.active {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #fff !important;
}

.fs-exit {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 2147483647;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  pointer-events: auto;
}

.fs-exit:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

@media (max-width: 600px) {
  .fs-overlay {
    top: 10px;
    right: 10px;
  }
  .fs-exit {
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }
}

/* General Utility to Hide Elements */
.hidden {
  display: none !important;
}

/* --- StreamFlix UI Overhaul --- */
.streamflix-details-view {
  position: relative;
  width: 100%;
  min-height: 100%;
  padding-bottom: 5rem;
  background-color: #0c0c0e;
}

.streamflix-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 90vh;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 0;
  mask-image: linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 100%);
}

.streamflix-backdrop::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 30%, rgba(12, 12, 14, 0) 15%, #0c0c0e 85%),
              linear-gradient(to top, #0c0c0e 0%, transparent 60%);
}

.streamflix-content {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 3.5rem;
  padding: 11rem 4rem 2rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.sf-poster {
  flex-shrink: 0;
  width: 300px;
  perspective: 1000px;
}

.sf-poster img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.sf-poster:hover img {
  transform: translateY(-8px) scale(1.03) rotateY(2deg);
  box-shadow: 0 40px 80px rgba(0,0,0,0.95);
  border-color: rgba(255, 255, 255, 0.2);
}

.sf-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.sf-title {
  font-family: 'Outfit', sans-serif;
  font-size: 4.8rem;
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1rem;
  letter-spacing: -2px;
  background: linear-gradient(to right, #fff 40%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 40px rgba(0,0,0,0.9);
}

.sf-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.8rem;
  align-items: center;
}

.sf-meta .badge {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  color: #e2e8f0;
}

.sf-meta .sf-rating {
  background: rgba(229, 9, 20, 0.08) !important;
  border-color: rgba(229, 9, 20, 0.25) !important;
  color: #ff333e !important;
}

.sf-genres {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 2.2rem;
  flex-wrap: wrap;
}

.sf-genres .genre-tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.45rem 1.2rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #a1a1aa;
  transition: all 0.3s ease;
}

.sf-genres .genre-tag:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-1px);
}

.sf-actions {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.sf-play-btn {
  background: #e50914 !important; /* Netflix red */
  border-color: #e50914 !important;
  color: #fff !important;
  padding: 1rem 3rem !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(229, 9, 20, 0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sf-play-btn:hover {
  background: #f40612 !important;
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 12px 35px rgba(229, 9, 20, 0.5) !important;
}

.sf-watchlist-btn {
  padding: 1rem 1.5rem !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sf-watchlist-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px) scale(1.05) !important;
}

.sf-tagline {
  font-style: italic;
  color: #a1a1aa;
  margin-bottom: 1.8rem;
  font-size: 1.15rem;
  letter-spacing: 0.2px;
  border-left: 3px solid #e50914;
  padding-left: 1rem;
}

.sf-overview p {
  color: #d4d4d8;
  line-height: 1.7;
  font-size: 1.05rem;
  max-width: 850px;
}

.sf-extra-sections {
  position: relative;
  z-index: 2;
  padding: 0 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Desktop body (actions + controls + overview inside sf-info) always visible on desktop */
.sf-desktop-body {
  display: block;
}

/* Mobile body section (below the hero row) — hidden on desktop */
.sf-mobile-body {
  display: none;
  padding: 0 1rem 1rem 1rem;
  flex-direction: column;
  gap: 1rem;
}

.sf-overview-mob p {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.sf-overview-mob h4 {
  color: #666 !important;
  font-size: 0.7rem;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 0.4rem;
}


/* Intermediate Tablet & Small Laptops Breakpoint */
@media (max-width: 1024px) {
  .streamflix-content {
    padding: 8rem 2.5rem 2rem 2.5rem;
    gap: 2rem;
  }
  .sf-poster {
    width: 240px;
  }
  .sf-title {
    font-size: 3.5rem;
  }
  .sf-overview p {
    font-size: 0.98rem;
  }
  .sf-play-btn {
    padding: 0.8rem 2.2rem !important;
    font-size: 1rem !important;
  }
  .sf-watchlist-btn {
    padding: 0.8rem 1.3rem !important;
  }
  .sf-extra-sections {
    padding: 0 2.5rem;
  }
}

/* =============================================
   NETFLIX-STYLE MOBILE DETAILS VIEW
   ============================================= */

@media (max-width: 768px) {

  /* ── Core layout fix ── */
  /* Make the details view itself the scroll container */
  .streamflix-details-view {
    padding-bottom: 5rem;
    overflow-x: hidden;
  }

  /* ── Backdrop: use as top hero banner ── */
  /* Keep it absolute but contained — give it a real height via padding-top trick */
  .streamflix-backdrop {
    position: relative !important;
    height: 210px !important;
    min-height: 0 !important;
    max-height: none !important;
    background-size: cover !important;
    background-position: center 20% !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }

  .streamflix-backdrop::after {
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.15) 0%,
      rgba(12,12,14,0.6) 60%,
      rgba(12,12,14,1) 100%
    ) !important;
  }

  /* ── Hero row: small poster + title/meta side by side ── */
  .streamflix-content {
    position: relative !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    padding: 0.75rem 1rem 0.75rem 1rem !important;
    gap: 0.85rem !important;
    margin-top: 0 !important;
    z-index: 5 !important;
    max-width: 100% !important;
    background: linear-gradient(to bottom, rgba(12,12,14,0.0) 0%, #0c0c0e 60%) !important;
  }

  /* ── Poster: small card on the left ── */
  .sf-poster {
    width: 90px !important;
    flex-shrink: 0 !important;
    perspective: none !important;
  }

  .sf-poster img {
    border-radius: 8px !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.75) !important;
  }

  .sf-poster:hover img {
    transform: none !important;
  }

  /* ── Info column: fills right side ── */
  .sf-info {
    flex: 1 !important;
    justify-content: flex-end !important;
    min-width: 0 !important;
  }

  /* ── Title ── */
  .sf-title {
    font-size: 1.35rem !important;
    letter-spacing: -0.3px !important;
    text-align: left !important;
    margin-bottom: 0.4rem !important;
    line-height: 1.2 !important;
    -webkit-text-fill-color: #fff !important;
    background: none !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8) !important;
  }

  /* ── Meta badges ── */
  .sf-meta {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
    margin-bottom: 0 !important;
  }

  .sf-meta .badge {
    padding: 0.2rem 0.55rem !important;
    font-size: 0.68rem !important;
  }

  /* ── Genres: hide on mobile ── */
  .sf-genres {
    display: none !important;
  }

  /* ── Desktop body: hidden on mobile ── */
  .sf-desktop-body {
    display: none !important;
  }

  /* ── Mobile body: full-width section below the hero row ── */
  .sf-mobile-body {
    display: flex !important;
    padding: 0.85rem 1rem 0 1rem !important;
  }

  /* Mobile action buttons */
  .sf-mobile-body .sf-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.6rem !important;
    margin-bottom: 0 !important;
  }

  .sf-mobile-body .sf-play-btn {
    flex: 1 !important;
    padding: 0.8rem 1rem !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
  }

  .sf-mobile-body .sf-watchlist-btn {
    flex: 0 0 auto !important;
    padding: 0.8rem 1rem !important;
    font-size: 0.85rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    white-space: nowrap !important;
  }

  /* Mobile overview */
  .sf-overview-mob {
    margin-top: 0 !important;
  }

  .sf-overview-mob p {
    font-size: 0.88rem !important;
    line-height: 1.6 !important;
    color: #aaa !important;
  }

  /* ── Close button ── */
  .close-modal-btn {
    top: 8px !important;
    right: 8px !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 0.8rem !important;
    z-index: 200 !important;
    background: rgba(0,0,0,0.6) !important;
  }

  /* ── Season picker ── */
  .sf-season-picker {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.6rem !important;
    flex-wrap: wrap !important;
  }

  #sf-season-dropdown {
    flex: 1 !important;
    min-width: 140px !important;
  }

  /* ── Extra sections ── */
  .sf-extra-sections {
    padding: 0 1rem !important;
  }

  /* Tagline: hide on mobile */
  .sf-tagline {
    display: none !important;
  }
}

/* ── Ultra-small phones (< 400px) ── */
@media (max-width: 400px) {
  .streamflix-backdrop {
    height: 180px !important;
  }

  .streamflix-content {
    gap: 0.75rem !important;
    padding: 0.6rem 0.85rem 0.6rem 0.85rem !important;
  }

  .sf-poster {
    width: 78px !important;
  }

  .sf-title {
    font-size: 1.15rem !important;
  }

  .sf-mobile-body {
    padding: 0.75rem 0.85rem 0 0.85rem !important;
  }

  .sf-extra-sections {
    padding: 0 0.85rem !important;
  }
}

/* Custom Episode List UI matching reference */
.sf-select-wrapper {
  position: relative;
  display: inline-block;
}
.sf-select-wrapper::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
  font-size: 0.8rem;
}
.sf-episode-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.sf-episode-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}
.sf-episode-card.active {
  background: rgba(229, 9, 20, 0.05);
  border-color: rgba(229, 9, 20, 0.3);
}
.sf-episode-thumb-container {
  position: relative;
  width: 180px;
  height: 101px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  background: #111;
}
.sf-episode-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.sf-episode-card:hover .sf-episode-thumb {
  transform: scale(1.05);
}
.sf-episode-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sf-episode-card:hover .sf-episode-play-overlay,
.sf-episode-card.active .sf-episode-play-overlay {
  opacity: 1;
}
.sf-episode-play-btn {
  width: 40px;
  height: 40px;
  background: #e50914;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(229, 9, 20, 0.4);
  transition: transform 0.2s ease;
}
.sf-episode-play-btn i {
  transform: translateX(1px);
}
.sf-episode-card:hover .sf-episode-play-btn {
  transform: scale(1.1);
}
.sf-episode-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.sf-episode-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sf-episode-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  transition: color 0.2s ease;
}
.sf-episode-card.active .sf-episode-title {
  color: #e50914;
}
.sf-episode-duration {
  font-size: 0.85rem;
  color: #888;
  font-weight: 600;
}
.sf-episode-overview {
  font-size: 0.9rem;
  color: #aaa;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

@media (max-width: 768px) {
  .sf-episode-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }
  .sf-episode-thumb-container {
    width: 100%;
    height: 160px;
  }
  .sf-episode-info {
    width: 100%;
  }
  .sf-episode-overview {
    -webkit-line-clamp: 3;
  }
}

/* God-Level Cinema Curtain Sweep Transition Styles */
.cinema-curtain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #08080a;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cinema-curtain.sweep-active {
  opacity: 1;
  pointer-events: all;
}

.curtain-line {
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #e50914, transparent);
  box-shadow: 0 0 15px #e50914, 0 0 5px #e50914;
  transition: width 0.35s ease-in-out;
}

.cinema-curtain.sweep-active .curtain-line {
  width: 80%;
}

/* --- Immersive Cinema HUD Overlay Styles --- */
.cinema-hud-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 20%, rgba(0,0,0,0.0) 50%, rgba(0,0,0,0.0) 100%);
  z-index: 100;
  opacity: 0;
  pointer-events: none; /* Always pointer-events: none so clicks fall through to the iframe */
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.5rem 2rem;
  font-family: 'Outfit', sans-serif;
}

.video-wrapper:hover .cinema-hud-overlay,
.cinema-hud-overlay.hud-active {
  opacity: 1;
}

/* Top Immersive HUD Bar */
.hud-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Space between details and server pills */
  width: 100%;
  pointer-events: all; /* Restore pointer-events specifically for the header elements */
}

.hud-top-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hud-top-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hud-back-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.hud-back-btn:hover {
  background: #e50914;
  border-color: #e50914;
  transform: translateX(-3px);
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.hud-top-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hud-main-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.5px;
}

.hud-sub-meta {
  font-size: 0.85rem;
  color: #888;
  font-weight: 600;
}

/* Bottom HUD Bar */
.hud-bottom-bar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

/* Timeline */
.hud-progress-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.hud-time-current,
.hud-time-total {
  font-size: 0.85rem;
  color: #ccc;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  width: 40px;
}

.hud-slider-container {
  position: relative;
  flex-grow: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.hud-progress-slider {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
  margin: 0;
}

.hud-slider-progress {
  position: absolute;
  left: 0;
  height: 100%;
  background: #e50914;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

/* Unified Premium Controls Row */
.hud-unified-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(10, 10, 12, 0.65);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 0.9rem 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  margin-top: 0.5rem;
  transition: all 0.3s ease;
}

.hud-left-group {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  width: 40%;
}

.hud-meta-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-width: 180px;
}

.hud-footer-poster {
  width: 38px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.hud-footer-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.hud-sub-meta-mini {
  font-size: 0.72rem;
  color: #888;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-actions-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 0.2rem;
}

.hud-center-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  justify-content: center;
}

.hud-server-label {
  font-size: 0.75rem;
  color: #888;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.hud-server-pills {
  display: flex;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2rem;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.06);
}

.hud-server-pill {
  background: transparent;
  border: none;
  color: #bbb;
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-server-pill:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.hud-server-pill.active {
  background: hsl(var(--color-primary)) !important;
  color: #000 !important;
  box-shadow: 0 4px 15px rgba(212, 163, 89, 0.45);
}

.hud-right-group {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  justify-content: flex-end;
  width: 35%;
}

.hud-control-btn {
  background: transparent;
  border: none;
  color: #ccc;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-control-btn:hover {
  color: #e50914;
  transform: scale(1.1);
}

.hud-control-circle-btn {
  background: #e50914;
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.45);
}

.hud-control-circle-btn:hover {
  background: #f40612;
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(229, 9, 20, 0.55);
}

.hud-volume-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hud-sub-badge {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #ccc;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.mobile-player-hud {
  display: none;
}

@media (max-width: 768px) {
  .cinema-hud-overlay {
    padding: 0.8rem 1rem;
  }
  .hud-top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
  .hud-top-left {
    gap: 0.8rem;
    width: 100%;
  }
  .hud-top-right {
    width: 100%;
    justify-content: space-between;
    margin-top: 0.1rem;
  }
  .hud-main-title {
    font-size: 1.1rem;
  }
  .hud-sub-meta {
    font-size: 0.75rem;
  }
  .hud-server-pill {
    padding: 0.35rem 0.8rem;
    font-size: 0.72rem;
  }
}

/* ================================
   NETFLIX-STYLE MOBILE UI
   ================================ */

/* --- Mobile Bottom Navigation --- */
.mobile-bottom-nav {
  display: none;
}

.mobile-header-icons {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background: rgba(8, 8, 10, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    padding: 0 env(safe-area-inset-bottom);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .mob-nav-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.65rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    padding: 4px 12px;
    transition: color 0.2s;
    font-family: var(--font-family);
    font-weight: 600;
    letter-spacing: 0.3px;
  }

  .mob-nav-btn i {
    font-size: 1.2rem;
  }

  .mob-nav-btn.active {
    color: #fff;
  }

  .mob-nav-btn.active i {
    color: hsl(var(--color-primary));
  }

  .mob-nav-btn span {
    font-size: 0.6rem;
    text-transform: uppercase;
  }

  /* --- Mobile Header Icons --- */
  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .mobile-header-icons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .search-bar {
    display: none;
  }

  .nav-links {
    display: none !important;
  }

  .mob-header-icon {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
  }

  .mob-header-icon:active {
    opacity: 1;
  }

  /* --- Mobile Search Overlay --- */
  .mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 6, 8, 0.98);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  .mobile-search-overlay.hidden {
    display: none !important;
  }

  .mobile-search-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .mobile-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-search-input-wrap i {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
  }

  .mobile-search-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    padding: 0.65rem 0;
    font-family: var(--font-family);
    outline: none;
  }

  .mobile-search-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.3);
  }

  .mob-search-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-family: var(--font-family);
    cursor: pointer;
    padding: 0.5rem;
    font-weight: 600;
  }

  .mob-search-close:active {
    color: #fff;
  }

  /* --- Mobile Results (populated by JS) --- */
  #mobile-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
  }

  /* --- Netflix-Style Horizontal Scroll Rows --- */
  .movie-grid {
    display: flex !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding: 0 1rem 0.5rem;
    grid-template-columns: unset !important;
    scrollbar-width: none;
  }

  .movie-grid::-webkit-scrollbar {
    display: none;
  }

  .movie-grid .movie-card {
    flex: 0 0 auto;
    width: 140px;
    scroll-snap-align: start;
    border-radius: 6px;
    border: none;
    background: transparent;
  }

  .movie-card .card-poster {
    border-radius: 6px;
    aspect-ratio: 2/3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }

  .movie-card .card-details {
    padding: 0.5rem 0;
    background: transparent;
  }

  .movie-card .card-title {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
  }

  .movie-card .card-meta {
    font-size: 0.6rem;
  }

  .movie-card .card-overlay,
  .movie-card .play-icon-overlay,
  .movie-card .card-rating-badge,
  .movie-card .card-type-badge {
    display: none !important;
  }

  /* History and Watchlist rows also horizontal scroll */
  .history-row, .watchlist-row {
    display: flex !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding: 0 1rem 0.5rem;
    grid-template-columns: unset !important;
    scrollbar-width: none;
  }

  .history-row::-webkit-scrollbar,
  .watchlist-row::-webkit-scrollbar {
    display: none;
  }

  .history-row .movie-card,
  .watchlist-row .movie-card {
    flex: 0 0 auto;
    width: 130px;
    scroll-snap-align: start;
    border-radius: 6px;
    border: none;
    background: transparent;
  }

  /* Section headers clean up */
  .section-header {
    padding: 0 1rem;
    margin-bottom: 0.75rem;
  }

  .section-title {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .section-title i {
    font-size: 0.9rem;
  }

  .catalog-header {
    margin-top: 0.5rem;
  }

  .results-count {
    font-size: 0.7rem;
  }

  /* --- Catalog section reflow --- */
  .catalog-section {
    margin-top: 0;
  }

  .catalog-controls {
    background: none;
    border: none;
    padding: 0.5rem 0;
    margin: 0 0 0.5rem 0;
    flex-direction: column;
    gap: 0.5rem;
  }

  .filter-tabs {
    display: flex;
    padding: 0 1rem;
    gap: 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tab {
    flex: 0 0 auto;
    font-size: 0.75rem;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
  }

  .filter-tab.active {
    background: #fff;
    color: #000;
    border-color: #fff;
  }

  .genre-list {
    display: flex;
    padding: 0 1rem;
    gap: 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .genre-list::-webkit-scrollbar {
    display: none;
  }

  .genre-btn {
    flex: 0 0 auto;
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
  }

  .genre-btn.active {
    background: rgba(212, 163, 89, 0.15);
    border-color: hsl(var(--color-primary));
    color: hsl(var(--color-primary));
  }

  /* --- God-Level Immersive Hero mobile refinements --- */
  .hero-section {
    position: relative !important;
    height: 55vh !important; /* Premium immersive height */
    min-height: 380px !important;
    display: flex !important;
    align-items: flex-end !important;
    padding: 0 !important;
    margin-bottom: 2.5rem !important;
  }

  .hero-backdrop {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center 10% !important;
    z-index: 1 !important;
  }

  .hero-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(to top, #08080a 0%, rgba(8, 8, 10, 0.7) 40%, rgba(8, 8, 10, 0.2) 70%, transparent 100%) !important;
    z-index: 2 !important;
  }

  .hero-content {
    position: relative !important;
    z-index: 3 !important;
    margin-top: 0 !important;
    padding: 0 1.25rem 2rem 1.25rem !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .featured-badge {
    font-size: 0.65rem !important;
    padding: 0.3rem 0.6rem !important;
    margin-bottom: 0.6rem !important;
    border: 1px solid hsl(var(--color-primary)) !important;
    color: hsl(var(--color-primary)) !important;
    background: rgba(212, 163, 89, 0.1) !important;
    border-radius: 4px !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
  }

  .hero-title {
    font-size: 2.2rem !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    color: #fff !important;
    margin-bottom: 0.5rem !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.85) !important;
    letter-spacing: -0.5px !important;
  }

  .hero-meta {
    margin-bottom: 0.75rem !important;
    gap: 0.75rem !important;
  }

  .hero-meta span, .hero-meta .hero-rating {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8) !important;
  }

  .hero-description {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    -webkit-line-clamp: 2 !important;
    margin-bottom: 1.2rem !important;
    color: #ddd !important;
    text-shadow: 0 1px 6px rgba(0,0,0,0.85) !important;
  }

  .hero-actions-container {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .hero-actions-container .btn {
    flex: 1 !important;
    padding: 0.75rem 1.2rem !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    transition: all 0.25s ease !important;
  }

  #hero-play-btn {
    background-color: hsl(var(--color-primary)) !important;
    color: #000 !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(212, 163, 89, 0.4) !important;
  }

  #hero-watchlist-btn {
    background-color: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
  }

  .hero-carousel-dots {
    bottom: 0.75rem !important;
    right: 1.25rem !important;
    gap: 0.35rem !important;
  }

  .hero-dot {
    width: 6px !important;
    height: 6px !important;
    background: rgba(255, 255, 255, 0.3) !important;
  }

  .hero-dot.active {
    width: 18px !important;
    border-radius: 3px !important;
    background: hsl(var(--color-primary)) !important;
  }

  /* --- Player modal mobile: Full-screen takeover --- */
  .player-modal {
    padding: 0 !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow-y: hidden !important; /* scroll handled by player-container */
  }

  .player-container {
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
    margin: 0 !important;
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-shadow: none !important;
    border: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .player-lounge-layout {
    display: block !important;
    width: 100% !important;
  }

  .player-main-view {
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  .streamflix-details-view {
    width: 100% !important;
    min-height: 100% !important;
    overflow: visible !important;
  }

  /* --- Premium Netflix-style Immersive Video Player layout on Mobile --- */
  .video-wrapper {
    padding-top: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    background: #000 !important;
    width: 100vw !important;
    overflow: visible !important;
    position: relative !important;
  }

  .video-wrapper iframe {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 56.25vw !important; /* Premium 16:9 Cinema Aspect Ratio */
    order: 2 !important; /* Renders in middle, directly below top header */
    border: none !important;
    z-index: 50 !important;
  }

  #video-skeleton {
    order: 2 !important;
    height: 56.25vw !important;
    position: relative !important;
  }

  /* Hide Desktop HUD on Mobile */
  .cinema-hud-overlay {
    display: none !important;
  }

  /* Mobile Active player layout container - display: contents lets direct children participate in parent flex */
  .mobile-player-hud {
    display: contents !important;
  }

  /* Immersive Header bar on top of screen */
  .mob-hud-header {
    order: 1 !important; /* Renders at the very top of screen */
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 60px !important;
    padding: 0 1.25rem !important;
    background: #08080a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    z-index: 60 !important;
    width: 100vw !important;
  }

  .pika-logo {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    letter-spacing: 5px !important;
    color: #fff !important;
    text-transform: uppercase !important;
  }

  .pika-logo::after {
    content: '.' !important;
    color: hsl(var(--color-primary)) !important;
  }

  .mob-hud-header-actions {
    display: flex !important;
    gap: 1rem !important;
  }

  .mob-hud-icon-btn {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: 1.15rem !important;
    cursor: pointer !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: background 0.3s !important;
  }
  
  .mob-hud-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
  }

  /* Floating Circular Back Button over iframe */
  .mob-hud-back-container {
    position: absolute !important;
    top: 72px !important; /* Positioned on top of the 16:9 video iframe (which starts at 60px) */
    left: 12px !important;
    z-index: 100 !important;
  }

  .mob-hud-back-btn {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5) !important;
  }

  .mob-hud-back-btn:active {
    transform: scale(0.9) !important;
    background: rgba(229, 9, 20, 0.8) !important;
  }

  /* Info and Server layout rendering below the video frame */
  .mob-hud-content-container {
    order: 3 !important; /* Renders at the bottom, directly below the 16:9 iframe */
    display: flex !important;
    flex-direction: column !important;
    padding: 1.25rem 1.25rem 2.5rem 1.25rem !important;
    gap: 1.2rem !important;
    background: #08080a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    width: 100vw !important;
    box-sizing: border-box !important;
  }

  /* Server Row (uppercase text + dynamic pills) */
  .mob-hud-server-row {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
  }

  .mob-hud-server-row .hud-server-label {
    font-size: 0.72rem !important;
    color: #888 !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
  }

  .mob-hud-server-row .hud-server-pills {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    flex-wrap: wrap !important;
  }

  .mob-hud-server-row .hud-server-pill {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ccc !important;
    padding: 0.4rem 1rem !important;
    border-radius: 12px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    transition: all 0.25s ease !important;
  }

  .mob-hud-server-row .hud-server-pill.active {
    background: hsl(var(--color-primary)) !important;
    color: #000 !important;
    border-color: hsl(var(--color-primary)) !important;
    box-shadow: 0 4px 12px rgba(212, 163, 89, 0.35) !important;
  }

  /* Aspect Ratio / Zoom Button styling */
  .mob-zoom-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    padding: 0.4rem 1rem !important;
    border-radius: 12px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    margin-left: auto !important; /* Push to far right */
  }

  .mob-zoom-btn:active {
    transform: scale(0.95) !important;
  }

  .mob-zoom-btn.active {
    background: hsl(var(--color-primary)) !important;
    color: #000 !important;
    border-color: hsl(var(--color-primary)) !important;
    box-shadow: 0 4px 12px rgba(212, 163, 89, 0.35) !important;
  }

  /* Zoom Mode Aspect Ratio scaling rules */
  .video-wrapper.aspect-zoom {
    overflow: hidden !important;
  }

  .video-wrapper.aspect-zoom iframe {
    transform: scale(1.35) !important; /* Premium crop fill */
    transform-origin: center center !important;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
  }

  /* Poster Card and metadata details row */
  .mob-hud-details-row {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    margin-top: 0.25rem !important;
  }

  .mob-hud-poster {
    width: 54px !important;
    height: 80px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5) !important;
    background: #141414 !important; /* Premium dark background fallback for loading */
  }

  .mob-hud-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.2rem !important;
  }

  .mob-hud-title {
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    margin: 0 !important;
    letter-spacing: -0.3px !important;
  }

  .mob-hud-year {
    font-size: 0.85rem !important;
    color: #888 !important;
    font-weight: 600 !important;
  }

  /* --- Meet modal mobile --- */
  .meet-container {
    padding: 0.75rem;
    width: 95%;
    border-radius: 12px;
  }

  .meet-title {
    font-size: 0.7rem;
    letter-spacing: 1px;
  }

  .meet-header-btn {
    font-size: 0.65rem;
    padding: 0.3rem 0.5rem;
  }

  .meet-btn {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }

  .meet-controls {
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .meet-video-grid-parent .video-feed-box {
    height: 180px !important;
    min-height: 180px !important;
  }

  /* --- Floating call container mobile --- */
  .floating-call-container {
    width: calc(100vw - 16px) !important;
    max-width: 300px;
    right: 8px !important;
    left: auto !important;
    bottom: 64px !important;
  }

  /* --- Floating lounge bar mobile --- */
  .floating-lounge-bar {
    bottom: 64px;
  }

  /* --- Player details mobile refinements --- */
  .player-details-content {
    padding: 1rem;
  }

  .player-title {
    font-size: 1.2rem;
  }

  .player-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .player-meta-badges {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .player-meta-badges .badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
  }

  .player-synopsis {
    font-size: 0.85rem;
  }

  .player-tagline {
    font-size: 0.9rem;
    padding-left: 0.5rem;
  }

  .close-modal-btn {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.8);
  }

  .player-lounge-layout.has-sidebar .close-modal-btn {
    left: 8px;
    top: 8px;
    right: auto;
  }

  /* --- Server overlay mobile --- */
  .server-overlay {
    top: 6px;
    right: 6px;
    gap: 3px;
  }

  .server-pills {
    gap: 2px;
    padding: 2px;
  }

  .server-pill {
    font-size: 0.55rem;
    padding: 0.2rem 0.35rem;
  }

  .fs-toggle-btn {
    width: 24px;
    height: 24px;
    font-size: 0.55rem;
  }

  /* --- Lobby mobile --- */
  .lobby-waiting-screen {
    padding: 1rem;
    min-height: auto;
  }

  .lobby-content {
    max-width: 100%;
    gap: 0.75rem;
  }

  .lobby-heading {
    font-size: 1.3rem;
  }

  .lobby-card-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .lobby-status-card {
    padding: 0.75rem;
  }

  .lobby-invite-section {
    padding: 0.75rem;
  }

  .invite-link-wrapper {
    flex-direction: column;
    gap: 0.4rem;
  }

  .invite-link-wrapper input {
    width: 100%;
    font-size: 0.65rem;
  }

  .invite-link-wrapper button {
    width: 100%;
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  .lobby-call-trigger {
    padding: 0.75rem;
  }

  .lobby-call-trigger p {
    max-width: 100%;
    font-size: 0.75rem;
  }

  .lobby-footer-tips {
    font-size: 0.65rem;
  }

  /* --- Sidebar mobile --- */
  .player-lounge-sidebar {
    min-height: 250px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .sidebar-header {
    padding: 0.75rem;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .sidebar-header h3 {
    font-size: 0.85rem;
  }

  .sidebar-header button {
    font-size: 0.6rem !important;
    padding: 0.2rem 0.4rem !important;
  }

  .sidebar-roster {
    padding: 0.5rem 0.75rem;
  }

  .chat-display {
    padding: 0.75rem;
    min-height: 120px;
    max-height: 140px;
  }

  /* --- Video call grid mobile --- */
  .video-call-grid {
    padding: 0.5rem;
    gap: 0.4rem;
  }

  .call-control-panel {
    padding: 0.5rem 0.75rem;
    gap: 0.4rem;
  }

  .control-btn {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }

  /* --- Cast & genres mobile --- */
  .cast-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.4rem;
  }

  .cast-card {
    border-radius: 6px;
  }

  .cast-info {
    padding: 0.3rem;
  }

  .cast-name {
    font-size: 0.6rem;
  }

  .cast-character {
    font-size: 0.5rem;
  }

  /* --- Content sections mobile --- */
  .content-wrapper {
    padding: 0 0 5rem;
  }

  .watchlist-section {
    padding: 0;
    background: none;
    border: none;
    margin-bottom: 1.5rem;
  }

  .watchlist-section .section-header {
    padding: 0 1rem;
  }

  /* --- Custom modals mobile --- */
  .custom-modal-container {
    width: 95%;
    padding: 1.25rem;
    border-radius: 12px;
  }

  .party-split-actions {
    gap: 0.75rem;
  }

  .party-action-card {
    padding: 1rem;
  }

  .party-action-card h4 {
    font-size: 0.9rem;
  }

  .party-action-card p {
    font-size: 0.75rem;
  }

  /* --- Footer mobile --- */
  .main-footer {
    padding-bottom: 64px;
  }

  .footer-container {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  /* --- General spacing --- */
  .modal-h3 {
    font-size: 1.1rem;
  }

  .modal-p {
    font-size: 0.8rem;
  }

  /* --- Movie card general mobile adjustments --- */
  .movie-card:hover {
    transform: none;
  }

  /* --- Skeleton loader mobile --- */
  .skeleton-text {
    font-size: 0.6rem;
    letter-spacing: 1px;
  }

  .skeleton-spinner {
    font-size: 1.5rem;
  }

  /* --- Guest waiting area mobile --- */
  .guest-waiting-box {
    padding: 1rem;
  }

  .guest-waiting-box h3 {
    font-size: 0.8rem;
  }

  .guest-waiting-box p {
    font-size: 0.68rem;
  }

  /* --- TV controls mobile --- */
  .tv-selector-group {
    flex-direction: column;
    width: 100%;
  }

  .tv-selector-group .selector-field {
    width: 100%;
  }

  .tv-selector-group select {
    width: 100%;
  }

  /* --- Mobile Menu Popup --- */
  .mobile-menu-popup {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: rgba(8, 8, 10, 0.98);
    z-index: 10001;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
  }

  .mobile-menu-popup.open {
    right: 0;
  }

  .mob-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .mob-menu-header .logo-text {
    font-size: 1.2rem;
  }

  .mob-menu-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.5rem;
  }

  .mob-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .mob-menu-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-family: var(--font-family);
    font-weight: 600;
    padding: 0.75rem 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: color 0.2s;
  }

  .mob-menu-link i {
    width: 20px;
    font-size: 1rem;
    opacity: 0.6;
  }

  .mob-menu-link:active {
    color: #fff;
  }

  .mob-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .mob-menu-backdrop.show {
    opacity: 1;
    pointer-events: all;
  }

  /* --- Fullscreen overlay mobile --- */
  .fs-overlay {
    top: 8px;
    right: 8px;
  }

  .fs-exit {
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
  }

  .fs-pill {
    font-size: 0.55rem;
    padding: 2px 5px;
  }

  .fs-call-btn {
    width: 28px;
    height: 28px;
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  .movie-grid .movie-card {
    width: 120px;
  }

  .history-row .movie-card,
  .watchlist-row .movie-card {
    width: 110px;
  }

  .hero-title {
    font-size: 1.3rem;
  }

  .hero-actions-container {
    flex-direction: row;
  }

  .hero-actions-container .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }

  .filter-tab {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
  }

  .section-title {
    font-size: 0.95rem;
  }

  .player-title {
    font-size: 1.05rem;
  }

  .player-details-content {
    padding: 0.75rem;
  }

  .custom-modal-container {
    padding: 1rem;
  }
}
