/* ========================================
   ESHAN'S LEARNING GAME - CORE DESIGN SYSTEM
   Futuristic Arcade Style
   ======================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Press+Start+2P&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */
:root {
  /* Neon Cyberpunk Colors */
  --neon-cyan: #00ffff;
  --neon-magenta: #ff00ff;
  --neon-purple: #8a2be2;
  --neon-green: #39ff14;
  --neon-blue: #00bfff;
  --neon-orange: #ff6600;
  --neon-pink: #ff1493;

  /* Dark Theme */
  --dark-bg: #050510;
  --dark-bg-secondary: #0a0a1a;
  --dark-bg-tertiary: #0f0f20;

  /* Glass Effects */
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);

  /* Typography */
  --font-primary: 'Orbitron', sans-serif;
  --font-arcade: 'Press Start 2P', cursive;
  --font-body: 'Poppins', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;

  /* Shadows */
  --shadow-glow-cyan: 0 0 20px rgba(0, 255, 255, 0.5);
  --shadow-glow-magenta: 0 0 20px rgba(255, 0, 255, 0.5);
  --shadow-glow-purple: 0 0 20px rgba(138, 43, 226, 0.5);
  --shadow-glow-green: 0 0 20px rgba(57, 255, 20, 0.5);
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: #050510;
}

body {
  font-family: var(--font-body);
  background: transparent;
  color: #ffffff;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
      #050510 0%,
      #0a0a1a 25%,
      #1a0a2e 50%,
      #0a0a1a 75%,
      #050510 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: -2;
} */

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* ========================================
   ANIMATED SPACE BACKGROUND
   ======================================== */
/* .space-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(138, 43, 226, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0, 191, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 0, 255, 0.12) 0%, transparent 50%),
    linear-gradient(135deg, #050510 0%, #0a0a1a 50%, #0f0f20 100%);
  background-size: 200% 200%, 200% 200%, 200% 200%, 100% 100%;
  animation: nebulaDrift 30s ease-in-out infinite;
  overflow: hidden;
}

@keyframes nebulaDrift {

  0%,
  100% {
    background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%;
  }

  33% {
    background-position: 100% 0%, 0% 100%, 25% 75%, 0% 0%;
  }

  66% {
    background-position: 100% 100%, 0% 0%, 75% 25%, 0% 0%;
  }
} */

.stars {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20% 30%, white, transparent),
    radial-gradient(2px 2px at 60% 70%, white, transparent),
    radial-gradient(1px 1px at 50% 50%, white, transparent),
    radial-gradient(1px 1px at 80% 10%, white, transparent),
    radial-gradient(2px 2px at 90% 60%, white, transparent),
    radial-gradient(1px 1px at 33% 80%, white, transparent),
    radial-gradient(1px 1px at 15% 90%, white, transparent),
    radial-gradient(1px 1px at 70% 40%, rgba(0, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 40% 60%, rgba(255, 0, 255, 0.8), transparent);
  background-size: 200% 200%;
  background-position: 0% 0%;
  animation: starsMove 60s linear infinite;
  opacity: 0.7;
}

@keyframes starsMove {
  0% {
    background-position: 0% 0%;
    opacity: 0.6;
  }

  50% {
    background-position: 100% 100%;
    opacity: 0.9;
  }

  100% {
    background-position: 0% 0%;
    opacity: 0.6;
  }
}

.grid-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
  opacity: 0.3;
}

.gradient-orbs {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 15s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--neon-cyan);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: var(--neon-magenta);
  top: 60%;
  right: 10%;
  animation-delay: 3s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: var(--neon-purple);
  bottom: 10%;
  left: 50%;
  animation-delay: 6s;
}

.orb-4 {
  width: 280px;
  height: 280px;
  background: var(--neon-green);
  top: 40%;
  right: 30%;
  animation-delay: 9s;
}

/* ========================================
   MAIN CONTAINER
   ======================================== */
#game-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  z-index: 10;
  /* Ensure it is above the background canvas */
}

.screen {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.screen.active {
  opacity: 1;
  transform: scale(1);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
}

.title-main {
  font-family: var(--font-arcade);
  font-size: clamp(2rem, 5vw, 4rem);
  text-align: center;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
  animation: textGlow 2s ease-in-out infinite alternate;
  margin-bottom: var(--spacing-lg);
}

.title-screen {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
  color: var(--neon-cyan);
  text-shadow:
    0 0 5px rgba(0, 255, 255, 0.8),
    0 0 10px rgba(0, 255, 255, 0.5),
    0 0 15px rgba(0, 255, 255, 0.3);
  margin-bottom: var(--spacing-md);
  opacity: 1;
  font-weight: 700;
  letter-spacing: 3px;
  animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {

  0%,
  100% {
    text-shadow:
      0 0 10px rgba(0, 255, 255, 0.8),
      0 0 20px rgba(0, 255, 255, 0.6),
      0 0 30px rgba(0, 255, 255, 0.4);
  }

  50% {
    text-shadow:
      0 0 20px rgba(0, 255, 255, 1),
      0 0 30px rgba(0, 255, 255, 0.8),
      0 0 40px rgba(0, 255, 255, 0.6),
      0 0 50px rgba(0, 255, 255, 0.4);
  }
}

.subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--spacing-lg);
}

/* ========================================
   GLASSMORPHISM UTILITIES
   ======================================== */
.glass-panel {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: var(--spacing-lg);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 20px rgba(0, 255, 255, 0.1);
  position: relative;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(0, 255, 255, 0.5),
      transparent);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-5px);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }

  #game-container {
    padding: var(--spacing-sm);
  }

  .glass-panel {
    padding: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 12px;
  }

  .title-arcade {
    font-size: 0.7rem;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: var(--spacing-xs);
}

.mt-2 {
  margin-top: var(--spacing-sm);
}

.mt-3 {
  margin-top: var(--spacing-md);
}

.mt-4 {
  margin-top: var(--spacing-lg);
}

.mb-1 {
  margin-bottom: var(--spacing-xs);
}

.mb-2 {
  margin-bottom: var(--spacing-sm);
}

.mb-3 {
  margin-bottom: var(--spacing-md);
}

.mb-4 {
  margin-bottom: var(--spacing-lg);
}

.hidden {
  display: none !important;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-column {
  display: flex;
  flex-direction: column;
}