/* ============================================================
   TesterApp – Auth Pages Styles (auth.css)
   ============================================================ */

.auth-body {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 20px;
  position: relative;
}

/* Background glow */
.auth-body::after {
  content: '';
  position: fixed; 
  top: -20%; 
  left: 50%; 
  transform: translateX(-50%);
  width: 600px; 
  height: 400px; 
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(66, 133, 244, 0.08) 0%, transparent 70%);
  pointer-events: none; 
  z-index: 0;
}

/* ── AUTH CARD ───────────────────────────────────────────────── */
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 40px 36px;
  position: relative; z-index: 1;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  animation: fadeUp .5s ease both;
}

.auth-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 800; font-size: 22px;
  letter-spacing: -0.5px; margin-bottom: 32px; text-decoration: none; color: var(--txt);
}
.auth-logo-img {
  height: 38px;
  width: 38px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  transition: opacity .2s;
}
.auth-logo:hover .auth-logo-img { opacity: .85; }

.auth-heading { font-family: var(--font-head); font-size: 26px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.03em; }
.auth-subheading { color: var(--txt2); font-size: 14px; margin-bottom: 32px; }

/* ── GOOGLE BUTTON ───────────────────────────────────────────── */
.btn-google {
  width: 100%; padding: 13px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--bg3); border: 1px solid var(--border2); border-radius: 8px;
  color: var(--txt); font-size: 14px; font-weight: 500; font-family: var(--font-body);
  cursor: pointer; transition: background .2s, border-color .2s;
}
.btn-google:hover { background: var(--surface); border-color: rgba(255,255,255,0.18); }
.btn-google svg  { width: 18px; height: 18px; flex-shrink: 0; }

/* ── DIVIDER ─────────────────────────────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 24px 0; color: var(--txt3); font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border2);
}

/* ── AUTH SUBMIT BUTTON ──────────────────────────────────────── */
.btn-auth {
  width: 100%; 
  padding: 14px;
  background: var(--accent); 
  color: #000;
  font-size: 15px; font-weight: 700; font-family: var(--font-body);
  border: none; border-radius: 8px; cursor: pointer;
  transition: opacity .2s, transform .15s;
  box-shadow: var(--accent-shadow);
  display: flex; align-items: center; 
  justify-content: center; gap: 8px;
}
.btn-auth:hover    { opacity: .88; transform: translateY(-1px); }
.btn-auth:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── AUTH FOOTER LINK ────────────────────────────────────────── */
.auth-footer-link {
  text-align: center; margin-top: 24px;
  font-size: 13px; color: var(--txt3);
}
.auth-footer-link a { color: var(--accent); transition: opacity .2s; }
.auth-footer-link a:hover { opacity: .8; }

/* ── PASSWORD STRENGTH ───────────────────────────────────────── */
.password-strength { margin-top: 8px; }
.strength-bar {
  height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 4px;
}
.strength-fill {
  height: 100%; border-radius: 2px;
  transition: width .3s ease, background .3s ease;
}
.strength-label { font-size: 11px; color: var(--txt3); font-family: var(--font-mono); }

/* ── ERROR/SUCCESS FLASH ─────────────────────────────────────── */
.auth-flash {
  padding: 12px 16px; border-radius: 8px; font-size: 13px;
  margin-bottom: 20px; display: none;
}
.auth-flash.visible  { display: block; animation: fadeIn .3s ease; }
.auth-flash.error    { background: rgba(255,77,109,0.1); border: 1px solid rgba(255,77,109,0.2); color: var(--red); }
.auth-flash.success  { background: rgba(66, 133, 244,0.1); border: 1px solid rgba(66, 133, 244,0.2); color: var(--accent); }

/* ── USERNAME OVERLAY (for new Google users) ─────────────────── */
.username-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,11,13,0.9); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.username-modal {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 20px; padding: 36px; max-width: 400px; width: 100%;
  animation: fadeUp .4s ease;
}
.username-modal h3 { font-family: var(--font-head); font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.username-modal p  { color: var(--txt2); font-size: 14px; margin-bottom: 24px; }

/* ── LOADING OVERLAY ─────────────────────────────────────────── */
.auth-loading {
  position: absolute; inset: 0; border-radius: 20px;
  background: rgba(10,11,13,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 10; display: none;
}
.auth-loading.visible { display: flex; }

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