/* CSS Variables for Landing Page Color Scheme */
:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --dark: #0c0c0d;
    --dark-secondary: #1a1a1b;
    --dark-tertiary: #2d2d30;
    --purple-deep: #5d45a7;
    --purple-bright: #a855f7;
    --text-primary: #ffffff;
    --text-secondary: #e5e7eb;
    --text-muted: #9ca3af;
    --gradient-1: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    --gradient-3: linear-gradient(135deg, #5d45a7 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-bg: linear-gradient(135deg, #0c0c0d 0%, #1a1a1b 50%, #2d2d30 100%);
}

/* Body styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--dark);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header styles - Beautiful Transparent Gradient Blur Design */
.header {
  width: 100vw;
  height: 80px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg,
    rgba(12, 12, 13, 0.95) 0%,
    rgba(26, 26, 27, 0.9) 25%,
    rgba(45, 45, 48, 0.85) 50%,
    rgba(139, 92, 246, 0.2) 75%,
    rgba(236, 72, 153, 0.15) 100%);
  position: fixed;
  top: 0;
  z-index: 1002;
  backdrop-filter: blur(30px) saturate(1.8);
  -webkit-backdrop-filter: blur(30px) saturate(1.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: none;
 box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
              0 6px 20px rgba(139, 92, 246, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  padding: 0 2rem;
  max-width: 100%;
  box-sizing: border-box;
}

/* Enhanced header hover effect */
.header:hover {
  background: linear-gradient(135deg,
    rgba(12, 12, 13, 0.95) 0%,
    rgba(26, 26, 27, 0.9) 25%,
    rgba(45, 45, 48, 0.85) 50%,
    rgba(139, 92, 246, 0.2) 75%,
    rgba(236, 72, 153, 0.15) 100%);
  border-bottom: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
              0 6px 20px rgba(139, 92, 246, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Mobile header adjustments */
@media screen and (max-width: 768px) {
  .header {
    padding: 0 1rem;
    justify-content: space-between;
    gap: 0.5rem;
  }

  #netflix-logo {
    width: 140px;
    height: 45px;
    order: 1;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    transition: filter 0.3s ease;
  }

  #netflix-logo:hover {
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3));
  }

  .mobile-nav-toggle {
    order: 0;
    margin-right: 0.5rem;
  }

  .input-container {
    order: 2;
    flex: 1;
    max-width: none;
    margin: 0;
  }

  .search-container {
    margin: 0;
    max-width: none;
  }

  .search-input {
    padding: 14px 16px;
    padding-right: 50px;
    font-size: 14px;
    border-radius: 22px;
    height: 48px;
    box-sizing: border-box;
  }

  .search-button {
    right: 8px;
    width: 36px;
    height: 36px;
  }

  .search-button svg {
    width: 14px;
    height: 14px;
  }

  .watchList-Btn {
    display: none !important;
  }
}

@media screen and (max-width: 480px) {
  .header {
    padding: 0 0.5rem;
    gap: 0.25rem;
  }

  #netflix-logo {
    width: 115px;
    height: 40px;
  }

  .mobile-nav-toggle {
    margin-right: 0.25rem;
  }

  .input-container {
    max-width: none;
    margin: 0;
  }

  .search-container {
    margin: 0;
  }

  .search-input {
    font-size: 13px;
    padding: 12px 14px;
    padding-right: 45px;
    border-radius: 20px;
    height: 44px;
    box-sizing: border-box;
  }

  .search-button {
    right: 6px;
    width: 32px;
    height: 32px;
  }

  .search-button svg {
    width: 12px;
    height: 12px;
  }
}

/* Navigation menu styles - Updated with Landing Page Colors */
.nav-menu {
  width: 100%;
  background-color: rgba(12, 12, 13, 0.95);
  position: fixed;
  top: 80px;
  z-index: 999;
  padding: 5px 0;
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
  border-bottom: none;
}

/* Desktop navigation - hide hamburger */
@media screen and (min-width: 769px) {
  .mobile-nav-toggle {
    display: none !important;
  }

  .mobile-nav-overlay {
    display: none !important;
  }

  .mobile-watchlist {
    display: none !important;
  }
}

.nav-list {
  display: flex;
  justify-content: center;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

/* Navigation menu transitions */
.nav-item {
  margin: 0 15px;
  padding: 8px 15px;
  border-radius: 5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-item a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-item a:hover {
  color: var(--primary);
}

.nav-item:hover {
  background-color: rgba(139, 92, 246, 0.1);
}

.nav-item.active a {
  color: white;
  font-weight: 600;
}

/* Dropdown styles for genre navigation */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(26, 26, 27, 0.95);
  min-width: 700px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  padding: 20px;
  z-index: 30;
  border: 1px solid rgba(139, 92, 246, 0.3);
  backdrop-filter: blur(20px);
}

.dropdown-column {
  flex: 1;
  min-width: 150px;
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dropdown-column h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 18px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  padding-bottom: 5px;
  text-align: center;
  width: 100%;
  font-weight: 600;
}

/* Mobile Navigation Hamburger Menu */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1003;
}

.mobile-nav-toggle:hover {
  background: rgba(139, 92, 246, 0.2);
}

.mobile-nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--primary);
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.mobile-nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Close Button */
.mobile-menu-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(139, 92, 246, 0.15);
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  z-index: 1004;
  opacity: 0;
  transform: scale(0.8) rotate(90deg);
  pointer-events: none;
}

.mobile-menu-close svg {
  color: var(--primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

.mobile-menu-close:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
  transform: scale(1.05) rotate(0deg);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.mobile-menu-close:hover svg {
  color: white;
  transform: rotate(90deg);
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.8));
}

.mobile-menu-close:active {
  transform: scale(0.95) rotate(0deg);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.6);
}

/* Show close button when mobile menu is active */
.nav-menu.active .mobile-menu-close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  pointer-events: all;
  animation: closeButtonFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes closeButtonFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(90deg);
  }
  50% {
    transform: scale(1.1) rotate(45deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Responsive adjustments for very small screens */
@media screen and (max-width: 480px) {
  .mobile-menu-close {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }

  .mobile-menu-close svg {
    width: 20px;
    height: 20px;
  }
}

/* Additional visual enhancement */
@media (prefers-reduced-motion: no-preference) {
  .mobile-menu-close:hover {
    animation: pulseGlow 2s infinite;
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
  }
  50% {
    box-shadow: 0 8px 35px rgba(139, 92, 246, 0.6);
  }
}

/* Mobile dropdown adjustments */
@media screen and (max-width: 768px) {
  .mobile-nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #0c0c0d 0%, #1a1a1b 50%, #2d2d30 100%);
    padding: 0;
    transition: left 0.3s ease;
    border-right: 2px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    z-index: 1002; /* Increased z-index to ensure it's above other elements */
    overflow-y: auto; /* Allow vertical scrolling if content is too tall */
    overflow-x: hidden; /* Hide horizontal overflow */
  }

  /* Enhanced mobile close button positioning in mobile view */
  .nav-menu .mobile-menu-close {
    display: flex;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto; /* Changed from 100% to auto to allow content to expand */
    padding: 70px 0 10px 0; /* Added top padding to avoid close button overlap */
    min-height: calc(100vh - 60px); /* Ensure minimum height but allow expansion */
  }

  .nav-item {
    width: 90%;
    margin: 8px 0;
    padding: 15px 20px;
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
  }

  .nav-item:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
  }

  .nav-item.active {
    background: var(--gradient-2);
    border: 1px solid rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
  }

  .nav-item a {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    display: block;
    padding: 0;
  }

  .nav-item.active a {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  }

  .dropdown-content {
    position: static;
    min-width: 100%;
    width: 100%;
    background: rgba(45, 45, 48, 0.95);
    border-radius: 8px;
    margin-top: 10px;
    padding: 15px;
    box-shadow: inset 0 0 15px rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    transform: none;
    opacity: 1;
    pointer-events: all;
    display: none;
    max-height: none; /* Remove any height constraints */
  }

  .dropdown.active .dropdown-content {
    display: block;
    animation: slideDown 0.3s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .dropdown-column {
    flex-basis: 100%;
    margin-bottom: 15px;
    padding: 12px;
    background-color: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
  }

  .dropdown-column h3 {
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 8px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  .dropdown-column a {
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: block; /* Ensure links are displayed properly */
    margin-bottom: 4px; /* Add spacing between links */
  }

  .dropdown-column a:hover {
    background: rgba(139, 92, 246, 0.2);
    color: white;
    transform: translateX(3px);
  }

  /* Set minimum gap between columns on mobile */
  .dropdown-column + .dropdown-column {
    margin-top: 10px;
  }

  /* Mobile watchlist button styling */
  .mobile-watchlist {
    margin-top: 20px;
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    padding-top: 20px;
  }

  .mobile-watchlist a {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: 12px;
    padding: 15px 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
  }

  .mobile-watchlist a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, #a855f7 0%, #f472b6 100%);
  }

  .mobile-watchlist svg {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
  }

  /* Mobile overlay */
  .mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001; /* Ensure overlay is below nav menu but above other content */
    backdrop-filter: blur(5px);
  }

  .mobile-nav-overlay.active {
    display: block;
  }
}
