/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM DESIGN OVERHAUL - HydraPlay/CinePulse
   ────────────────────────────────────────────────────────────────────────
   Luxury aesthetics, psychology-driven interactions, and mobile optimization.
   Applied AFTER all other stylesheets for maximum specificity.
   
   • Premium card elevation and depth
   • Enhanced hover interactions with micro-animations
   • Psychological color theory & scarcity principles
   • Touch-friendly 48px targets & swipe optimization
   • Premium typography hierarchy
   • Glass-morphic effects for premium feel
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --premium-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.32);
  --premium-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.48);
  --premium-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.64);
  --premium-shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.72);
  --premium-shadow-deep: 0 32px 80px rgba(0, 0, 0, 0.78);
  
  --premium-glow-red: 0 0 20px rgba(255, 0, 0, 0.35);
  --premium-glow-gold: 0 0 20px rgba(245, 197, 24, 0.25);
  --premium-glow-accent: 0 0 30px rgba(255, 0, 0, 0.42);
  
  --premium-ease-smooth: cubic-bezier(0.34, 1.56, 0.64, 1);
  --premium-ease-expo: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --premium-transition-fast: 150ms var(--premium-ease-expo);
  --premium-transition: 280ms var(--premium-ease-expo);
  --premium-transition-slow: 420ms var(--premium-ease-expo);
}

/* ──────────────────────────────────────────────────────────────────────────
   1. PREMIUM MOVIE CARDS - Core Enhancement
   ────────────────────────────────────────────────────────────────────────── */

.movie-card {
  border-radius: 18px !important;
  backdrop-filter: blur(8px);
  background: linear-gradient(135deg, rgba(19, 19, 25, 0.8), rgba(13, 13, 19, 0.85)) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: var(--premium-shadow-md);
  position: relative;
  overflow: hidden;
  transition: 
    transform var(--premium-transition),
    box-shadow var(--premium-transition),
    border-color var(--premium-transition),
    background var(--premium-transition);
}

/* Premium hover state with 3D depth */
.movie-card:hover {
  transform: translateY(-10px) scale(1.08) !important;
  box-shadow: 
    var(--premium-shadow-xl),
    var(--premium-glow-accent),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 0, 0, 0.35) !important;
  background: linear-gradient(135deg, rgba(25, 25, 35, 0.9), rgba(15, 15, 22, 0.95)) !important;
}

/* Card thumbnail enhancement */
.movie-card .card-thumbnail {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.card-thumbnail img {
  transition: transform var(--premium-transition), filter var(--premium-transition);
  filter: brightness(1);
}

.movie-card:hover .card-thumbnail img {
  transform: scale(1.12) !important;
  filter: brightness(1.15) saturate(1.1);
}

/* Premium badge styling */
.card-badge {
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 6px 12px !important;
  letter-spacing: 0.8px;
  backdrop-filter: blur(10px);
  box-shadow: var(--premium-shadow-md) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-new {
  background: linear-gradient(135deg, #ff1f39 0%, #ff4d55 50%, #ff6b35 100%) !important;
}

.badge-anime {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f43f5e 100%) !important;
}

.badge-movie {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 50%, #7c3aed 100%) !important;
}

.badge-series {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%) !important;
}

/* Premium rating badge */
.card-rating {
  background: linear-gradient(135deg, rgba(20, 20, 28, 0.85), rgba(10, 10, 16, 0.92)) !important;
  border: 1.5px solid rgba(255, 215, 0, 0.25) !important;
  backdrop-filter: blur(12px);
  box-shadow: var(--premium-shadow-md), 0 0 15px rgba(255, 215, 0, 0.15) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  padding: 6px 12px !important;
  border-radius: 999px !important;
}

.card-rating i {
  background: linear-gradient(135deg, #ffd700 0%, #ffb24d 50%, #ff8c00 100%) !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

/* Card overlay enhancement */
.card-overlay-details {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.85) 40%, rgba(0, 0, 0, 0.4) 100%) !important;
  backdrop-filter: blur(4px);
  transition: transform var(--premium-transition-fast);
}

.overlay-play-icon {
  background: linear-gradient(135deg, #ff1f39, #ff4d55) !important;
  color: #fff !important;
  box-shadow: 
    var(--premium-shadow-lg),
    0 0 20px rgba(255, 31, 57, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: 
    transform var(--premium-transition-fast),
    box-shadow var(--premium-transition-fast);
}

.movie-card:hover .overlay-play-icon {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 
    var(--premium-shadow-xl),
    0 0 30px rgba(255, 31, 57, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Card title premium typography */
.card-title {
  font-weight: 700 !important;
  letter-spacing: 0.3px;
  transition: color var(--premium-transition-fast);
}

.movie-card:hover .card-title {
  color: #fff;
}

/* Card info container */
.card-info {
  padding: 14px 10px 0 !important;
}

/* ──────────────────────────────────────────────────────────────────────────
   2. HERO SECTION - Premium Enhancement
   ────────────────────────────────────────────────────────────────────────── */

.hero-spotlight {
  background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #050505 100%) !important;
}

.hero-backdrop::after {
  background: 
    linear-gradient(70deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.2) 100%),
    linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 15%, transparent 40%) !important;
}

.hero-headline {
  font-size: clamp(42px, 7vw, 78px) !important;
  font-weight: 900 !important;
  letter-spacing: -1px;
  line-height: 1.05;
  text-shadow: 
    3px 3px 8px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(255, 0, 0, 0.15);
}

.hero-subcopy {
  font-size: clamp(14px, 2.2vw, 20px) !important;
  line-height: 1.5;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-actions .btn {
  min-height: 52px !important;
  min-width: 140px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  letter-spacing: 0.5px;
  transition: 
    all var(--premium-transition-fast),
    box-shadow var(--premium-transition-fast);
  text-transform: uppercase;
  font-size: 14px;
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #ff1f39, #ff4d55) !important;
  color: #fff !important;
  box-shadow: 
    var(--premium-shadow-lg),
    0 0 25px rgba(255, 31, 57, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px) !important;
  box-shadow: 
    var(--premium-shadow-xl),
    0 0 35px rgba(255, 31, 57, 0.6) !important;
}

.btn-secondary {
  background: rgba(100, 100, 120, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(10px);
  color: #fff !important;
}

.btn-secondary:hover {
  background: rgba(120, 120, 140, 0.8) !important;
  border-color: rgba(255, 0, 0, 0.4) !important;
  transform: translateY(-3px) !important;
}

/* ──────────────────────────────────────────────────────────────────────────
   3. CONTROL STRIP & FILTERS - Premium Styling
   ────────────────────────────────────────────────────────────────────────── */

.control-strip {
  background: linear-gradient(135deg, rgba(20, 20, 28, 0.85), rgba(12, 12, 18, 0.9)) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(16px) saturate(150%);
  border-radius: 24px !important;
  box-shadow: var(--premium-shadow-lg);
}

.home-filter-btn {
  border-radius: 999px !important;
  padding: 12px 20px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  transition: all var(--premium-transition-fast);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.home-filter-btn:hover {
  background: rgba(255, 0, 0, 0.1) !important;
  border-color: rgba(255, 0, 0, 0.35) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.25);
}

.home-filter-btn.global-active {
  background: linear-gradient(135deg, #ff1f39, #ff4d55) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 
    var(--premium-shadow-md),
    0 0 20px rgba(255, 31, 57, 0.4) !important;
}

/* ──────────────────────────────────────────────────────────────────────────
   4. RAIL SECTIONS - Premium Enhancement
   ────────────────────────────────────────────────────────────────────────── */

.rail-section {
  padding: 0 4% !important;
  margin-bottom: 48px !important;
}

.rail-title {
  font-size: clamp(26px, 4vw, 36px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px;
}

.rail-see-all {
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all var(--premium-transition-fast);
}

.rail-see-all:hover {
  color: #ff1f39 !important;
  transform: translateX(4px);
}

.stream-rail,
.movie-rail {
  gap: 22px !important;
  padding-bottom: 12px;
  scroll-behavior: smooth;
}

/* ──────────────────────────────────────────────────────────────────────────
   5. SEARCH BAR - Premium Enhancement
   ────────────────────────────────────────────────────────────────────────── */

.nav-search input {
  background: linear-gradient(135deg, rgba(18, 18, 26, 0.7), rgba(10, 10, 16, 0.8)) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.3),
    var(--premium-shadow-sm);
  transition: all var(--premium-transition-fast);
  font-size: 14px !important;
}

.nav-search input:focus {
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.95), rgba(12, 12, 22, 0.98)) !important;
  border-color: rgba(255, 0, 0, 0.5) !important;
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 0, 0, 0.35),
    0 0 0 4px rgba(255, 0, 0, 0.1) !important;
}

.search-dropdown {
  background: linear-gradient(165deg, rgba(18, 18, 26, 0.97) 0%, rgba(10, 10, 16, 0.95) 100%) !important;
  backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: var(--premium-shadow-xl) !important;
  border-radius: 20px !important;
}

.search-dropdown-item {
  padding: 14px 18px !important;
  transition: all var(--premium-transition-fast);
}

.search-dropdown-item:hover {
  background: rgba(255, 0, 0, 0.08) !important;
  transform: translateX(4px);
}

/* ──────────────────────────────────────────────────────────────────────────
   6. NAVBAR ENHANCEMENT
   ────────────────────────────────────────────────────────────────────────── */

.navbar {
  background: linear-gradient(135deg, rgba(15, 15, 18, 0.9), rgba(8, 8, 12, 0.85)) !important;
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.navbar.scrolled,
.navbar.solid {
  background: linear-gradient(135deg, rgba(10, 10, 14, 0.95), rgba(5, 5, 9, 0.92)) !important;
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.nav-link {
  font-weight: 600 !important;
  letter-spacing: 0.3px;
  transition: all var(--premium-transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: #ff1f39 !important;
}

.btn-nav {
  background: linear-gradient(135deg, #ff1f39, #ff4d55) !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  padding: 10px 24px !important;
  box-shadow: var(--premium-shadow-md);
  transition: all var(--premium-transition-fast);
}

.btn-nav:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--premium-shadow-lg), 0 0 20px rgba(255, 0, 0, 0.35) !important;
}

/* ──────────────────────────────────────────────────────────────────────────
   7. MOBILE OPTIMIZATION - Touch-Friendly & Responsive
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .movie-card {
    border-radius: 16px !important;
  }
  
  .movie-card:hover {
    transform: translateY(-8px) scale(1.06) !important;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }
  
  /* Mobile-first card sizing */
  .movie-card {
    border-radius: 14px !important;
    box-shadow: var(--premium-shadow-md);
  }
  
  .movie-card:hover {
    transform: translateY(-6px) scale(1.04) !important;
  }
  
  /* Hero section mobile */
  .hero-spotlight {
    min-height: 65vh !important;
    align-items: flex-end;
    padding-bottom: 40px;
  }
  
  .hero-headline {
    font-size: clamp(32px, 8vw, 48px) !important;
    line-height: 1.1;
  }
  
  .hero-subcopy {
    font-size: clamp(13px, 2vw, 16px) !important;
  }
  
  /* Touch targets - minimum 48px */
  .hero-actions .btn {
    min-height: 48px !important;
    min-width: 120px !important;
    padding: 12px 20px !important;
    font-size: 13px !important;
    flex: 1;
  }
  
  /* Mobile buttons should be full-width on very small screens */
  @media (max-width: 480px) {
    .hero-actions .btn {
      flex: 1 0 calc(50% - 6px);
    }
  }
  
  /* Filter pills mobile */
  .home-filter-btn {
    padding: 10px 16px !important;
    font-size: 12px !important;
    min-height: 40px;
    border-radius: 20px !important;
  }
  
  /* Rail section mobile */
  .rail-title {
    font-size: clamp(20px, 5vw, 28px) !important;
  }
  
  .stream-rail,
  .movie-rail {
    gap: 16px !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Optimize card size for mobile */
  .rail-card .movie-card {
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  
  /* Search bar mobile */
  .nav-search input {
    width: 200px !important;
    font-size: 13px !important;
    padding: 8px 14px 8px 32px !important;
  }
  
  .nav-search input:focus {
    width: 220px !important;
  }
}

@media (max-width: 480px) {
  /* Extra small screen optimizations */
  .control-strip {
    flex-direction: column;
    gap: 12px !important;
  }
  
  .filter-cluster {
    width: 100%;
  }
  
  .home-filter-btn {
    flex: 1;
  }
  
  /* Navbar hamburger and buttons */
  .hp-hamburger {
    width: 40px !important;
    height: 40px !important;
  }
  
  .btn-nav {
    padding: 8px 16px !important;
    font-size: 12px !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   8. MICRO-INTERACTIONS & ANIMATIONS
   ────────────────────────────────────────────────────────────────────────── */

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

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

/* Loading skeleton animation */
@keyframes premium-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.skeleton {
  animation: premium-pulse 2s var(--premium-ease-expo) infinite;
}

/* Smooth fade-in for elements */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fade-in-up var(--premium-transition) var(--premium-ease-expo) forwards;
}

/* ──────────────────────────────────────────────────────────────────────────
   9. POSTER/DETAILS PAGE PREMIUM ENHANCEMENT
   ────────────────────────────────────────────────────────────────────────── */

.details-hero {
  background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
}

.details-bg::after {
  background: 
    linear-gradient(to top, var(--bg-primary) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0.3) 100%) !important;
}

.details-poster {
  border-radius: 20px !important;
  box-shadow: var(--premium-shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.details-poster img {
  border-radius: 20px !important;
}

.details-title {
  font-size: clamp(28px, 5vw, 48px) !important;
  font-weight: 900 !important;
  letter-spacing: -0.5px;
}

.details-meta {
  font-size: 14px !important;
  font-weight: 600 !important;
}

/* ──────────────────────────────────────────────────────────────────────────
   10. ACCESSIBILITY & FOCUS STATES
   ────────────────────────────────────────────────────────────────────────── */

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(255, 0, 0, 0.5);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  .movie-card {
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  }
  
  .card-badge {
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
  }
  
  .control-strip {
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  }
}
