/* ===================================
   LÍDERES PRO - SPLASH & LOGIN STYLES
   =================================== */

/* Reset y Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #000;
  background-color: #000;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Canvas de estrellas de fondo */
#stars-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: #000;
}

/* Planeta Tierra girando - centrado */
#earth-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(0);
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  z-index: -1;
  opacity: 0;
  animation: planetFadeIn 1.5s ease-out 0.2s forwards;
  will-change: opacity, transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#earth-sphere {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: 
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.1), transparent 40%),
    radial-gradient(circle at center, #0a1628 0%, #050b15 100%);
  box-shadow: 
    inset -50px -50px 100px rgba(0, 0, 0, 0.9),
    inset 30px 30px 80px rgba(100, 150, 255, 0.1),
    0 0 20px rgba(255, 196, 0, 0.3);
  position: relative;
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
}

/* Continentes del mundo */
#earth-sphere::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 0;
  width: 200%;
  height: 120%;
  background-image: url('/img/mundo.png');
  background-size: 100% 100%;
  background-position: 0 center;
  background-repeat: repeat-x;
  opacity: 0;
  animation: fadeInWorld 1.5s ease-out 0.5s forwards, rotateEarth 80s linear 0.5s infinite;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

@keyframes rotateEarth {
  from {
    transform: translateX(0) translateZ(0);
  }
  to {
    transform: translateX(-50%) translateZ(0);
  }
}

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

@keyframes planetFadeIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9) translateZ(0);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateZ(0);
  }
}

@keyframes rotateEarth360 {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  #earth-container {
    width: 70vw;
    height: 70vw;
    max-width: 400px;
    max-height: 400px;
    opacity: 0.6;
  }
}

/* ===================================
   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;
}

/* Contenedor principal del splash */
.splash-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Logo container con efectos */
.splash-logo-container {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 60px;
}

/* Anillos animados detrás del logo */
.splash-ring {
  position: absolute;
  border: 2px solid rgba(255, 196, 0, 0.2);
  border-radius: 50%;
  opacity: 0;
}

.splash-ring:nth-child(1) {
  width: 280px;
  height: 280px;
}

.splash-ring:nth-child(2) {
  width: 220px;
  height: 220px;
}

.splash-ring:nth-child(3) {
  width: 160px;
  height: 160px;
}

/* Logo principal */
.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;
}

/* Partículas flotantes */
.splash-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

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

/* Texto de bienvenida */
.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 (dentro del splash)
   =================================== */

.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;
}

.login-form-container.active {
  pointer-events: all;
}

/* Partículas continuas en el formulario */
.form-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

/* Scan lines de fondo */
.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;
}

@keyframes scanMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(50px); }
}

/* Logo del formulario (más pequeño) */
.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;
}

@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);
  }
}

/* Form elements */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 10;
}

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

.form-input {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.08) 100%
  );
  backdrop-filter: blur(40px) saturate(180%) brightness(105%);
  -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(105%);
  border: 2px solid transparent;
  border-top: 2px solid rgba(255, 255, 255, 0.6);
  border-left: 2px solid rgba(255, 255, 255, 0.3);
  border-right: 2px solid rgba(255, 255, 255, 0.15);
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 24px;
  color: #fff;
  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 0 rgba(0, 0, 0, 0.3),
    0 2px 8px 0 rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 2px 4px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 4px 0 rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.form-input::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  border-radius: 24px 24px 0 0;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
}

.form-input:focus {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.12) 100%
  );
  border-top-color: rgba(255, 196, 0, 0.8);
  border-left-color: rgba(255, 196, 0, 0.5);
  border-right-color: rgba(255, 196, 0, 0.3);
  border-bottom-color: rgba(255, 196, 0, 0.2);
  box-shadow: 
    0 0 0 4px rgba(255, 196, 0, 0.12),
    0 0 40px rgba(255, 196, 0, 0.25),
    0 12px 40px 0 rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(255, 196, 0, 0.15),
    inset 0 0 0 1px rgba(255, 196, 0, 0.2),
    inset 0 2px 6px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 4px 0 rgba(0, 0, 0, 0.1);
  transform: translateY(-2px) translateZ(0);
  backdrop-filter: blur(45px) saturate(200%) brightness(110%);
  -webkit-backdrop-filter: blur(45px) saturate(200%) brightness(110%);
  animation: borderGlow 2s ease-in-out infinite;
  will-change: transform;
}

.form-input:focus::before {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

@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);
  }
}

.form-input:not(:placeholder-shown) {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
  border-top-color: rgba(255, 255, 255, 0.65);
  border-left-color: rgba(255, 255, 255, 0.35);
  border-right-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(42px) saturate(190%) brightness(108%);
  -webkit-backdrop-filter: blur(42px) saturate(190%) brightness(108%);
}

/* Autofill styles */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff !important;
  -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.08) inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Botón de login */
.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;
}

.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;
}

@keyframes buttonShine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.form-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 196, 0, 0.5);
}

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

.form-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Links del formulario */
.form-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 15px;
  margin-top: 25px;
  opacity: 0;
}

.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;
}

.form-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #FFC400;
  transition: width 0.3s ease;
}

.form-link:hover {
  color: #FFC400;
}

.form-link:hover::after {
  width: 100%;
}

/* Botón para volver al sitio principal */
.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;
}

.back-to-site:hover {
  background: rgba(255, 196, 0, 0.1);
  border-color: rgba(255, 196, 0, 0.6);
  color: #FFC400;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 196, 0, 0.2);
}

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

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

#app.visible {
  opacity: 1;
  visibility: visible;
}

/* ===================================
   FOOTER STYLES
   =================================== */

footer,
.footer,
.copyright,
[class*="footer"] {
  opacity: 0;
  transition: opacity 0.8s ease;
}

footer.visible,
.footer.visible,
.copyright.visible,
[class*="footer"].visible {
  opacity: 1;
}

/* ===================================
   LOGIN PAGE OVERRIDES (cuando Vue carga)
   =================================== */

body.is-login {
  background: transparent;
}

body.is-login .login-card {
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  border: none !important;
}

body.is-login .login-card .logo-container img {
  display: none !important;
}

body.is-login input[type="text"],
body.is-login input[type="email"],
body.is-login input[type="password"] {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 196, 0, 0.2) !important;
  border-radius: 16px !important;
  color: #fff !important;
  padding: 18px 24px !important;
}

body.is-login input:-webkit-autofill {
  -webkit-text-fill-color: #fff !important;
  -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.08) inset !important;
}

body.is-login button[type="submit"] {
  background: linear-gradient(135deg, #FFC400 0%, #FFD700 100%) !important;
  border: none !important;
  border-radius: 16px !important;
  color: #000 !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 20px rgba(255, 196, 0, 0.3) !important;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
  .splash-logo-container {
    width: 300px;
    height: 300px;
    margin-bottom: 30px;
  }

  .splash-logo {
    width: 200px;
  }

  .splash-text {
    font-size: 1.2rem;
  }

  .login-form-container {
    padding: 25px 20px;
    max-width: 90%;
  }

  .form-logo {
    width: 160px;
    margin-bottom: 55px;
    animation: logoPulseGlowMobile 4s ease-in-out infinite;
  }

  @keyframes logoPulseGlowMobile {
    0%, 100% {
      filter: drop-shadow(0 0 25px rgba(255, 196, 0, 0.5));
      transform: scale(1);
    }
    50% {
      filter: drop-shadow(0 0 35px rgba(255, 196, 0, 0.65));
      transform: scale(1.02);
    }
  }

  .form-input {
    padding: 14px 18px;
    font-size: 15px;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.15) 0%,
      rgba(255, 255, 255, 0.05) 50%,
      rgba(255, 255, 255, 0.08) 100%
    );
    backdrop-filter: blur(60px) saturate(180%) brightness(105%);
    -webkit-backdrop-filter: blur(60px) saturate(180%) brightness(105%);
    border: 2px solid transparent;
    border-top: 2px solid rgba(255, 255, 255, 0.6);
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    border-right: 2px solid rgba(255, 255, 255, 0.15);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    box-shadow: 
      0 8px 32px 0 rgba(0, 0, 0, 0.3),
      0 2px 8px 0 rgba(0, 0, 0, 0.2),
      inset 0 0 0 1px rgba(255, 255, 255, 0.1),
      inset 0 2px 4px 0 rgba(255, 255, 255, 0.25),
      inset 0 -2px 4px 0 rgba(0, 0, 0, 0.05);
  }

  .form-input::before {
    border-radius: 20px 20px 0 0;
  }

  .form-button {
    padding: 14px;
    font-size: 15px;
  }

  .back-to-site {
    padding: 10px 16px;
    font-size: 0.8rem;
    margin-top: 12px;
  }

  .form-links {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    margin-top: 15px;
  }

  .form-link {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
  }

  .splash-ring:nth-child(1) {
    width: 290px;
    height: 290px;
  }

  .splash-ring:nth-child(2) {
    width: 230px;
    height: 230px;
  }

  .splash-ring:nth-child(3) {
    width: 170px;
    height: 170px;
  }
}

@media (max-width: 480px) {
  .login-form-container {
    padding: 20px 15px;
    max-width: 95%;
  }

  .form-logo {
    width: 150px;
    margin-bottom: 50px;
  }

  .form-input {
    padding: 13px 16px;
    font-size: 15px;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.15) 0%,
      rgba(255, 255, 255, 0.05) 50%,
      rgba(255, 255, 255, 0.08) 100%
    );
    backdrop-filter: blur(60px) saturate(180%) brightness(105%);
    -webkit-backdrop-filter: blur(60px) saturate(180%) brightness(105%);
    border: 2px solid transparent;
    border-top: 2px solid rgba(255, 255, 255, 0.6);
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    border-right: 2px solid rgba(255, 255, 255, 0.15);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 18px;
    box-shadow: 
      0 8px 32px 0 rgba(0, 0, 0, 0.3),
      0 2px 8px 0 rgba(0, 0, 0, 0.2),
      inset 0 0 0 1px rgba(255, 255, 255, 0.1),
      inset 0 2px 4px 0 rgba(255, 255, 255, 0.25),
      inset 0 -2px 4px 0 rgba(0, 0, 0, 0.05);
  }

  .form-input::before {
    border-radius: 18px 18px 0 0;
  }

  .form-button {
    padding: 13px;
    font-size: 15px;
  }

  .back-to-site {
    padding: 9px 14px;
    font-size: 0.75rem;
  }

  .form-links {
    gap: 10px;
    margin-top: 12px;
  }

  .form-link {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
  }

  .splash-logo-container {
    width: 280px;
    height: 280px;
  }

  .splash-logo {
    width: 180px;
  }

  .splash-text {
    font-size: 1.1rem;
  }
}

/* ===================================
   LOADING SPINNER (para estados de carga)
   =================================== */

.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); }
}
