/* Custom animations and effects */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

* {
  font-family: "Inter", sans-serif;
}

/* Animated starfield background */
.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="0.5" fill="white" opacity="0.8"/><circle cx="80" cy="40" r="0.3" fill="white" opacity="0.6"/><circle cx="40" cy="60" r="0.4" fill="white" opacity="0.7"/><circle cx="90" cy="80" r="0.2" fill="white" opacity="0.5"/><circle cx="10" cy="90" r="0.3" fill="white" opacity="0.6"/><circle cx="70" cy="10" r="0.4" fill="white" opacity="0.8"/><circle cx="30" cy="30" r="0.2" fill="white" opacity="0.5"/><circle cx="60" cy="70" r="0.3" fill="white" opacity="0.7"/></svg>')
    repeat;
  animation: move-stars 50s linear infinite;
}

.twinkling {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="25" cy="25" r="0.3" fill="white" opacity="0.9"/><circle cx="75" cy="50" r="0.2" fill="white" opacity="0.7"/><circle cx="50" cy="75" r="0.4" fill="white" opacity="0.8"/><circle cx="15" cy="65" r="0.2" fill="white" opacity="0.6"/><circle cx="85" cy="15" r="0.3" fill="white" opacity="0.9"/></svg>')
    repeat;
  animation: move-twinkling 100s linear infinite;
}

@keyframes move-stars {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(-2000px);
  }
}

@keyframes move-twinkling {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(-2000px);
  }
}

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

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #8b5cf6, #ec4899);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #7c3aed, #db2777);
}

/* Smooth transitions */
* {
  transition: all 0.2s ease-in-out;
}

/* Backdrop blur support */
@supports (backdrop-filter: blur(10px)) {
  .backdrop-blur-md {
    backdrop-filter: blur(12px);
  }
  .backdrop-blur-sm {
    backdrop-filter: blur(4px);
  }
}

/* Responsive text sizing */
@media (max-width: 640px) {
  .stars,
  .twinkling {
    animation-duration: 30s;
  }
}

/* Glow effects */
.focus\:ring-2:focus {
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.5), 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Modern dark mode color palette and effects */
body, html {
  background: linear-gradient(135deg, #18122B 0%, #1E1B3A 100%) !important;
  color: #E0E7FF;
}

header, footer {
  background: rgba(24, 18, 43, 0.85) !important;
  border-color: rgba(80, 70, 180, 0.15) !important;
}

/* Animated gradients for section titles */
@keyframes gradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animate-gradient {
  background-size: 300% auto;
  animation: gradient 15s ease infinite;
}

/* Card and button glow */
.movie-card, button, .filter-btn, .category-tag, .search-bar {
  box-shadow: 0 2px 24px 0 rgba(139, 92, 246, 0.12), 0 1.5px 8px 0 rgba(236, 72, 153, 0.08);
}

.movie-card {
  background: linear-gradient(135deg, rgba(36, 33, 64, 0.95) 0%, rgba(30, 27, 58, 0.95) 100%);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.movie-card:hover {
  box-shadow: 0 8px 32px 0 rgba(139, 92, 246, 0.25), 0 2px 8px 0 rgba(236, 72, 153, 0.12);
  background: linear-gradient(135deg, #232046 0%, #2d225a 100%);
  outline: none;
}

.movie-card:focus {
  outline: none;
}

button, .filter-btn {
  background: linear-gradient(90deg, #6D28D9 0%, #EC4899 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 16px 0 rgba(139, 92, 246, 0.18);
}

button:hover, .filter-btn:hover {
  background: linear-gradient(90deg, #7C3AED 0%, #DB2777 100%);
  box-shadow: 0 4px 24px 0 rgba(139, 92, 246, 0.25);
  transform: translateY(-2px) scale(1.03);
}

input, .search-bar {
  background: rgba(36, 33, 64, 0.85) !important;
  color: #E0E7FF !important;
  border: 1px solid rgba(139, 92, 246, 0.15) !important;
}

input::placeholder {
  color: #a1a1aa !important;
}

/* Subtle neon border for focus */
input:focus, button:focus, .filter-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px #a78bfa, 0 0 12px #a78bfa;
}

/* Category tags */
.category-tag, span[class*="px-4"] {
  background: linear-gradient(90deg, #232046 0%, #2d225a 100%);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.18);
  box-shadow: 0 1px 8px 0 rgba(139, 92, 246, 0.10);
}

.category-tag:hover, span[class*="px-4"]:hover {
  background: linear-gradient(90deg, #3b2f6b 0%, #4b326e 100%);
  color: #fff;
  box-shadow: 0 2px 16px 0 rgba(139, 92, 246, 0.18);
}

/* Reduce white overlays */
.bg-white\/10, .bg-white\/20, .border-white\/10, .border-white\/20 {
  background: rgba(36, 33, 64, 0.85) !important;
  border-color: rgba(139, 92, 246, 0.10) !important;
}

.text-white {
  color: #E0E7FF !important;
}

.text-gray-400 {
  color: #a1a1aa !important;
}

.text-gray-300 {
  color: #d1d5db !important;
}

/* Subtle animated gradient for hero text */
.bg-gradient-to-r, .bg-gradient-to-br {
  background-size: 200% 200%;
  animation: gradientMove 6s ease-in-out infinite;
}

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