@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #080808;
  --bg-card: #111111;
  --border: rgba(255,255,255,0.08);
  --border-glow: rgba(139,92,246,0.4);
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --purple-dark: #6d28d9;
  --gold: #f59e0b;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  --error: #ef4444;
  --success: #22c55e;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

html, body { height: 100%; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

/* Background orbs */
.bg-orb {
  position: fixed; border-radius: 50%;
  filter: blur(80px); pointer-events: none; z-index: 0;
}
.bg-orb-1 {
  width: 500px; height: 500px;
  background: rgba(139,92,246,0.08);
  top: -150px; right: -100px;
}
.bg-orb-2 {
  width: 400px; height: 400px;
  background: rgba(245,158,11,0.05);
  bottom: -100px; left: -100px;
}

.auth-container {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  padding: 20px;
}

.auth-card {
  background: rgba(17,17,17,0.9);
  backdrop-filter: blur(30px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 8px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
  animation: cardIn 0.5s cubic-bezier(0.4,0,0.2,1) forwards;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 32px; text-decoration: none;
}
.auth-brand .logo-img { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; }
.auth-brand .brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem; font-weight: 700;
  background: linear-gradient(135deg, var(--purple-light), #fcd34d);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.auth-heading { margin-bottom: 28px; }
.auth-heading h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem; font-weight: 700; margin-bottom: 6px;
}
.auth-heading p { font-size: 0.875rem; color: var(--text-secondary); }

.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 0.8rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.input-wrapper {
  position: relative; display: flex; align-items: center;
}
.input-icon {
  position: absolute; left: 14px; color: var(--text-muted);
  display: flex; align-items: center; pointer-events: none;
}
.input-icon svg { width: 18px; height: 18px; }
.form-input {
  width: 100%;
  padding: 13px 14px 13px 44px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.9rem; font-family: 'Inter', sans-serif;
  transition: var(--transition); outline: none;
}
.form-input:focus {
  border-color: var(--border-glow);
  background: rgba(139,92,246,0.06);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}
.form-input::placeholder { color: var(--text-muted); }
.input-toggle {
  position: absolute; right: 14px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center;
  transition: var(--transition);
}
.input-toggle:hover { color: var(--purple-light); }
.input-toggle svg { width: 18px; height: 18px; }

.form-options {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.forgot-link { font-size: 0.8rem; color: var(--purple-light); text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }

.btn-submit {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: #fff; border: none; border-radius: 12px;
  font-size: 0.95rem; font-weight: 700; font-family: 'Inter', sans-serif;
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(139,92,246,0.35);
}
.btn-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 32px rgba(139,92,246,0.5); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-submit .spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0; color: var(--text-muted); font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-footer {
  text-align: center; font-size: 0.85rem; color: var(--text-secondary);
  margin-top: 20px;
}
.auth-footer a { color: var(--purple-light); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

.alert {
  padding: 12px 16px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 500;
  margin-bottom: 18px; display: none;
  animation: alertIn 0.3s ease;
}
@keyframes alertIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.alert-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.2); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.2); color: #86efac; }

@media (max-width: 480px) {
  .auth-card { padding: 28px 22px; }
}
