/* Cool Graphite + Indigo Accent — updated 2026-06-26 */
/* ============================================================================
   StudyHub - Authentication Pages CSS
   Login, Register, Email Verification
   ============================================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #07090f;
  padding: var(--spacing-lg);
  position: relative;
  overflow: hidden;
}

/* Subtle ambient glow behind the card */
.auth-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 350px;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(99,102,241,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.auth-container {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06);
  max-width: 440px;
  width: 100%;
  padding: 2.5rem;
  position: relative;
  animation: slideUp 0.4s ease;
}

/* Inner top glow on the card */
.auth-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: radial-gradient(ellipse 80% 40% at 50% 0%, rgba(99,102,241,0.07) 0%, transparent 60%);
  pointer-events: none;
}

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

/* ── Logo row ── */
.auth-logo-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
}

.auth-wordmark {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: #f3f5fb;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.auth-wordmark-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366F1;
  flex-shrink: 0;
  margin-bottom: 2px;
}

/* ── Live badge ── */
.auth-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #818CF8;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}

.auth-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: live-pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── Auth Header ── */
.auth-header {
  margin-bottom: 1.75rem;
}

/* Keep legacy .auth-logo for any other pages using it */
.auth-logo {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.auth-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #f3f5fb;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  color: rgba(243,245,251,0.55);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Auth Form ── */
.auth-form {
  margin-bottom: var(--spacing-lg);
}

.auth-form .form-group:last-child {
  margin-bottom: 0;
}

/* ── Primary button override for auth pages ── */
.auth-form .btn-primary,
.auth-page .btn-primary {
  background: #6366F1;
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}

.auth-form .btn-primary:hover:not(:disabled),
.auth-page .btn-primary:hover:not(:disabled) {
  background: #4F46E5;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99,102,241,0.45);
}

.auth-form .btn-primary:active:not(:disabled),
.auth-page .btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

/* ── Google button ── */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  background: rgba(255,255,255,0.04);
  color: rgba(243,245,251,0.75);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 0.78rem 1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.google-btn img {
  width: 18px;
  height: 18px;
}

.google-btn:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.22);
  color: #f3f5fb;
}

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

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.25rem 0;
  color: rgba(243,245,251,0.35);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

/* ── Auth Footer ── */
.auth-footer {
  text-align: center;
  color: rgba(243,245,251,0.5);
  font-size: 0.85rem;
  margin-top: 1.5rem;
}

.auth-footer a {
  color: #6366F1;
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  color: #818CF8;
}

/* ── Forgot password link ── */
.auth-forgot {
  display: block;
  text-align: right;
  font-size: 0.82rem;
  color: #6366F1;
  font-weight: 500;
  text-decoration: none;
  margin-top: 1.5rem;
}

.auth-forgot:hover {
  color: #818CF8;
}

/* ── Remember me row ── */
.auth-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

/* ── Checkbox ── */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.checkbox-group input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #6366F1;
  cursor: pointer;
}

.checkbox-group label {
  cursor: pointer;
  user-select: none;
  font-size: 0.83rem;
  color: rgba(243,245,251,0.55);
}

/* ── Password Strength Indicator ── */
.password-strength {
  margin-top: var(--spacing-sm);
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0;
  transition: all var(--transition-base);
  border-radius: 99px;
}

.password-strength-bar.weak   { width: 33%; background: var(--error-red,#EF4444); }
.password-strength-bar.medium { width: 66%; background: var(--warning-orange,#F59E0B); }
.password-strength-bar.strong { width: 100%; background: #4ade80; }

.password-strength-text { font-size: 0.875rem; margin-top: var(--spacing-xs); font-weight: 600; }
.password-strength-text.weak   { color: #EF4444; }
.password-strength-text.medium { color: #F59E0B; }
.password-strength-text.strong { color: #4ade80; }

/* ── Username availability ── */
.username-check {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
  font-size: 0.875rem;
  font-weight: 600;
}
.username-check.checking  { color: rgba(243,245,251,0.55); }
.username-check.available { color: #4ade80; }
.username-check.taken     { color: #EF4444; }

/* ── Email Verification ── */
.verification-page { text-align: center; }

.verification-icon {
  font-size: 5rem;
  margin-bottom: var(--spacing-lg);
  animation: bounce 1s ease infinite;
}
.verification-icon.success { animation: checkmark 0.6s ease; }

@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-10px); }
}
@keyframes checkmark {
  0%   { transform: scale(0); opacity: 0; }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.verification-message {
  color: rgba(243,245,251,0.7);
  margin: var(--spacing-lg) 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ── Social login ── */
.social-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  color: rgba(243,245,251,0.7);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}
.social-login-btn:hover {
  border-color: rgba(99,102,241,0.35);
  color: #f3f5fb;
  transform: translateY(-1px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

/* ── Terms ── */
.auth-terms {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(243,245,251,0.38);
  margin-top: var(--spacing-lg);
  line-height: 1.5;
}
.auth-terms a { color: #6366F1; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .auth-page      { padding: var(--spacing-md); }
  .auth-container { padding: 2rem 1.5rem; }
  .auth-title     { font-size: 1.5rem; }
}
