/* ===================== CSS RESET & ROOT VARIABLES ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Dark Theme Colors */
  --bg-color: #0f0f0f;
  --card-bg: #1a1a1a;
  --text-color: #ffffff;
  --text-secondary: #b3b3b3;
  --accent-color: #e50914;
  --accent-hover: #f40612;
  --success-color: #46d369;
  --warning-color: #ffd700;
  --info-color: #17a2b8;
  --border-color: #333333;
  
  /* Content Type Colors */
  --trailer-color: #ff6b35;
  --movie-color: #4ecdc4;
  --cartoon-color: #ff6b9d;
  
  /* Animation Variables */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

/* Light Theme */
[data-theme="light"] {
  --bg-color: #ffffff;
  --card-bg: #f8f9fa;
  --text-color: #212529;
  --text-secondary: #6c757d;
  --border-color: #dee2e6;
}

/* ===================== BASE STYLES ===================== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

:root {
  --bg-color: #0a0a0a;
  --text-color: #ffffff;
  --header-bg: #000000;
  --card-bg: #1a1a1a;
  --accent-color: #e50914;
  --accent-blue: #007acc;
  --accent-gold: #ffd700;
  --gray-light: #2a2a2a;
  --gray-dark: #666;
  --success-color: #28a745;
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  --hero-height: 80vh;
  --shadow-light: 0 4px 20px rgba(229, 9, 20, 0.15);
  --shadow-heavy: 0 12px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #000000;
  --header-bg: #f8f9fa;
  --card-bg: #f5f5f5;
  --gray-light: #e0e0e0;
  --gray-dark: #666;
  --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 12px 40px rgba(0, 0, 0, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: 'SF Pro Display', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===================== ENHANCED SPLASH SCREEN ===================== */
#splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #e50914 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.splash-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.splash-text {
  font-size: 4rem;
  font-weight: 900;
  color: var(--accent-color);
  letter-spacing: 3px;
  animation: logoGlow 2s infinite alternate;
  margin-bottom: 0.5rem;
}

.splash-tagline {
  font-size: 1.2rem;
  color: var(--accent-gold);
  font-weight: 300;
  letter-spacing: 1px;
  opacity: 0.9;
}

.splash-loader {
  width: 60px;
  height: 60px;
  border: 3px solid transparent;
  border-top: 3px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes logoGlow {
  0% { text-shadow: 0 0 20px var(--accent-color); }
  100% { text-shadow: 0 0 40px var(--accent-color), 0 0 60px var(--accent-color); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===================== ENHANCED HEADER ===================== */
header {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 4%;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1500;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-brand h1 {
  color: var(--accent-color);
  font-size: 1.8rem;
  font-weight: 900;
}

.brand-tagline {
  background: linear-gradient(45deg, var(--accent-gold), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  transition: var(--transition);
  position: relative;
}

.nav-link.active,
.nav-link:hover {
  color: var(--accent-color);
  background: rgba(229, 9, 20, 0.1);
}

.header-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

#searchInput {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-color);
  padding: 10px 20px;
  border-radius: 25px;
  min-width: 250px;
  font-size: 14px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

#searchInput:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.2);
}

#themeToggle {
  background: linear-gradient(135deg, var(--accent-blue), #0056cc);
  border: none;
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

#themeToggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 5px 15px rgba(0, 86, 204, 0.4);
}

/* ===================== ENHANCED LOADING INDICATOR ===================== */
.loading-indicator {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
}

.advanced-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 2rem;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid transparent;
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

.spinner-ring:nth-child(1) {
  border-top-color: var(--accent-color);
  animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
  border-right-color: var(--accent-blue);
  animation-delay: 0.3s;
}

.spinner-ring:nth-child(3) {
  border-bottom-color: var(--accent-gold);
  animation-delay: 0.6s;
}

/* ===================== ROTATING HERO BANNER ===================== */
.hero-banner {
  position: relative;
  height: var(--hero-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  margin-top: 80px;
  margin-bottom: 3rem;
  border-radius: 0 0 20px 20px;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.1);
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg, 
    rgba(0,0,0,0.8) 0%, 
    rgba(0,0,0,0.3) 40%, 
    rgba(229,9,20,0.2) 70%,
    rgba(0,0,0,0.6) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 0 4%;
  max-width: 600px;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(45deg, var(--accent-color), #ff0000);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}

.hero-info h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
  line-height: 1.1;
  background: linear-gradient(45deg, #ffffff, var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-info p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  max-width: 500px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  line-height: 1.5;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* ===================== ENHANCED HERO BUTTONS WITH ANIMATIONS ===================== */
.hero-btn {
  position: relative;
  padding: 16px 32px;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 180px;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transition: all 0.6s ease;
  transform: translate(-50%, -50%);
}

.hero-btn:hover::before {
  width: 300px;
  height: 300px;
}

.hero-btn.primary {
  background: linear-gradient(135deg, var(--accent-color), #ff1744);
  color: white;
  box-shadow: 0 8px 25px rgba(229, 9, 20, 0.4);
}

.hero-btn.primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(229, 9, 20, 0.6);
}

/* Pulsing ring animation for play button */
.btn-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent-color);
  border-radius: 50px;
  transform: translate(-50%, -50%);
  animation: pulseRing 2s infinite;
  opacity: 0;
}

@keyframes pulseRing {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0;
  }
}

.btn-content {
  position: relative;
  z-index: 2;
}

.hero-btn.secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 2px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
}

.hero-btn.secondary:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-3px);
}

/* Hero Indicators */
.hero-indicators {
  display: flex;
  gap: 10px;
  margin-top: 2rem;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: var(--transition);
}

.indicator.active {
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-color);
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to bottom, transparent, var(--bg-color));
  z-index: 1;
}

/* ===================== PREMIUM AD CONTAINERS ===================== */
.ad-container.premium {
  margin: 3rem auto;
  padding: 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--card-bg), rgba(229, 9, 20, 0.05));
  border: 1px solid rgba(229, 9, 20, 0.2);
  border-radius: 15px;
  max-width: 1200px;
  position: relative;
  overflow: hidden;
}

.ad-container.premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.ad-label {
  font-size: 0.8rem;
  color: var(--gray-dark);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.adsbygoogle {
  display: block !important;
  width: 100% !important;
  border-radius: 10px;
  overflow: hidden;
}

/* ===================== CONTENT SECTIONS ===================== */
.content-section {
  margin-bottom: 4rem;
  scroll-margin-top: 100px;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 0 2rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, var(--accent-color), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--gray-dark);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===================== ENHANCED CATEGORIES ===================== */
.categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 20px;
  gap: 15px;
  margin-bottom: 2rem;
}

.category-btn {
  background: var(--gray-light);
  color: var(--text-color);
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.category-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.category-btn:hover::before {
  left: 100%;
}

.category-btn.active,
.category-btn:hover {
  background: linear-gradient(135deg, var(--accent-color), #ff1744);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

/*
 * Responsive categories toggle. On small screens the list of categories is hidden
 * behind a hamburger icon. Tapping the icon reveals the categories list. On
 * larger screens the icon is hidden and categories remain visible.
 */
@media (max-width: 768px) {
  /* Hide categories by default on small screens */
  .categories {
    display: none;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
  }
  /* When the categories have the `show` class they become visible */
  .categories.show {
    display: flex;
  }
  /* Style for the categories toggle button */
  .categories-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    padding: 0.5rem;
    font-size: 1.3rem;
    cursor: pointer;
    margin: 0 auto 0.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  }
  .categories-toggle:active {
    transform: scale(0.95);
  }
  /* Make hero buttons more compact on mobile */
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .hero-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 30px;
    min-width: auto;
    width: 100%;
  }
}

@media (min-width: 769px) {
  /* Always show categories on desktop and hide the toggle button */
  .categories {
    display: flex;
  }
  .categories-toggle {
    display: none;
  }
}

/* ===================== ENHANCED CAROUSELS ===================== */
.trending-container {
  position: relative;
  margin: 2rem 0;
  padding: 0 2rem;
}

.trending-container h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.trending-carousel {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding: 20px 0;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.trending-carousel::-webkit-scrollbar {
  display: none;
}

.scroll-btn {
  position: absolute;
  top: 60%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.8);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 100;
  backdrop-filter: blur(10px);
}

.scroll-btn:hover {
  background: var(--accent-color);
  transform: translateY(-50%) scale(1.1);
}

#trending-prev {
  left: 10px;
}

#trending-next {
  right: 10px;
}

/* ===================== PREMIUM MOVIE GRID ===================== */
/*
 * The premium grid arranges cards responsively.  Instead of leaving
 * horizontal padding that causes grey gutters on either side, the left and
 * right padding is removed so cards span edge‑to‑edge, similar to
 * Netflix.  The base template uses auto‑fill with a minimum card width,
 * but media queries below will override the number of columns explicitly.
 */
.premium-grid {
  display: grid;
  gap: 25px;
  padding: 2rem 0;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ===================== ENHANCED MOVIE CARDS WITH ANIMATIONS ===================== */
.movie-card {
  position: relative;
  cursor: pointer;
  border-radius: 15px;
  overflow: hidden;
  background: var(--card-bg);
  transition: var(--transition);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  min-height: 420px;
}

.movie-card:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: var(--shadow-heavy);
}

.movie-poster {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

/* Enhanced image fallback styling */
.movie-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Ortega Movies Logo Fallback */
.ortega-logo-fallback {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, var(--accent-color), #1a1a2e, var(--accent-gold));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
}

.ortega-logo-fallback::before {
  content: '🎬';
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: float 2s ease-in-out infinite;
}

.ortega-logo-fallback .logo-text {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.ortega-logo-fallback .movie-title-fallback {
  font-size: 1rem;
  opacity: 0.9;
  font-weight: 600;
}

.episode-count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  font-weight: 500;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.movie-info {
  padding: 20px;
  background: var(--card-bg);
  position: relative;
  z-index: 10;
}

.movie-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-color);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-category {
  background: linear-gradient(135deg, var(--accent-color), #ff1744);
  color: white;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 15px;
  text-transform: capitalize;
  font-weight: 600;
}

.movie-year,
.movie-rating {
  color: var(--accent-gold);
  font-size: 0.9rem;
  font-weight: 600;
}

.movie-description {
  color: var(--gray-dark);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 15px;
}

/* ===================== ENHANCED OVERLAY WITH PLAY BUTTON ANIMATIONS ===================== */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.8);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 5;
}

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

.play-icon {
  font-size: 4rem;
  color: white;
  transition: all 0.3s ease;
  position: relative;
  animation: pulse 2s infinite;
}

.play-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border: 2px solid white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: expandRing 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

@keyframes expandRing {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

.movie-card:hover .play-icon {
  transform: scale(1.2);
  color: var(--accent-color);
}

/* ===================== ENHANCED MODAL ===================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(10px);
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  background: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-heavy);
  transform: scale(0.9);
  transition: transform 0.4s ease;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 3010;
  background: rgba(0,0,0,0.5);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

#videoContainer {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  background: #000;
}

.modal iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.modal-info {
  padding: 25px;
  background: var(--card-bg);
}

.modal-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--accent-color);
}

.modal-info p {
  color: var(--gray-dark);
  line-height: 1.6;
}

/* ===================== ENHANCED ERROR MESSAGE ===================== */
.error-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--accent-color);
  background: var(--card-bg);
  border-radius: 15px;
  margin: 2rem;
  box-shadow: var(--shadow-light);
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: shake 1s infinite;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.error-message h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.retry-btn {
  background: linear-gradient(135deg, var(--accent-color), #ff1744);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  margin-top: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
}

.retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

/* ===================== NO RESULTS ===================== */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-dark);
  background: var(--card-bg);
  border-radius: 15px;
  margin: 2rem;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.no-continue {
  text-align: center;
  color: var(--gray-dark);
  padding: 40px;
  background: var(--card-bg);
  border-radius: 15px;
  font-style: italic;
}

/* ===================== ENHANCED FOOTER ===================== */
footer {
  background: linear-gradient(135deg, var(--header-bg), var(--card-bg));
  margin-top: 4rem;
  border-top: 1px solid rgba(229, 9, 20, 0.2);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

.footer-brand h4 {
  color: var(--accent-color);
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: var(--gray-dark);
  font-size: 1rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
}

.footer-column h5 {
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-column a {
  color: var(--gray-dark);
  text-decoration: none;
  display: block;
  padding: 5px 0;
  transition: var(--transition);
}

.footer-column a:hover {
  color: var(--accent-color);
  padding-left: 10px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 2rem;
  text-align: center;
  color: var(--gray-dark);
}

/* ===================== MOVIE IFRAME CONTAINER ===================== */
.featured-movie-container {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 2rem;
  margin: 2rem auto;
  max-width: 800px;
  box-shadow: var(--shadow-heavy);
  text-align: center;
}

.featured-movie-container h3 {
  color: var(--accent-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.movie-iframe-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 1.5rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.movie-iframe-container iframe {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 10px;
}

.movie-warning {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid var(--accent-gold);
  border-radius: 8px;
  padding: 15px;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.movie-warning p {
  margin: 0;
  color: var(--accent-gold);
  line-height: 1.4;
}

.movie-warning strong {
  color: var(--accent-color);
}

@media (max-width: 768px) {
  .featured-movie-container {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .movie-iframe-container iframe {
    height: 300px;
  }
}
@media (max-width: 1024px) {
  .premium-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  :root {
    --hero-height: 60vh;
  }
  
  header {
    flex-direction: column;
    gap: 15px;
    padding: 15px 2rem;
  }
  
  .header-nav {
    gap: 1rem;
  }
  
  .header-right {
    width: 100%;
    justify-content: center;
  }
  
  #searchInput {
    min-width: 200px;
    width: 100%;
    max-width: 300px;
  }
  
  .hero-info h2 {
    font-size: 2.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-btn {
    min-width: auto;
    width: 100%;
  }
  
  .premium-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 1rem;
  }
  
  .movie-card {
    min-height: 350px;
  }
  
  .movie-poster,
  .movie-card img,
  .overlay,
  .ortega-logo-fallback {
    height: 250px;
  }
  
  .categories {
    gap: 10px;
    padding: 15px;
  }
  
  .category-btn {
    padding: 10px 16px;
    font-size: 0.8rem;
  }
  
  .trending-carousel {
    gap: 15px;
  }
  
  .scroll-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .splash-text {
    font-size: 3rem;
  }
  
  .hero-content {
    padding: 0 2rem;
  }
  
  .premium-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0.5rem;
  }
  
  .movie-card {
    min-height: 300px;
  }
  
  .movie-poster,
  .movie-card img,
  .overlay,
  .ortega-logo-fallback {
    height: 200px;
  }
  
  .play-icon {
    font-size: 3rem;
  }
  
  .trending-container {
    padding: 0 1rem;
  }
  
  .modal-content {
    width: 95%;
    margin: 1rem;
  }
}
/* ===================== PROFESSIONAL COMMENT SYSTEM ===================== */
.comments-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  opacity: 0;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(10px);
}

.comments-section.show {
  display: flex;
  opacity: 1;
}

.comments-container {
  background: var(--card-bg);
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.4s ease;
}

.comments-section.show .comments-container {
  transform: scale(1);
}

/* Comments Header */
.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--gray-light);
  background: var(--header-bg);
}

.comments-header h3 {
  color: var(--accent-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.close-comments-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 2rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.close-comments-btn:hover {
  background: var(--accent-color);
  color: white;
  transform: rotate(90deg);
}

/* Comment Form */
.comment-form {
  padding: 25px;
  border-bottom: 1px solid var(--gray-light);
  background: var(--bg-color);
}

.comment-form-header {
  margin-bottom: 20px;
}

.comment-form-header h4 {
  color: var(--text-color);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.form-group {
  margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-light);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-color);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.form-group textarea {
  min-height: 100px;
  max-height: 200px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.char-count {
  color: var(--gray-dark);
  font-size: 0.9rem;
  font-weight: 500;
}

.char-count.warning {
  color: var(--warning-color);
}

.char-count.error {
  color: var(--accent-color);
}

.submit-comment-btn {
  background: linear-gradient(135deg, var(--accent-color), #ff1744);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.submit-comment-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(229, 9, 20, 0.4);
}

.submit-comment-btn:disabled {
  background: var(--gray-dark);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Comments List */
.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 25px;
  background: var(--bg-color);
}

.comments-count {
  color: var(--text-color);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--gray-light);
}

.comments-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Individual Comment */
.comment-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--gray-light);
  transition: all 0.3s ease;
  position: relative;
}

.comment-item:hover {
  border-color: var(--accent-color);
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.comment-name {
  color: var(--text-color);
  font-weight: 600;
  font-size: 1rem;
}

.comment-time {
  color: var(--gray-dark);
  font-size: 0.85rem;
  font-weight: 500;
}

.comment-content {
  color: var(--text-color);
  line-height: 1.6;
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.comment-actions {
  margin-top: 15px;
  display: flex;
  gap: 15px;
}

.comment-action {
  background: none;
  border: none;
  color: var(--gray-dark);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 15px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.comment-action:hover {
  background: var(--gray-light);
  color: var(--accent-color);
}

.comment-action.liked {
  color: var(--accent-color);
  background: rgba(229, 9, 20, 0.1);
}

/* No Comments State */
.no-comments {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-dark);
}

.no-comments-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.7;
}

.no-comments p {
  font-size: 1.1rem;
  font-style: italic;
}

/* Loading State */
.comments-loading {
  text-align: center;
  padding: 40px;
  color: var(--gray-dark);
}

.comments-loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-light);
  border-top: 2px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .comments-container {
    width: 95%;
    max-height: 95vh;
  }
  
  .comments-header,
  .comment-form,
  .comments-list {
    padding: 20px;
  }
  
  .comment-item {
    padding: 15px;
  }
  
  .comment-avatar {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .submit-comment-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .comments-container {
    width: 98%;
    margin: 1%;
  }
  
  .comments-header h3 {
    font-size: 1.3rem;
  }
  
  .comment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .comment-actions {
    flex-wrap: wrap;
  }
}
/* Comment Button in Movie Cards */
.movie-comment-section {
  margin-top: 12px;
}

.comment-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--gray-light);
  color: var(--text-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.comment-btn:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  transform: translateY(-1px);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-sm);
}

.char-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.char-count.warning {
  color: var(--warning-color);
}

.char-count.error {
  color: var(--accent-color);
}

.submit-comment-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.submit-comment-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.submit-comment-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.comments-list {
  max-height: 400px;
  overflow-y: auto;
  padding: var(--space-md);
}

.comments-count {
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--space-sm);
}

.comment-item {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  margin-bottom: var(--space-sm);
  transition: all var(--transition-fast);
}

.comment-item:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-sm);
}

.comment-header {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-xs);
}

.comment-author {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.comment-name {
  font-weight: 600;
  color: var(--text-color);
}

.comment-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.comment-content {
  color: var(--text-color);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
}

.comment-actions {
  display: flex;
  gap: var(--space-sm);
}

.comment-action {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
}

.comment-action:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.no-comments {
  text-align: center;
  padding: var(--space-lg);
  color: var(--text-secondary);
}

.no-comments-icon {
  font-size: 3rem;
  margin-bottom: var(--space-sm);
}

/* ===================== ERROR & NO RESULTS ===================== */
.error-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-bg);
  border: 1px solid var(--accent-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  z-index: 5000;
  max-width: 90vw;
  width: 400px;
  box-shadow: var(--shadow-xl);
}

.error-icon {
  font-size: 3rem;
  margin-bottom: var(--space-sm);
}

.error-message h3 {
  margin-bottom: var(--space-sm);
  color: var(--accent-color);
}

.error-message p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.retry-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-fast);
}

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

.no-results {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text-secondary);
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: var(--space-sm);
}

.no-results h3 {
  margin-bottom: var(--space-sm);
  color: var(--text-color);
}

.no-continue {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: var(--space-lg);
}

.no-content {
  text-align: center;
  color: var(--text-secondary);
  grid-column: 1 / -1;
  padding: var(--space-xl);
  font-size: 1.1rem;
}

/* ===================== ADVERTISEMENTS ===================== */
.ad-container {
  margin: var(--space-lg) auto;
  text-align: center;
  position: relative;
  max-width: 100%;
}

.ad-container.premium {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.05), rgba(78, 205, 196, 0.05));
  border: 1px solid rgba(229, 9, 20, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  backdrop-filter: blur(5px);
}

.ad-label {
  position: absolute;
  top: -8px;
  left: var(--space-sm);
  background: var(--accent-color);
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ad-container.top-banner {
  margin-bottom: var(--space-lg);
}

.ad-container.in-feed {
  margin: var(--space-xl) auto;
}

.ad-container.mid-content {
  margin: var(--space-xl) auto;
}

.ad-container.bottom-ad {
  margin-top: var(--space-xl);
}

.ad-container.leaderboard {
  max-width: 728px;
}

.ad-container.side-rail {
  position: fixed;
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  z-index: 100;
}

.ad-container.sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  margin: 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--border-color);
}

/* ===================== FOOTER ===================== */
footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  margin-top: var(--space-xl);
  padding: var(--space-xl) var(--space-md) var(--space-md);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-lg);
  align-items: start;
}

.footer-brand h4 {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
  background: linear-gradient(45deg, var(--accent-color), var(--movie-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-column h5 {
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-color);
}

.footer-column a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: var(--space-xs);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===================== RESPONSIVE DESIGN ===================== */

/* Desktop First Approach */
@media (min-width: 1200px) {
  .desktop-only {
    display: block !important;
  }
  
  .mobile-only {
    display: none !important;
  }
  
  .trending-carousel {
    padding: 0 60px; /* Space for scroll buttons */
  }
  
  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

/* Tablet */
@media (max-width: 1199px) and (min-width: 768px) {
  .desktop-only {
    display: none !important;
  }
  
  .ad-container.side-rail {
    display: none !important;
  }
  
  .scroll-btn {
    display: none;
  }
  
  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  
  .hero-banner {
    height: 60vh;
  }
  
  main {
    padding: var(--space-md) var(--space-sm);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }
  
  .mobile-only {
    display: block !important;
  }
  
  /* Header adjustments */
  header {
    padding: var(--space-sm);
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .header-nav {
    order: 3;
    width: 100%;
    justify-content: space-around;
    background: var(--card-bg);
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
  }
  
  .nav-link {
    flex: 1;
    text-align: center;
    padding: var(--space-sm);
    font-size: 0.9rem;
  }
  
  .header-right {
    order: 2;
    width: 100%;
    justify-content: space-between;
  }
  
  #searchInput {
    flex: 1;
    margin-right: var(--space-sm);
  }
  
  /* Hero adjustments */
  .hero-banner {
    height: 50vh;
    min-height: 300px;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-btn {
    min-width: auto;
    width: 100%;
  }
  
  .hero-indicators {
    bottom: var(--space-sm);
  }
  
  /* Content adjustments */
  main {
    padding: var(--space-sm);
  }
  
  .section-header {
    margin-bottom: var(--space-md);
  }
  
  .categories {
    padding: var(--space-xs);
    gap: var(--space-xs);
  }
  
  .category-btn {
    font-size: 0.8rem;
    padding: var(--space-xs);
  }
  
  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-sm);
  }
  
  .carousel-card {
    min-width: 250px;
  }
  
  .movie-poster {
    height: 300px;
  }
  
  .play-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }
  
  .scroll-btn {
    display: none;
  }
  
  .trending-container h3 {
    font-size: 1.3rem;
    margin-bottom: var(--space-sm);
  }
  
  /* Modal adjustments */
  .modal-content {
    max-width: 95vw;
    margin: 2.5vh auto;
  }
  
  #videoContainer {
    height: 40vh;
    min-height: 250px;
  }
  
  .modal-info {
    padding: var(--space-sm);
  }
  
  /* Comments adjustments */
  .comments-container {
    max-width: 95vw;
    max-height: 85vh;
    width: auto;
  }
  
  .comments-list {
    max-height: 300px;
  }
  
  /* Footer adjustments */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-md);
  }
  
  .footer-links {
    justify-content: center;
    gap: var(--space-md);
  }
  
  .footer-column {
    min-width: 120px;
  }
  
  /* Ad adjustments */
  .ad-container.side-rail {
    display: none !important;
  }
  
  .ad-container.sticky-bottom {
    padding: var(--space-xs);
  }
  
  /* Utility classes for mobile */
  .mobile-stack {
    flex-direction: column !important;
  }
  
  .mobile-full-width {
    width: 100% !important;
  }
  
  .mobile-center {
    text-align: center !important;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .movies-grid {
    grid-template-columns: 1fr;
  }
  
  .carousel-card {
    min-width: 200px;
  }
  
  .movie-poster {
    height: 280px;
  }
  
  .hero-banner {
    height: 40vh;
    min-height: 250px;
  }
  
  .splash-text {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .hero-info h2 {
    font-size: 1.8rem;
  }
  
  .hero-info p {
    font-size: 1rem;
  }
  
  #videoContainer {
    height: 30vh;
    min-height: 200px;
  }
}

/* Landscape phone adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-banner {
    height: 80vh;
  }
  
  .hero-buttons {
    flex-direction: row;
    gap: var(--space-sm);
  }
  
  .hero-btn {
    width: auto;
    min-width: 120px;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .play-icon,
  .hero-btn,
  .category-btn {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .infinite-scroll {
    animation: none !important;
  }
  
  .trending-carousel {
    scroll-behavior: auto;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #ffffff;
    --shadow-sm: 0 2px 4px rgba(255, 255, 255, 0.3);
    --shadow-md: 0 4px 6px rgba(255, 255, 255, 0.3);
    --shadow-lg: 0 10px 15px rgba(255, 255, 255, 0.3);
    --shadow-xl: 0 20px 25px rgba(255, 255, 255, 0.4);
  }
  
  .movie-card {
    border: 2px solid var(--border-color);
  }
  
  .category-btn {
    border-width: 2px;
  }
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

button:focus,
.movie-card:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .hero-banner,
  .ad-container,
  .modal,
  .comments-section,
  header,
  footer {
    display: none !important;
  }
  
  .movies-grid {
    display: block !important;
  }
  
  .movie-card {
    break-inside: avoid;
    margin-bottom: var(--space-md);
  }
}

/* Animation keyframes */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--card-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* Selection styles */
::selection {
  background: var(--accent-color);
  color: white;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }

.z-1 { z-index: 1; }
.z-10 { z-index: 10; }
.z-100 { z-index: 100; }
.z-1000 { z-index: 1000; }

/* ===================== Quick Watch Parity for Grids ===================== */
/* Make movies/series/cartoons grids match quickwatch small-card layout */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

/* Compact card sizing to mirror quickwatch */
.movie-card {
  border-radius: 12px;
  border: 1px solid var(--border-color);
}
.movie-poster {
  height: 220px;
}
.movie-info { padding: 10px; }
.movie-title { font-size: .9rem; line-height: 1.2; }
.movie-meta { font-size: .75rem; }

/* Mobile: keep 2 columns like quickwatch */
@media (max-width: 768px){
  .movies-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .movie-poster { height: 240px; }
  .movie-info { padding: 8px; }
  .movie-title { font-size: .85rem; }
  .movie-meta { font-size: .7rem; }
}

/* Very small screens */
@media (max-width: 375px){
  .movie-poster { height: 200px; }
}

/* Tablet landscape */
@media (min-width:769px) and (max-width:1024px){
  .movies-grid { grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap:12px }
  .movie-poster { height: 240px }
}

/* Large screens */
@media (min-width:1400px){
  .movies-grid { grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap:14px }
  .movie-poster { height: 260px }
}

/* Also align premium-grid utility to the same layout so pages using
   "movies-grid premium-grid" get consistent sizing with quickwatch */
.premium-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap:10px }
@media (max-width: 768px){ .premium-grid { grid-template-columns: repeat(2,1fr); gap:8px } }
@media (min-width:769px) and (max-width:1024px){ .premium-grid { grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap:12px } }
@media (min-width:1400px){ .premium-grid { grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap:14px } }
.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  font-size: 18px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.footer-social a:hover {
  background: white;
  color: var(--accent-color);
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(229, 9, 20, 0.4);
}
/* ===================== MOBILE-FIRST OPTIMIZED CSS ===================== */

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

/* Root Variables */
:root {
  --bg-color: #0a0a0a;
  --card-bg: #1a1a1a;
  --text-color: #ffffff;
  --text-secondary: #999;
  --accent-color: #e50914;
  --accent-hover: #f40612;
  --trailer-color: #ff6b35;
  --movie-color: #4ecdc4;
  --cartoon-color: #ff6b9d;
  --border-color: #333;
  --transition: all 0.3s ease;
  --header-height: 60px;
  --bottom-nav-height: 65px;
}

[data-theme="light"] {
  --bg-color: #ffffff;
  --card-bg: #f5f5f5;
  --text-color: #000000;
  --text-secondary: #666;
  --border-color: #ddd;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  overflow-x: hidden;
  padding-top: var(--header-height);
  padding-bottom: var(--bottom-nav-height);
}

/* ===================== SPLASH SCREEN ===================== */
#splash {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #000 0%, var(--accent-color) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.splash-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.splash-text {
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent-color);
  text-shadow: 0 0 30px var(--accent-color);
  animation: pulse 1.5s infinite;
}

.splash-tagline {
  font-size: 1.2rem;
  color: #fff;
  opacity: 0.8;
}

.splash-loader {
  width: 50px;
  height: 50px;
  border: 3px solid transparent;
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

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

/* ===================== COMPACT HEADER ===================== */
.compact-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.header-brand h1 {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-color);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:active {
  background: var(--card-bg);
  transform: scale(0.95);
}

/* ===================== SEARCH BAR ===================== */
.search-bar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--card-bg);
  padding: 0.75rem 1rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
  z-index: 999;
  border-bottom: 1px solid var(--border-color);
}

.search-bar.active {
  display: flex;
}

.search-bar input {
  flex: 1;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.75rem 1rem;
  border-radius: 25px;
  font-size: 1rem;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* ===================== LOADING ===================== */
.loading-indicator {
  text-align: center;
  padding: 3rem 1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

/* ===================== MAIN CONTENT ===================== */
main {
  padding: 1rem 0;
  min-height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
}

/* ===================== COMPACT HERO BANNER ===================== */
.hero-banner-compact {
  position: relative;
  height: 40vh;
  min-height: 250px;
  max-height: 350px;
  margin: 0 1rem 1.5rem;
  border-radius: 12px;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-color), #000);
  background-size: cover;
  background-position: center;
}

.hero-banner-compact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.9));
  z-index: 1;
}

.hero-content {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.hero-content h2 {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.hero-btn-compact {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.hero-btn-compact:active {
  transform: scale(0.95);
}

/* ===================== CONTENT SECTIONS ===================== */
.content-row {
  margin: 1.5rem 0;
}

.content-row h3 {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.content-row h3 i {
  color: var(--accent-color);
}

/* ===================== CARDS CONTAINER ===================== */
.cards-container {
  display: flex;
  gap: 0.75rem;
  padding: 0 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cards-container::-webkit-scrollbar {
  display: none;
}

/* ===================== COMPACT MOVIE CARD ===================== */
.movie-card-compact {
  flex: 0 0 140px;
  scroll-snap-align: start;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.movie-card-compact:active {
  transform: scale(0.95);
}

.card-poster {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

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

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.movie-card-compact:active .card-overlay {
  opacity: 1;
}

.play-icon-small {
  font-size: 2rem;
  color: white;
}

.card-info {
  padding: 0.75rem;
}

.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  min-height: 2.6em;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.7rem;
}

.card-badge {
  background: var(--accent-color);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

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

/* ===================== QUICK CATEGORIES ===================== */
.quick-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0 1rem;
  margin: 1.5rem 0;
}

.quick-cat-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
  border: 2px solid transparent;
}

.quick-cat-card:active {
  transform: scale(0.95);
}

.quick-cat-card i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.quick-cat-card.trailer {
  border-color: var(--trailer-color);
}

.quick-cat-card.trailer i {
  color: var(--trailer-color);
}

.quick-cat-card.movie {
  border-color: var(--movie-color);
}

.quick-cat-card.movie i {
  color: var(--movie-color);
}

.quick-cat-card.cartoon {
  border-color: var(--cartoon-color);
}

.quick-cat-card.cartoon i {
  color: var(--cartoon-color);
}

.quick-cat-card span {
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===================== BOTTOM NAVIGATION ===================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(0, 0, 0, 0.98);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid var(--border-color);
  z-index: 1000;
  padding: 0.5rem 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  flex: 1;
  padding: 0.5rem;
  transition: var(--transition);
  position: relative;
}

.nav-item i {
  font-size: 1.3rem;
}

.nav-item span {
  font-size: 0.7rem;
  font-weight: 500;
}

.nav-item.active {
  color: var(--accent-color);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 0 0 3px 3px;
}

/* ===================== MODAL ===================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.8);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

#videoContainer {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}

#videoContainer iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.modal-info {
  padding: 1rem;
}

.modal-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.modal-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===================== FOOTER ===================== */
.compact-footer {
  background: var(--card-bg);
  padding: 2rem 1rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}

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

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
}

.footer-social a:active {
  transform: scale(0.9);
}

.compact-footer p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

/* ===================== TABLET (768px - 1024px) ===================== */
@media (min-width: 768px) {
  :root {
    --bottom-nav-height: 70px;
  }

  .movie-card-compact {
    flex: 0 0 160px;
  }

  .card-poster {
    height: 220px;
  }

  .card-title {
    font-size: 0.9rem;
  }

  .hero-banner-compact {
    height: 45vh;
    max-height: 400px;
  }

  .hero-content h2 {
    font-size: 1.8rem;
  }

  .quick-categories {
    gap: 1rem;
  }

  .quick-cat-card {
    padding: 2rem 1rem;
  }

  .quick-cat-card i {
    font-size: 2.5rem;
  }

  .nav-item i {
    font-size: 1.5rem;
  }

  .nav-item span {
    font-size: 0.75rem;
  }
}

/* ===================== DESKTOP (1024px+) ===================== */
@media (min-width: 1024px) {
  body {
    padding-bottom: 0;
  }

  .compact-header {
    height: 70px;
    padding: 0 2rem;
  }

  .header-brand h1 {
    font-size: 1.8rem;
  }

  /* Show desktop nav */
  .bottom-nav {
    position: static;
    height: auto;
    background: transparent;
    border: none;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    padding: 0;
  }

  .nav-item {
    flex-direction: row;
    flex: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    gap: 0.5rem;
  }

  .nav-item::before {
    display: none;
  }

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

  .nav-item span {
    font-size: 0.9rem;
  }

  .nav-item:hover {
    background: var(--card-bg);
  }

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

  /* Reposition nav to header */
  .compact-header {
    justify-content: space-between;
  }

  .header-actions {
    order: 3;
  }

  .bottom-nav {
    order: 2;
  }

  .movie-card-compact {
    flex: 0 0 200px;
  }

  .card-poster {
    height: 280px;
  }

  .card-title {
    font-size: 1rem;
  }

  .hero-banner-compact {
    height: 50vh;
    max-height: 500px;
    margin: 0 2rem 2rem;
  }

  .hero-content h2 {
    font-size: 2.5rem;
  }

  .content-row h3 {
    font-size: 1.3rem;
    padding: 0 2rem;
  }

  .cards-container {
    padding: 0 2rem;
    gap: 1rem;
  }

  .quick-categories {
    padding: 0 2rem;
    gap: 1.5rem;
  }

  main {
    padding: 2rem 0;
  }

  .modal-content {
    max-width: 800px;
  }
}

/* ===================== LARGE DESKTOP (1440px+) ===================== */
@media (min-width: 1440px) {
  .movie-card-compact {
    flex: 0 0 240px;
  }

  .card-poster {
    height: 320px;
  }

  .hero-banner-compact {
    max-height: 600px;
  }
}

/* ===================== UTILITIES ===================== */
.hide {
  display: none !important;
}

.show {
  display: block !important;
}

.text-center {
  text-align: center;
}

.no-scroll {
  overflow: hidden;
}

/* ===================== CUSTOM NETFLIX-STYLE TWEAKS ===================== */
/* Hide all advertising blocks completely.  This prevents messy banners from
   appearing anywhere on the site. */
.ad-container,
.native-banner-container {
  display: none !important;
}

/* Also hide any ad specific variants such as top, side or bottom banners. */
.top-banner,
.bottom-ad,
.section-ad,
.pre-content-ad,
.mid-grid-ad,
.side-rail,
.sticky-bottom {
  display: none !important;
}

/* Reduce the hero banner height on smaller screens.  On desktop the hero
   remains a cinematic 80vh strip; on mobile it becomes a shorter 50vh
   strip for better usability.  We also hide the navigation and search
   controls on mobile so that only the brand is visible – bottom navigation
   takes over on smaller devices. */
@media (max-width: 768px) {
  :root {
    --hero-height: 50vh;
  }
  header .header-nav,
  header .header-right {
    display: none;
  }
}

/* Hide the bottom navigation on wider screens.  It only appears on
   mobile and tablet devices. */
@media (min-width: 769px) {
  .bottom-nav {
    display: none;
  }
}

/* Responsive column counts for the premium grid.  The grid adjusts
   automatically based on the viewport width: two cards per row on
   phones, three on small tablets, five on medium screens and seven on
   desktops. */
@media (max-width: 480px) {
  .premium-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .premium-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .premium-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1025px) {
  .premium-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

/* Apply a glass effect to the cards: a semi‑transparent background with a
   blur and subtle border.  On hover the cards glow using the accent
   colour, and the existing transform remains intact. */
.movie-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.movie-card:hover {
  box-shadow: 0 0 25px var(--accent-color);
}

/* Enable smooth scroll snapping on horizontal carousels.  Cards will
   snap neatly into view when scrolling by touch or mouse drag. */
.trending-carousel,
.continue-carousel {
  scroll-snap-type: x mandatory;
}

.trending-carousel > *,
.continue-carousel > * {
  scroll-snap-align: start;
}

/* Fade in the arrow buttons only when the user hovers over the row. */
.trending-container .scroll-btn {
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.trending-container:hover .scroll-btn {
  opacity: 1;
}

/* Keep the brand tagline in lowercase.  The default stylesheet applies
   text-transform: uppercase to the tagline which forces “premium” to
   appear in all caps.  Override that behaviour so the tagline stays
   lowercase. */
.brand-tagline {
  text-transform: none;
}

/* ===================== EPISODES SIDEBAR ===================== */
.episodes-sidebar {
  width: 300px;
  background: var(--card-bg);
  border-left: 1px solid var(--border-color);
  padding: 20px;
  position: sticky;
  top: 100px;
  height: calc(100vh - 120px);
  overflow-y: auto;
  margin-left: 20px;
}

.episodes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.episodes-header h3 {
  color: var(--text-color);
  font-size: 1.2rem;
  margin: 0;
}

.episode-total {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.episode-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 15px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.episode-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-color);
  transform: translateX(5px);
}

.episode-item.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.episode-item.active .episode-title,
.episode-item.active .episode-meta {
  color: white;
}

.episode-number {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-color);
  margin-bottom: 5px;
}

.episode-item.active .episode-number {
  color: white;
}

.episode-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 5px;
  color: var(--text-color);
}

.episode-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.episode-duration {
  font-size: 0.8rem;
}

/* Responsive adjustments for episodes sidebar */
@media (max-width: 1024px) {
  .episodes-sidebar {
    width: 250px;
  }
}

@media (max-width: 768px) {
  .episodes-sidebar {
    display: none !important;
  }
  
  main {
    flex-direction: column;
  }
  
  .poster-col {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .info {
    width: 100%;
  }
}

/* Adjust main layout to accommodate sidebar */
@media (min-width: 769px) {
  main {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
  }
  
  .poster-col {
    flex-shrink: 0;
  }
  
  .info {
    flex: 1;
    min-width: 0;
  }
}

/* ===================== ORTEGAMOVIES LOGO HOVER + CARD GLOW ===================== */
/* Make the splash logo text feel alive on hover */
.splash-text {
  position: relative;
  transition: var(--transition);
}

.splash-logo:hover .splash-text {
  transform: translateY(-4px) scale(1.04) rotateX(6deg);
  text-shadow: 0 0 12px var(--accent-color), 0 0 28px var(--accent-color);
  background: linear-gradient(90deg, var(--accent-color), var(--movie-color), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header brand: subtle float + glow on hover */
.header-brand h1 {
  transition: var(--transition);
}

.header-brand:hover h1 {
  transform: translateY(-2px) scale(1.03);
  text-shadow: 0 0 10px var(--accent-color), 0 0 22px var(--accent-color);
}

.header-brand:hover .brand-tagline {
  filter: drop-shadow(0 0 6px var(--accent-gold));
}

/* Glowing gradient border for cards (works across all pages) */
.movie-card,
.movie-card-compact {
  position: relative;
}

.movie-card::before,
.movie-card-compact::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px; /* border thickness */
  background: linear-gradient(135deg, var(--accent-color), var(--movie-color), var(--accent-gold));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude; /* show only the border ring */
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.movie-card:hover::before,
.movie-card-compact:hover::before { opacity: 1; }

/* Add a soft outer glow that complements the ring */
.movie-card:hover,
.movie-card-compact:hover {
  box-shadow: 0 10px 35px rgba(229, 9, 20, 0.35);
}
