/* Variables necesarias */
:root {
  --primary-color: rgba(1, 1, 1, 0.9);
  --secondary-color: #ff8c42;
  --white: #ffffff;
  --black: #000000;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--primary-color);
  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;
  height: 80px;
}

.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);
}

/* Ajuste para el body debido al header fijo */
body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: #f5f7fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 40px; /* Aumentado padding-top para el header fijo */
}

.container {
    max-width: 800px;
    width: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 20px; /* Espacio adicional para separar del header */
}

/* Header del juego (cambiado de header a .game-header para evitar conflicto) */
.game-header {
    background: linear-gradient(135deg, #4a6ee0, #6a11cb);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.game-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Game Stats */
.game-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
}

.stat {
    text-align: center;
    padding: 10px;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #4a6ee0;
}

/* Game Screen */
.game-screen {
    padding: 30px;
}

.question-container {
    margin-bottom: 30px;
}

.question-number {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-align: center;
}

.question-text {
    font-size: 1.8rem;
    line-height: 1.4;
    text-align: center;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #4a6ee0;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blank {
    background: white;
    padding: 5px 15px;
    border-radius: 5px;
    border: 2px solid #4a6ee0;
    color: #4a6ee0;
    font-weight: bold;
    margin: 0 5px;
    min-width: 100px;
    display: inline-block;
    text-align: center;
}

/* Options */
.options-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

@media (max-width: 600px) {
    .options-container {
        grid-template-columns: 1fr;
    }
}

.option {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    font-size: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.option:hover {
    border-color: #4a6ee0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 110, 224, 0.1);
}

.option.selected {
    background: #e8f0fe;
    border-color: #4a6ee0;
    color: #4a6ee0;
    font-weight: bold;
}

.option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.option.disabled:hover {
    transform: none;
    border-color: #e0e0e0;
    box-shadow: none;
}

.option.correct {
    background: #e8f6ef;
    border-color: #34c759;
    color: #2d7d46;
    font-weight: bold;
}

.option.incorrect {
    background: #fdeaea;
    border-color: #ff3b30;
    color: #c62828;
    font-weight: bold;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 180px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.verify-btn {
    background: #4a6ee0;
    color: white;
}

.next-btn {
    background: #34c759;
    color: white;
}

/* Feedback */
.feedback {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1rem;
    background: #f8f9fa;
    border-left: 4px solid #4a6ee0;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback.correct {
    background: #e8f6ef;
    border-color: #34c759;
    color: #2d7d46;
}

.feedback.incorrect {
    background: #fdeaea;
    border-color: #ff3b30;
    color: #c62828;
}

/* Results Screen */
.results-screen {
    padding: 40px 30px;
}

.results-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #eaeaea;
}

.results-icon {
    font-size: 4rem;
    color: #ffd700;
    margin-bottom: 20px;
}

.results-card h2 {
    color: #4a6ee0;
    margin-bottom: 30px;
    font-size: 2.2rem;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
}

.result-stat {
    text-align: center;
}

.result-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.result-value {
    display: block;
    font-size: 2.2rem;
    font-weight: bold;
    color: #4a6ee0;
}

#grade {
    font-size: 1.8rem;
    color: #34c759;
}

.results-message {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 35px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.results-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.menu-btn {
    background: #666;
    color: white;
}

.play-again-btn {
    background: #4a6ee0;
    color: white;
}

/* Media Queries para responsive */
@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;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .header .navigation ul li {
    width: 100%;
  }

  .header .navigation ul li a {
    padding: 12px 20px;
    font-size: 18px;
  }

  #toggle:checked ~ .navigation {
    display: block;
    animation: slideDown 0.4s ease-out;
  }
}

@media (max-width: 768px) {
    .game-header h1 {
        font-size: 2rem;
    }
    
    .question-text {
        font-size: 1.5rem;
        padding: 20px;
    }
    
    .results-stats {
        grid-template-columns: 1fr;
    }
    
    .results-buttons {
        flex-direction: column;
    }
    
    .btn {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
  .logo {
    font-size: 22px;
  }

  .header {
    padding: 12px 5%;
    height: 70px;
  }
  
  body {
    padding: 90px 15px 30px; /* Ajustado para header más pequeño */
  }
  
  .game-header h1 {
    font-size: 1.8rem;
    flex-direction: column;
    gap: 10px;
  }
  
  .game-header {
    padding: 20px 15px;
  }
  
  .question-text {
    font-size: 1.3rem;
    padding: 15px;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .result-value {
    font-size: 1.8rem;
  }
}

/* Animación para el menú desplegable */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}