/* Base Design System */
:root {
  --color-bg: #0f1014;
  --color-bg-secondary: #18191f;
  --color-text: #ffffff;
  --color-primary: #ff7a18;
  /* Orange */
  --color-accent-pink: #ff007f;
  /* Hot Pink */
  --color-accent-blue: #00d4ff;
  /* Electric Blue */

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;

  --shadow-glow-orange: 0 0 25px rgba(255, 122, 24, 0.5);
  --shadow-glow-pink: 0 0 25px rgba(255, 0, 127, 0.5);
  --shadow-card: 0 10px 40px -10px rgba(0, 0, 0, 0.8);
}

/* Base Styles */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-main);
  overflow-x: hidden;
  /* Lively background */
  background-image:
    radial-gradient(circle at 15% 50%, rgba(255, 122, 24, 0.05) 0%, transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(0, 212, 255, 0.05) 0%, transparent 25%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0f1014;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--color-primary), var(--color-accent-pink));
  border-radius: 5px;
  border: 2px solid #0f1014;
}

/* Header */
header {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
  transition: all 0.4s ease;
}

header.scrolled {
  background-color: rgba(15, 16, 20, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Hero Section */
.hero-gradient-overlay {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
}

.hero-bottom-fade {
  background: linear-gradient(to top, var(--color-bg) 10%, transparent 100%);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #ff5500);
  color: white;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 15px rgba(255, 122, 24, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: var(--shadow-glow-orange);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: 0.5s;
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* Movie Card - IMPORTANT FIXES */
.movie-card {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0s;
  z-index: 10;
  cursor: pointer;
}

.movie-card img {
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* Hover State */
.movie-card:hover {
  transform: scale(1.2);
  /* Bigger pop */
  z-index: 50;
}

.movie-card:hover img {
  box-shadow: var(--shadow-card);
}

.movie-card .overlay {
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
  transition: opacity 0.3s ease;
  pointer-events: none;
  /* Let clicks pass through if needed, but we used JS onclick on container */
}

.movie-card:hover .overlay {
  opacity: 1;
  pointer-events: auto;
  /* Re-enable pointer events for buttons inside overlay */
}

/* Ensure buttons inside overlay result in clicks */
.movie-card .overlay button,
.movie-card .overlay a {
  pointer-events: auto;
  transform: scale(1);
  transition: transform 0.2s;
}

.movie-card .overlay button:hover,
.movie-card .overlay a:hover {
  transform: scale(1.1);
}

/* Typography Gradient */
.text-gradient {
  background: linear-gradient(to right, #ff7a18, #ff007f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Layout Utilities */
.snap-x {
  scroll-behavior: smooth;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}


/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  pointer-events: none;
}

.toast {
  background: rgba(24, 25, 31, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: auto;
  min-width: 300px;
  border-left: 4px solid var(--color-primary);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 122, 24, 0.2);
  color: var(--color-primary);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.1rem;
}

.toast-message {
  font-size: 0.8rem;
  color: #9ca3af;
}