
/* AI Upgrade Shared Styles - LIGHT THEME FOCUS */

:root {
  --accent-color-rgb: 79, 70, 229;
  --accent-secondary-rgb: 139, 92, 246;
  --bg-light-nebula: #f8faff;
  --card-glass-light: rgba(255, 255, 255, 0.7);
}

/* Nebula Background - Light Mode */
.nebula-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background-color: var(--bg-light-nebula);
}

.nebula-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(rgba(79, 70, 229, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(79, 70, 229, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 70, 229, 0.03) 1px, transparent 1px);
  background-size: 40px 40px, 100px 100px, 100px 100px;
  opacity: 0.5;
}

.glow-point {
  position: absolute;
  width: 70vw;
  height: 70vw;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.4;
  animation: nebula-move 25s infinite alternate ease-in-out;
}

.glow-1 {
  background: radial-gradient(circle, rgba(124, 156, 255, 0.3) 0%, transparent 70%);
  top: -15%;
  left: -10%;
}

.glow-2 {
  background: radial-gradient(circle, rgba(196, 181, 253, 0.3) 0%, transparent 70%);
  bottom: -15%;
  right: -10%;
  animation-delay: -5s;
}

/* Floating Particles - Light Theme */
.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(79, 70, 229, 0.2);
  border-radius: 50%;
  opacity: 0.5;
  box-shadow: 0 0 8px rgba(79, 70, 229, 0.3);
  animation: particle-float var(--duration) infinite ease-in-out;
}

@keyframes particle-float {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-80px) translateX(40px) scale(1.4); opacity: 0.7; }
}

@keyframes nebula-move {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { transform: translate(3%, 3%) rotate(3deg) scale(1.05); }
}

/* Cyber Glow Cards - Light Glassmorphism */
.cyber-card {
  position: relative;
  overflow: hidden;
  background: var(--card-glass-light) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) !important;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.05) !important;
}

.cyber-card::before {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(var(--accent-color-rgb), 0.1),
    transparent
  );
  pointer-events: none;
  z-index: 2;
}

.cyber-card:hover::before {
  animation: scan-line 3s linear infinite;
}

.cyber-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
              rgba(var(--accent-color-rgb), 0.08) 0%, 
              transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 1;
}

.cyber-card:hover::after {
  opacity: 1;
}

@keyframes scan-line {
  0% { top: -100%; }
  100% { top: 100%; }
}

/* AI Glow Text Utility - Light Theme */
.ai-glow-text {
  color: #1a1f26 !important;
  text-shadow: 0 0 15px rgba(var(--accent-color-rgb), 0.15);
  animation: text-pulse-light 3s infinite alternate;
}

@keyframes text-pulse-light {
  0% { text-shadow: 0 0 10px rgba(var(--accent-color-rgb), 0.1); }
  100% { text-shadow: 0 0 20px rgba(var(--accent-color-rgb), 0.3); }
}

.cyber-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(var(--accent-color-rgb), 0.3) !important;
  box-shadow: 0 12px 40px rgba(var(--accent-color-rgb), 0.12) !important;
}

/* --- MOBILE & TABLET OPTIMIZATIONS --- */
@media (max-width: 1199px) {
  /* Prevent ANY clipping or stacking context traps in the header area */
  header, #header, .header, .header-container {
    overflow: visible !important;
    z-index: 99999 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
  }

  .mobile-nav-active #header {
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
  }

  /* Force the navigation drawer to be the top-most layer on the screen */
  .navmenu {
    position: static !important;
  }

  .mobile-nav-active .navmenu {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(30px) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .mobile-nav-active .navmenu > ul {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    width: 85% !important;
    max-height: 80vh !important;
    border-radius: 24px !important;
    padding: 30px 10px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15) !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    position: relative !important;
    inset: auto !important;
    margin: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .mobile-nav-active .navmenu a {
    color: #0f172a !important; /* Dark slate */
    font-size: 20px !important;
    font-weight: 700 !important;
    padding: 18px 25px !important;
    text-align: center !important;
    width: 100% !important;
    justify-content: center !important;
    border-bottom: 1px solid rgba(0,0,0,0.03) !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .mobile-nav-active .navmenu a:last-child {
    border-bottom: none !important;
  }

  .mobile-nav-toggle {
    z-index: 1000000 !important;
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    color: #0f172a !important;
    background: #ffffff !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
    cursor: pointer !important;
  }

  .theme-toggle {
    z-index: 1000000 !important;
    position: fixed !important;
    top: 20px !important;
    right: 80px !important;
    background: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
  }

  /* Scaled down UI for mobile */
  .ai-glow-text {
    font-size: 2.2rem !important;
  }
  
  .cyber-card {
    padding: 20px !important;
  }
}

/* Force Light Theme for these elements */
body:not(.dark-mode) {
  color: #334155;
}
