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

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

:root {
  --cyan:   #C6A15B;
  --purple: #ff4444;
  --text:   #e8f0fe;
  --muted:  #7a9cc0;
  --border: rgba(255,255,255,0.10);
  --surface: rgba(255,255,255,0.05);
}

html, body {
  min-height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: #080f1e;
  color: var(--text);
}

/* ── Animated background ─────────────────────── */
body::before, body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
}
body::before {
  width: 600px; height: 600px;
  top: -200px; right: -200px;
  background: radial-gradient(circle, rgba(198,161,91,0.18) 0%, transparent 70%);
  animation: drift1 18s ease-in-out infinite alternate;
}
body::after {
  width: 500px; height: 500px;
  bottom: -150px; left: -150px;
  background: radial-gradient(circle, rgba(124,58,237,0.14) 0%, transparent 70%);
  animation: drift2 22s ease-in-out infinite alternate;
}
@keyframes drift1 { from { transform: translate(0,0); } to { transform: translate(-60px, 80px); } }
@keyframes drift2 { from { transform: translate(0,0); } to { transform: translate(80px, -60px); } }

/* ── Layout ──────────────────────────────────── */
.auth-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  gap: 24px;
}

/* ── Branding ────────────────────────────────── */
.auth-brand {
  text-align: center;
}
.auth-logo {
  font-family: 'Space Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(198,161,91,0.6), 0 0 60px rgba(198,161,91,0.2);
}
.auth-tagline {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

/* ── Card ────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 48px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
}

/* ── Tab switcher ────────────────────────────── */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.auth-tab {
  padding: 14px;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.5px;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active {
  color: var(--cyan);
  background: rgba(198,161,91,0.08);
  border-bottom: 2px solid var(--cyan);
  margin-bottom: -1px;
}

/* ── Form body ───────────────────────────────── */
.auth-form-wrap {
  padding: 28px 28px 24px;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form[hidden] { display: none !important; }

.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.field-label input {
  padding: 11px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.field-label input::placeholder { color: rgba(122,156,192,0.5); }
.field-label input:focus {
  border-color: rgba(198,161,91,0.6);
  box-shadow: 0 0 0 3px rgba(198,161,91,0.12);
  background: rgba(198,161,91,0.05);
}

.auth-submit {
  margin-top: 4px;
  padding: 13px;
  width: 100%;
  background: linear-gradient(135deg, #C6A15B 0%, #A0824D 100%);
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(198,161,91,0.35);
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
}
.auth-submit:hover {
  opacity: 0.92;
  box-shadow: 0 6px 28px rgba(198,161,91,0.5);
  transform: translateY(-1px);
}
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { opacity: 0.5; cursor: default; transform: none; }

.input-eye-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-eye-wrap input {
  flex: 1;
  padding-right: 42px !important;
}
.btn-eye {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 0;
  color: var(--muted);
  transition: color 0.15s;
  display: flex;
  align-items: center;
}
.btn-eye:hover { color: var(--text); }

.remember-label, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.remember-label input[type="checkbox"],
.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}
.remember-label input[type="checkbox"]:checked,
.checkbox-label input[type="checkbox"]:checked {
  background: var(--cyan);
  border-color: var(--cyan);
}
.remember-label input[type="checkbox"]:checked::after,
.checkbox-label input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.btn-forgot {
  background: none;
  border: none;
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: color 0.15s;
}
.btn-forgot:hover { color: var(--cyan); }

.auth-message {
  min-height: 18px;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
  transition: color 0.2s;
}
.auth-message[data-state="error"] { color: #f87171; }
.auth-message[data-state="success"] { color: #34d399; }

/* ── Google Sign-In ──────────────────────────── */
.auth-google-wrap {
  padding: 0 28px 24px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
#googleSignInBtn {
  display: flex;
  justify-content: center;
}

/* ── Footer ──────────────────────────────────── */
.auth-footer {
  font-size: 11px;
  color: rgba(122,156,192,0.5);
  text-align: center;
  letter-spacing: 0.5px;
}

/* ── Beta notice ─────────────────────────────── */
.beta-notice {
  margin: 16px 28px 0;
  padding: 11px 14px;
  background: rgba(198,161,91,0.08);
  border: 1px solid rgba(198,161,91,0.28);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.beta-notice strong {
  color: var(--cyan);
}

@media (max-width: 480px) {
  .auth-card { border-radius: 14px; }
  .auth-form-wrap { padding: 22px 18px 20px; }
  .beta-notice { margin: 12px 18px 0; }
}
