/* ===== PARTICLE CANVAS ===== */
.particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

/* ===== CUSTOM CURSOR ===== */
.custom-cursor {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(102, 126, 234, 0.8);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(5px);
  background: rgba(102, 126, 234, 0.1);
  opacity: 1;
  visibility: visible;
}

.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--primary-gradient);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 15px rgba(102, 126, 234, 1);
  opacity: 1;
  visibility: visible;
}

.custom-cursor.cursor-hover {
  width: 60px;
  height: 60px;
  border-color: rgba(245, 87, 108, 0.8);
  background: rgba(245, 87, 108, 0.2);
  box-shadow: 0 0 20px rgba(245, 87, 108, 0.5);
}

/* Hide default cursor and show custom cursor */


/* Force cursor visibility on all screen sizes */
@media (min-width: 1px) {
  .custom-cursor,
  .cursor-dot {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 50%;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  transform: scale(1.1) rotate(15deg);
}

/* ===== LIGHT THEME ===== */
.light-theme {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.6);
  
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 8px 40px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.light-theme .banner {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
}

.light-theme .navbar {
  background: rgba(248, 250, 252, 0.8);
}

.light-theme .navbar.scrolled {
  background: rgba(248, 250, 252, 0.95);
}

.light-theme .particle-canvas {
  opacity: 0.3;
}

/* ===== DEBUG PANEL ===== */
.debug-panel {
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--text-primary);
  z-index: 9998;
  min-width: 120px;
}

.debug-panel div {
  margin-bottom: 0.5rem;
}

.debug-panel span {
  color: var(--primary-color);
  font-weight: bold;
}

/* ===== ENHANCED ANIMATIONS ===== */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.6);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

/* ===== FLOATING ELEMENTS ===== */
.logo-icon {
  animation: float 3s ease-in-out infinite;
}

.title-icon {
  animation: pulse 2s ease-in-out infinite;
}

.play-button {
  animation: glow 2s ease-in-out infinite;
}

/* ===== STAGGERED ANIMATIONS ===== */
.movie-card:nth-child(1) { animation-delay: 0.1s; }
.movie-card:nth-child(2) { animation-delay: 0.2s; }
.movie-card:nth-child(3) { animation-delay: 0.3s; }
.movie-card:nth-child(4) { animation-delay: 0.4s; }
.movie-card:nth-child(5) { animation-delay: 0.5s; }
.movie-card:nth-child(6) { animation-delay: 0.6s; }

.category-card:nth-child(odd) {
  animation: slideInFromLeft 0.8s ease both;
}

.category-card:nth-child(even) {
  animation: slideInFromRight 0.8s ease both;
}

/* ===== MICRO-INTERACTIONS ===== */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  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: width 0.6s, height 0.6s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

/* ===== ENHANCED HOVER EFFECTS ===== */
.movie-card {
  position: relative;
  overflow: hidden;
}

.movie-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
  z-index: 1;
}

.movie-card:hover::before {
  left: 100%;
}

/* ===== SCROLL INDICATORS ===== */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--bg-secondary);
  z-index: 9999;
}

.scroll-progress {
  height: 100%;
  background: var(--primary-gradient);
  width: 0%;
  transition: width 0.1s ease;
}

/* ===== GLASSMORPHISM EFFECTS ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ===== NEON EFFECTS ===== */
.neon-text {
  color: var(--primary-color);
  text-shadow: 
    0 0 5px currentColor,
    0 0 10px currentColor,
    0 0 15px currentColor,
    0 0 20px currentColor;
}

.neon-border {
  border: 2px solid var(--primary-color);
  box-shadow: 
    0 0 10px var(--primary-color),
    inset 0 0 10px var(--primary-color);
}

/* ===== GRADIENT ANIMATIONS ===== */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animated-gradient {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* ===== MORPHING SHAPES ===== */
@keyframes morph {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

.morphing-shape {
  animation: morph 8s ease-in-out infinite;
}

/* ===== LOADING STATES ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===== ENHANCED MOBILE ANIMATIONS ===== */
@media (max-width: 768px) {
  .custom-cursor,
  .cursor-dot {
    width: 30px;
    height: 30px;
  }
  
  .cursor-dot {
    width: 6px;
    height: 6px;
  }
  
  .particle-canvas {
    opacity: 0.3;
  }
  
  /* Reduce motion for better performance */
  .movie-card {
    animation: none;
  }
  
  .category-card {
    animation: fadeInUp 0.6s ease both;
  }
  
  /* Touch-friendly hover effects */
  .movie-card:active {
    transform: scale(0.98);
  }
  
  .btn:active {
    transform: scale(0.95);
  }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
  .particle-canvas {
    display: none;
  }
  
  .custom-cursor,
  .cursor-dot {
    transition: none !important;
    animation: none !important;
  }
  
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  /* Keep cursor visible but remove animations */
  .custom-cursor,
  .cursor-dot {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --bg-card: rgba(255, 255, 255, 0.2);
    --border-color: rgba(255, 255, 255, 0.3);
  }
  
  .movie-card,
  .category-card {
    border-width: 2px;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .particle-canvas,
  .custom-cursor,
  .cursor-dot,
  .debug-panel,
  .navbar,
  .footer {
    display: none !important;
  }
  
  .main-content {
    margin-top: 0;
  }
  
  .banner {
    height: auto;
    min-height: auto;
    page-break-inside: avoid;
  }
  
  .movie-card,
  .category-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}