/* ============================================
   CODPAA AI Login - Original Blue Theme
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #001a33 0%, #003366 50%, #002244 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
  position: relative;
}

/* Neural Network Canvas Background */
#neuralCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: auto;
}

/* Scan Line Animation */
.scan-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 122, 204, 0.5), transparent);
  animation: scanMove 4s linear infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes scanMove {
  0% {
    top: 0;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    top: 100%;
    opacity: 0;
  }
}

/* Login Container */
.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

/* Glassmorphism Card */
.login-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 122, 204, 0.2);
  border-radius: 20px;
  padding: 30px 24px;
  box-shadow:

    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 100px rgba(0, 122, 204, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

/* Card Glow Border Animation */
.login-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #003366, #007acc, #005fa3, #007acc);
  background-size: 400% 400%;
  border-radius: 26px;
  z-index: -1;
  animation: borderGlow 8s ease infinite;
  opacity: 0.4;
}

@keyframes borderGlow {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* AI Icon */
.ai-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;

  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-icon-inner {
  font-size: 30px;

  color: #007acc;
  animation: pulse 2s ease-in-out infinite;
  text-shadow: 0 0 30px rgba(0, 122, 204, 0.6);
}

.ai-icon-inner img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.ai-icon-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(0, 122, 204, 0.4);
  border-radius: 50%;
  animation: ringPulse 3s ease-out infinite;
}

.ai-icon-ring:nth-child(2) {
  animation-delay: 1s;
}

.ai-icon-ring:nth-child(3) {
  animation-delay: 2s;
}

@keyframes ringPulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* Title */
.login-title {
  text-align: center;
  margin-bottom: 8px;
}

.login-title h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;

  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.5px;
}

/* AI Tagline with rotating text */
.ai-tagline {
  text-align: center;
  margin-bottom: 12px;

  height: 24px;
  overflow: hidden;
}

.ai-tagline-text {
  font-size: 0.85rem;
  font-weight: 500;
  background: linear-gradient(90deg, #007acc, #005fa3);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeRotate 9s ease-in-out infinite;
}

@keyframes fadeRotate {

  0%,
  30% {
    opacity: 1;
  }

  33% {
    opacity: 0;
  }

  36%,
  63% {
    opacity: 1;
  }

  66% {
    opacity: 0;
  }

  69%,
  96% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* Form Elements */
.form-group {
  margin-bottom: 12px;
  position: relative;

}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0, 122, 204, 0.7);
  font-size: 16px;
  z-index: 2;
  transition: color 0.3s ease;
}

.form-control {
  width: 100%;
  padding: 12px 16px 12px 40px;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #ffffff;
  font-size: 15px;
  transition: all 0.3s ease;
  outline: none;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-control:focus {
  border-color: rgba(0, 122, 204, 0.6);
  background: rgba(0, 122, 204, 0.08);
  box-shadow:
    0 0 0 3px rgba(0, 122, 204, 0.15),
    0 0 20px rgba(0, 122, 204, 0.15);
}

.form-control:focus+.input-icon,
.form-group:focus-within .input-icon {
  color: #007acc;
}

/* Remember & Forgot */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-check-input {
  width: 16px;
  height: 16px;
  accent-color: #007acc;
  cursor: pointer;
}

.form-check-label {
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.forgot-link {
  color: rgba(0, 122, 204, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}

.forgot-link:hover {
  color: #007acc;
  text-decoration: underline;
}

/* Error Message */
#mensaje_login {
  text-align: center;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #ff6b6b;
  min-height: 20px;
}

/* Submit Button */
.btn-ai {
  width: 100%;
  padding: 12px 24px;

  background: linear-gradient(135deg, #007acc 0%, #003366 100%);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-ai::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-ai:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 40px rgba(0, 122, 204, 0.4),
    0 0 60px rgba(0, 95, 163, 0.3);
}

.btn-ai:hover::before {
  left: 100%;
}

.btn-ai:active {
  transform: translateY(0);
}

/* Processing Animation (shown on submit) */
.btn-ai.processing {
  pointer-events: none;
}

.btn-ai.processing::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .login-title h1 {
    font-size: 1.5rem;
  }

  .ai-icon {
    width: 60px;
    height: 60px;
  }

  .ai-icon-inner {
    font-size: 30px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
