@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Orbitron:wght@400;500;600;700&display=swap');

/* Base Styles */
:root {
  --primary: #6c5ce7;
  --secondary: #00cec9;
  --accent: #fd79a8;
  --dark: #2d3436;
  --light: #f5f6fa;
  --neon-glow: 0 0 10px rgba(108, 92, 231, 0.8);
  --font-main: 'Rajdhani', 'Orbitron', sans-serif;
  --font-legal: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
  --font-heading: 'Orbitron', sans-serif;
  --header-height: 90px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--dark);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(108, 92, 231, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(0, 206, 201, 0.1) 0%, transparent 50%);
}

/* Header Styles */
.header {
  background: rgba(45, 52, 54, 0.9);
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  z-index: 1001; /* Higher z-index to ensure header is above content */
  border-bottom: 1px solid rgba(108, 92, 231, 0.3);
  box-shadow: var(--neon-glow);
  transition: background 0.4s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

/* Animated neon bar under header */
.header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--primary), var(--accent), var(--secondary));
  background-size: 200% 100%;
  animation: headerBar 5s linear infinite;
}

@keyframes headerBar {
  0% { background-position: 0 0; }
  100% { background-position: -200% 0; }
}

/* Shrink on scroll */
.header.scrolled {
  background: rgba(45, 52, 54, 0.95);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 15px rgba(108, 92, 231, 0.4);
}

.header.scrolled .nav {
  padding: 0.75rem 2rem;
}

/* Logo container */
.logo {
  font-family: 'Orbitron', 'Rajdhani', sans-serif !important;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--light);
  text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: 0.03em;
}

/* Glow animation for header logo */
.header-logo {
  height: 48px;
  width: auto;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.4), 0 0 0 2px rgba(108, 92, 231, 0.15) inset;
  animation: logoGlow 6s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(108,92,231,0.35), 0 0 0 2px rgba(108,92,231,0.12) inset; }
  50% { box-shadow: 0 0 16px rgba(0,206,201,0.55), 0 0 0 2px rgba(0,206,201,0.2) inset; }
}

@media (min-width: 992px) {
  .header-logo { height: 64px; }
}

/* Nav */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  font-family: 'Orbitron', 'Rajdhani', sans-serif !important;
  color: var(--light);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  position: relative;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

/* animated underline */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  background-size: 200% 100%;
  transition: width 0.35s ease;
}

.nav-links a:hover {
  color: var(--secondary);
  text-shadow: 0 0 6px var(--secondary), 0 0 16px rgba(0, 206, 201, 0.4);
  transform: translateY(-1px);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Login Button Styles */
.login-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 25px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

/* Profile Dropdown Styles */
.profile-dropdown {
  position: relative;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.profile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(45, 52, 54, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 12px;
  padding: 0.5rem 0;
  min-width: 220px;
  max-height: 400px;
  height: auto !important;
  box-sizing: border-box;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
  margin-top: 0.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  /* Desktop scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(108, 92, 231, 0.5) transparent;
}

.profile-menu::-webkit-scrollbar {
  width: 6px;
}

.profile-menu::-webkit-scrollbar-track {
  background: transparent;
}

.profile-menu::-webkit-scrollbar-thumb {
  background: rgba(108, 92, 231, 0.5);
  border-radius: 3px;
}

.profile-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(108, 92, 231, 0.7);
}

.profile-dropdown:hover .profile-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-menu li {
  list-style: none;
}

.profile-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--light);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-family: 'Orbitron', sans-serif;
  border-radius: 8px;
  margin: 0 0.5rem;
  min-height: 40px;
  box-sizing: border-box;
}

.profile-menu a:hover {
  background: rgba(108, 92, 231, 0.2);
  color: var(--secondary);
  transform: translateX(5px);
}

.menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.3), transparent);
  margin: 0.5rem 1rem;
  box-sizing: border-box;
  flex-shrink: 0;
}



/* Mobile Profile Menu */
@media (max-width: 768px) {
  /* Mobile Popup Selection Menu */
  .mobile-popup-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 350px;
    background: rgba(45, 52, 54, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(108, 92, 231, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
  }
  
  .mobile-popup-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
  }
  
  .mobile-popup-menu .popup-header {
    padding: 1.5rem 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(108, 92, 231, 0.2);
    position: relative;
  }
  
  .mobile-popup-menu .popup-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: var(--secondary);
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 206, 201, 0.3);
  }
  
  .mobile-popup-menu .popup-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 1px;
  }
  
  .mobile-popup-menu .popup-content {
    padding: 1rem 0;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .mobile-popup-menu .popup-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    color: var(--light);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0;
    margin: 0;
    position: relative;
    overflow: hidden;
  }
  
  .mobile-popup-menu .popup-item:active {
    background: rgba(108, 92, 231, 0.2);
    transform: scale(0.98);
  }
  
  .mobile-popup-menu .popup-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.1), transparent);
    transition: left 0.3s ease;
  }
  
  .mobile-popup-menu .popup-item:active::before {
    left: 100%;
  }
  
  .mobile-popup-menu .popup-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.3), transparent);
    margin: 0.5rem 1.5rem;
  }
  
  .mobile-popup-menu .popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(108, 92, 231, 0.2);
    border-radius: 50%;
    color: var(--light);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mobile-popup-menu .popup-close:hover {
    background: rgba(108, 92, 231, 0.3);
    transform: scale(1.1);
  }
  
  /* Popup overlay */
  .mobile-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-popup-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  
  /* Mobile popup animations */
  .mobile-popup-menu .popup-item {
    animation: slideInUp 0.3s ease forwards;
    opacity: 0;
    transform: translateY(20px);
  }
  
  .mobile-popup-menu .popup-item:nth-child(1) { animation-delay: 0.1s; }
  .mobile-popup-menu .popup-item:nth-child(2) { animation-delay: 0.15s; }
  .mobile-popup-menu .popup-item:nth-child(3) { animation-delay: 0.2s; }
  .mobile-popup-menu .popup-item:nth-child(4) { animation-delay: 0.25s; }
  .mobile-popup-menu .popup-item:nth-child(5) { animation-delay: 0.3s; }
  .mobile-popup-menu .popup-item:nth-child(6) { animation-delay: 0.35s; }
  
  @keyframes slideInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .profile-menu {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 70vh;
    border-radius: 20px 20px 0 0;
    margin-top: 0;
    transform: translateY(100%);
    border: none;
    border-top: 1px solid rgba(108, 92, 231, 0.3);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    background: rgba(45, 52, 54, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* Override desktop scroll for mobile */
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .profile-menu::-webkit-scrollbar {
    display: none;
  }
  

  
  .profile-dropdown:hover .profile-menu {
    transform: translateY(0);
  }
  
  .profile-menu a {
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
    margin: 0 1rem;
    touch-action: manipulation;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
  }
  
  .profile-menu a:active {
    background: rgba(108, 92, 231, 0.3);
    transform: scale(0.98);
  }
  
  .profile-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.1), transparent);
    transition: left 0.3s ease;
  }
  
  .profile-menu a:active::before {
    left: 100%;
  }
  
  .menu-divider {
    margin: 1rem 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.4), transparent);
  }
  
  /* Touch-friendly mobile interactions */
  .profile-dropdown:active .profile-menu,
  .profile-dropdown:focus .profile-menu {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  /* Mobile overlay for profile menu */
  .profile-menu::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
    backdrop-filter: blur(4px);
  }
  
  /* Mobile drag indicator */
  .profile-menu::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.4), 0 0 15px rgba(0, 206, 201, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
  }
  
  @keyframes glow {
    from {
      box-shadow: 0 2px 8px rgba(108, 92, 231, 0.4), 0 0 15px rgba(0, 206, 201, 0.3);
    }
    to {
      box-shadow: 0 2px 12px rgba(108, 92, 231, 0.6), 0 0 20px rgba(0, 206, 201, 0.5);
    }
  }
  
  /* Mobile menu animations */
  .profile-menu.show {
    transform: translateY(0);
  }
  
  .profile-menu.hide {
    transform: translateY(100%);
  }
  
  /* Mobile menu header */
  .profile-menu .mobile-header {
    padding: 1.5rem 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(108, 92, 231, 0.2);
    margin-bottom: 0.5rem;
    position: relative;
  }
  
  .profile-menu .mobile-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 1px;
  }
  
  .profile-menu .mobile-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--secondary);
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 206, 201, 0.3);
  }
  
  .profile-dropdown:hover .profile-menu {
    transform: translateY(0);
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .profile-dropdown:hover .profile-menu {
    opacity: 0;
    visibility: hidden;
  }
  
  .profile-dropdown:active .profile-menu,
  .profile-dropdown:focus .profile-menu {
    opacity: 1;
    visibility: visible;
  }
  
  /* Touch-friendly button sizes */
  .profile-btn,
  .login-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .profile-menu a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  
  /* Mobile pop up animation */
  .profile-menu {
    animation: slideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Override desktop scroll for touch devices */
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .profile-menu::-webkit-scrollbar {
    display: none;
  }
  
  @keyframes slideUp {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  /* Mobile menu items animation */
  .profile-menu li {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
    transform: translateY(20px);
  }
  
  .profile-menu li:nth-child(1) { animation-delay: 0.1s; }
  .profile-menu li:nth-child(2) { animation-delay: 0.15s; }
  .profile-menu li:nth-child(3) { animation-delay: 0.2s; }
  .profile-menu li:nth-child(4) { animation-delay: 0.25s; }
  .profile-menu li:nth-child(5) { animation-delay: 0.3s; }
  .profile-menu li:nth-child(6) { animation-delay: 0.35s; }
  
  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .profile-menu,
  .nav-links a,
  .login-btn {
    transition: none;
  }
  
  .profile-menu {
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .profile-menu {
    border: 2px solid var(--light);
    background: var(--dark);
  }
  
  .profile-menu a:hover {
    background: var(--light);
    color: var(--dark);
  }
  
  .menu-divider {
    background: var(--light);
  }
}

.login-btn:hover {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
  text-shadow: none !important;
}

.login-btn::after {
  display: none;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--header-height) + 2rem) 2rem 2rem; /* Add top padding for header */
  background: 
    linear-gradient(135deg, rgba(45, 52, 54, 0.85) 0%, rgba(45, 52, 54, 0.75) 100%),
    url('../images/wallpaper.jpg') 50% center / cover no-repeat;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 0; /* Ensure hero section fits perfectly when scrolled to top */
  box-sizing: border-box; /* Ensure padding is included in height calculation */
}

/* Ensure hero content is properly centered */
.hero > * {
  margin-top: calc(-1 * var(--header-height) / 2); /* Compensate for header padding */
}

/* Ensure smooth scroll to home section */
html {
  scroll-padding-top: 0; /* Remove any default scroll padding */
}

.hero-logo {
  width: min(320px, 60vw);
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.4)) drop-shadow(0 0 12px rgba(108, 92, 231, 0.5));
  border-radius: 12px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="none" stroke="rgba(108, 92, 231, 0.1)" stroke-width="0.5"/></svg>');
  background-size: 50px 50px;
  opacity: 0.5;
  z-index: -1;
}

.hero h1 {
  font-family: 'Orbitron', 'Rajdhani', sans-serif !important;
  font-size: clamp(2.2rem, 4vw + 1rem, 4rem);
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero .title-emoji {
  font-size: 1em;
  filter: drop-shadow(0 0 6px rgba(108, 92, 231, 0.6));
}

.hero .title-text {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(108, 92, 231, 0.3);
  animation: pulse 2s infinite alternate;
}

.hero p {
  font-size: 1.5rem;
  max-width: 800px;
  margin-bottom: 3.5rem;
  color: rgba(245, 246, 250, 0.9);
}

@keyframes pulse {
  0% {
    text-shadow: 0 0 10px rgba(108, 92, 231, 0.3);
  }
  100% {
    text-shadow: 0 0 20px rgba(108, 92, 231, 0.6), 0 0 30px rgba(0, 206, 201, 0.4);
  }
}

/* Container & Sections */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

/* Apply Orbitron font to headings and prominent text */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Orbitron', 'Courier New', monospace !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.section-title {
  font-family: 'Orbitron', 'Courier New', monospace !important;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--primary), var(--secondary), transparent);
  border-radius: 3px;
}

/* Games Grid */
.games-section {
  background:
    linear-gradient(135deg, rgba(45, 52, 54, 0.85) 0%, rgba(45, 52, 54, 0.75) 100%),
    url('../images/wallpaper2.jpg') 50% 100% / cover no-repeat;
  border-radius: 0;
  padding: calc(var(--header-height) + 3rem) 2rem 1rem; /* Increased top padding for better scroll positioning */
  margin: 0;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.games-section .section-title {
  /* override global centering approach for cleaner layout */
  position: static;
  transform: none;
  display: block;
  margin: 0 auto 2rem;
  padding-top: 1rem; /* Extra padding at top for better visual spacing */
}

.games-section .section-title,
.games-section .games-grid {
  max-width: 1200px;
  width: 100%;
}

.games-section .games-grid { margin: 0 auto; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 0 0 2rem;
}

/* Section Separator */
.section-separator {
  height: clamp(220px, 45vh, 560px);
  margin: 4rem 0;
  position: relative;
  background: transparent;
  border: none;
}

.section-separator::before { display: none; }

/* Refine spacing for features section to feel distinct */
#games { 
  scroll-margin-top: 160px; /* Increased for better positioning */
  scroll-behavior: smooth;
  scroll-padding-top: 20px; /* Additional padding for scroll positioning */
}

#home {
  scroll-margin-top: 0; /* Ensure home section fits perfectly at top */
  scroll-behavior: smooth;
}

/* Ensure smooth scrolling for all anchor links */
html {
  scroll-behavior: smooth;
}

.game-card {
  background: rgba(45, 52, 54, 0.7);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(108, 92, 231, 0.2);
  backdrop-filter: blur(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(108, 92, 231, 0) 0%,
    rgba(108, 92, 231, 0.1) 50%,
    rgba(108, 92, 231, 0) 100%
  );
  transform: rotate(30deg);
  transition: all 0.5s ease;
  opacity: 0;
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), 0 0 15px rgba(108, 92, 231, 0.3);
  border-color: var(--primary);
}

.game-card:hover::before {
  animation: shine 1.5s;
}

@keyframes shine {
  0% {
    opacity: 0;
    left: -50%;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    left: 150%;
  }
}

.game-icon {
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.game-card:hover .game-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
}

.game-card h3 {
  font-family: 'Orbitron', 'Rajdhani', sans-serif !important;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--light);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.game-card p {
  color: rgba(245, 246, 250, 0.7);
}

/* Features Section */
.features {
  margin-top: 5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature {
  background: rgba(45, 52, 54, 0.7);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 206, 201, 0.2);
  backdrop-filter: blur(5px);
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 10px rgba(0, 206, 201, 0.3);
  border-color: var(--secondary);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--secondary);
  transition: all 0.3s ease;
}

.feature:hover .feature-icon {
  transform: scale(1.1);
  text-shadow: 0 0 10px var(--secondary);
}

.feature h3 {
  font-family: 'Orbitron', 'Rajdhani', sans-serif !important;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--light);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.feature p {
  color: rgba(245, 246, 250, 0.7);
}

/* Footer */
.footer {
  background: rgba(45, 52, 54, 0.95);
  padding: 2.5rem 0 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(108, 92, 231, 0.3);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="none" stroke="rgba(108, 92, 231, 0.05)" stroke-width="0.5"/></svg>');
  background-size: 30px 30px;
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}

.footer h3 {
  display: none;
}

.footer p {
  color: rgba(245, 246, 250, 0.7);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.footer-logo {
  height: 64px;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.4), 0 0 0 2px rgba(108, 92, 231, 0.15) inset;
  margin-bottom: 1rem;
}

.footer-brand:hover .footer-logo {
  filter: brightness(1.08);
}

/* Legal Pages */
.legal-section {
  padding: calc(var(--header-height) + 2rem) 0 4rem;
  min-height: calc(100vh - var(--header-height));
  background: rgba(45, 52, 54, 0.6);
  border-top: 1px solid rgba(108, 92, 231, 0.25);
  border-bottom: 1px solid rgba(108, 92, 231, 0.25);
}

.legal-content {
  background: rgba(45, 52, 54, 0.55);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  line-height: 1.9;
  font-family: var(--font-legal);
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  max-width: 880px;
  margin: 0 auto;
}

.legal-content p,
.legal-content li {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

.legal-content ul {
  margin: 1rem 0 1rem 1.25rem;
}

.legal-content li { margin: 0.5rem 0; }

/* Legal page titles use readable stack too */
.legal-section .section-title {
  font-family: var(--font-legal);
  letter-spacing: 0.01em;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}

.footer-heading {
  font-family: 'Orbitron', 'Rajdhani', sans-serif !important;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}
.footer-list { list-style: none; padding: 0; }
.footer-list li { margin: 0.35rem 0; }
.footer-list a { color: rgba(245,246,250,0.85); text-decoration: none; }
.footer-list a:hover { color: var(--accent); }
.footer-inline { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

.badges-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.35rem 0; }
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(245,246,250,0.35);
  border-radius: 6px;
  font-size: 0.85rem;
  color: rgba(245,246,250,0.85);
}
.badge-secure { border-color: var(--secondary); color: var(--secondary); }

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-brand-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-text { line-height: 1.25; }
.footer-title {
  font-family: 'Orbitron', 'Rajdhani', sans-serif !important;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}
.footer-desc {
  font-size: 0.95rem;
  color: rgba(245, 246, 250, 0.75);
}

@media (max-width: 640px) {
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-logo { height: 56px; margin-bottom: 0; }
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.social-links a {
  color: var(--light);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: var(--accent);
  transform: translateY(-3px);
  text-shadow: 0 0 10px var(--accent);
}

.footer .container > p {
  font-size: 0.9rem;
  color: rgba(245, 246, 250, 0.5);
}

/* CTA Button */
.cta-btn {
  font-family: 'Orbitron', 'Rajdhani', sans-serif !important;
  display: inline-block;
  padding: 1rem 2.5rem;
  background: rgba(108, 92, 231, 0.1);
  backdrop-filter: blur(10px);
  color: var(--light);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(108, 92, 231, 0.3);
  cursor: pointer;
  letter-spacing: 0.02em;
}

.card-btn {
  font-family: 'Orbitron', 'Rajdhani', sans-serif !important;
  margin-top: 0.75rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  box-shadow: 0 3px 10px rgba(108, 92, 231, 0.25);
  letter-spacing: 0.02em;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(108, 92, 231, 0.4);
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.2);
}

.cta-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: 0.5s;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    padding: 1rem;
    position: relative;
  }
  
  .nav-links {
    margin-top: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    overflow: hidden;
    padding: 0.5rem;
  }
  
  .nav-links li {
    margin: 0.25rem;
    flex-shrink: 0;
  }
  
  .nav-links a {
    white-space: nowrap;
    min-width: fit-content;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .games-grid, .features-grid {
    grid-template-columns: 1fr;
  }
  
  /* Mobile Header Adjustments */
  .header {
    padding: 0.5rem 0;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }
  
  .header-logo {
    height: 40px;
  }
  
  .logo {
    font-size: 1.4rem;
  }
  
  .login-btn {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.9rem;
  }
  
  /* Mobile Navigation - Override desktop scroll */
  .profile-menu {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-height: 70vh;
  }
  
  .profile-menu::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 0.75rem;
  }
  
  .nav-links {
    gap: 0.75rem;
  }
  
  .nav-links a {
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .header-logo {
    height: 36px;
  }
  
  .logo {
    font-size: 1.2rem;
  }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav {
    padding: 1.25rem 1.5rem;
  }
  
  .nav-links {
    gap: 1.5rem;
  }
  
  .profile-menu {
    min-width: 200px;
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(108, 92, 231, 0.5) transparent;
  }
  
  .profile-menu::-webkit-scrollbar {
    width: 6px;
  }
  
  .profile-menu::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .profile-menu::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.5);
    border-radius: 3px;
  }
  
  .profile-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 92, 231, 0.7);
  }
  
  .profile-menu a {
    padding: 0.8rem 1.2rem;
  }
}

/* Mobile Landscape */
@media (max-height: 500px) and (orientation: landscape) {
  .header {
    padding: 0.25rem 0;
  }
  
  .header-logo {
    height: 32px;
  }
  
  .logo {
    font-size: 1.1rem;
  }
  
  .nav {
    padding: 0.5rem 1rem;
  }
  
  .nav-links {
    margin-top: 0.5rem;
    gap: 0.75rem;
  }
  
  .profile-menu {
    max-height: 50vh;
    border-radius: 15px 15px 0 0;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .profile-menu::-webkit-scrollbar {
    display: none;
  }
  
  .profile-menu a {
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
  }
  
  .profile-menu .mobile-header {
    padding: 1rem 1.5rem 0.5rem;
  }
  
  .profile-menu .mobile-header h3 {
    font-size: 1rem;
  }
}

/* Small Mobile Devices */
@media (max-width: 360px) {
  .profile-menu {
    max-height: 80vh;
    border-radius: 15px 15px 0 0;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .profile-menu::-webkit-scrollbar {
    display: none;
  }
  
  .profile-menu a {
    padding: 1rem 1.2rem;
    font-size: 1rem;
    margin: 0 0.8rem;
  }
  
  .menu-divider {
    margin: 0.8rem 1.2rem;
  }
  
  .profile-menu .mobile-header {
    padding: 1.2rem 1.2rem 0.8rem;
  }
  
  .profile-menu .mobile-header h3 {
    font-size: 1.1rem;
  }
}

/* Extra Small Mobile Devices */
@media (max-width: 320px) {
  .profile-menu {
    max-height: 85vh;
    border-radius: 12px 12px 0 0;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .profile-menu::-webkit-scrollbar {
    display: none;
  }
  
  .profile-menu a {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    margin: 0 0.6rem;
  }
  
  .menu-divider {
    margin: 0.7rem 1rem;
  }
  
  .profile-menu .mobile-header {
    padding: 1rem 1rem 0.6rem;
  }
  
  .profile-menu .mobile-header h3 {
    font-size: 1rem;
  }
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Particle Background Effect (optional - can be enhanced with JS) */
.particle {
  position: absolute;
  background: rgba(108, 92, 231, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--light);
}

.brand-link:hover {
  filter: brightness(1.08);
}

/* Force Orbitron font for all important elements */
.logo,
.nav-links a,
.cta-btn,
.card-btn,
.game-card h3,
.feature h3,
.footer-heading,
.footer-title,
.hero h1,
.region-code,
.back-btn,
.region-btn,
.order-btn,
.products-table th,
.form-group label {
  font-family: 'Orbitron', 'Courier New', monospace !important;
}

/* Additional font loading optimization */
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/orbitron/v31/yMJMMIlzdpvBhQQL_SC3X9yhF25-T1nyGy6BoWgz.woff2') format('woff2');
}

@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/orbitron/v31/yMJMMIlzdpvBhQQL_SC3X9yhF25-T1nyGy6BoWgz.woff2') format('woff2');
}

@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/orbitron/v31/yMJMMIlzdpvBhQQL_SC3X9yhF25-T1nyGy6BoWgz.woff2') format('woff2');
}

/* Burger Menu Styles (Mobile Only) */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.burger-line {
  width: 100%;
  height: 3px;
  background: var(--light);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.burger-menu.active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Overlay - FIXED for separated files */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 9999; /* Higher z-index to appear above all content */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none; /* Disable clicks when hidden */
  display: none; /* Hide completely when not active */
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* Enable clicks when active */
  display: block; /* Show when active */
}

.mobile-nav-content {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: linear-gradient(135deg, #2d3436 0%, #1e2729 100%);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(108, 92, 231, 0.3);
  padding: 2rem;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  z-index: 10000;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
  display: none; /* Hide by default */
}

.mobile-nav-overlay.active .mobile-nav-content {
  transform: translateX(0);
  display: block; /* Show when overlay is active */
}

/* New Mobile Navigation Styles */
.mobile-nav {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(45, 52, 54, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(108, 92, 231, 0.3);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 80px;
  min-height: 80px;
  z-index: 1000;
  box-shadow: var(--neon-glow);
  margin: 0;
  transition: background 0.4s ease, padding 0.3s ease, box-shadow 0.3s ease;
}


.mobile-menu-btn {
  background: var(--primary);
  border: 2px solid var(--primary);
  color: var(--light);
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
  min-width: 50px;
  min-height: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1001;
}

.mobile-menu-btn:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.mobile-menu-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--light);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary);
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  position: relative;
  z-index: 1001;
  height: 50px;
  min-height: 50px;
}

.mobile-logo:hover {
  transform: translateY(-2px);
  text-shadow: 0 0 8px var(--primary), 0 0 15px var(--primary);
}

.mobile-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.mobile-logo:hover img {
  transform: scale(1.05);
}

.mobile-login-icon {
  background: var(--primary);
  border: 2px solid var(--primary);
  color: var(--light);
  padding: 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
  min-width: 50px;
  min-height: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1001;
}

.mobile-login-icon:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.mobile-login-icon:active {
  transform: translateY(-1px) scale(0.98);
}

.mobile-nav-header {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(108, 92, 231, 0.3);
  margin-bottom: 1rem;
}

.mobile-nav-header h3 {
  color: #f5f6fa;
  margin: 0;
  font-size: 1.2rem;
}

.mobile-close-btn {
  background: none;
  border: none;
  color: #f5f6fa;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.mobile-close-btn:hover {
  background: rgba(108, 92, 231, 0.2);
}

.mobile-profile-section {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(108, 92, 231, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(108, 92, 231, 0.2);
  display: block !important;
}

.mobile-profile-section h4 {
  color: #f5f6fa;
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-profile-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block !important;
}

.mobile-profile-links li {
  margin: 0.5rem 0;
  display: block !important;
}

.mobile-profile-links a {
  color: #f5f6fa;
  text-decoration: none;
  padding: 0.75rem;
  border-radius: 8px;
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.2);
  margin-bottom: 0.5rem;
}

.mobile-profile-links a:hover {
  background: rgba(108, 92, 231, 0.2);
  transform: translateX(5px);
}

.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block !important;
}

.mobile-nav-links li {
  margin: 0.5rem 0;
  display: block !important;
}

.mobile-nav-links a {
  color: #f5f6fa;
  text-decoration: none;
  padding: 1rem;
  border-radius: 8px;
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.2);
  margin-bottom: 0.5rem;
}

.mobile-nav-links a:hover {
  background: rgba(108, 92, 231, 0.2);
  transform: translateX(5px);
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--light);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.mobile-nav-links a:hover {
  background: rgba(108, 92, 231, 0.2);
  border-color: rgba(108, 92, 231, 0.4);
  color: var(--secondary);
  transform: translateX(5px);
}

.mobile-login-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: white !important;
  justify-content: center !important;
  margin-top: 1rem !important;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3) !important;
}

.mobile-back-btn {
  background: rgba(108, 92, 231, 0.1) !important;
  border-color: rgba(108, 92, 231, 0.3) !important;
  color: var(--primary) !important;
}

/* Mobile Profile Button */
.mobile-profile-btn {
  background: rgba(108, 92, 231, 0.1) !important;
  border-color: rgba(108, 92, 231, 0.3) !important;
  color: var(--primary) !important;
  justify-content: flex-start !important;
  cursor: pointer !important;
}

/* Mobile Profile Popup */
.mobile-profile-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1003;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-profile-popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.mobile-profile-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: linear-gradient(135deg, rgba(45, 52, 54, 0.95), rgba(30, 39, 41, 0.98));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  z-index: 1004;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: block !important;
}

.mobile-profile-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(108, 92, 231, 0.2);
  background: rgba(108, 92, 231, 0.1);
}

.popup-header h3 {
  color: var(--light);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.popup-close {
  background: none;
  border: none;
  color: var(--light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.popup-close:hover {
  background: rgba(108, 92, 231, 0.2);
  color: var(--primary);
}

.popup-content {
  padding: 1rem 0;
  max-height: 60vh;
  overflow-y: auto;
}

.popup-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  color: var(--light);
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(108, 92, 231, 0.1);
}

.popup-item:hover {
  background: rgba(108, 92, 231, 0.1);
  color: var(--primary);
  padding-left: 2.5rem;
}

.popup-item i {
  width: 20px;
  text-align: center;
  color: var(--primary);
}

.popup-divider {
  height: 1px;
  background: rgba(108, 92, 231, 0.2);
  margin: 0.5rem 2rem;
}

/* Mobile popup scrollbar */
.popup-content::-webkit-scrollbar {
  width: 6px;
}

.popup-content::-webkit-scrollbar-track {
  background: transparent;
}

.popup-content::-webkit-scrollbar-thumb {
  background: rgba(108, 92, 231, 0.5);
  border-radius: 3px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
  background: rgba(108, 92, 231, 0.7);
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
  .nav-links {
    display: none; /* Hide desktop navigation on mobile */
  }
  
  .burger-menu {
    display: flex; /* Show burger menu on mobile */
  }
}

@media (min-width: 769px) {
  .burger-menu {
    display: none; /* Hide burger menu on desktop */
  }
  
  .mobile-nav-overlay {
    display: none; /* Hide mobile overlay on desktop */
  }
  
  .mobile-nav {
    display: none; /* Hide mobile nav on desktop */
  }
  
  .desktop-nav {
    display: flex; /* Show desktop nav on desktop */
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
  }
  
  .desktop-nav .nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
  }
  
  .desktop-nav .nav-links li {
    margin: 0;
  }
  
  .desktop-nav .nav-links a {
    color: var(--light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
  }
  
  .desktop-nav .nav-links a:hover {
    background: rgba(108, 92, 231, 0.2);
    color: var(--primary);
  }
  
  .desktop-nav .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--light);
    text-decoration: none;
    font-family: 'Orbitron', 'Rajdhani', sans-serif !important;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary);
    letter-spacing: 0.03em;
  }
  
  .desktop-nav .logo img {
    height: 40px;
    width: auto;
    border-radius: 8px;
  }
  
  .desktop-nav .logo:hover {
    text-shadow: 0 0 8px var(--primary), 0 0 15px var(--primary);
  }
  
  .desktop-nav .profile-dropdown {
    position: relative;
  }
  
  .desktop-nav .profile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(45, 52, 54, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 12px;
    padding: 1rem 0;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
  }
  
  .desktop-nav .profile-dropdown:hover .profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .desktop-nav .profile-menu li {
    margin: 0;
  }
  
  .desktop-nav .profile-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: var(--light);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
  }
  
  .desktop-nav .profile-menu a:hover {
    background: rgba(108, 92, 231, 0.2);
    color: var(--primary);
  }
  
  .desktop-nav .menu-divider {
    height: 1px;
    background: rgba(108, 92, 231, 0.3);
    margin: 0.5rem 0;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .desktop-nav {
    display: none; /* Hide desktop nav on mobile */
  }
  
  .mobile-nav {
    display: flex; /* Show mobile nav on mobile */
    height: 80px;
    min-height: 80px;
  }
  
  .nav {
    height: 80px;
    min-height: 80px;
    padding: 0;
  }
  
  /* Ensure content doesn't overlap with mobile navigation */
  body {
    padding-top: 90px; /* Add padding to account for fixed header */
  }
  
  /* Make sure main content starts below header */
  .hero {
    margin-top: 0; /* Remove extra space */
    padding-top: 0.5rem; /* Minimal top padding for mobile */
  }
  
  /* Adjust hero content positioning for mobile */
  .hero > * {
    margin-top: -50px; /* Move content up more aggressively on mobile */
  }
  
  /* Specific adjustments for hero logo on mobile */
  .hero-logo {
    margin-bottom: 0.5rem; /* Reduce bottom margin */
  }
  
  /* Specific adjustments for hero text on mobile */
  .hero p {
    margin-bottom: 2rem; /* Reduce bottom margin */
  }
  
  /* Mobile hero section adjustments */
  .hero {
    min-height: calc(100vh - 100px); /* Reduce min-height for mobile */
    padding: 0.5rem 2rem 2rem; /* Minimal top padding */
  }
  
  /* Move hero content higher on mobile */
  .hero h1 {
    margin-top: -20px; /* Move title up */
  }
  
  .hero-logo {
    margin-top: -10px; /* Move logo up */
    margin-bottom: 0.5rem;
  }
  
  .hero p {
    margin-top: -10px; /* Move text up */
    margin-bottom: 2rem;
  }
  
  /* Move Shop Now button down a bit on mobile */
  .cta-btn {
    margin-top: 1rem; /* Add space above button */
  }
  
  /* Remove any extra spacing between header and hero content */
  .hero {
    margin-top: -10px; /* Pull hero section up */
    padding-top: 0; /* Remove all top padding */
  }
  
  /* Ensure hero content starts immediately after header */
  .hero > *:first-child {
    margin-top: 0; /* Remove top margin from first element */
  }
  
  /* Ensure all sections have proper spacing */
  section {
    position: relative;
    z-index: 1;
  }
  
  /* Fix any overlapping issues */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    min-height: 80px;
    z-index: 1000;
  }
  
  /* When mobile nav is open, prevent body scroll */
  body.mobile-nav-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
}