/* =============================
   SPLASH SCREEN - CLUB ALMACÉN
   Primera visita del día
   ============================= */

/* ---------- Variables ---------- */
:root {
  --splash-primary: #2563eb;
  --splash-secondary: #16a34a;
  --splash-accent: #f59e0b;
  --splash-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --splash-white: #ffffff;
  --splash-text: #1f2937;
  --splash-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ---------- Contenedor principal ---------- */
.splash-screen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: var(--splash-bg) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999 !important; /* Máima prioridad sobre todo */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-screen.active {
  opacity: 1;
  visibility: visible;
}

.splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* ---------- Contenido ---------- */
.splash-content {
  text-align: center;
  color: var(--splash-white);
  max-width: 600px;
  padding: 2rem;
  animation: splashContent 1s ease-out;
}

/* ---------- Logo/Icono ---------- */
.splash-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  background: var(--splash-white);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: bold;
  color: var(--splash-primary);
  box-shadow: var(--splash-shadow);
  animation: logoBounce 1.5s ease-out;
}

.splash-logo i {
  animation: logoRotate 2s ease-in-out infinite;
}

/* ---------- Texto ---------- */
.splash-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: titleSlide 1.2s ease-out;
}

.splash-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: subtitleFade 1.4s ease-out;
}

.splash-message {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  opacity: 0.8;
  animation: messageFade 1.6s ease-out;
}

/* ---------- Botón ---------- */
.splash-button {
  background: var(--splash-white);
  color: var(--splash-primary);
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  animation: buttonScale 1.8s ease-out;
}

.splash-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.splash-button:active {
  transform: translateY(0);
}

/* ---------- Elementos decorativos ---------- */
.splash-decoration {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

.splash-decoration:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.splash-decoration:nth-child(2) {
  width: 60px;
  height: 60px;
  top: 20%;
  right: 15%;
  animation-delay: 2s;
}

.splash-decoration:nth-child(3) {
  width: 100px;
  height: 100px;
  bottom: 15%;
  left: 5%;
  animation-delay: 4s;
}

.splash-decoration:nth-child(4) {
  width: 40px;
  height: 40px;
  bottom: 25%;
  right: 10%;
  animation-delay: 1s;
}

/* ---------- Animaciones ---------- */
@keyframes splashContent {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logoBounce {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(-50px);
  }
  50% {
    transform: scale(1.1) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes logoRotate {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

@keyframes titleSlide {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes subtitleFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 0.9;
    transform: translateY(0);
  }
}

@keyframes messageFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.8;
  }
}

@keyframes buttonScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .splash-title {
    font-size: 2rem;
  }
  
  .splash-subtitle {
    font-size: 1rem;
  }
  
  .splash-message {
    font-size: 1rem;
  }
  
  .splash-logo {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }
  
  .splash-content {
    padding: 1rem;
  }
}

/* ---------- Accesibilidad ---------- */
@media (prefers-reduced-motion: reduce) {
  .splash-screen,
  .splash-content,
  .splash-logo,
  .splash-title,
  .splash-subtitle,
  .splash-message,
  .splash-button,
  .splash-decoration {
    animation: none;
  }
  
  .splash-screen {
    transition: none;
  }
}

/* ---------- Dark mode ---------- */
@media (prefers-color-scheme: dark) {
  .splash-screen {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  }
}
