/* ===== MODERN EQ GAME STYLES ===== */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Unified Theme Variables */
  --bg-primary: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  --bg-secondary: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.1);
  --border-glass: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --accent-primary: #4f46e5;
  --accent-secondary: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --shadow-primary: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 50px rgba(79, 70, 229, 0.1);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Game Specific Colors */
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --blue-400: #60a5fa;
  --pink-400: #f472b6;
  --green-400: #4ade80;
  --text-muted: #94a3b8;
}

html, body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== UNIFIED NAVIGATION ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

.nav-logo img {
  height: 52px;
  width: auto;
  vertical-align: middle;
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-auth {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.current-game {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===== RESPONSIVE NAVIGATION ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .nav-content {
    justify-content: space-between;
  }
  
  .nav-logo {
    font-size: 1.2rem;
  }
  
  .current-game {
    font-size: 0.8rem;
  }
}

/* ===== OLD NAVIGATION (to be removed) ===== */
.game-nav {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

.nav-back {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 10px 15px;
  box-shadow: var(--shadow-primary);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

.nav-back:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* ===== VOLUME CONTROL ===== */
.volume-control {
  position: fixed;
  top: 80px;
  right: 20px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  padding: 10px 15px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-primary);
  z-index: 1000;
}

.volume-control label {
  font-size: 0.9rem;
  white-space: nowrap;
  color: var(--text-secondary);
}

.volume-control input[type="range"] {
  width: 80px;
  height: 4px;
  background: var(--purple-600);
  outline: none;
  border-radius: 2px;
  cursor: pointer;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--cyan-400);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

.volume-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--cyan-400);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

.volume-control span {
  font-size: 0.8rem;
  min-width: 35px;
  color: var(--text-muted);
}

/* ===== GAME WRAPPER ===== */
.game-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

/* ===== GAME CONTAINER ===== */
.game-container {
  width: 85%;
  max-width: 1000px;
  height: 80vh;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-primary), var(--shadow-glow);
  padding: 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: none;
  transform-origin: center;
  box-sizing: border-box;
}

/* Responsive scaling */
@media (max-width: 768px) {
  .game-container {
    width: 92%;
    height: 85vh;
    padding: 15px;
  }
  
  .volume-control {
    top: 10px;
    right: 10px;
    padding: 8px 12px;
  }
  
  .canvas-card {
    height: 280px;
  }
  
  #eq-canvas {
    height: 230px;
  }
}

@media (max-width: 480px) {
  .game-container {
    width: 95%;
    height: 90vh;
    padding: 12px;
  }
  
  .canvas-card {
    height: 250px;
  }
  
  #eq-canvas {
    height: 200px;
  }
}

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

/* ===== HEADER ===== */
.game-header {
  text-align: center;
  flex-shrink: 0;
}

.game-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan-400), var(--purple-500));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 1rem 0;
  text-shadow: 0 0 30px rgba(124, 58, 237, 0.5);
}

.game-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 0.5rem 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--cyan-400);
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
}

/* ===== CONTROLS SECTION ===== */
.controls-section {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ===== MODERN BUTTONS ===== */
.btn-modern {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 140px;
  justify-content: center;
}

.btn-modern::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: left 0.6s ease;
}

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

.btn-icon {
  font-size: 1.25rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  color: white;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.6);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-400));
  color: white;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.6);
}

.btn-action {
  background: linear-gradient(135deg, var(--green-400), #22c55e);
  color: white;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
  font-size: 1.125rem;
  padding: 1.25rem 2.5rem;
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.6);
}

.btn-next {
  background: linear-gradient(135deg, var(--blue-400), #3b82f6);
  color: white;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.6);
}

.btn-restart {
  background: linear-gradient(135deg, var(--pink-400), #ec4899);
  color: white;
  box-shadow: 0 4px 20px rgba(244, 114, 182, 0.4);
  font-size: 1.125rem;
}

.btn-restart:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(244, 114, 182, 0.6);
}

/* ===== CANVAS SECTION ===== */
.canvas-section {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.canvas-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  padding: 0.8rem;
  box-shadow: var(--shadow-primary);
  position: relative;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  height: 320px;
  max-width: 100%;
}

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

#eq-canvas {
  width: 100%;
  height: 280px;
  max-width: 100%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: block;
  /* Prevent any layout changes during interaction */
  box-sizing: border-box;
  position: static;
  margin: 0 auto;
}

#eq-canvas:hover {
  border-color: var(--cyan-400);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.3);
}

.eq-hover-display {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--cyan-400);
  font-weight: 500;
  min-height: 1.5rem;
  background: rgba(34, 211, 238, 0.1);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(34, 211, 238, 0.2);
  flex-shrink: 0;
}

/* ===== ACTION SECTION ===== */
.action-section {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ===== RESULT DISPLAY ===== */
.result-display {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  min-height: 1.5rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.modal-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-primary);
  max-width: 400px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.modal-header {
  padding: 2rem 2rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-body {
  padding: 2rem;
  text-align: center;
}

.final-score {
  font-size: 2rem;
  font-weight: 700;
  color: var(--cyan-400);
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
}

.final-message {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.modal-footer {
  padding: 0 2rem 2rem;
  display: flex;
  justify-content: center;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
  display: none !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .game-title {
    font-size: 1.75rem;
  }
  
  .game-stats {
    gap: 1.5rem;
  }
  
  .stat-value {
    font-size: 1.1rem;
  }
  
  .controls-section {
    gap: 0.75rem;
  }
  
  .btn-modern {
    min-width: 120px;
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
  }
  
  .canvas-card {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .game-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .game-stats {
    gap: 1rem;
  }
  
  .stat-value {
    font-size: 1rem;
  }
  
  .controls-section {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .btn-modern {
    width: 100%;
    max-width: 200px;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
  
  .canvas-card {
    padding: 0.5rem;
  }
  
  .eq-hover-display {
    font-size: 0.8rem;
    padding: 0.25rem;
  }
  
  .modal-card {
    margin: 0.5rem;
  }
} 