/* ===================================
   LÍDERES PRO - SPLASH STYLES
   All class-based rules are scoped to #splash-screen so they
   cannot bleed into the Vue app.
   =================================== */

/* Global: only box-sizing and the body background */
* { box-sizing: border-box; }

body {
  background-color: #141414;
  background-image: url('/img/fondologin.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

@media (max-width: 768px) {
  body {
    background-image: url('/img/fondomovillogin.webp');
    background-attachment: scroll;
  }
}

/* ===================================
   KEYFRAMES
   =================================== */

@keyframes scanMove {
  0%   { transform: translateY(0); }
  100% { transform: translateY(50px); }
}
@keyframes logoPulseGlow {
  0%, 100% { filter: drop-shadow(0 0 25px rgba(255,196,0,0.5)); transform: scale(1) translateZ(0); }
  50%       { filter: drop-shadow(0 0 35px rgba(255,196,0,0.65)); transform: scale(1.02) translateZ(0); }
}
@keyframes buttonShine {
  0%   { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}
@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,196,0,0.1), 0 0 30px rgba(255,196,0,0.2); }
  50%       { box-shadow: 0 0 0 3px rgba(255,196,0,0.2), 0 0 40px rgba(255,196,0,0.4), 0 0 60px rgba(255,196,0,0.2); }
}

/* ===================================
   SPLASH SCREEN — all scoped to #splash-screen
   =================================== */

#splash-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow: hidden;
}

#splash-screen * {
  margin: 0;
  padding: 0;
}

#splash-screen .splash-container {
  position: relative;
  width: 100%; max-width: 500px;
  padding: 40px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}

#splash-screen .splash-logo-container {
  position: relative;
  width: 300px; height: 300px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 60px;
}

#splash-screen .splash-ring {
  position: absolute;
  border: 2px solid rgba(255,196,0,0.2);
  border-radius: 50%;
  opacity: 0;
}
#splash-screen .splash-ring:nth-child(1) { width: 280px; height: 280px; }
#splash-screen .splash-ring:nth-child(2) { width: 220px; height: 220px; }
#splash-screen .splash-ring:nth-child(3) { width: 160px; height: 160px; }

#splash-screen .splash-logo {
  width: 200px; height: auto;
  position: relative; z-index: 10;
  filter: drop-shadow(0 0 40px rgba(255,196,0,0.6));
  opacity: 0;
}

#splash-screen .splash-particles {
  position: absolute;
  width: 100%; height: 100%;
  pointer-events: none;
}

#splash-screen .particle {
  position: absolute;
  width: 3px; height: 3px;
  background: #FFC400;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 10px #FFC400;
}

#splash-screen .splash-text {
  font-size: 1.3rem;
  font-weight: 300;
  color: rgba(255,255,255,0.9);
  text-align: center;
  opacity: 0;
  letter-spacing: 2px;
}

/* Login form inside splash */
#splash-screen .login-form-container {
  width: 100%; max-width: 400px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  padding: 40px;
  opacity: 0;
  pointer-events: none;
}
#splash-screen .login-form-container.active { pointer-events: all; }

#splash-screen .form-particles {
  position: absolute;
  width: 100%; height: 100%;
  top: 0; left: 0;
  pointer-events: none; z-index: 1;
}

#splash-screen .form-scan-lines {
  position: absolute;
  width: 100%; height: 100%;
  top: 0; left: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0px, rgba(255,196,0,0.02) 1px, transparent 2px);
  animation: scanMove 8s linear infinite;
  z-index: 1;
}

#splash-screen .form-logo {
  width: 140px; height: auto;
  display: block;
  margin: 0 auto 50px;
  filter: drop-shadow(0 0 30px rgba(255,196,0,0.5));
  opacity: 0;
  animation: logoPulseGlow 3s ease-in-out infinite;
  will-change: filter, transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#splash-screen .login-form {
  display: flex; flex-direction: column;
  gap: 20px; position: relative; z-index: 10;
}

#splash-screen .form-group { position: relative; opacity: 0; }

#splash-screen .pw-group { display: flex; align-items: center; }
#splash-screen .pw-group .form-input { padding-right: 52px; }
#splash-screen .pw-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(0,0,0,0.45);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 11;
}
#splash-screen .pw-toggle:hover { color: rgba(0,0,0,0.7); }

#splash-screen .form-input {
  width: 100%;
  padding: 18px 24px;
  background: rgba(255,255,255,0.88);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 24px;
  color: #111; font-size: 1rem; outline: none;
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  font-family: inherit;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  position: relative; overflow: hidden;
}
#splash-screen .form-input::placeholder { color: rgba(0,0,0,0.42); font-weight: 400; }
#splash-screen .form-input:focus {
  border-color: rgba(255,196,0,0.8);
  box-shadow: 0 0 0 3px rgba(255,196,0,0.2), 0 8px 32px rgba(0,0,0,0.3);
}
#splash-screen .form-input:-webkit-autofill,
#splash-screen .form-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #111 !important;
  -webkit-box-shadow: 0 0 0 30px rgba(255,255,255,0.88) inset !important;
}

#splash-screen .form-button {
  width: 100%; padding: 18px;
  background: linear-gradient(135deg, #FFC400 0%, #FFD700 100%);
  border: none; border-radius: 16px;
  color: #000; font-size: 1.05rem; font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(255,196,0,0.3);
  opacity: 0; margin-top: 10px;
  position: relative; overflow: hidden;
}
#splash-screen .form-button::before {
  content: '';
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  animation: buttonShine 3s infinite;
}
#splash-screen .form-button:hover  { transform: translateY(-2px); box-shadow: 0 6px 30px rgba(255,196,0,0.5); }
#splash-screen .form-button:active { transform: translateY(0); }
#splash-screen .form-button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

#splash-screen .form-links {
  display: flex; justify-content: center; align-items: center;
  flex-direction: column; gap: 15px; margin-top: 25px; opacity: 0;
}

#splash-screen .form-link {
  color: rgba(255,255,255,0.95);
  text-decoration: none; font-size: 0.9rem;
  transition: all 0.3s ease; position: relative; font-weight: 400;
}
#splash-screen .form-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px; background: #FFC400; transition: width 0.3s ease;
}
#splash-screen .form-link:hover { color: #FFC400; }
#splash-screen .form-link:hover::after { width: 100%; }

#splash-screen .back-to-site {
  display: block; width: 100%;
  padding: 10px 20px; margin-top: 15px;
  background: transparent;
  border: 1px solid rgba(255,196,0,0.3);
  color: rgba(255,196,0,0.8);
  text-align: center; text-decoration: none;
  font-size: 0.85rem; font-weight: 400;
  border-radius: 8px; cursor: pointer;
  transition: all 0.3s ease;
  position: relative; z-index: 10; opacity: 0;
}
#splash-screen .back-to-site:hover {
  background: rgba(255,196,0,0.1);
  border-color: rgba(255,196,0,0.6);
  color: #FFC400; transform: translateY(-2px);
}

#splash-screen .spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #000; border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block; vertical-align: middle; margin-left: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================================
   APP CONTAINER TRANSITION
   =================================== */

#app {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#app.visible {
  opacity: 1;
  visibility: visible;
}

/* ===================================
   RESPONSIVE — splash elements only
   =================================== */

@media (max-width: 768px) {
  #splash-screen .splash-logo-container { width: 300px; height: 300px; margin-bottom: 30px; }
  #splash-screen .splash-logo { width: 200px; }
  #splash-screen .splash-text { font-size: 1.2rem; }
  #splash-screen .login-form-container { padding: 25px 20px; max-width: 90%; }
  #splash-screen .form-logo { width: 160px; margin-bottom: 55px; }
  #splash-screen .form-input { padding: 14px 18px; font-size: 15px; border-radius: 20px; }
  #splash-screen .form-button { padding: 14px; font-size: 15px; }
  #splash-screen .back-to-site { padding: 10px 16px; font-size: 0.8rem; margin-top: 12px; }
  #splash-screen .form-links { flex-direction: column; gap: 12px; margin-top: 15px; }
  #splash-screen .form-link { font-size: 0.85rem; }
  #splash-screen .splash-ring:nth-child(1) { width: 290px; height: 290px; }
  #splash-screen .splash-ring:nth-child(2) { width: 230px; height: 230px; }
  #splash-screen .splash-ring:nth-child(3) { width: 170px; height: 170px; }
}

@media (max-width: 480px) {
  #splash-screen .login-form-container { padding: 20px 15px; max-width: 95%; }
  #splash-screen .form-logo { width: 150px; margin-bottom: 60px; }
  #splash-screen .form-input { padding: 13px 16px; font-size: 15px; border-radius: 18px; }
  #splash-screen .form-button { padding: 13px; font-size: 15px; }
  #splash-screen .back-to-site { padding: 9px 14px; font-size: 0.75rem; }
  #splash-screen .form-links { gap: 10px; margin-top: 12px; }
  #splash-screen .form-link { font-size: 0.8rem; }
  #splash-screen .splash-logo-container { width: 280px; height: 280px; }
  #splash-screen .splash-logo { width: 180px; }
  #splash-screen .splash-text { font-size: 1.1rem; }
}
