/* ── Auth & Landing Page styles ──────────────────────────────── */

/* ── Auth overlay (full-screen container) ─────────────────── */

.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg, #0d0d0d);
  z-index: 1000;
  overflow-y: auto;
}

.auth-overlay.hidden {
  display: none;
}

/* ── Landing page layout ──────────────────────────────────── */

.landing-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Hero ─────────────────────────────────────────────────── */

.landing-hero {
  text-align: center;
  padding: 4rem 0 3rem;
}

.landing-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.landing-note {
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.landing-tagline {
  font-size: 1.2rem;
  color: var(--accent, #f0c040);
  margin: 0.5rem 0 1.5rem;
  font-weight: 500;
}

.landing-desc {
  font-size: 1rem;
  color: var(--muted, #888);
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.landing-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.05rem;
  border-radius: 10px;
}

/* ── Features grid ────────────────────────────────────────── */

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  padding: 2rem 0;
}

.feature-card {
  background: var(--surface, #1a1a2e);
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(240, 192, 64, 0.25);
  transform: translateY(-2px);
}

.feature-emoji {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.feature-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.feature-desc {
  font-size: 0.82rem;
  color: var(--muted, #888);
  line-height: 1.5;
}

/* ── Auth form section (inline in landing page) ───────────── */

.landing-auth-section {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.landing-auth-section.hidden {
  display: none;
}

.auth-dialog {
  background: var(--surface, #1a1a2e);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted, #888);
  margin-top: 1rem;
}

.auth-switch a {
  color: var(--accent, #f0c040);
  text-decoration: none;
}

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

/* ── Auth bar at top of app ───────────────────────────────── */

.auth-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-bar.hidden {
  display: none;
}

.auth-user {
  font-size: 0.85rem;
  color: var(--muted, #888);
}

/* ── Landing footer ──────────────────────────────────────── */

.landing-footer {
  text-align: center;
  padding: 2rem 0 1rem;
  font-size: 0.8rem;
  color: var(--muted, #888);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2rem;
}

/* ── Mobile tweaks ────────────────────────────────────────── */

@media (max-width: 600px) {
  .landing-title {
    font-size: 2.4rem;
  }

  .landing-hero {
    padding: 2rem 0 1.5rem;
  }

  .landing-features {
    grid-template-columns: 1fr;
  }
}

/* ── Google OAuth button ──────────────────────────────────── */

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-google:hover {
  background: #f5f5f5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.google-icon {
  flex-shrink: 0;
}

/* ── Auth divider (or) ────────────────────────────────────── */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--muted, #888);
  font-size: 0.8rem;
}

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

/* ── Auth avatar ──────────────────────────────────────────── */

.auth-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* ── Credits badge ─────────────────────────────────────── */

.credits-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.6rem;
  background: var(--surface, #1a1a2e);
  border: 1px solid var(--accent, #f0c040);
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent, #f0c040);
  cursor: pointer;
  transition: background 0.2s;
}
.credits-badge:hover {
  background: rgba(240, 192, 64, 0.15);
}

/* ── Credits modal ─────────────────────────────────────── */

.credits-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.credits-modal {
  background: var(--card-bg, #16213e);
  border: 1px solid var(--border, #333);
  border-radius: 12px;
  padding: 2rem;
  width: 90%;
  max-width: 380px;
}
.credits-modal h3 {
  margin: 0 0 0.5rem 0;
}
.credits-form label {
  font-size: 0.85rem;
  color: var(--muted, #999);
  display: block;
}

/* -- Credit package selector ---------------------------------------- */

.credit-packages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.credit-package {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--surface, #1a1a2e);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.credit-package:hover {
  border-color: rgba(240, 192, 64, 0.3);
}
.credit-package:has(input:checked) {
  border-color: var(--accent, #f0c040);
  background: rgba(240, 192, 64, 0.08);
}
.credit-package input[type="radio"] {
  accent-color: var(--accent, #f0c040);
  margin: 0;
  flex-shrink: 0;
}

.credit-package-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.credit-pkg-amount {
  font-weight: 700;
  font-size: 0.9rem;
}
.credit-pkg-price {
  font-size: 0.75rem;
  color: var(--accent, #f0c040);
  font-weight: 600;
}
.credit-pkg-desc {
  font-size: 0.72rem;
  color: var(--muted, #888);
}
