:root {
  --primary-color: rgba(1, 1, 1, 0.9);
  --secondary-color: #ff8c42;
  --accent-color: #ff6600;
  --light-color: #ffd8b5;
  --text-color: #333;
  --white: #ffffff;
  --black: #000000;
  --orange-gradient: linear-gradient(
    115deg,
    #ff6701,
    #ff9900,
    #fd640b,
    #ff8851,
    #ff9810,
    #ff7951
  );
  --success-color: #4caf50;
  --error-color: #f44336;
  --orange-bg: #b9b8b7;
  --zero-color: #3498db;
  --first-color: #9b59b6;
}

* {
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background-color: var(--orange-bg);
  color: var(--text-color);
  padding-top: 80px;
}

/* ----- HEADER (IDÉNTICO) ----- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(1, 1, 1, 0.9);
  padding: 0 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-bottom: 2px solid var(--secondary-color);
  transition: all 0.3s ease;
}

.header:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header .navigation ul li {
  float: left;
  position: relative;
}

.header .navigation ul li a {
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  padding: 22px 20px;
  display: block;
  transition: all 0.3s ease;
}

.header .navigation ul li a:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  color: var(--black);
}

#toggle,
.header label {
  display: none;
  cursor: pointer;
}

.menu {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

/* ----- MAIN CONTAINER ----- */
.main-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  text-align: center;
  color: var(--black);
  margin-bottom: 30px;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  padding-bottom: 15px;
}

h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: var(--orange-gradient);
  border-radius: 4px;
}

/* ----- GAME HEADER (estadísticas) ----- */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--white);
  border-radius: 15px;
  padding: 20px 30px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 20px;
}

.game-stats {
  display: flex;
  gap: 20px;
}

.stat-box {
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  text-align: center;
  min-width: 140px;
  box-shadow: 0 4px 10px rgba(255, 140, 66, 0.3);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.verb-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.zero-color {
  background: linear-gradient(145deg, #3498db, #2980b9);
}

.first-color {
  background: linear-gradient(145deg, #9b59b6, #8e44ad);
}

/* ----- ORGANIZACIÓN VERTICAL ----- */
.game-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* ----- ÁREA DE JUEGO ----- */
.game-area {
  background-color: var(--white);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-left: 6px solid var(--accent-color);
  display: flex;
  flex-direction: column;
}

/* ----- ESCUDO MEJORADO (GRIETAS ARTÍSTICAS) ----- */
.shield-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.shield-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.shield-title i {
  color: var(--accent-color);
}

#shield-canvas {
  display: block;
  width: 220px;
  height: 260px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, #f9e6d8, #ffe0c0);
  box-shadow:
    0 15px 25px rgba(0, 0, 0, 0.25),
    inset 0 0 10px rgba(255, 140, 66, 0.3);
  margin-bottom: 15px;
  transition: transform 0.2s;
}

/* Animación de daño (vibración + destello) */
.shield-damage {
  animation:
    shieldShake 0.3s ease,
    shieldFlash 0.3s ease;
}

@keyframes shieldShake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-3px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes shieldFlash {
  0% {
    filter: drop-shadow(0 0 5px red);
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.8));
  }
  100% {
    filter: drop-shadow(0 0 5px red);
  }
}

.shield-stats {
  font-size: 1.3rem;
  font-weight: 700;
  background: rgba(255, 140, 66, 0.15);
  padding: 8px 25px;
  border-radius: 40px;
  color: var(--primary-color);
  border: 2px solid var(--secondary-color);
  backdrop-filter: blur(2px);
}

/* ----- SENTENCIA ACTUAL ----- */
.current-verb-container {
  text-align: center;
  margin-bottom: 30px;
  background: linear-gradient(145deg, #fff8f0, #fff);
  padding: 20px;
  border-radius: 20px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 140, 66, 0.2),
    0 8px 0 rgba(0, 0, 0, 0.05);
}

.verb-label {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.current-verb {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--primary-color);
  text-shadow: 2px 2px 0 rgba(255, 140, 66, 0.2);
  margin-bottom: 10px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.verb-translation {
  font-size: 1.2rem;
  color: #555;
  font-style: italic;
  background: rgba(255, 140, 66, 0.08);
  padding: 8px 16px;
  border-radius: 50px;
  display: inline-block;
}

/* ----- BOTONES NEÓN 3D ----- */
.choice-buttons {
  display: flex;
  gap: 25px;
  margin-bottom: 30px;
}

.choice-btn {
  flex: 1;
  padding: 22px 10px;
  border: none;
  border-radius: 20px;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  letter-spacing: 1.5px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 10px 0 rgba(0, 0, 0, 0.1),
    0 6px 20px rgba(0, 0, 0, 0.2);
}

.choice-btn i {
  font-size: 2.2rem;
  filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.1));
}

.zero-btn {
  background: radial-gradient(circle at 20% 30%, #4da6ff, #1f6390);
  color: white;
  border-bottom: 6px solid #0d3a55;
  text-shadow: 0 2px 0 #0d3a55;
  box-shadow:
    0 12px 0 #0d3a55,
    0 8px 20px #3498db80;
}

.zero-btn:hover:not(:disabled) {
  transform: translateY(-6px);
  box-shadow:
    0 18px 0 #0d3a55,
    0 12px 30px #3498db;
  background: radial-gradient(circle at 30% 40%, #6ab0ff, #2575a5);
}

.first-btn {
  background: radial-gradient(circle at 80% 30%, #c158e0, #6b3b7c);
  color: white;
  border-bottom: 6px solid #3e1f4a;
  text-shadow: 0 2px 0 #3e1f4a;
  box-shadow:
    0 12px 0 #3e1f4a,
    0 8px 20px #9b59b680;
}

.first-btn:hover:not(:disabled) {
  transform: translateY(-6px);
  box-shadow:
    0 18px 0 #3e1f4a,
    0 12px 30px #9b59b6;
  background: radial-gradient(circle at 70% 40%, #da7bff, #8e44ad);
}

.choice-btn:disabled {
  opacity: 0.7;
  transform: translateY(4px);
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.1),
    0 8px 15px rgba(0, 0, 0, 0.2);
  cursor: not-allowed;
}

.choice-btn:active:not(:disabled) {
  transform: translateY(6px);
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.1),
    0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ----- RESULTADO ----- */
.result-container {
  margin-top: 20px;
  padding: 18px;
  border-radius: 60px;
  text-align: center;
  font-weight: 700;
  font-size: 1.2rem;
  display: none;
  animation: fadeIn 0.4s ease;
}

.result-container.correct {
  background: linear-gradient(145deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 2px solid var(--success-color);
  display: block;
}

.result-container.incorrect {
  background: linear-gradient(145deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 2px solid var(--error-color);
  display: block;
}

/* ----- BOTÓN SIGUIENTE ----- */
.next-btn-container {
  text-align: center;
  margin-top: 15px;
}

.next-btn {
  padding: 16px 50px;
  background: var(--orange-gradient);
  color: white;
  border: none;
  border-radius: 60px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  box-shadow:
    0 12px 0 #b3470c,
    0 10px 25px rgba(255, 140, 66, 0.5);
  display: none;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
}

.next-btn:hover {
  transform: translateY(-5px);
  box-shadow:
    0 17px 0 #b3470c,
    0 15px 30px rgba(255, 140, 66, 0.7);
}

.next-btn:active {
  transform: translateY(7px);
  box-shadow:
    0 5px 0 #b3470c,
    0 15px 30px rgba(255, 140, 66, 0.7);
}

/* ----- BARRA DE PROGRESO ----- */
.progress-container {
  width: 100%;
  height: 14px;
  background-color: #e0e0e0;
  border-radius: 10px;
  margin: 20px 0 30px;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  height: 100%;
  background: var(--orange-gradient);
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----- REGLAS EN INGLÉS (simples y claras) ----- */
.game-rules {
  background-color: var(--white);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-left: 6px solid var(--secondary-color);
}

.rules-title {
  font-size: 1.7rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rules-title i {
  color: var(--accent-color);
}

.rules-list {
  list-style-type: none;
  margin-left: 5px;
}

.rules-list li {
  margin-bottom: 15px;
  padding-left: 25px;
  position: relative;
  line-height: 1.6;
  font-size: 1.1rem;
}

.rules-list li:before {
  content: "🛡️";
  color: var(--accent-color);
  position: absolute;
  left: -5px;
}

/* ----- MODAL ----- */
.game-over-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.4s ease-out;
}

.modal-content {
  background: linear-gradient(145deg, var(--white), var(--light-color));
  padding: 40px;
  border-radius: 30px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  animation: scaleUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  border: 3px solid var(--secondary-color);
}

.modal-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.modal-message {
  font-size: 1.3rem;
  margin-bottom: 25px;
  color: var(--text-color);
}

.final-score {
  font-size: 3.5rem;
  color: var(--secondary-color);
  font-weight: 800;
  margin: 20px 0;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
}

.modal-btn {
  padding: 14px 35px;
  background: linear-gradient(145deg, #2c3e50, #1a2632);
  color: white;
  border: none;
  border-radius: 60px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: 0.2s;
  box-shadow: 0 8px 0 #0f1217;
  margin: 0 10px;
}

.modal-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 0 #0f1217;
}

.answer-list {
  text-align: left;
  margin: 20px 0;
  max-height: 300px;
  overflow-y: auto;
  padding: 15px;
  background: #fef3e7;
  border-radius: 16px;
  border: 2px solid var(--secondary-color);
}
.answer-item {
  padding: 10px;
  border-bottom: 1px solid #ffe0b5;
}
.answer-correct {
  color: #2e7d32;
  font-weight: bold;
}
.answer-incorrect {
  color: #c62828;
}

/* ----- MEDIA QUERIES ----- */
@media (max-width: 950px) {
  .header label {
    display: initial;
  }
  .header {
    padding: 15px 10%;
  }
  .header .navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-color);
    display: none;
    border-radius: 0 0 12px 12px;
  }
  .header .navigation ul li {
    width: 100%;
  }
  #toggle:checked ~ .navigation {
    display: block;
  }
  h1 {
    font-size: 2rem;
  }
  .choice-buttons {
    flex-direction: column;
  }
  .game-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .game-stats {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .current-verb {
    font-size: 1.8rem;
  }
  .choice-btn {
    padding: 18px;
    font-size: 1.2rem;
  }
}
