/* =================================================================================
   TRIVIA SCREEN STYLES - MUSEO DE ORÁN - VERSIÓN COMPACTA
   ================================================================================= */

.museo-trivia-game .screen.trivia-screen {
  background: rgba(0, 0, 0, 0.1);
  max-height: calc(100vh - 80px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.museo-trivia-game .trivia-container {
  padding: 1rem;
  max-width: 1200px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.museo-trivia-game .question-container {
  width: 100%;
}

/* Layout: pregunta arriba full width, opciones + imagen abajo */
.museo-trivia-game .question-layout {
  width: 100%;
}

.museo-trivia-game .question-top {
  width: 100%;
  margin-bottom: 2rem;
}

.museo-trivia-game .question-bottom {
  display: flex;
  gap: 30px;
  width: 100%;
}

.museo-trivia-game .question-left {
  width: 50%;
}

.museo-trivia-game .question-right {
  width: 50%;
  display: flex;
  justify-content: center;
  max-height: 400px;
}

.museo-trivia-game .question-image-container {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(76, 175, 80, 0.2);
  overflow: hidden;
}

.museo-trivia-game .question-image {
  object-fit: cover;   /* se ajusta dentro del contenedor */
  object-position: center center; /* la centra en ambos ejes */
  width: 100%;   /* asegura que ocupe todo el ancho disponible */
  height: 100%;  /* asegura que ocupe todo el alto disponible */
  border-radius: 12px;
  position: relative;
  z-index: 2;
}

.museo-trivia-game .container-question-text {
  background: linear-gradient(135deg, #0b8644, #0a7a3e);
  padding: 2rem;
  border-radius: 2.5rem;
  box-shadow: 0 8px 16px rgba(11, 134, 68, 0.3);
}

.museo-trivia-game .question-text {
  color: white;
  font-size: 2.2rem;
  margin: 0;
  text-align: center;
  line-height: 1.4;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.museo-trivia-game .options-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.museo-trivia-game .option-btn {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border: 3px solid rgba(76, 175, 80, 0.2);
  border-radius: 50px;
  padding: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 6px 0 rgba(11,134,68,0.4);
  position: relative;
  overflow: hidden;
}

.museo-trivia-game .option-btn:hover {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  transform: translateX(8px) translateY(-2px);
  box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

.museo-trivia-game .option-btn:hover .option-text,
.museo-trivia-game .option-btn:hover .option-letter {
  color: white;
}

.museo-trivia-game .option-btn.selected {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  transform: translateX(8px) translateY(-2px);
  pointer-events: none;
}

.museo-trivia-game .option-btn.selected .option-text,
.museo-trivia-game .option-btn.selected .option-letter {
  color: white;
}

.museo-trivia-game .option-btn.disabled {
  pointer-events: none;
  opacity: 0.7;
}

.museo-trivia-game .option-letter {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #0b8644, #0a7a3e);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.museo-trivia-game .option-text {
  color: #333;
  font-size: 1.5rem;
  flex: 1;
  font-weight: 500;
}

.museo-trivia-game .progress-info {
  text-align: center;
  color: #303030;
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  border-radius: 50px;
  font-size: 16px;
  padding: 0.8rem 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
  margin: 15px auto;
  font-weight: 600;
  border: 2px solid rgba(76, 175, 80, 0.2);
}

/* Modal */
.museo-trivia-game .explanation-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.museo-trivia-game .explanation-modal.visible {
  opacity: 1;
  visibility: visible;
}

.museo-trivia-game .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.museo-trivia-game .modal-content {
  position: relative;
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border-radius: 30px;
  max-width: 500px;
  width: 90%;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  transform: scale(0.7) translateY(50px);
  transition: all 0.4s ease;
}

.museo-trivia-game .explanation-modal.visible .modal-content {
  transform: scale(1) translateY(0);
}

.museo-trivia-game .modal-header {
  text-align: center;
  padding: 30px 25px 20px;
  color: rgb(24, 24, 24);
}

.museo-trivia-game .result-icon-container {
  width: 70px;
  height: 70px;
  margin: 0 auto 15px;
}

.museo-trivia-game .result-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.3));
  animation: bounce 0.6s ease-out;
}

.museo-trivia-game .result-title {
  font-size: 24px;
  margin: 0;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.museo-trivia-game .modal-body {
  padding: 25px;
  text-align: center;
}

.museo-trivia-game .explanation-text {
  color: #333;
  font-size: 1.75rem;
  line-height: 1.6;
  margin: 0;
}

.museo-trivia-game .modal-footer {
  padding: 20px 25px 30px;
  text-align: center;
}

.museo-trivia-game .next-btn {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  border: none;
  border-radius: 25px;
  color: white;
  padding: 15px 30px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
  font-weight: bold;
  text-shadow: 2px 2px 4px rgb(0 0 0);
}

.museo-trivia-game .next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

/* Pantalla de resultados */
.museo-trivia-game .screen.results-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.museo-trivia-game .results-container {
  padding: 2rem;
  max-width: 600px;
  width: 100%;
}

.museo-trivia-game .results-content {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border-radius: 30px;
  padding: 40px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.museo-trivia-game .results-icon-container {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
}

.museo-trivia-game .results-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: celebration 1s ease-out;
}

.museo-trivia-game .results-title {
  font-size: 32px;
  margin: 0 0 30px 0;
  color: #1e293b;
  font-weight: bold;
}

.museo-trivia-game .score-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
  border: 5px solid rgba(255, 255, 255, 0.8);
}

.museo-trivia-game .score-text {
  color: white;
  font-size: 36px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.museo-trivia-game .score-message {
  font-size: 3cap;
  color: #1e293b;
  margin: 0 0 30px 0;
  font-weight: 600;
}

.museo-trivia-game .results-details {
  margin: 30px 0;
  text-align: left;
}

.museo-trivia-game .detail-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  margin-bottom: 10px;
  background: rgba(76, 175, 80, 0.05);
  border-radius: 15px;
  border-left: 4px solid #4CAF50;
}

.museo-trivia-game .detail-label {
  color: #333;
}

.museo-trivia-game .detail-value {
  font-weight: bold;
  color: #008d48;
}

.museo-trivia-game .results-footer {
  margin-top: 30px;
  display: flex;
  gap: 15px;
  justify-content: center;
}

.museo-trivia-game .results-btn {
  border: none;
  border-radius: 25px;
  padding: 15px 25px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.museo-trivia-game .results-btn.primary {
  background: linear-gradient(135deg, #4CAF50, #008d48);
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.museo-trivia-game .results-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.museo-trivia-game .results-btn.secondary {
  background: white;
  color: #4CAF50;
  border: 2px solid #4CAF50;
}

.museo-trivia-game .results-btn.secondary:hover {
  background: #4CAF50;
  color: white;
  transform: translateY(-2px);
}

/* Animaciones */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0% { transform: scale(0) rotate(-180deg); }
  50% { transform: scale(1.2) rotate(-90deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes celebration {
  0% { transform: scale(0) rotate(-360deg); }
  50% { transform: scale(1.3) rotate(-180deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.museo-trivia-game .screen.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.museo-trivia-game .screen.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: all 0.4s ease;
}

.museo-trivia-game .sound-effect {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 100px;
  z-index: 9999;
  pointer-events: none;
  animation: soundPulse 0.6s ease-out forwards;
}

@keyframes soundPulse {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

/* ✅ BOTÓN DE VOLVER EN TRIVIA - Arriba a la izquierda */

.trivia-header {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 50;
}

.results-header-nav {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 50;
}

.back-to-menu-btn {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 25px;
  padding: 0.8rem 1.5rem;
  font-family: "Arial", sans-serif;
  font-size: 0.9rem;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
}

.back-to-menu-btn:hover {
  background: white;
  border-color: rgba(0, 0, 0, 0.2);
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-menu-btn:active {
  transform: translateY(0);
}

.back-to-menu-btn svg {
  transition: transform 0.3s ease;
  stroke: currentColor;
}

.back-to-menu-btn:hover svg {
  transform: translateX(-2px);
}

/* Responsive para el botón */
@media (max-width: 768px) {
  .trivia-header,
  .results-header-nav {
    top: 0.5rem;
    left: 0.5rem;
  }
  
  .back-to-menu-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
  
  .back-to-menu-btn span {
    display: none; /* Solo mostrar el ícono en móvil */
  }
}

@media (max-width: 480px) {
  .back-to-menu-btn {
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
  }
}