/* ===== ESTILOS MODERNOS PARA LA TRIVIA ===== */

/* Variables de color consistentes con la paleta neolítica */
:root {
  /* Colores principales de la paleta */
  --shiny-shamrock: #67a580;
  --shiny-shamrock-tint: #40a090;
  --shiny-shamrock-shade: #245b55;
  --vista-blue: #80a8d9;
  --vista-blue-tint: #bbdbfc;
  --vista-blue-shade: #218ef9;
  --dark-coral: #c45834;
  --dark-coral-tint: #f3a889;
  --dark-coral-shade: #d0947a;
  --tigers-eye: #e49844;
  --tigers-eye-tint: #f4e8d0;
  --tigers-eye-shade: #f9ce64;
  --black: #0b0b0b;
  --white: #ffffff;

  /* Variables para la trivia */
  --trivia-primary: var(--dark-coral);
  --trivia-secondary: var(--shiny-shamrock);
  --trivia-accent: var(--tigers-eye);
  --trivia-success: var(--shiny-shamrock);
  --trivia-danger: var(--dark-coral);
  --trivia-warning: var(--tigers-eye);
  --trivia-light: var(--white);
  --trivia-dark: var(--black);
  --trivia-gradient: linear-gradient(
    135deg,
    var(--dark-coral) 0%,
    var(--shiny-shamrock) 100%
  );
  --trivia-gradient-alt: linear-gradient(
    135deg,
    var(--tigers-eye) 0%,
    var(--vista-blue) 100%
  );
  --trivia-shadow: 0 10px 40px rgba(103, 165, 128, 0.15);
  --trivia-shadow-hover: 0 20px 60px rgba(103, 165, 128, 0.25);
}

/* ===== HERO SECTION MODERNO ===== */
.trivia-hero-section {
  background: var(--dark-coral);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.trivia-hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("/img/fondo pattern.png") center/cover;
  opacity: 0.08;
  z-index: 1;
}

.trivia-hero-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 30% 20%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 50%
    );
  z-index: 1;
}

.trivia-hero-section .container {
  position: relative;
  z-index: 2;
}

.trivia-hero-section h1 {
  font-size: 4rem;
  font-weight: 800;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
  color: var(--white);
}

.trivia-hero-section .lead {
  font-size: 1.4rem;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 3rem;
  opacity: 0.95;
}

/* ===== BOTÓN MODERNO ===== */
#startTriviaBtn {
  background: var(--dark-coral);
  border: none;
  border-radius: 50px;
  padding: 1.2rem 3rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 30px rgba(196, 88, 52, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

#startTriviaBtn::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;
}

#startTriviaBtn:hover::before {
  left: 100%;
}

#startTriviaBtn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(196, 88, 52, 0.6);
}

#startTriviaBtn:active {
  transform: translateY(-1px) scale(1.02);
}

/* ===== CONTAINER PRINCIPAL ===== */
.trivia-container {
  margin-top: 50px;
  padding: 0;
  background: var(--tigers-eye-tint);
  min-height: 100vh;
  position: relative;
}

.trivia-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: var(--shiny-shamrock);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%);
  z-index: 1;
}

.trivia-container .container {
  position: relative;
  z-index: 2;
  padding-top: 3rem;
}

/* ===== BARRA DE PROGRESO COMPACTA ===== */
.trivia-progress-compact {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 25px;
  padding: 1.5rem 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 2rem;
}

.trivia-progress .progress {
  height: 12px;
  background: rgba(255, 255, 255, 0.76);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.trivia-progress .progress-bar {
  background: var(--shiny-shamrock);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.trivia-progress .progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.trivia-progress .d-flex {
  font-weight: 600;
  color: var(--trivia-dark);
}

/* ===== CARD DE PREGUNTA MODERNA ===== */
.trivia-question-card {
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.trivia-question-card .card {
  border-radius: 30px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: var(--trivia-shadow);
  overflow: hidden;
  position: relative;
}

.trivia-question-card .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--dark-coral);
}

.trivia-question-card .card-body {
  padding: 3rem;
}

#questionText {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--trivia-dark);
  line-height: 1.4;
  margin-bottom: 2.5rem;
  text-align: center;
}

/* ===== OPCIONES DE RESPUESTA MODERNAS ===== */
.answer-option {
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(103, 165, 128, 0.2);
  border-radius: 20px;
  padding: 1.8rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.answer-option::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--trivia-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.answer-option > div {
  position: relative;
  z-index: 1;
}

.answer-option .badge {
  background: var(--vista-blue) !important;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(128, 168, 217, 0.3);
}

.answer-option span:last-child {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--trivia-dark);
  margin-left: 1rem;
}

.answer-option:hover {
  border-color: var(--dark-coral);
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--trivia-shadow-hover);
}

.answer-option:hover::before {
  opacity: 0.05;
}

.answer-option.correct {
  border-color: var(--shiny-shamrock);
  background: var(--shiny-shamrock-tint);
  box-shadow: 0 10px 30px rgba(103, 165, 128, 0.3);
}

.answer-option.correct .badge {
  background: var(--shiny-shamrock) !important;
  box-shadow: 0 4px 15px rgba(103, 165, 128, 0.4);
}

.answer-option.incorrect {
  border-color: var(--dark-coral);
  background: var(--dark-coral-tint);
  box-shadow: 0 10px 30px rgba(196, 88, 52, 0.3);
}

.answer-option.incorrect .badge {
  background: var(--dark-coral) !important;
  box-shadow: 0 4px 15px rgba(196, 88, 52, 0.4);
}

/* ===== MENSAJES DE RESULTADO MODERNOS ===== */
.trivia-result {
  animation: slideInUp 0.5s ease-out;
}

.trivia-result .alert {
  border-radius: 20px;
  border: none;
  padding: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.trivia-result .alert-success {
  background: var(--shiny-shamrock-tint);
  border-left: 4px solid var(--shiny-shamrock);
}

.trivia-result .alert-danger {
  background: var(--dark-coral-tint);
  border-left: 4px solid var(--dark-coral);
}

.trivia-result #resultIcon {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.trivia-result #resultTitle {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.trivia-result #resultText {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ===== BOTÓN SIGUIENTE MODERNO ===== */
#nextQuestionBtn {
  background: var(--shiny-shamrock);
  border: none;
  border-radius: 50px;
  padding: 1rem 2.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 25px rgba(103, 165, 128, 0.3);
  transition: all 0.3s ease;
}

#nextQuestionBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(103, 165, 128, 0.4);
}

/* ===== RESULTADOS FINALES MODERNOS ===== */
.trivia-final-results {
  animation: slideInUp 0.6s ease-out;
}

.trivia-final-results .card {
  border-radius: 30px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: var(--trivia-shadow);
  overflow: hidden;
}

.trivia-final-results .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--shiny-shamrock);
}

.trivia-final-results .card-body {
  padding: 4rem 3rem;
}

.trivia-final-results .bi-trophy {
  font-size: 5rem;
  color: var(--tigers-eye);
  filter: drop-shadow(0 4px 8px rgba(228, 152, 68, 0.3));
}

.trivia-final-results #finalTitle {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.trivia-final-results #finalScore {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--trivia-dark);
  margin-bottom: 2rem;
}

.trivia-final-results #finalMessage p {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0;
}

/* ===== BOTONES FINALES MODERNOS ===== */
#playAgainBtn,
#viewResultsBtn {
  border-radius: 50px;
  padding: 1rem 2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

#playAgainBtn {
  background: var(--shiny-shamrock);
  border: none;
  box-shadow: 0 8px 25px rgba(103, 165, 128, 0.3);
}

#playAgainBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(103, 165, 128, 0.4);
}

#viewResultsBtn {
  background: transparent;
  border: 2px solid var(--dark-coral);
  color: var(--dark-coral);
}

#viewResultsBtn:hover {
  background: var(--dark-coral);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(196, 88, 52, 0.3);
}

/* ===== RESUMEN DE RESULTADOS MODERNO ===== */
.trivia-results-summary {
  animation: slideInUp 0.6s ease-out;
}

.trivia-results-summary .card {
  border-radius: 25px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: var(--trivia-shadow);
  overflow: hidden;
}

.trivia-results-summary .card-header {
  background: var(--dark-coral);
  color: white;
  border: none;
  padding: 1.5rem 2rem;
  font-weight: 700;
  font-size: 1.2rem;
}

.trivia-results-summary .card-body {
  padding: 2rem;
}

.result-item {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-radius: 15px;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.result-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  transition: all 0.3s ease;
}

.result-item.correct {
  background: var(--shiny-shamrock-tint);
  box-shadow: 0 4px 15px rgba(103, 165, 128, 0.1);
}

.result-item.correct::before {
  background: var(--trivia-success);
}

.result-item.incorrect {
  background: var(--dark-coral-tint);
  box-shadow: 0 4px 15px rgba(196, 88, 52, 0.1);
}

.result-item.incorrect::before {
  background: var(--trivia-danger);
}

.result-item:hover {
  transform: translateX(5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.result-item strong {
  color: var(--trivia-dark);
  font-weight: 700;
}

.result-item small {
  color: var(--trivia-dark);
  opacity: 0.8;
  font-weight: 500;
}

.result-item .badge {
  font-size: 1rem;
  padding: 0.5rem 0.8rem;
  border-radius: 50px;
  font-weight: 700;
}

/* ===== ANIMACIONES ===== */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== RESPONSIVE MODERNO ===== */
@media (max-width: 768px) {
  .trivia-hero-section {
    min-height: 80vh;
    padding: 2rem 0;
  }

  .trivia-hero-section h1 {
    font-size: 2.5rem;
  }

  .trivia-hero-section .lead {
    font-size: 1.1rem;
  }

  #startTriviaBtn {
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .trivia-container {
    padding: 2rem 0;
  }

  .trivia-progress {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
  }

  .trivia-question-card .card-body {
    padding: 2rem 1.5rem;
  }

  #questionText {
    font-size: 1.4rem;
    margin-bottom: 2rem;
  }

  .answer-option {
    padding: 1.2rem;
    margin-bottom: 1rem;
  }

  .answer-option .badge {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .answer-option span:last-child {
    font-size: 1rem;
  }

  .trivia-final-results .card-body {
    padding: 2rem 1.5rem;
  }

  .trivia-final-results #finalTitle {
    font-size: 2rem;
  }

  .trivia-final-results .bi-trophy {
    font-size: 3.5rem;
  }

  #playAgainBtn,
  #viewResultsBtn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .trivia-hero-section {
    min-height: 70vh;
    padding: 1.5rem 0;
  }

  .trivia-hero-section h1 {
    font-size: 2rem;
  }

  .trivia-hero-section .lead {
    font-size: 1rem;
  }

  .trivia-container {
    padding: 1.5rem 0;
  }

  .trivia-progress {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .trivia-question-card .card-body {
    padding: 1.5rem 1rem;
  }

  #questionText {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
  }

  .answer-option {
    padding: 1rem;
  }

  .answer-option .badge {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .answer-option span:last-child {
    font-size: 0.9rem;
  }

  .trivia-result .alert {
    padding: 1.5rem;
  }

  .trivia-result #resultIcon {
    font-size: 2rem;
  }

  .trivia-result #resultTitle {
    font-size: 1.2rem;
  }

  .trivia-result #resultText {
    font-size: 1rem;
  }

  .trivia-final-results .card-body {
    padding: 1.5rem 1rem;
  }

  .trivia-final-results #finalTitle {
    font-size: 1.8rem;
  }

  .trivia-final-results .bi-trophy {
    font-size: 3rem;
  }

  .result-item {
    padding: 1rem;
  }

  .result-item strong {
    font-size: 0.9rem;
  }

  .result-item small {
    font-size: 0.8rem;
  }
}
