/* ==========================================================================
   LA RUEDA DE ESPAÑA - ESTILOS DEL JUEGO INTERACTIVO Y VIRAL
   ========================================================================== */

:root {
  --rueda-gold: #F1BF00;
  --rueda-orange: #ff9900;
  --rueda-red: #AA151B;
  --rueda-dark: #0f1117;
  --rueda-card: #181d28;
  --rueda-card-border: #2a3346;
  --rueda-text: #f3f4f6;
  --rueda-text-muted: #9ca3af;
  --rueda-green: #16a34a;
  --rueda-wrong: #dc2626;
  --rueda-pass: #ea580c;
  --rueda-circle-size: 360px;
}

/* Contenedor principal de la experiencia */
.rueda-game-section {
  max-width: 1040px;
  margin: 0 auto 3rem auto;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 20%, #1c2333 0%, var(--rueda-dark) 100%);
  border: 1px solid var(--rueda-card-border);
  border-radius: 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 30px rgba(241, 191, 0, 0.08);
  color: var(--rueda-text);
  font-family: 'Montserrat', sans-serif;
  position: relative;
  overflow: hidden;
}

.rueda-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.rueda-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--rueda-red), #c81e26);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 50px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  box-shadow: 0 4px 12px rgba(170, 21, 27, 0.4);
}

.rueda-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 2.5rem;
  color: var(--rueda-gold);
  letter-spacing: 2px;
  margin: 0 0 0.4rem 0;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(241, 191, 0, 0.3);
}

.rueda-subtitle {
  font-size: 1.05rem;
  color: var(--rueda-text-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Pantalla de Inicio / Instrucciones */
.rueda-intro-card {
  background: var(--rueda-card);
  border: 1px solid var(--rueda-card-border);
  border-radius: 20px;
  padding: 2.2rem 2.5rem;
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.rueda-intro-rules {
  list-style: none;
  padding: 0;
  margin: 1.8rem 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.rueda-intro-rules li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  color: #e5e7eb;
}

.rueda-intro-rules .rule-icon {
  font-size: 1.3rem;
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.rueda-intro-rules .rule-text {
  flex: 1;
  white-space: nowrap;
}

.btn-start-game {
  background: linear-gradient(135deg, var(--rueda-gold) 0%, #e5a700 100%);
  color: #000;
  border: none;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 15px 42px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(241, 191, 0, 0.4);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-start-game:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(241, 191, 0, 0.6);
  color: #000;
}

/* Contenedor del Juego Activo (LAYOUT COMPACTO SIDE-BY-SIDE) */
.rueda-play-area {
  display: none;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  width: 100%;
}

/* LA RUEDA CIRCULAR */
.rueda-circle-wrapper {
  position: relative;
  width: var(--rueda-circle-size);
  height: var(--rueda-circle-size);
  flex-shrink: 0;
  margin: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 29, 40, 0.8) 0%, rgba(15, 17, 23, 0.95) 100%);
  border: 2px dashed rgba(241, 191, 0, 0.25);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6), inset 0 0 25px rgba(0, 0, 0, 0.5);
  user-select: none;
}

/* Nodos individuales de las letras */
.rueda-node {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: #1e293b;
  border: 2px solid #334155;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
  transform: translate(-50%, -50%);
  z-index: 10;
}

/* Estados de las letras */
.rueda-node.active {
  background: var(--rueda-gold) !important;
  color: #000 !important;
  border-color: #fff !important;
  transform: translate(-50%, -50%) scale(1.35) !important;
  box-shadow: 0 0 20px rgba(241, 191, 0, 0.9), 0 0 40px rgba(241, 191, 0, 0.4) !important;
  z-index: 20;
  animation: pulseNode 1.5s infinite alternate;
}

@keyframes pulseNode {
  0% { transform: translate(-50%, -50%) scale(1.25); }
  100% { transform: translate(-50%, -50%) scale(1.38); }
}

.rueda-node.correct {
  background: var(--rueda-green) !important;
  color: #fff !important;
  border-color: #4ade80 !important;
  box-shadow: 0 0 12px rgba(22, 163, 74, 0.7);
}

.rueda-node.wrong {
  background: var(--rueda-wrong) !important;
  color: #fff !important;
  border-color: #f87171 !important;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.7);
}

.rueda-node.passed {
  background: var(--rueda-pass) !important;
  color: #fff !important;
  border-color: #fb923c !important;
}

/* Hub Central dentro de la Rueda */
.rueda-center-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 155px;
  height: 155px;
  border-radius: 50%;
  background: rgba(15, 17, 23, 0.92);
  border: 1px solid var(--rueda-card-border);
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8), 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 5;
}

.rueda-timer {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 2.7rem;
  font-weight: 700;
  color: var(--rueda-gold);
  line-height: 1;
  text-shadow: 0 0 15px rgba(241, 191, 0, 0.5);
  margin-bottom: 4px;
}

.rueda-timer.timer-warning {
  color: #f87171;
  animation: timerBlink 0.8s infinite;
}

@keyframes timerBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.rueda-hub-scores {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}

.hub-score-pill {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hub-score-pill.correct {
  background: rgba(22, 163, 74, 0.25);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.hub-score-pill.wrong {
  background: rgba(220, 38, 38, 0.25);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.btn-sound-toggle {
  background: transparent;
  border: 1px solid #475569;
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-sound-toggle:hover {
  background: #334155;
  color: #fff;
}

/* Tarjeta de Pregunta y Controles (COLUMNA DERECHA) */
.rueda-question-card {
  flex: 1;
  max-width: 500px;
  background: var(--rueda-card);
  border: 1px solid var(--rueda-card-border);
  border-radius: 20px;
  padding: 1.8rem;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.question-letter-tag {
  display: inline-block;
  align-self: center;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rueda-gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  background: rgba(241, 191, 0, 0.12);
  padding: 4px 16px;
  border-radius: 20px;
  border: 1px solid rgba(241, 191, 0, 0.3);
}

.question-text {
  font-size: 1.15rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.55;
  margin-bottom: 1.3rem;
  min-height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Formulario de Respuesta */
.rueda-input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 1rem;
}

.rueda-input {
  flex: 1;
  background: #0b0d13;
  border: 2px solid #374151;
  border-radius: 12px;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 12px 16px;
  outline: none;
  transition: all 0.25s ease;
  text-transform: uppercase;
}

.rueda-input:focus {
  border-color: var(--rueda-gold);
  box-shadow: 0 0 15px rgba(241, 191, 0, 0.3);
}

.rueda-input::placeholder {
  color: #6b7280;
  text-transform: none;
  font-size: 0.95rem;
  font-weight: 400;
}

.rueda-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-rueda {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 11px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-rueda-check {
  background: linear-gradient(135deg, var(--rueda-green), #15803d);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.4);
}

.btn-rueda-check:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.6);
}

.btn-rueda-pass {
  background: #334155;
  color: #f1f5f9;
  border: 1px solid #475569;
}

.btn-rueda-pass:hover {
  background: var(--rueda-pass);
  color: #fff;
  border-color: var(--rueda-pass);
  transform: translateY(-2px);
}

.rueda-shortcuts-hint {
  font-size: 0.82rem;
  color: var(--rueda-text-muted);
  margin-top: 0.8rem;
}

/* Modal de Resultados Finales */
.rueda-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.rueda-modal.active {
  display: flex;
}

.rueda-modal-content {
  background: var(--rueda-card);
  border: 2px solid var(--rueda-gold);
  border-radius: 24px;
  max-width: 580px;
  width: 100%;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 40px rgba(241, 191, 0, 0.25);
  animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-result-icon {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

.modal-result-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 2.2rem;
  color: var(--rueda-gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.modal-result-quote {
  font-size: 1.1rem;
  color: #e5e7eb;
  line-height: 1.5;
  margin-bottom: 1.8rem;
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 2rem;
}

.modal-stat-box {
  background: #0f1117;
  border: 1px solid var(--rueda-card-border);
  border-radius: 14px;
  padding: 14px 8px;
}

.modal-stat-num {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.modal-stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--rueda-text-muted);
}

/* Botones de Compartir */
.modal-share-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--rueda-gold);
  font-weight: 700;
  margin-bottom: 1rem;
}

.modal-share-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn-share {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 50px;
  text-decoration: none !important;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-share-whatsapp {
  background: #25D366;
}

.btn-share-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
}

.btn-share-x {
  background: #000000;
  border: 1px solid #333;
}

.btn-share-x:hover {
  background: #111;
  transform: translateY(-2px);
  border-color: #555;
}

.btn-share-copy {
  background: #4b5563;
}

.btn-share-copy:hover {
  background: #374151;
  transform: translateY(-2px);
}

.btn-modal-restart {
  background: linear-gradient(135deg, var(--rueda-gold), #d99b00);
  color: #000;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 36px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(241, 191, 0, 0.4);
  transition: all 0.25s ease;
}

.btn-modal-restart:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(241, 191, 0, 0.6);
}

/* ==========================================================================
   SECCIÓN DE PRODUCTOS DESTACADOS 4+4 DE ALTA CONVERSIÓN
   ========================================================================== */

.rueda-affiliate-section {
  max-width: 1140px;
  margin: 4rem auto 2rem auto;
}

.rueda-affiliate-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.rueda-affiliate-header h2 {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 2.2rem;
  color: #111827;
  letter-spacing: 1.5px;
  margin-bottom: 0.6rem;
}

.rueda-affiliate-header p {
  color: #4b5563;
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Banner promocional en Home */
.home-rueda-banner {
  background: linear-gradient(135deg, #111827 0%, #1e293b 100%);
  border: 2px solid var(--rueda-gold);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  margin: 2.5rem 0;
  text-align: center;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.home-rueda-banner::before {
  content: '🇪🇸';
  position: absolute;
  right: -20px;
  bottom: -20px;
  font-size: 10rem;
  opacity: 0.06;
  pointer-events: none;
}

.home-rueda-badge {
  display: inline-block;
  background: var(--rueda-gold);
  color: #000;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1.5px;
  padding: 5px 16px;
  border-radius: 30px;
  margin-bottom: 1rem;
}

.home-rueda-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
}

.home-rueda-desc {
  font-size: 1.05rem;
  color: #cbd5e1;
  max-width: 650px;
  margin: 0 auto 1.8rem auto;
  line-height: 1.6;
}

.btn-home-play {
  background: linear-gradient(135deg, var(--rueda-red) 0%, #870f14 100%);
  color: #fff !important;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 36px;
  border-radius: 50px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(170, 21, 27, 0.4);
  transition: all 0.3s ease;
}

.btn-home-play:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(170, 21, 27, 0.6);
  background-position-y: 0% !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS Y MÓVILES)
   ========================================================================== */

@media (max-width: 860px) {
  :root {
    --rueda-circle-size: 300px;
  }
  
  .rueda-game-section {
    padding: 1.2rem 0.8rem;
    border-radius: 18px;
  }
  
  .rueda-intro-card {
    padding: 1.8rem 1.2rem;
  }
  
  .rueda-intro-rules .rule-text {
    white-space: normal;
  }
  
  .rueda-play-area {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .rueda-circle-wrapper {
    margin: 0.5rem auto;
  }
  
  .rueda-node {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }
  
  .rueda-center-hub {
    width: 135px;
    height: 135px;
  }
  
  .rueda-timer {
    font-size: 2.3rem;
  }
  
  .hub-score-pill {
    font-size: 0.75rem;
    padding: 2px 6px;
  }
  
  .rueda-question-card {
    max-width: 100%;
    padding: 1.4rem 1rem;
  }
  
  .question-text {
    font-size: 1.05rem;
    min-height: 55px;
  }
  
  .rueda-input {
    font-size: 1.05rem;
    padding: 10px 12px;
  }
  
  .btn-rueda {
    font-size: 1rem;
    padding: 10px 16px;
  }
  
  .modal-result-title {
    font-size: 1.7rem;
  }
  
  .modal-stat-num {
    font-size: 1.7rem;
  }
}

@media (max-width: 500px) {
  :root {
    --rueda-circle-size: 270px;
  }
  
  .rueda-title {
    font-size: 1.8rem;
  }
  
  .rueda-subtitle {
    font-size: 0.9rem;
  }
  
  .rueda-node {
    width: 25px;
    height: 25px;
    font-size: 0.75rem;
  }
  
  .rueda-center-hub {
    width: 120px;
    height: 120px;
  }
  
  .rueda-timer {
    font-size: 2rem;
  }
}
