/* auth.css — homepage, sign-in, sign-up
   Scoped to its own file/classnames so it never collides with the
   existing style.css used by the logged-in dashboard shell. */

:root {
  --auth-bg: #0f1115;
  --auth-bg-panel: #161923;
  --auth-border: #262b3a;
  --auth-text: #e7e9f0;
  --auth-text-dim: #8b90a3;
  --auth-accent: #7c5cff;
  --auth-accent-hover: #9078ff;
  --auth-danger: #ff6b6b;
  --auth-success: #4ade80;
  --auth-radius: 10px;
}

.auth-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, rgba(76, 222, 128, 0.08), transparent 55%),
    var(--auth-bg);
  color: var(--auth-text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
}

/* ---------- shared nav ---------- */
.auth-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 56px);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--auth-text);
  text-decoration: none;
}

.auth-logo .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--auth-accent);
  box-shadow: 0 0 12px 2px rgba(124, 92, 255, 0.7);
}

.auth-nav-links {
  display: flex;
  gap: 10px;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--auth-border);
  background: transparent;
  color: var(--auth-text);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.auth-btn:hover {
  border-color: var(--auth-accent);
  transform: translateY(-1px);
}

.auth-btn-primary {
  background: var(--auth-accent);
  border-color: var(--auth-accent);
  color: #ffffff;
}

.auth-btn-primary:hover {
  background: var(--auth-accent-hover);
  border-color: var(--auth-accent-hover);
}

.auth-btn-block {
  width: 100%;
  padding: 12px 18px;
}

/* ---------- homepage hero ---------- */
.auth-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px 80px;
}

.auth-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--auth-accent);
  font-weight: 700;
  margin-bottom: 18px;
}

.auth-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 18px;
  max-width: 720px;
}

.auth-hero p.auth-sub {
  color: var(--auth-text-dim);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 0 34px;
  line-height: 1.55;
}

.auth-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.auth-hero-actions .auth-btn {
  padding: 13px 26px;
  font-size: 0.98rem;
}

.auth-feature-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  max-width: 760px;
  width: 100%;
  margin-top: 64px;
}

.auth-feature {
  border: 1px solid var(--auth-border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--auth-radius);
  padding: 18px 16px;
  text-align: left;
}

.auth-feature .glyph {
  font-size: 1.3rem;
  margin-bottom: 8px;
  display: block;
}

.auth-feature h3 {
  font-size: 0.92rem;
  margin: 0 0 4px;
}

.auth-feature p {
  font-size: 0.82rem;
  color: var(--auth-text-dim);
  margin: 0;
  line-height: 1.4;
}

/* ---------- login / signup card ---------- */
.auth-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--auth-bg-panel);
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  padding: 34px 30px 28px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

.auth-card h1 {
  font-size: 1.4rem;
  margin: 0 0 6px;
}

.auth-card p.auth-card-sub {
  color: var(--auth-text-dim);
  font-size: 0.88rem;
  margin: 0 0 26px;
}

.auth-field {
  margin-bottom: 16px;
  text-align: left;
}

.auth-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--auth-text-dim);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.auth-field input {
  width: 100%;
  box-sizing: border-box;
  background: #0d0f16;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--auth-text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.auth-field input:focus {
  border-color: var(--auth-accent);
}

.auth-hint {
  font-size: 0.74rem;
  color: var(--auth-text-dim);
  margin-top: 5px;
}

.auth-message {
  display: none;
  font-size: 0.84rem;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.auth-message.show {
  display: block;
}

.auth-message.error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: var(--auth-danger);
}

.auth-message.success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--auth-success);
}

.auth-footer-link {
  margin-top: 22px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--auth-text-dim);
}

.auth-footer-link a {
  color: var(--auth-accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer-link a:hover {
  text-decoration: underline;
}

/* ---------- account bar (sits inside index.html's #tab-bar) ---------- */
#account-bar {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

#account-username {
  font-size: 0.85rem;
  color: var(--auth-text-dim);
  font-weight: 600;
}

#account-logout-btn {
  padding: 6px 14px;
  border-radius: 7px;
  border: 1px solid var(--auth-border);
  background: transparent;
  color: var(--auth-text);
  font-size: 0.82rem;
  cursor: pointer;
}

#account-logout-btn:hover {
  border-color: var(--auth-danger);
  color: var(--auth-danger);
}

.auth-submit[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------- select + TTS level explainer (signup) ---------- */
.auth-field select {
  width: 100%;
  box-sizing: border-box;
  background: #0d0f16;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--auth-text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.auth-field select:focus {
  border-color: var(--auth-accent);
}

#tts-level-explain strong { color: var(--auth-success); }
#tts-level-explain em { color: var(--auth-danger); font-style: normal; }