/* ===================== ESTILOS ESPECÍFICOS VIEW-INTRO ===================== */
/* Nota: Estilos base (fonts, reset, body, animaciones comunes) están en yonunca_base.css */

/* ===================== LOGO DEL BAR (esquina superior derecha) ===================== */
#view-intro .logo-bar-container {
  position: fixed;
  top: 2vh;
  right: 2vw;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 1.5vh;
  padding: 1.2vh;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

#view-intro .logo-bar {
  width: 15vw;
  height: auto;
  max-width: 100px;
  max-height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
  transition: transform 0.3s ease, filter 0.3s ease;
}

#view-intro .logo-bar:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

/* ===================== LOGO CONTAINER ESPECÍFICO INTRO ===================== */
/* Logo container único para intro - sin herencia */
/* IMPORTANTE: La visibilidad se controla completamente desde spa_transitions.css */
/* No establecer opacity/visibility aquí para evitar conflictos */
.logo-container_intro {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
  margin-top: -4vh;
  margin-bottom: 4vh;

}

/* Logo único para intro - sin herencia */
.logo_intro {
  font-size: 8vw;
  font-family: 'Arial', sans-serif;
  font-weight: bold;
  width: 35vw;
  height: auto;
  margin-bottom: 4vh;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
  display: block;
  /* La animación se aplica al logo-container, no al logo */
}

/* ===================== CONTAINER ESPECÍFICO INTRO ===================== */
/* Container que contiene QR, ID y botón */
#view-intro .container,
#view-intro .core-container {
  position: relative;
  z-index: 1;
}

#view-intro .container {
  display: flex;
  flex-direction: row; /* Layout horizontal: QR izquierda, ID+botón derecha (como muestra la imagen) */
  margin-bottom: 0px;
  text-align: center;
  color: white;
  padding: 1vw;
  border-radius: 2vh;
  background-color: rgba(255, 255, 255, 0.1);
  width: 85%;
  z-index: 1;
  align-items: center;
  justify-content: center; 
  gap: 15vw;
}

/* ===================== QR CONTAINER ===================== */
#view-intro .qr-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important; /* Centrado vertical dentro del container */
  gap: 1vh !important;
  flex: 0 0 auto !important; /* No crecer ni encogerse, tamaño según contenido */
  width: auto !important;
}

#view-intro .qr-code {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffffff !important;
  padding: 2vw !important;
  border-radius: 2vh !important;
  box-shadow: 0 0.4vw 1vw rgba(0, 0, 0, 0.2) !important;
  border: 0.2vh solid #e0e7ef !important;
  width: fit-content !important;
  margin-top: 0 !important; /* Sin margen superior, el padding del container ya lo maneja */
}

#view-intro .qr-code canvas {
  width: 20vw;
  height: auto;
  margin-bottom: 0;
  background: transparent;
  border-radius: 1vh;
}
  
#view-intro .qr-code img {
  width: 8vw;
  height: 8vh;
  margin-bottom: 1vh;
}

#view-intro .qr-text {
  font-size: 2vw !important;
  color: white !important;
  font-family: 'ChauPhilomeneOne-Italic', sans-serif !important;
  text-align: center !important;
  margin: 0 !important;
}

/* ===================== GAME INFO ===================== */
#view-intro .game-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important; /* Centrado para mejor alineación con QR */
  justify-content: center !important; /* Centrado vertical dentro del container */
  gap: 2vh !important;
  flex: 0 0 auto !important; /* No crecer ni encogerse, tamaño según contenido */
  width: auto !important;
}

#view-intro .game-id-text {
  font-size: 2.5vw;
    font-family: 'ChauPhilomeneOne-Italic', sans-serif;
  color: whitesmoke;
    font-weight: bold;
    text-shadow: 
      -1px -1px 0 #000,
      1px -1px 0 #000,
      -1px 1px 0 #000,
      1px 1px 0 #000;
  margin: 0 !important; /* Sin márgenes, el gap del flex lo maneja */
  text-align: center !important;
}

#view-intro #id_partida {
  color: white;
  font-size: 6vw;
  font-family: 'ChauPhilomeneOne-Italic', sans-serif;
  font-weight: bold;
  text-shadow: 
      -2px -2px 0 #000,
        2px -2px 0 #000,  
        -2px 2px 0 #000,  
        2px 2px 0 #000;
  margin: 0 !important; /* Sin márgenes, el gap del flex lo maneja */
  text-align: center !important;
  display: block !important;
}

.text-border {
  color: white;
  text-shadow: 
      -1px -1px 0 #000,
      1px -1px 0 #000,
      -1px 1px 0 #000,
      1px 1px 0 #000;
  font-weight: bold;
  font-family: 'ChauPhilomeneOne-Italic', sans-serif;
}

/* ===================== BOTÓN COMENZAR ===================== */
#view-intro .game-btn {
  z-index: 1;
  background-color: #29211d;
  color: white;
  padding: 1.5vw 4vh;
  font-size: 4vw;
  text-decoration: none;
  border-radius: 6vh;
  transition: background-color 0.3s ease;
  font-family: 'ChauPhilomeneOne-Italic', sans-serif;
  width: auto !important; /* Ancho automático según contenido */
  min-width: 25vw; /* Ancho mínimo */
  height: 12vh;
  border: none;
  cursor: pointer;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: zoomInOut 6s ease-in-out infinite;
  margin: 0 !important; /* Sin margen, el gap del flex lo maneja */
}

#view-intro .game-btn:hover {
  background-color: #4b3810;
  transform: translateY(-0.5vh);
  box-shadow: 1vw 1vw 2vw rgba(0, 0, 0, 0.4);
}

/* ===================== HEADINGS ESPECÍFICOS INTRO ===================== */
#view-intro .header-container {
  width: 100%;
  display: flex;
  margin-top: 1vh;
  justify-content: center;
  position: relative;
}

#view-intro .main-heading {
  font-size: 6vw;
  font-weight: bold;
  padding-top: 5vh;
  color: #000;
  text-shadow: 0.2vw 0.2vw 0.4vw rgb(0, 255, 255), -0.2vw -0.2vw 0.4vw rgb(244, 29, 29);
  font-family: 'ChauPhilomeneOne-Italic', sans-serif;
}

#view-intro .second-heading {
  font-size: 5vw;
  font-weight: bold;
  padding-top: 8vh;
  padding-right: 5vw;
  align-items: center;
  text-align: center;
  justify-content: center; 
  color: #000;
  font-family: 'ChauPhilomeneOne-Italic', sans-serif;
}

#view-intro .content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 20px;
  border-radius: 20px;
  width: 100%;
}

/* ===================== BOTÓN ATRÁS ===================== */
#view-intro .boton-atras-container {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  padding-left: 4em;
  position: fixed;
  bottom: 2em;
  z-index: 1000;
}

#view-intro .boton-atras {
  background-color: #2563eb;
  color: white;
  padding: 10px 22px;
  font-size: 1rem;
  border-radius: 5vw;
  text-decoration: none;
  font-family: 'ChauPhilomeneOne-Italic', sans-serif;
  font-weight: bold;
}

#view-intro .boton-atras:hover {
  background-color: #1e40af;
}

/* ===================== BOTÓN DE AJUSTES ===================== */
#view-intro .settings-button-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

#view-intro .settings-button {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#view-intro .settings-button:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#view-intro .settings-button:active {
  transform: translateY(0);
}

/* ===================== MODAL DE CONFIGURACIÓN ===================== */
#view-intro .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#view-intro .modal-content {
  background: white;
  border-radius: 15px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#view-intro .modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#view-intro .modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

#view-intro .modal-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

#view-intro .modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

#view-intro .modal-body {
  padding: 2rem;
}

#view-intro .form-group {
  margin-bottom: 1rem;
}

#view-intro .form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}

#view-intro .form-control {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

#view-intro .form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#view-intro .modal-footer {
  padding: 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

#view-intro .btn-action {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

#view-intro .btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#view-intro .modal-banner {
  background: rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  margin: 1rem 2rem;
  padding: 1rem;
  border: 2px solid #667eea;
}

#view-intro .modal-banner-text {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  animation: modal-banner-scroll 15s linear infinite;
}

@keyframes modal-banner-scroll {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ===================== TEMPORIZADOR ===================== */
#view-intro .temporizador-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.92);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(10px);
  animation: fadeInOverlay 0.5s ease-in-out;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

#view-intro .temporizador-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#view-intro .temporizador-container {
  position: relative;
  text-align: center;
  background: linear-gradient(180deg, rgba(26, 240, 162, 0.95) 0%, rgba(75, 143, 229, 0.95) 100%);
  padding: 3vw 3.5vw 2vw 3.5vw;
  border-radius: 3vw;
  box-shadow: 
    0 2vw 4vw rgba(0,0,0,0.4),
    0 0 2vw rgba(255,255,255,0.3),
    inset 0 0 1.5vw rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3);
  z-index: 2;
  animation: containerEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: visible;
  max-width: 90vw;
  max-height: 80vh;
  margin-bottom: 2vh;
}

@keyframes containerEntrance {
  0% {
    transform: scale(0.5) rotate(-5deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.05) rotate(2deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

#view-intro .temporizador-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.3), transparent);
  animation: floatCircle 4s ease-in-out infinite;
}

#view-intro .temporizador-circle-1 {
  width: 150px;
  height: 150px;
  top: -50px;
  left: -50px;
  animation-delay: 0s;
  animation-duration: 6s;
}

#view-intro .temporizador-circle-2 {
  width: 200px;
  height: 200px;
  bottom: -80px;
  right: -80px;
  animation-delay: 1s;
  animation-duration: 7s;
}

#view-intro .temporizador-circle-3 {
  width: 100px;
  height: 100px;
  top: 50%;
  right: -30px;
  animation-delay: 2s;
  animation-duration: 5s;
}

@keyframes floatCircle {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translate(20px, -20px) scale(1.1);
    opacity: 0.5;
  }
}

#view-intro .temporizador-content {
  position: relative;
  z-index: 3;
}

#view-intro .temporizador-lettering-wrapper {
  animation: letteringFloat 3s ease-in-out infinite;
}

@keyframes letteringFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.02);
  }
}

#view-intro .temporizador-lettering {
  max-width: 70vw !important;
  max-height: 20vh !important;
  width: auto;
  height: auto;
  margin: 0 auto 2vh auto !important;
  object-fit: contain;
  filter: drop-shadow(0 0.8vw 1.5vw rgba(0,0,0,0.5)) 
          drop-shadow(0 0 2vw rgba(255,255,255,0.3));
  display: block;
  animation: logoGlow 2s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% {
    filter: drop-shadow(0 0.8vw 1.5vw rgba(0,0,0,0.5)) 
            drop-shadow(0 0 2vw rgba(255,255,255,0.3));
  }
  50% {
    filter: drop-shadow(0 0.8vw 1.5vw rgba(0,0,0,0.5)) 
            drop-shadow(0 0 3vw rgba(255,255,255,0.6));
  }
}

#view-intro .temporizador-display-wrapper {
  position: relative;
  display: inline-block;
}

#view-intro .temporizador-display {
  font-family: 'ChauPhilomeneOne-Italic', sans-serif;
  font-size: 12vw;
  color: #ffffff;
  text-shadow: 
    0 0 1vw rgba(255,255,255,0.8),
    0 0 2vw rgba(255,255,255,0.6),
    0 0.8vw 1.5vw rgba(0,0,0,0.6);
  margin: 0;
  font-weight: bold;
  position: relative;
  z-index: 2;
  animation: pulseNumber 1.5s ease-in-out infinite;
}

@keyframes pulseNumber {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

#view-intro .temporizador-display-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255,255,255,0.3), transparent 70%);
  animation: glowPulse 2s ease-in-out infinite;
  z-index: 1;
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

#view-intro .temporizador-text {
  font-family: 'ChauPhilomeneOne-Italic', sans-serif;
  font-size: 2vw;
  color: #ffffff;
  opacity: 0.95;
  text-shadow: 
    0 0.3vw 0.6vw rgba(0,0,0,0.4),
    0 0 1vw rgba(255,255,255,0.3);
  animation: textFade 3s ease-in-out infinite;
  font-weight: 600;
  letter-spacing: 0.05em;
}

@keyframes textFade {
  0%, 100% {
    opacity: 0.95;
  }
  50% {
    opacity: 1;
  }
}

#view-intro .temporizador-btn-cerrar {
  font-family: 'ChauPhilomeneOne-Italic', sans-serif;
  font-size: 2.2vw;
  padding: 1vw 2.5vw;
  border-radius: 3vw;
  font-weight: bold;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
  color: #333;
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: 
    0 0.4vw 1.2vw rgba(0,0,0,0.3),
    inset 0 0.15vw 0.3vw rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5vw;
  margin: 1.5vh auto 1vh auto;
  position: relative;
  overflow: hidden;
}

#view-intro .temporizador-btn-cerrar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

#view-intro .temporizador-btn-cerrar:hover::before {
  width: 300%;
  height: 300%;
}

#view-intro .temporizador-btn-cerrar:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 
    0 1vw 2vw rgba(0,0,0,0.4),
    inset 0 0.2vw 0.4vw rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.8);
}

#view-intro .temporizador-btn-cerrar:active {
  transform: translateY(-1px) scale(1.02);
}

#view-intro .temporizador-btn-icon {
  font-size: 2.5vw;
  line-height: 1;
  position: relative;
  z-index: 2;
}

#view-intro .temporizador-btn-text {
  position: relative;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

#view-intro #cerrar-temporizador-btn {
  font-family: 'ChauPhilomeneOne-Italic', sans-serif;
}

/* ===================== RESPONSIVE - TABLETS ===================== */
@media (max-width: 991px) {
  #view-intro .temporizador-display { 
    font-size: 15vw; 
  }
  #view-intro .temporizador-text { 
    font-size: 2.5vw; 
  }
  #view-intro .temporizador-container { 
    padding: 3vw 4vw 2vw 4vw; 
    max-height: 75vh;
    margin-bottom: 2vh;
  }
  #view-intro .temporizador-lettering { 
    max-width: 75vw !important; 
    max-height: 25vh !important; 
  }
  #view-intro .temporizador-btn-cerrar { 
    font-size: 3.2vw; 
    padding: 1.2vw 3.5vw; 
    border-radius: 2.5vw;
    margin: 1.2vh auto 1vh auto;
  }
  #view-intro .temporizador-btn-icon {
    font-size: 3.5vw;
  }
  #view-intro .temporizador-circle-1 {
    width: 100px;
    height: 100px;
  }
  #view-intro .temporizador-circle-2 {
    width: 120px;
    height: 120px;
  }
  #view-intro .temporizador-circle-3 {
    width: 70px;
    height: 70px;
  }
  #view-intro #cerrar-temporizador-btn { 
    font-size: 3.2vw; 
    padding: 1.2vw 3vw; 
    border-radius: 2.5vw;
    margin-bottom: 1vh;
  }
}

/* ===================== RESPONSIVE - MÓVILES ===================== */
@media (max-width: 576px) {
  #view-intro .temporizador-display { 
    font-size: 18vw; 
  }
  #view-intro .temporizador-text { 
    font-size: 3vw; 
  }
  #view-intro .temporizador-container { 
    padding: 4vw 5vw 2vw 5vw; 
    max-height: 70vh;
    margin-bottom: 2vh;
  }
  #view-intro .temporizador-lettering { 
    max-width: 80vw !important; 
    max-height: 28vh !important; 
  }
  #view-intro .temporizador-btn-cerrar { 
    font-size: 3.8vw; 
    padding: 1.5vw 4vw; 
    border-radius: 2vw;
    margin: 1vh auto 1vh auto;
  }
  #view-intro .temporizador-btn-icon {
    font-size: 4.2vw;
  }
  #view-intro .temporizador-circle-1 {
    width: 80px;
    height: 80px;
  }
  #view-intro .temporizador-circle-2 {
    width: 100px;
    height: 100px;
  }
  #view-intro .temporizador-circle-3 {
    width: 50px;
    height: 50px;
  }
  #view-intro #cerrar-temporizador-btn { 
    font-size: 3.8vw; 
    padding: 1.5vw 4vw; 
    border-radius: 2vw;
    margin-bottom: 1vh;
  }
}

#view-intro .btn-danger {
  font-family: 'ChauPhilomeneOne-Italic', sans-serif;
  font-size: 2.5vw;
  padding: 1vw 2vw;
  border-radius: 1.5vw;
  font-weight: bold;
}

#view-intro .mt-3 {
  margin-top: 1rem;
}
