/* ============================================
   auth.css — Shared styles for login & register
   ============================================ */

/* --- Google Fonts import ---
   Add this in your <head> before this stylesheet:
   <link href="https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
*/

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

/* ---- CSS Variables ---- */
:root {
  --bg:           #0b0c10;
  --surface:      #13141a;
  --border:       #1f2130;
  --accent:       #025536;
  --accent-dim:   rgba(200, 241, 53, 0.12);
  --accent-glow:  rgba(200, 241, 53, 0.25);
  --text:         #e8eaf0;
  --muted:        #6b7094;
  --error:        #ff5f6d;
  --error-dim:    rgba(255, 95, 109, 0.1);
  --success-dim:  rgba(200, 241, 53, 0.08);
}

/* ---- Body ---- */
body {
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* ---- Animated background grid ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,241,53,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,241,53,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridShift 20s linear infinite;
  pointer-events: none;
}

@keyframes gridShift {
  0%   { transform: translateY(0); }
  100% { transform: translateY(48px); }
}

/* ---- Blob glow ---- */
body::after {
  content: '';
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,241,53,0.06) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: blobPulse 6s ease-in-out infinite;
}

@keyframes blobPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: 1; }
  50%       { transform: translate(-50%, -50%) scale(1.15); opacity: 0.6; }
}

/* ---- Wrapper ---- */
.auth-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  padding: 24px;
  animation: slideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Badge ---- */
.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(200,241,53,0.2);
  color: var(--accent);
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.auth-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: badgeBlink 1.5s ease-in-out infinite;
}

@keyframes badgeBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ---- Heading ---- */
.auth-heading {
  font-family: sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.auth-heading span {
  color: var(--accent);
}

/* ---- Subtitle ---- */
.auth-subtitle {
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
  margin-bottom: 36px;
}

/* ---- Card ---- */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,241,53,0.4), transparent);
}

/* ---- Alerts ---- */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 24px;
}

.auth-alert-error {
  background: var(--error-dim);
  border: 1px solid rgba(255,95,109,0.25);
  color: var(--error);
  animation: shakeIn 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.auth-alert-success {
  background: var(--success-dim);
  border: 1px solid rgba(200,241,53,0.25);
  color: var(--accent);
}

@keyframes shakeIn {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.auth-alert-error::before {
  content: '✕';
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  min-width: 18px;
  background: var(--error);
  color: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
}

.auth-alert-success::before {
  content: '✓';
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  min-width: 18px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
}

/* ---- Form field ---- */
.auth-field {
  margin-bottom: 20px;
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ---- Input wrap ---- */
.auth-input-wrap {
  position: relative;
}

.auth-input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
  transition: color 0.2s;
}

.auth-input-wrap:focus-within svg {
  color: var(--accent);
}

/* ---- Input ---- */
.auth-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px 13px 42px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

.auth-input::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

/* ---- Submit button ---- */
.auth-btn {
  width: 100%;
  background: var(--accent);
  color: var(--text);
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.2s;
}

.auth-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(2, 85, 54, 0.3);
}

.auth-btn:hover::after {
  transform: translateX(100%);
}

.auth-btn:active {
  transform: translateY(0);
}

/* ---- Footer links ---- */
.auth-links {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}

.auth-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}

.auth-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.auth-links a:hover {
  color: var(--accent);
}

.auth-links a:hover::after {
  transform: scaleX(1);
}

.auth-sep {
  margin: 0 8px;
  opacity: 0.3;
}

/* forgot password */

.fp-info {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      background: rgba(200,241,53,0.06);
      border: 1px solid rgba(200,241,53,0.15);
      border-radius: 12px;
      padding: 14px 16px;
      margin-bottom: 28px;
    }
    .fp-info-icon {
      width: 32px;
      height: 32px;
      min-width: 32px;
      border-radius: 8px;
      background: rgba(200,241,53,0.12);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .fp-info-icon svg {
      width: 16px;
      height: 16px;
      color: #c8f135;
    }
    .fp-info-text {
      font-size: 13px;
      color: #6b7094;
      line-height: 1.6;
    }
    .fp-info-text strong {
      display: block;
      color: #e8eaf0;
      font-size: 13px;
      font-weight: 500;
      margin-bottom: 2px;
    }
    /* Reset link box */
    .fp-link-box {
      display: block;
      margin-top: 10px;
      background: #0b0c10;
      border: 1px solid #1f2130;
      border-radius: 8px;
      padding: 10px 12px;
      font-size: 12px;
      color: #c8f135;
      word-break: break-all;
      font-family: monospace;
      letter-spacing: 0.02em;
    }

    /* For reset password page css */
    .rsp-strength {
      margin-top: 8px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .rsp-bars {
      display: flex;
      gap: 4px;
      flex: 1;
    }
    .rsp-bar {
      height: 3px;
      flex: 1;
      border-radius: 100px;
      background: #1f2130;
      transition: background 0.3s;
    }
    .rsp-bar.weak   { background: #ff5f6d; }
    .rsp-bar.medium { background: #f5a623; }
    .rsp-bar.strong { background: #c8f135; }
    .rsp-label {
      font-size: 11px;
      font-weight: 500;
      color: #6b7094;
      min-width: 44px;
      text-align: right;
      transition: color 0.3s;
    }
    .rsp-label.weak   { color: #ff5f6d; }
    .rsp-label.medium { color: #f5a623; }
    .rsp-label.strong { color: #c8f135; }

    /* match indicator */
    .rsp-match {
      margin-top: 8px;
      font-size: 12px;
      display: none;
      align-items: center;
      gap: 6px;
    }
    .rsp-match.visible { display: flex; }
    .rsp-match.ok    { color: #c8f135; }
    .rsp-match.fail  { color: #ff5f6d; }
    .rsp-match svg   { width: 14px; height: 14px; }
    