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

/* ─── TOKENS ─────────────────────────────────────────── */
:root {
  --bg:           #0B111E;
  --surface:      #131C2E;
  --surface-2:    #1A2540;
  --border:       #1E2A41;
  --border-2:     #243050;
  --text:         #F0F4F8;
  --text-2:       #8A9AAD;
  --text-3:       #4A5A6D;
  --accent:       #81D4FA;
  --accent-dim:   rgba(129, 212, 250, 0.12);
  --green:        #00E676;
  --red:          #FF5252;

  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;

  --font-brand: 'Bebas Neue', 'Impact', sans-serif;
  --font-body:  'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:  'Cascadia Code', 'Fira Code', monospace;
}

/* ─── RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ─── LOGO GLOW ───────────────────────────────────────── */
.logo-glow {
  filter: drop-shadow(0 0 8px rgba(129, 212, 250, 0.55))
          drop-shadow(0 0 20px rgba(129, 212, 250, 0.25));
  transition: filter var(--transition-slow);
}
.logo-glow:hover {
  filter: drop-shadow(0 0 12px rgba(129, 212, 250, 0.80))
          drop-shadow(0 0 32px rgba(129, 212, 250, 0.40));
}

/* ─── AUTH LAYOUT ─────────────────────────────────────── */
.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Ambient orb */
.auth-page::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(129,212,250,0.07) 0%, transparent 65%);
  pointer-events: none;
}

/* ─── AUTH CARD ───────────────────────────────────────── */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

/* ─── AUTH HEADER ─────────────────────────────────────── */
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}
.auth-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.auth-brand-name {
  font-family: var(--font-brand);
  font-size: 26px;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 13px;
  color: var(--text-2);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ─── DIVIDER ─────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.auth-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border-2);
}
.auth-divider-text {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

/* ─── FORM ELEMENTS ───────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base);
}
.form-input::placeholder { color: var(--text-3); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(129, 212, 250, 0.12);
}
.form-input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.12);
}

/* ─── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 13px 20px;
  transition: background var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              transform var(--transition-fast),
              box-shadow var(--transition-base),
              opacity var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:not(:disabled):hover {
  background: #a8e4ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(129, 212, 250, 0.2);
}

.btn-google {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-google:not(:disabled):hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-1px);
}

/* Google icon */
.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(11,17,30,0.3);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.btn-google .spinner {
  border-color: rgba(240,244,248,0.2);
  border-top-color: var(--text);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── CHECKBOX ────────────────────────────────────────── */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}
.checkbox-input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1.5px solid var(--border-2);
  border-radius: 5px;
  background: var(--surface-2);
  cursor: pointer;
  margin-top: 2px;
  position: relative;
  transition: border-color var(--transition-base),
              background var(--transition-base);
}
.checkbox-input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox-input:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: 2px solid var(--bg);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.checkbox-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.checkbox-label {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  cursor: pointer;
}
.checkbox-label a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.checkbox-label a:hover { color: #a8e4ff; }

/* ─── ERROR BANNER ────────────────────────────────────── */
.error-banner {
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(255, 82, 82, 0.1);
  border: 1px solid rgba(255, 82, 82, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--red);
  line-height: 1.5;
}
.error-banner.visible { display: flex; }
.error-banner svg { flex-shrink: 0; }

/* ─── FOOTER LINK ─────────────────────────────────────── */
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-3);
}
.auth-footer a {
  color: var(--accent);
  font-weight: 500;
}
.auth-footer a:hover { color: #a8e4ff; }

/* ─── BACK LINK ───────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 24px;
  transition: color var(--transition-fast);
}
.back-link:hover { color: var(--accent); }

/* ─── CALLBACK PAGE ───────────────────────────────────── */
.callback-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 20px;
  text-align: center;
  padding: 24px;
}
.callback-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.callback-text {
  font-size: 14px;
  color: var(--text-2);
}
.callback-brand {
  font-family: var(--font-brand);
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

/* ─── STATIC PAGE (Terms / Privacy) ──────────────────── */
.static-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}
.static-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 40px;
  transition: color var(--transition-fast);
}
.static-back:hover { color: var(--accent); }
.static-brand {
  font-family: var(--font-brand);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 12px;
}
.static-title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.2;
}
.static-updated {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-3);
  margin-bottom: 48px;
}
.static-body h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 12px;
}
.static-body h2:first-child { margin-top: 0; }
.static-body p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 14px;
}
.static-body ul {
  list-style: none;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.static-body ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
}
.static-body ul li::before {
  content: '—';
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}
.static-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.static-divider {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; border-radius: 16px; }
  .static-page { padding: 40px 20px 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
