/* ============================================================
   Auth Pages Stylesheet (Login, Register, Forgot Password)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2128;
  --border: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #6366f1;
  --accent-hover: #4f52d0;
  --accent-glow: rgba(99,102,241,0.25);
  --accent-light: rgba(99,102,241,0.12);
  --danger: #f85149;
  --success: #3fb950;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --font-sans: 'Inter', 'Noto Sans Devanagari', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Animated background blobs */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.07;
  pointer-events: none;
  animation: blob-move 12s ease-in-out infinite alternate;
}
body::before {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -120px; left: -100px;
}
body::after {
  width: 400px; height: 400px;
  background: #8b5cf6;
  bottom: -100px; right: -80px;
  animation-delay: -6s;
}

@keyframes blob-move {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.1); }
}

/* Auth Page Layout */
.auth-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  animation: auth-enter 0.5s cubic-bezier(0.4,0,0.2,1);
}

@keyframes auth-enter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  margin-bottom: 12px;
  box-shadow: 0 8px 32px rgba(99,102,241,0.4);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.auth-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.auth-logo p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.auth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.auth-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Form Groups */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.form-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px 11px 40px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.input-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
  font-size: 0.9rem;
}
.input-toggle:hover { color: var(--text-primary); }

/* Error message */
.field-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Submit button */
.btn-auth {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn-auth::before {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-auth:hover { background: var(--accent-hover); box-shadow: 0 4px 16px rgba(99,102,241,0.4); }
.btn-auth:active::before { opacity: 0.1; }
.btn-auth:disabled { opacity: 0.6; cursor: not-allowed; }

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

/* Auth links */
.auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.auth-link {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
.auth-link:hover { color: var(--accent-hover); text-decoration: underline; }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-footer a { color: var(--accent); font-weight: 500; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* Alert */
.auth-alert {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-alert.error   { background: rgba(248,81,73,0.1); border: 1px solid rgba(248,81,73,0.3); color: var(--danger); }
.auth-alert.success { background: rgba(63,185,80,0.1); border: 1px solid rgba(63,185,80,0.3); color: var(--success); }
.auth-alert.info    { background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.3); color: var(--accent); }

/* Password strength bar */
.password-strength {
  height: 3px;
  background: var(--border);
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
}
.password-strength-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease, background 0.4s ease;
}

.strength-text { font-size: 0.72rem; margin-top: 4px; }

/* Flash */
.flash-message {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: flash-in 0.3s ease;
}
.flash-success { background: rgba(63,185,80,0.15); border: 1px solid rgba(63,185,80,0.4); color: var(--success); }
.flash-error   { background: rgba(248,81,73,0.15); border: 1px solid rgba(248,81,73,0.4); color: var(--danger); }
.flash-close { margin-left: 10px; background: none; border: none; color: inherit; cursor: pointer; }
@keyframes flash-in { from { opacity:0; transform: translateX(-50%) translateY(-8px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }
.flash-hide { opacity:0; transform: translateX(-50%) translateY(-8px); transition: all 0.3s; }

/* Responsive */
@media (max-width: 480px) {
  .auth-card { padding: 24px 20px; border-radius: 16px; }
  body { padding: 16px; }
}
