/* ===== ADVANCED MOVIE DISCOVERY HUB - MODERN UI ===== */

/* CSS Custom Properties for Theme Management */
:root {
  /* Light Theme Colors */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --danger-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  
  /* Background Gradients */
  --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --bg-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --bg-glass: rgba(255, 255, 255, 0.25);
  --bg-glass-strong: rgba(255, 255, 255, 0.9);
  
  /* Text Colors */
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --text-light: #ffffff;
  --text-muted: #bdc3c7;
  
  /* Shadows */
  --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 15px 50px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.3);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 15px;
  --radius-lg: 25px;
  --radius-xl: 35px;
  
  /* Transitions */
  --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: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  --bg-secondary: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
  --bg-glass: rgba(0, 0, 0, 0.25);
  --bg-glass-strong: rgba(0, 0, 0, 0.8);
  --text-primary: #ecf0f1;
  --text-secondary: #bdc3c7;
  --text-light: #ffffff;
  --text-muted: #7f8c8d;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Advanced Animated Background with Multiple Layers */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 60% 60%, rgba(255, 200, 100, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 10% 10%, rgba(200, 100, 255, 0.3) 0%, transparent 50%);
  animation: backgroundShift 25s ease-in-out infinite;
  z-index: -3;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(45deg, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
    linear-gradient(-45deg, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
  animation: backgroundFlow 30s linear infinite;
  z-index: -2;
}

/* Particle System */
.particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 20s infinite linear;
}

.particle:nth-child(1) { width: 4px; height: 4px; left: 10%; animation-delay: 0s; animation-duration: 15s; }
.particle:nth-child(2) { width: 6px; height: 6px; left: 20%; animation-delay: 2s; animation-duration: 18s; }
.particle:nth-child(3) { width: 3px; height: 3px; left: 30%; animation-delay: 4s; animation-duration: 12s; }
.particle:nth-child(4) { width: 5px; height: 5px; left: 40%; animation-delay: 6s; animation-duration: 16s; }
.particle:nth-child(5) { width: 4px; height: 4px; left: 50%; animation-delay: 8s; animation-duration: 14s; }
.particle:nth-child(6) { width: 7px; height: 7px; left: 60%; animation-delay: 10s; animation-duration: 20s; }
.particle:nth-child(7) { width: 3px; height: 3px; left: 70%; animation-delay: 12s; animation-duration: 13s; }
.particle:nth-child(8) { width: 5px; height: 5px; left: 80%; animation-delay: 14s; animation-duration: 17s; }
.particle:nth-child(9) { width: 4px; height: 4px; left: 90%; animation-delay: 16s; animation-duration: 15s; }
.particle:nth-child(10) { width: 6px; height: 6px; left: 15%; animation-delay: 18s; animation-duration: 19s; }

@keyframes backgroundShift {
  0%, 100% { 
    transform: translateX(0) translateY(0) rotate(0deg) scale(1);
    filter: hue-rotate(0deg);
  }
  25% { 
    transform: translateX(-30px) translateY(-15px) rotate(2deg) scale(1.05);
    filter: hue-rotate(90deg);
  }
  50% { 
    transform: translateX(20px) translateY(10px) rotate(-1deg) scale(0.95);
    filter: hue-rotate(180deg);
  }
  75% { 
    transform: translateX(-10px) translateY(20px) rotate(1deg) scale(1.02);
    filter: hue-rotate(270deg);
  }
}

@keyframes backgroundFlow {
  0% { 
    transform: translateX(-100%) translateY(-100%) rotate(0deg);
    opacity: 0.3;
  }
  50% { 
    transform: translateX(0%) translateY(0%) rotate(180deg);
    opacity: 0.6;
  }
  100% { 
    transform: translateX(100%) translateY(100%) rotate(360deg);
    opacity: 0.3;
  }
}

@keyframes float {
  0% {
    transform: translateY(100vh) translateX(0px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes buttonGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Header Styles */
header {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.25) 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 50px rgba(102, 126, 234, 0.1);
  margin-bottom: var(--space-xl);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

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

#appTitle {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-md);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
  animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from { filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.3)); }
  to { filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.6)); }
}

.stats {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.stats span {
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition-normal);
}

.stats span:hover {
  transform: translateY(-2px);
  background: var(--bg-glass-strong);
  box-shadow: var(--shadow-light);
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 1000;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4facfe 100%);
  background-size: 300% 300%;
  animation: buttonGradient 10s ease infinite;
  border: none;
  border-radius: 50%;
  width: 55px;
  height: 55px;
  cursor: pointer;
  backdrop-filter: blur(20px);
  box-shadow: 
    0 6px 20px rgba(102, 126, 234, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-weight: 800;
}

.theme-toggle:hover {
  transform: scale(1.15) rotate(180deg);
  box-shadow: 
    0 12px 30px rgba(102, 126, 234, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Controls Section */
.controls {
  max-width: 1200px;
  margin: 0 auto var(--space-xl);
  padding: 0 var(--space-lg);
}

.search-section, .filter-section {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.2) 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    rgba(255, 255, 255, 0.05) 100%);
  padding: var(--space-lg);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-lg);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 30px rgba(102, 126, 234, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.search-section::before, .filter-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transition: var(--transition-slow);
}

.search-section:hover::before, .filter-section:hover::before {
  transform: scaleX(1);
}

.search-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

.search-input-container {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  width: 100%;
  max-width: 600px;
}

.search-suggestions {
  background: var(--bg-glass-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  margin-top: var(--space-sm);
  max-width: 600px;
  width: 100%;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-light);
}

.suggestion-item {
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  color: var(--text-primary);
  font-weight: 500;
}

.suggestion-item:hover {
  background: var(--bg-glass);
  transform: translateX(5px);
}

#searchInput {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  border: 2px solid transparent;
  border-radius: var(--radius-xl);
  font-size: 1.1rem;
  outline: none;
  transition: var(--transition-normal);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-weight: 500;
}

#searchInput::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

#searchInput:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  background: var(--bg-glass-strong);
  transform: translateY(-2px);
}

#searchBtn {
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4facfe 100%);
  background-size: 300% 300%;
  animation: buttonGradient 4s ease infinite;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 800;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 6px 20px rgba(102, 126, 234, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  min-width: 60px;
  letter-spacing: 0.5px;
}

#searchBtn::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: var(--transition-slow);
}

#searchBtn:hover::before {
  left: 100%;
}

#searchBtn:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 
    0 12px 30px rgba(102, 126, 234, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.filter-section {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  align-items: center;
  min-width: 150px;
}

.filter-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
}

label {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#genres {
  padding: var(--space-md) var(--space-lg);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.2) 0%, 
    rgba(255, 255, 255, 0.1) 100%);
  backdrop-filter: blur(15px);
  cursor: pointer;
  min-width: 250px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  letter-spacing: 0.3px;
}

#genres:focus {
  border-color: #667eea;
  box-shadow: 
    0 0 0 3px rgba(102, 126, 234, 0.2),
    0 6px 20px rgba(102, 126, 234, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.3) 0%, 
    rgba(255, 255, 255, 0.2) 100%);
  transform: translateY(-2px);
  color: var(--text-primary);
}

#playBtn {
  padding: var(--space-md) var(--space-xl);
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 50%, #f093fb 100%);
  background-size: 300% 300%;
  animation: buttonGradient 5s ease infinite;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 800;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 6px 20px rgba(255, 107, 107, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  min-width: 180px;
  letter-spacing: 0.5px;
}

#playBtn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition-slow);
}

#playBtn:hover::before {
  width: 300px;
  height: 300px;
}

#playBtn:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 
    0 12px 30px rgba(255, 107, 107, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Loading Animation */
.loading {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text-primary);
  background: var(--bg-glass-strong);
  border-radius: var(--radius-xl);
  margin: var(--space-lg) auto;
  max-width: 400px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-light);
}

.spinner {
  width: 80px;
  height: 80px;
  border: 4px solid rgba(102, 126, 234, 0.2);
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-lg);
  position: relative;
}

.spinner::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 2px solid transparent;
  border-top: 2px solid rgba(102, 126, 234, 0.1);
  border-radius: 50%;
  animation: spin 2s linear infinite reverse;
}

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

/* Movie Container */
.movie-container {
  max-width: 1200px;
  margin: 0 auto var(--space-xl);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.25) 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    rgba(255, 255, 255, 0.05) 100%);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 80px rgba(102, 126, 234, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  min-height: 500px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  position: relative;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.movie-container:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy), var(--shadow-glow);
}

.poster-section {
  flex: 0 0 350px;
  background: linear-gradient(135deg, 
    #667eea 0%, 
    #764ba2 25%, 
    #f093fb 50%, 
    #f5576c 75%, 
    #4facfe 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.poster-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  animation: posterShimmer 4s ease-in-out infinite;
}

@keyframes posterShimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.poster-section img {
  max-width: 100%;
  height: auto;
  max-height: 450px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-heavy);
  transition: var(--transition-slow);
  position: relative;
  z-index: 1;
}

.poster-section img:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: var(--shadow-heavy), 0 0 30px rgba(102, 126, 234, 0.5);
}

.poster-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-light);
  text-align: center;
  padding: var(--space-lg);
}

.poster-icon {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  opacity: 0.8;
  animation: pulse 2s ease-in-out infinite;
}

.poster-placeholder p {
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.9;
}

.movie-placeholder {
  text-align: center;
  padding: var(--space-xl);
}

.movie-placeholder h2 {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-lg);
}

.movie-placeholder p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.welcome-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.feature-item {
  background: var(--bg-glass);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  font-weight: 600;
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition-normal);
  text-align: center;
}

.feature-item:hover {
  transform: translateY(-3px);
  background: var(--bg-glass-strong);
  box-shadow: var(--shadow-light);
}

.movie-details {
  flex: 1;
  padding: var(--space-xl);
  position: relative;
}

.movie-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  line-height: 1.2;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.movie-meta {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 600;
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-normal);
}

.meta-item:hover {
  transform: translateY(-2px);
  background: var(--bg-glass-strong);
  box-shadow: var(--shadow-light);
}

.rating {
  background: var(--warning-gradient);
  color: var(--text-light);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-lg);
  font-weight: 700;
  box-shadow: var(--shadow-light);
  font-size: 1rem;
}

.movie-overview {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  text-align: justify;
  font-weight: 400;
}

.movie-genres {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.genre-tag {
  background: var(--accent-gradient);
  color: var(--text-light);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: var(--shadow-light);
  transition: var(--transition-normal);
  cursor: pointer;
}

.genre-tag:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-medium);
}

/* Action Buttons */
.action-buttons {
  max-width: 1200px;
  margin: 0 auto var(--space-xl);
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.action-buttons button {
  padding: var(--space-md) var(--space-lg);
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 180px;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  background-size: 200% 200%;
  animation: buttonGradient 5s ease infinite;
}

.action-buttons button::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: var(--transition-slow);
}

.action-buttons button:hover::before {
  left: 100%;
}

.btn-like {
  background: linear-gradient(135deg, #00b894 0%, #00a085 50%, #43e97b 100%);
  background-size: 300% 300%;
  animation: buttonGradient 6s ease infinite;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 
    0 6px 20px rgba(0, 184, 148, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.btn-like:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 
    0 12px 30px rgba(0, 184, 148, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn-dislike {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 50%, #ff6b6b 100%);
  background-size: 300% 300%;
  animation: buttonGradient 7s ease infinite;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 
    0 6px 20px rgba(231, 76, 60, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.btn-dislike:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 
    0 12px 30px rgba(231, 76, 60, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn-next {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4facfe 100%);
  background-size: 300% 300%;
  animation: buttonGradient 8s ease infinite;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 
    0 6px 20px rgba(102, 126, 234, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.btn-next:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 
    0 12px 30px rgba(102, 126, 234, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Favorites Section */
.favorites-section {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg-glass-strong);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.favorites-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
}

.favorites-section h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#favoritesContainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.favorite-item {
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: var(--transition-normal);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.favorite-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition-normal);
  z-index: 0;
}

.favorite-item:hover::before {
  opacity: 0.1;
}

.favorite-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-medium);
}

.favorite-item > * {
  position: relative;
  z-index: 1;
}

.favorite-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-light);
  transition: var(--transition-normal);
}

.favorite-item:hover img {
  transform: scale(1.05);
  box-shadow: var(--shadow-medium);
}

.favorite-item h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-weight: 700;
  line-height: 1.3;
}

.favorite-item .rating {
  font-size: 1rem;
  display: inline-block;
  margin-bottom: var(--space-sm);
}

/* Remove Favorite Button */
.remove-favorite-btn {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 50%, #ff6b6b 100%);
  background-size: 300% 300%;
  animation: buttonGradient 9s ease infinite;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  border: none;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: var(--space-sm);
  width: 100%;
  box-shadow: 
    0 4px 15px rgba(231, 76, 60, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

.remove-favorite-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: var(--transition-slow);
}

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

.remove-favorite-btn:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 
    0 8px 25px rgba(231, 76, 60, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.remove-favorite-btn:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 
    0 4px 15px rgba(231, 76, 60, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .movie-container {
    flex-direction: column;
  }
  
  .poster-section {
    flex: none;
    padding: var(--space-lg);
  }
  
  .movie-details {
    padding: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .controls {
    padding: 0 var(--space-md);
  }
  
  .search-section, .filter-section {
    padding: var(--space-md);
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-section {
    gap: var(--space-sm);
  }
  
  .filter-section {
    gap: var(--space-md);
  }
  
  .action-buttons {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }
  
  .action-buttons button {
    width: 100%;
    max-width: 300px;
  }
  
  #genres {
    min-width: auto;
  }
  
  .stats {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  #favoritesContainer {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
  }
  
  .theme-toggle {
    top: var(--space-md);
    right: var(--space-md);
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .controls {
    padding: 0 var(--space-sm);
  }
  
  .search-section, .filter-section {
    padding: var(--space-sm);
  }
  
  .movie-details {
    padding: var(--space-md);
  }
  
  .favorites-section {
    padding: var(--space-md);
  }
  
  #favoritesContainer {
    grid-template-columns: 1fr;
  }
}

/* Advanced Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

/* Apply animations to elements */
.movie-container {
  animation: fadeInUp 0.6s ease-out;
}

.favorite-item {
  animation: fadeInScale 0.4s ease-out;
}

.action-buttons button:active {
  animation: pulse 0.2s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-gradient);
}

/* Selection Styling */
::selection {
  background: rgba(102, 126, 234, 0.3);
  color: var(--text-primary);
}

::-moz-selection {
  background: rgba(102, 126, 234, 0.3);
  color: var(--text-primary);
}