/* ============================================================
   Joyfans — server-rendered pages (about, faq, terms, privacy,
   character profiles, guides, comparisons)
   Mirrors the app's dark luxury theme in public/styles.css.
   Served as a real stylesheet so the strict CSP (style-src 'self')
   applies to these pages too — no inline styles.
   ============================================================ */

:root {
  color-scheme: dark;
  --bg: #0a0910;
  --bg-raised: #121019;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f3eef5;
  --text-dim: #a89fb3;
  --text-faint: #6f6680;
  --rose: #fb4d6d;
  --rose-soft: #ff7d92;
  --gold: #d8b08c;
  --accent-grad: linear-gradient(135deg, #fb4d6d 0%, #d4496e 55%, #b03a8c 100%);
  --glow: 0 0 40px rgba(251, 77, 109, 0.25);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

/* Same ambient glow as the app shell */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(176, 58, 140, 0.18), transparent 60%),
    radial-gradient(800px 500px at -10% 20%, rgba(251, 77, 109, 0.12), transparent 60%),
    radial-gradient(700px 600px at 50% 110%, rgba(216, 176, 140, 0.07), transparent 60%);
}

header, main, footer { position: relative; z-index: 1; }

a { color: var(--rose-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- topbar (matches the app) ---------- */

header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 9, 16, 0.7);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--accent-grad);
  box-shadow: var(--glow);
  position: relative;
  flex-shrink: 0;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.92);
  clip-path: path("M6 11 C 2 8, 0 5.5, 0 3.5 C 0 1.5, 1.6 0, 3.3 0 C 4.4 0, 5.5 0.7, 6 1.7 C 6.5 0.7, 7.6 0, 8.7 0 C 10.4 0, 12 1.5, 12 3.5 C 12 5.5, 10 8, 6 11 Z");
}

.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
}

.brand-name em {
  font-style: italic;
  color: var(--gold);
}

nav {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
nav a { color: var(--text-dim); }
nav span { color: var(--text-faint); }

/* ---------- content ---------- */

main { max-width: 860px; margin: 0 auto; padding: 40px 24px 80px; }

h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 36px 0 10px;
  color: var(--text);
}

h3 { font-size: 1.1rem; font-weight: 600; margin: 24px 0 8px; color: var(--text); }

p { margin-bottom: 14px; color: var(--text-dim); }
strong { color: var(--text); }
ul, ol { margin: 0 0 14px 22px; color: var(--text-dim); }
li { margin-bottom: 6px; }

.lead { font-size: 1.1rem; color: var(--text-dim); margin-bottom: 28px; }

/* Character profile image + greeting quote */
.profile-img {
  border-radius: 12px;
  margin-bottom: 24px;
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
}

.quote {
  border-left: 3px solid var(--rose);
  padding: 10px 16px;
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  margin: 0 0 20px;
  color: var(--text-dim);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface);
}
.card h3 { margin-top: 0; }
.card-meta { font-size: 13px; color: var(--text-faint); margin-bottom: 6px; }
.card-note { font-size: 13px; margin-bottom: 0; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item:first-child { padding-top: 0; }
.faq-q { font-weight: 600; color: var(--text); margin-bottom: 8px; }

.tag {
  display: inline-block;
  font-size: 12px;
  background: var(--surface-strong);
  color: var(--rose-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  margin: 2px;
}

/* CTA */
.cta-row { margin-top: 40px; }

.cta {
  display: inline-block;
  background: var(--accent-grad);
  color: #fff !important;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--glow);
}
.cta:hover { text-decoration: none; filter: brightness(1.05); }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 20px 0; }
th {
  text-align: left;
  background: var(--surface-strong);
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-strong);
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-dim);
}

.check { color: #22c55e; font-weight: 700; }
.cross { color: #ef4444; font-weight: 700; }

blockquote { color: var(--text-dim); }

footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
}
footer a { color: var(--text-dim); }

@media (max-width: 600px) {
  main { padding: 28px 16px 64px; }
  h1 { font-size: 1.6rem; }
  header { padding: 14px 16px; }
  table { display: block; overflow-x: auto; }
}
