/* auth.truthly.ai — ported from offer.truthly.ai auth card design */
:root {
  --black: #000;
  --black-card: #111;
  --white: #fff;
  --gray-100: #f0f0f0;
  --gray-300: #b0b0b0;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  background: var(--black);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}
.page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.no-redirect {
  text-align: center;
  max-width: 400px;
  color: var(--gray-400);
  font-size: 1rem;
  line-height: 1.6;
}
.no-redirect h1 { font-size: 1.5rem; color: var(--white); margin-bottom: 12px; }

/* Auth card */
.auth-card {
  position: relative;
  background: var(--black-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header h2 { font-size: 1.6rem; font-weight: 600; margin-bottom: 8px; }
.auth-header p { font-size: 0.95rem; color: var(--gray-400); }
.auth-buttons { display: flex; flex-direction: column; gap: 12px; }
.error-msg { color: #ff6b6b; text-align: center; min-height: 1.2em; font-size: 0.9rem; }

/* Provider buttons */
.btn-auth {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 14px 20px; font-size: 0.95rem; font-weight: 600;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: background 0.15s ease;
  border: 1px solid rgba(255,255,255,0.15);
}
.auth-provider-icon { flex-shrink: 0; }
.btn-apple { background: var(--white); color: var(--black); border-color: var(--white); }
.btn-apple:hover { background: var(--gray-100); }
.btn-google { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.2); }
.btn-google:hover { background: rgba(255,255,255,0.05); }

/* Divider */
.divider { display: flex; align-items: center; gap: 16px; margin: 8px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,0.15); }
.divider span { font-size: 0.8rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; }

/* Inputs */
.input-field {
  width: 100%; padding: 14px 16px; font-size: 0.95rem; color: var(--white);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm); outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input-field:focus { border-color: var(--white); box-shadow: 0 0 0 3px rgba(255,255,255,0.1); }
.input-field::placeholder { color: var(--gray-500); }

/* Tab bar */
.auth-tab-bar {
  display: flex; border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 4px;
}
.auth-tab {
  flex: 1; padding: 10px 0; font-size: 0.85rem; font-weight: 500;
  color: var(--gray-400); background: transparent; border: none; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.auth-tab.active { background: rgba(255,255,255,0.1); color: var(--white); }
.auth-tab:hover:not(.active) { background: rgba(255,255,255,0.04); }

/* Tab panels */
.auth-tab-panel { display: none; }
.auth-tab-panel.active { display: flex; flex-direction: column; gap: 12px; }

/* Phone auth */
.phone-existing-hint { font-size: 0.82rem; color: var(--gray-500); text-align: center; margin-bottom: 4px; }
.phone-verify-hint { font-size: 0.88rem; color: var(--gray-300); text-align: center; margin-bottom: 4px; }
#phone-input-group, #phone-verify-group { display: flex; flex-direction: column; gap: 12px; }
.hidden { display: none !important; }
.btn-link {
  display: block; width: 100%; background: none; border: none;
  color: var(--gray-400); font-size: 0.85rem; cursor: pointer;
  padding: 8px 0; text-align: center; transition: color 0.15s ease;
}
.btn-link:hover { color: var(--white); }

/* Primary button */
.btn-primary {
  width: 100%; padding: 14px; border-radius: var(--radius-sm);
  border: none; background: rgb(113,184,250); color: var(--black);
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
}
.btn-primary:disabled { opacity: 0.6; cursor: wait; }

/* Loader */
.loader-overlay {
  display: none; position: absolute; inset: 0; background: rgba(0,0,0,0.6);
  border-radius: var(--radius-lg); align-items: center; justify-content: center; z-index: 10;
}
.loader-overlay.active { display: flex; }
.spinner {
  width: 36px; height: 36px; border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--white); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Terms */
.auth-terms { font-size: 0.78rem; color: var(--gray-500); text-align: center; margin-top: 20px; }
.auth-terms a { color: var(--gray-400); text-decoration: underline; }

/* Email prompt modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
