/* ================================
   01) RESET + VARIABLES LOGIN
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-cyan: #00d9ff;
  --primary-blue: #0099cc;
  --accent-red: #ff3d57;
  --success-green: #00ff88;
  --error-red: #ff3d57;

  --bg-input: #1a1a1aa7;

  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --text-muted: #808080;

  --shadow-red: 0 4px 20px rgba(255, 61, 87, 0.4);
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.6);
}

/* ================================
   02) BASE
================================ */
body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  background: #000;
}

/* ================================
   03) FONDO LOGIN
================================ */
.login-background {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.login-bg-image {
  position: absolute;
  inset: 0;
  background-image: url('/assets/Fondo-pantalla/evangelion.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.login-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(0, 217, 255, 0.10), transparent 38%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.78));
  z-index: 1;
  pointer-events: none;
}

/* ================================
   04) CONTENEDOR
================================ */
.login-main {
  min-height: 100vh;
  width: 100%;
  padding: 2rem 1rem;

  display: flex;
  align-items: center;
  justify-content: center;

  position: relative;
  z-index: 1;
}

/* ================================
   05) CARD LOGIN
================================ */
.login-card {
  width: 100%;
  max-width: 440px;

  background: rgba(20, 20, 20, 0.38);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.4rem;

  padding: 2.25rem 1.85rem;

  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.60),
    0 0 30px rgba(0, 217, 255, 0.14);

  animation: fadeInScale 0.55s ease-out;
  overflow: hidden;
}

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

.login-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.35rem 0.8rem;
  margin-bottom: 1rem;

  border-radius: 999px;
  border: 1px solid rgba(0, 217, 255, 0.32);
  background: rgba(0, 217, 255, 0.08);

  color: var(--primary-cyan);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;

  text-shadow: 0 0 16px rgba(0, 217, 255, 0.45);
}

.login-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.55rem;
  letter-spacing: 0.3px;
}

.login-subtitle {
  max-width: 92%;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ================================
   06) FORMULARIO
================================ */
.login-form {
  animation: fadeIn 0.6s ease-out 0.15s both;
}

.login-field {
  margin-bottom: 1.25rem;
}

.login-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);

  margin-bottom: 0.5rem;
}

.login-input {
  width: 100%;

  padding: 1rem 1.1rem;

  background: var(--bg-input);
  border: 2px solid #3a3a3a;
  border-radius: 0.65rem;

  color: var(--text-primary);
  font-size: 1.02rem;
  font-family: inherit;

  outline: none;
  transition: all 0.3s ease;
}

.login-input::placeholder {
  color: var(--text-muted);
}

.login-input:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.10);
}

.login-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ================================
   07) MENSAJES
================================ */
.login-message {
  min-height: 22px;

  margin: 0.2rem 0 0.9rem;

  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.login-message.error {
  color: var(--error-red);
}

.login-message.success {
  color: var(--success-green);
}

/* ================================
   08) BOTON
================================ */
.login-btn {
  width: 100%;

  padding: 1rem;

  background: linear-gradient(135deg, var(--accent-red), #ff1744);
  border: none;
  border-radius: 0.65rem;

  color: white;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;

  text-transform: uppercase;
  letter-spacing: 0.6px;

  transition: all 0.3s ease;
  box-shadow: var(--shadow-red);
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 61, 87, 0.5);
}

.login-btn:active:not(:disabled) {
  transform: translateY(0);
}

.login-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

/* ================================
   09) INTENTOS
================================ */
.login-attempts {
  margin-top: 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.login-attempts span {
  color: var(--primary-cyan);
  font-weight: 800;
}

/* ================================
   10) ANIMACIONES
================================ */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================
   11) RESPONSIVE
================================ */
@media (max-width: 768px) {
  .login-main {
    align-items: flex-start;
    padding-top: 7rem;
    padding-bottom: 2.2rem;
  }

  .login-card {
    max-width: 520px;
    padding: 2rem 1.5rem;
  }

  .login-title {
    font-size: 1.6rem;
  }

  .login-subtitle {
    font-size: 0.92rem;
  }
}

@media (max-width: 480px) {
  .login-main {
    padding-top: 5.6rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .login-card {
    max-width: 480px;
    padding: 1.75rem 1.25rem;
    border-radius: 1.15rem;
  }

  .login-badge {
    font-size: 0.68rem;
    letter-spacing: 1.2px;
  }

  .login-title {
    font-size: 1.42rem;
  }

  .login-subtitle {
    max-width: 100%;
    font-size: 0.86rem;
  }

  .login-input {
    padding: 0.75rem 0.875rem;
    font-size: 0.95rem;
  }

  .login-btn {
    padding: 0.875rem;
    font-size: 0.9rem;
  }
}