/* General */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  text-align: center;
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  overflow: hidden;
  color: #fff;
  height: 100%;
}

.hidden {
  display: none !important;
}

/* Menú Principal */
#main-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 15, 25, 0.95);
  padding: 35px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 320px;
  z-index: 1000;
}

.game-title {
  font-size: 2.2rem;
  color: #e94560;
  text-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
  margin-bottom: 25px;
  letter-spacing: 3px;
}

.menu-stats {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-label {
  color: #888;
}

.stat-value {
  color: #e94560;
  font-weight: bold;
}

.menu-options {
  margin-bottom: 15px;
}

.menu-options label {
  color: #aaa;
  margin-right: 10px;
  font-size: 0.9rem;
}

.menu-options select {
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
}

.menu-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.08);
  color: #ccc;
}

.menu-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.primary-btn {
  background: #e94560;
  color: #fff;
  font-weight: bold;
}

.primary-btn:hover {
  background: #ff6b6b;
}

.danger-btn {
  background: transparent;
  color: #666;
  font-size: 0.85rem;
}

.danger-btn:hover {
  color: #e94560;
  background: transparent;
}

/* Overlays */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.tutorial-content, .pause-content, .gameover-content {
  background: rgba(20, 20, 30, 0.98);
  padding: 30px;
  border-radius: 15px;
  max-width: 400px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tutorial-content h2, .pause-content h2, .gameover-content h2 {
  color: #e94560;
  margin-bottom: 20px;
}

.tutorial-section {
  text-align: left;
  margin: 15px 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  font-size: 0.9rem;
}

.tutorial-section h3 {
  color: #e94560;
  margin-bottom: 8px;
  font-size: 1rem;
}

.tutorial-section ul {
  padding-left: 18px;
  margin: 0;
}

.tutorial-section li {
  margin: 5px 0;
  color: #aaa;
}

.target-demo {
  display: inline-block;
  width: 15px;
  height: 15px;
  background: #e94560;
  border-radius: 50%;
  vertical-align: middle;
}

/* Game Over */
.gameover-stats {
  margin: 20px 0;
}

.go-stat {
  display: flex;
  justify-content: space-between;
  padding: 8px 15px;
  background: rgba(255, 255, 255, 0.03);
  margin: 8px 0;
  border-radius: 6px;
}

.go-value {
  color: #e94560;
  font-size: 1.1rem;
  font-weight: bold;
}

.new-record {
  color: #ffd700;
  font-size: 1.2rem;
  font-weight: bold;
  animation: record-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes record-pulse {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

/* Game HUD - Minimalista */
#game-hud {
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 100;
  pointer-events: none;
}

#game-hud > * {
  pointer-events: auto;
}

#score-container {
  display: flex;
  gap: 20px;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
}

#progress-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 15px;
  border-radius: 20px;
}

#level-progress {
  width: 120px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  background: #e94560;
  transition: width 0.3s ease;
  width: 0%;
}

#progress-text {
  color: #888;
  font-size: 0.8rem;
}

#pause-btn {
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: #888;
  font-size: 1.2rem;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#pause-btn:hover {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

#score {
  color: #fff;
}

#level {
  color: #e94560;
}

#combo {
  font-size: 0.9rem;
  transition: color 0.2s ease;
}


/* Área de juego */
#game-area {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw;
  height: 70vh;
  overflow: hidden;
  border: 2px solid rgba(233, 69, 96, 0.3);
  border-radius: 10px;
  box-sizing: border-box;
  transition: width 0.5s, height 0.5s;
  background: rgba(0, 0, 0, 0.2);
}

/* Objetivo principal */
#target {
  position: absolute;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #e94560);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(233, 69, 96, 0.6);
  cursor: pointer;
  z-index: 10;
  visibility: hidden;
  transition: left 0.08s ease-out, top 0.08s ease-out;
}

#target:hover {
  box-shadow: 0 0 30px rgba(233, 69, 96, 0.9);
}

/* Objetivo extra (bonus) */
.extra-target {
  position: absolute;
  background: radial-gradient(circle at 30% 30%, #4ade80, #22c55e);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
  cursor: pointer;
  z-index: 9;
  animation: extra-pulse 0.4s infinite alternate ease-in-out;
}

@keyframes extra-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

@keyframes target-blink {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

#target.clicked {
  transform: scale(0.9);
  opacity: 0.7;
}

/* Objetivos falsos */
.fake-target {
  position: absolute;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle at 30% 30%, #60a5fa, #3b82f6);
  border-radius: 50%;
  opacity: 0.8;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.fake-target:hover {
  transform: scale(1.1);
}



/* Contador */
#countdown {
  font-size: 4rem;
  font-weight: bold;
  color: #e94560;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  text-shadow: 0 0 30px rgba(233, 69, 96, 0.5);
}

/* Notificación de subida de nivel */
.level-up-notification {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  font-weight: bold;
  color: #e94560;
  text-shadow: 0 0 30px rgba(233, 69, 96, 0.8);
  z-index: 100;
  animation: level-up-anim 1.2s ease-out forwards;
  pointer-events: none;
}

@keyframes level-up-anim {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  20% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}
