/* ==========================================================================
   ROAD FIGHTER MULTIMEDIA MINI-GAME STYLES
   ========================================================================== */

.game-section {
  padding: 5rem 0 6rem 0;
  position: relative;
  background: radial-gradient(circle at 50% 30%, rgba(13, 148, 136, 0.08) 0%, rgba(7, 9, 14, 0) 70%);
  border-top: 1px solid var(--border-subtle);
  overflow: hidden;
}

.game-container {
  max-width: 1000px;
  margin: 0 auto;
}

.game-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.game-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: var(--color-accent-orange);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.game-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Wrapper principal del juego */
.game-viewport-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow-teal);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* HUD Top Bar */
.game-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(14, 19, 31, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  flex-wrap: wrap;
  gap: 1rem;
  z-index: 10;
}

.hud-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hud-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 600;
}

.hud-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
}

.hud-value.highlight-teal {
  color: #14b8a6;
}

.hud-value.highlight-orange {
  color: #fb923c;
}

/* Energy Gauge */
.energy-gauge-wrap {
  min-width: 200px;
  flex: 1;
  max-width: 280px;
}

.energy-bar-bg {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.energy-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #10b981 0%, #14b8a6 50%, #3b82f6 100%);
  border-radius: var(--radius-full);
  transition: width 0.15s ease-out, background 0.3s ease;
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.5);
}

.energy-bar-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
  animation: pulseWarning 0.8s infinite alternate;
}

@keyframes pulseWarning {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

/* Area Central Canvas + Overlays */
.game-canvas-area {
  position: relative;
  width: 100%;
  height: 520px;
  background: #090c15;
  display: flex;
  justify-content: center;
  align-items: center;
}

#road-fighter-canvas {
  display: block;
  max-width: 100%;
  height: 100%;
  background: #111827;
  cursor: pointer;
}

/* Overlay Pantallas (Inicio / Game Over / Pausa) */
.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  z-index: 20;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.game-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-icon-badge {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(249, 115, 22, 0.2));
  border: 1px solid rgba(20, 184, 166, 0.4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-glow-teal);
}

.overlay-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.overlay-desc {
  color: #94a3b8;
  max-width: 480px;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.game-start-btn {
  padding: 0.9rem 2.2rem;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.game-start-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 30px rgba(20, 184, 166, 0.6);
}

/* Guía de Controles abajo del juego */
.game-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: rgba(14, 19, 31, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 1rem;
}

.controls-legend {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #94a3b8;
  font-size: 0.82rem;
}

.key-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-family: monospace;
  font-weight: 700;
  color: #ffffff;
  font-size: 0.75rem;
}

/* Mobile Touch Controls */
.mobile-touch-controls {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(7, 9, 14, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

@media (max-width: 768px) {
  .mobile-touch-controls {
    display: flex;
  }
}

.touch-btn-group {
  display: flex;
  gap: 0.75rem;
}

.touch-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: manipulation;
}

.touch-btn:active {
  background: rgba(20, 184, 166, 0.4);
  transform: scale(0.95);
}

.touch-btn-boost {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.5);
  color: #fb923c;
  width: 70px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 800;
}
