
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #1e293b 100%);
  color: white;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: absolute;
  width: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
  animation: pulse 15s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(-5%, -5%) scale(1.1); opacity: 0.3; }
}

.container {
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  border-radius: 32px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(99, 102, 241, 0.1) inset;
  position: relative;
  z-index: 1;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-icon {
  font-size: 3.5rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #a5b4fc 0%, #c7d2fe 50%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.tagline {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 32px;
  color: #cbd5e1;
  font-weight: 400;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.15);
  padding: 6px 12px;
  border-radius: 40px;
  font-size: 0.7rem;
  margin-bottom: 20px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.alert {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  display: none;
  align-items: center;
  gap: 10px;
  text-align: left;
  backdrop-filter: blur(10px);
  animation: slideDown 0.3s ease-out;
  border: 1px solid;
  font-weight: 500;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#successBox { background: rgba(22, 163, 74, 0.15); border-color: rgba(22, 163, 74, 0.3); color: #86efac; }
#errorBox { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3); color: #fca5a5; }
#cooldownBox { background: rgba(99, 102, 241, 0.15); border-color: rgba(99, 102, 241, 0.3); color: #a5b4fc; }
#rateLimitBox { background: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }

.input-group {
  margin-bottom: 24px;
  position: relative;
}

input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  border: 2px solid rgba(148, 163, 184, 0.1);
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
  font-weight: 400;
}

input::placeholder {
  color: rgba(203, 213, 225, 0.6);
  font-weight: 400;
}

input:focus {
  border-color: #6366f1;
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  height: 0;
  width: 0;
}

button {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  letter-spacing: 0.3px;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

button:hover::before {
  left: 100%;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.resend {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.9rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.resend button {
  width: auto;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  color: #a5b4fc;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: none;
}

.resend button:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.1);
  border-color: #6366f1;
}

.resend button:disabled {
  opacity: 0.4;
}

.footer {
  margin-top: 32px;
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.timer-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.2);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-left: 8px;
}

.cooldown-warning {
  font-size: 0.7rem;
  color: #fbbf24;
  margin-top: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

@media (max-width: 480px) {
  .container { padding: 32px 24px; }
  h1 { font-size: 2rem; }
  .logo-icon { font-size: 3rem; }
  .footer { flex-direction: column; gap: 8px; }
}