/* ============================================================
   auth.css — Premium Resume Scanner
   Covers: auth modal, login/signup forms, avatar dropdown,
           mobile login, Get Pro ↔ Upgrade Pro swap,
           Google button click colour-wave animation
   ============================================================ */


/* ── 1. MODAL OVERLAY ─────────────────────────────────────── */

#auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
}

#auth-modal.auth-open {
  display: block;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.80);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.auth-modal-positioner {
  position: fixed;
  top: calc(50% + 32px);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 440px;
  padding: 16px;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes auth-scale-in {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.94); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}


/* ── 2. MODAL CARD ─────────────────────────────────────────── */

.auth-card {
  background: #1E293B;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  position: relative;
}

/* Thin gradient top bar */
.auth-card::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #3B82F6, #7C3AED, #EC4899);
}

.auth-card-inner {
  padding: 28px 28px 24px;
}


/* ── 3. CLOSE BUTTON ───────────────────────────────────────── */

.auth-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94A3B8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  z-index: 2;
}
.auth-close-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }


/* ── 4. HEADER ─────────────────────────────────────────────── */

.auth-header {
  text-align: center;
  margin-bottom: 22px;
}

.auth-icon-ring {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1D4ED8, #6D28D9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-icon-ring svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  color: #F1F5F9;
  letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: 13px;
  color: #94A3B8;
  margin-top: 4px;
}


/* ── 5. TABS ───────────────────────────────────────────────── */

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #0F172A;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 22px;
  gap: 3px;
}

.auth-tab {
  padding: 9px 12px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: #64748B;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-tab svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.auth-tab.active {
  background: #1E293B;
  color: #F1F5F9;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}


/* ── 6. ALERT BANNER ───────────────────────────────────────── */

.auth-alert {
  display: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.4;
  align-items: flex-start;
  gap: 8px;
}

.auth-alert.visible { display: flex; }

.auth-alert svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* info (blue) */
.auth-alert.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93C5FD;
}

/* error (red) */
.auth-alert.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #FCA5A5;
}

/* success (green) */
.auth-alert.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86EFAC;
}

/* warning (amber) */
.auth-alert.warning {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #FCD34D;
}


/* ── 7. FORM PANELS ────────────────────────────────────────── */

.auth-form-panel {
  display: none;
}

.auth-form-panel.active {
  display: block;
  animation: auth-fade-up 0.18s ease both;
}

@keyframes auth-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-form-heading {
  text-align: center;
  margin-bottom: 16px;
}

.auth-form-heading h3 {
  font-size: 17px;
  font-weight: 700;
  color: #F1F5F9;
  margin-bottom: 3px;
}

.auth-form-heading p {
  font-size: 13px;
  color: #94A3B8;
}


/* ── 8. FORM FIELDS ────────────────────────────────────────── */

.auth-field-group {
  margin-bottom: 14px;
}

.auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 400px) {
  .auth-field-row { grid-template-columns: 1fr; }
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #94A3B8;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.auth-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #F1F5F9;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.auth-input::placeholder { color: #475569; }

.auth-input:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.auth-input.error-field {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Password wrapper with show/hide toggle */
.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .auth-input {
  padding-right: 42px;
}

.auth-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #64748B;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.auth-pw-toggle:hover { color: #94A3B8; }
.auth-pw-toggle svg { width: 16px; height: 16px; }


/* ── 9. EXTRAS ROW (remember me + forgot password) ─────────── */

.auth-extras {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #94A3B8;
}

.auth-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #3B82F6;
  cursor: pointer;
}

.auth-forgot-link {
  font-size: 13px;
  color: #60A5FA;
  text-decoration: none;
  transition: color 0.15s;
}
.auth-forgot-link:hover { color: #93C5FD; }


/* ── 10. TERMS CHECKBOX ────────────────────────────────────── */

.auth-terms-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-terms-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #3B82F6;
  cursor: pointer;
  flex-shrink: 0;
}

.auth-terms-row span {
  font-size: 12px;
  color: #64748B;
  line-height: 1.5;
}

.auth-terms-row a {
  color: #60A5FA;
  text-decoration: none;
}
.auth-terms-row a:hover { color: #93C5FD; }


/* ── 11. SUBMIT BUTTON ─────────────────────────────────────── */

.auth-submit-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  transition: opacity 0.15s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.auth-submit-btn:hover { opacity: 0.92; }
.auth-submit-btn:active { transform: scale(0.98); }

.auth-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* spinner inside button */
.auth-btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes auth-spin { to { transform: rotate(360deg); } }


/* ── 12. DIVIDER ───────────────────────────────────────────── */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}

.auth-divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.auth-divider-text {
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
}


/* ── 13. SOCIAL BUTTONS ────────────────────────────────────── */

.auth-social-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.auth-social-btn {
  padding: 11px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
  min-height: 44px;
}

.auth-social-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.auth-social-btn:active { transform: scale(0.98); }

.auth-social-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}


/* ── 14. FOOTER LINKS ──────────────────────────────────────── */

.auth-footer-link {
  text-align: center;
  font-size: 13px;
  color: #64748B;
  margin-top: 16px;
}

.auth-footer-link a,
.auth-footer-link button {
  color: #60A5FA;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  padding: 0;
  text-decoration: none;
  transition: color 0.15s;
}

.auth-footer-link a:hover,
.auth-footer-link button:hover { color: #93C5FD; }


/* ── 15. AVATAR BUTTON & DROPDOWN ──────────────────────────── */

#user-avatar-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
  min-height: 36px;
}

#user-avatar-btn.visible { display: inline-flex; }
#user-avatar-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); }

.avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-name {
  font-size: 13px;
  font-weight: 500;
  color: #CBD5E1;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar-chevron {
  width: 14px;
  height: 14px;
  color: #64748B;
  transition: transform 0.2s;
  flex-shrink: 0;
}

#user-avatar-btn[aria-expanded="true"] .avatar-chevron { transform: rotate(180deg); }


/* ── 16. USER DROPDOWN ─────────────────────────────────────── */

#user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  z-index: 200;
  overflow: hidden;
  animation: auth-fade-up 0.15s ease both;
}

#user-dropdown.open { display: block; }

.dropdown-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dropdown-avatar-lg {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.dropdown-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.dropdown-user-details { overflow: hidden; }

.dropdown-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #F1F5F9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-email {
  font-size: 12px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.dropdown-user-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.dropdown-user-badge.pro {
  background: linear-gradient(135deg, rgba(251,191,36,.15), rgba(168,85,247,.15));
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #FCD34D;
}

.dropdown-user-badge.free {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #94A3B8;
}

.dropdown-menu-items {
  padding: 6px;
}

.dropdown-item {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  background: none;
  border: none;
  color: #CBD5E1;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.12s, color 0.12s;
  text-align: left;
  font-family: inherit;
}

.dropdown-item svg { width: 15px; height: 15px; flex-shrink: 0; color: #64748B; }

.dropdown-item:hover { background: rgba(255,255,255,0.06); color: #F1F5F9; }
.dropdown-item:hover svg { color: #94A3B8; }

.dropdown-item.danger { color: #FCA5A5; }
.dropdown-item.danger svg { color: #F87171; }
.dropdown-item.danger:hover { background: rgba(239, 68, 68, 0.1); color: #FCA5A5; }

.dropdown-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 4px 6px;
}

/* Upgrade to Pro item in dropdown */
.dropdown-item.upgrade {
  background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(124,58,237,0.15));
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #A5B4FC;
  margin-bottom: 4px;
}
.dropdown-item.upgrade svg { color: #818CF8; }
.dropdown-item.upgrade:hover {
  background: linear-gradient(135deg, rgba(37,99,235,0.25), rgba(124,58,237,0.25));
}

/* danger-subtle: for destructive actions that need visual separation */
.dropdown-item.danger-subtle {
  color: #f87171;
  opacity: 0.8;
  font-size: 12.5px;
}
.dropdown-item.danger-subtle:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  opacity: 1;
}


/* ── 17. NAVBAR STATE TOGGLES ──────────────────────────────── */

/* Login nav button — hidden when logged in */
#login-nav-btn.auth-hidden   { display: none !important; }

/* Get Pro nav button — hidden when logged in, replaced by Upgrade */
#get-pro-btn.auth-hidden     { display: none !important; }

/* Upgrade nav button — shown only when logged in (free user) */
#upgrade-nav-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid rgba(99,102,241,0.35);
  background: rgba(99,102,241,0.1);
  color: #a5b4fc;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
  white-space: nowrap;
}

#upgrade-nav-btn.visible {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(37,99,235,0.2), rgba(124,58,237,0.2));
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #A5B4FC;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 36px;
  font-family: inherit;
}

#upgrade-nav-btn:hover {
  background: linear-gradient(135deg, rgba(37,99,235,0.35), rgba(124,58,237,0.35));
  border-color: rgba(99, 102, 241, 0.5);
  color: #c7d2fe;
}

/* Logout nav button */
#logout-nav-btn { display: none; }
#logout-nav-btn.visible { display: inline-flex; }

/* nav-avatar-wrapper: must be display:flex to stay in navbar flow */
#nav-avatar-wrapper {
  display: none;
  align-items: center;
  position: relative;
}
#nav-avatar-wrapper.nav-avatar-visible {
  display: flex !important;
}


/* ── 18. MOBILE NAV STATE TOGGLES ──────────────────────────── */

#mobile-login-btn.auth-hidden  { display: none !important; }
#mobile-logout-btn.auth-hidden { display: none !important; }
#mobile-get-pro-btn.auth-hidden { display: none !important; }

#mobile-upgrade-btn {
  display: none;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37,99,235,0.2), rgba(124,58,237,0.2));
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #A5B4FC;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  font-family: inherit;
  transition: all 0.2s;
}

#mobile-upgrade-btn.visible {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Mobile user info strip (shown when logged in) */
#mobile-user-strip {
  display: none;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  margin-bottom: 8px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}

#mobile-user-strip.visible { display: flex; }

.mobile-strip-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.mobile-strip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.mobile-strip-info { overflow: hidden; }

.mobile-strip-name {
  font-size: 14px;
  font-weight: 600;
  color: #F1F5F9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-strip-email {
  font-size: 12px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ── 19. PRO BADGE (navbar) ────────────────────────────────── */

#pro-badge {
  display: none;
}

#pro-badge.visible {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, #D97706, #92400E);
  color: #FEF3C7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}


/* ── 20. VERIFIED EMAIL BADGE ──────────────────────────────── */

.auth-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #86EFAC;
  margin-top: 4px;
}

.auth-verified-badge svg { width: 12px; height: 12px; }


/* ── 21. PASSWORD STRENGTH METER ───────────────────────────── */

.auth-pw-strength {
  margin-top: 6px;
  display: none;
}

.auth-pw-strength.visible { display: block; }

.auth-pw-strength-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin-bottom: 4px;
}

.auth-pw-strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}

.auth-pw-strength-label {
  font-size: 11px;
  color: #64748B;
}


/* ── 22. GOOGLE-ONLY MODAL LAYOUT ──────────────────────────── */

.auth-google-only {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 8px 0 4px;
}

.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #f1f5f9;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  /* Base transition — overridden during animation */
  transition: background 0.18s, border-color 0.18s, transform 0.12s, box-shadow 0.18s;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.auth-google-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-google-btn:hover {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

.auth-google-btn:active { transform: translateY(0); }

.auth-google-note {
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
  margin: 0;
}

.auth-google-terms {
  color: #64748b;
  font-size: 12px;
  text-align: center;
  line-height: 1.6;
}

.auth-google-terms a {
  color: #818cf8;
  text-decoration: none;
}

.auth-google-terms a:hover { text-decoration: underline; }


/* ── 23. GOOGLE BUTTON — CLICK COLOUR-WAVE ANIMATION ──────── */

/*
  On click, the button plunges to pure black, then erupts through
  a deep-blue → electric-purple → hot-pink wave of colour before
  fading back to the resting state as the OAuth redirect kicks in.
*/

/* Main burst: black → blue → purple → pink → back */
@keyframes google-btn-burst {
  0% {
    background: #000000;
    border-color: #000000;
    box-shadow: 0 0 0px rgba(0,0,0,0);
    color: #ffffff;
    transform: scale(0.97);
  }
  12% {
    background: #05050f;
    border-color: #1e3a8a;
    box-shadow: 0 0 22px rgba(37,99,235,0.6), inset 0 0 12px rgba(37,99,235,0.15);
    color: #93c5fd;
    transform: scale(0.98);
  }
  30% {
    background: #0a0520;
    border-color: #6d28d9;
    box-shadow: 0 0 38px rgba(109,40,217,0.75), 0 0 70px rgba(109,40,217,0.3), inset 0 0 18px rgba(109,40,217,0.2);
    color: #c4b5fd;
    transform: scale(1.005);
  }
  50% {
    background: #12041a;
    border-color: #be185d;
    box-shadow: 0 0 34px rgba(236,72,153,0.7), 0 0 65px rgba(236,72,153,0.25), inset 0 0 16px rgba(236,72,153,0.18);
    color: #f9a8d4;
    transform: scale(1.005);
  }
  68% {
    background: #080820;
    border-color: #1d4ed8;
    box-shadow: 0 0 24px rgba(59,130,246,0.55), inset 0 0 10px rgba(59,130,246,0.12);
    color: #bfdbfe;
    transform: scale(1);
  }
  84% {
    background: #040410;
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 0 10px rgba(255,255,255,0.06);
    color: #e2e8f0;
    transform: scale(1);
  }
  100% {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    box-shadow: none;
    color: #f1f5f9;
    transform: scale(1);
  }
}

/* Outer ripple ring that expands and fades */
@keyframes google-btn-ring {
  0%   { box-shadow: 0 0 0 0px rgba(99,102,241,0.7); }
  40%  { box-shadow: 0 0 0 10px rgba(99,102,241,0.15); }
  100% { box-shadow: 0 0 0 18px rgba(99,102,241,0); }
}

/* Shimmer sweep across the button surface */
@keyframes google-btn-shimmer {
  0%   { transform: translateX(-120%) skewX(-12deg); }
  100% { transform: translateX(220%)  skewX(-12deg); }
}

/* Google G icon: bounce pop */
@keyframes google-icon-pop {
  0%   { transform: scale(1)    rotate(0deg);  }
  25%  { transform: scale(1.35) rotate(-10deg); }
  55%  { transform: scale(0.88) rotate(6deg);  }
  80%  { transform: scale(1.08) rotate(-2deg); }
  100% { transform: scale(1)    rotate(0deg);  }
}

/* ── Firing state (class added by JS on click) ── */
.auth-google-btn.btn-firing {
  animation:
    google-btn-burst 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    google-btn-ring  0.65s ease-out forwards;
  pointer-events: none; /* block double-click while redirect fires */
  cursor: default;
}

/* Shimmer pseudo-element */
.auth-google-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.12),
    transparent
  );
  transform: translateX(-120%) skewX(-12deg);
  pointer-events: none;
}

.auth-google-btn.btn-firing::after {
  animation: google-btn-shimmer 0.55s 0.08s ease-out forwards;
}

/* Icon pop fires when button is in firing state */
.auth-google-btn.btn-firing svg {
  animation: google-icon-pop 0.52s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Loading text fade (optional — swap label to "Redirecting…" in JS) */
.auth-google-btn.btn-firing .auth-google-btn-label {
  opacity: 0.7;
  letter-spacing: 0.04em;
  transition: opacity 0.2s, letter-spacing 0.3s;
}


/* ── 24. RESPONSIVE ────────────────────────────────────────── */

@media (max-width: 480px) {
  .auth-card-inner { padding: 20px 16px 18px; }
  .auth-modal-positioner { padding: 12px; }
  .auth-title { font-size: 18px; }
  #user-dropdown { width: 240px; }
  .avatar-name { display: none; }
}