/* ============================================
   Xianxia Manuscript Audit — Shared Styles
   Dark academia meets cultivation aesthetic
   ============================================ */

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a26;
  --bg-input: #0d0d16;
  --border: #1e1e30;
  --border-active: #4a3f6b;
  --gold: #c9a44b;
  --gold-light: #e4c97a;
  --gold-dark: #8b6914;
  --purple: #7c5cbf;
  --purple-light: #a78bfa;
  --purple-dark: #4c1d95;
  --red: #e74c3c;
  --red-light: #f87171;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --green: #10b981;
  --green-light: #34d399;
  --text: #e2e2e9;
  --text-muted: #8b8b9e;
  --text-dim: #5c5c72;
  --radius: 8px;
  --radius-lg: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Georgia", "Times New Roman", serif;
  --max-w: 960px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  min-height: 100vh;
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Nav ---- */
.nav {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.5px;
}
.nav-brand span { color: var(--purple-light); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--gold);
  color: #0a0a0f !important;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem !important;
}
.nav-cta:hover { background: var(--gold-light) !important; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: var(--font);
}
.btn-gold {
  background: var(--gold);
  color: #0a0a0f;
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--purple); color: var(--purple-light); }
.btn-purple {
  background: var(--purple);
  color: #fff;
}
.btn-purple:hover { background: var(--purple-light); }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.3;
}
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.2rem; }
.text-gold { color: var(--gold); }
.text-purple { color: var(--purple-light); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); font-size: 0.85rem; }

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.card-accent {
  border-left: 3px solid var(--gold);
}
.card-purple {
  border-left: 3px solid var(--purple);
}

/* ---- Hero ---- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}
.hero h1 { margin-bottom: 16px; }
.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 32px;
}
.hero-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- Feature Grid ---- */
.features {
  padding: 80px 0;
}
.features h2 { text-align: center; margin-bottom: 48px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.3s;
}
.feature-card:hover { border-color: var(--border-active); }
.feature-icon { font-size: 1.6rem; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ---- Form ---- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text);
}
.form-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}
textarea, input[type="text"], select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color 0.2s;
}
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--purple);
}
textarea { min-height: 100px; }
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b8b9e' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* ---- Audit Results ---- */
.audit-results { display: none; margin-top: 40px; }
.audit-results.visible { display: block; }

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.score-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}
.score-value {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-display);
}
.score-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.score-high { color: var(--green); }
.score-medium { color: var(--amber); }
.score-low { color: var(--red); }

.finding-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.finding-severity {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.sev-high { background: rgba(231,76,60,0.15); color: var(--red-light); }
.sev-medium { background: rgba(245,158,11,0.15); color: var(--amber-light); }
.sev-low { background: rgba(16,185,129,0.15); color: var(--green-light); }
.finding-body { flex: 1; }
.finding-message { font-weight: 600; margin-bottom: 4px; }
.finding-suggestion { color: var(--text-muted); font-size: 0.88rem; }

.free-limit-banner {
  background: linear-gradient(135deg, var(--purple-dark), var(--bg-card));
  border: 1px solid var(--purple);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  margin-top: 24px;
}
.free-limit-banner h3 { color: var(--gold); margin-bottom: 8px; }
.free-limit-banner p { color: var(--text-muted); margin-bottom: 16px; }

/* ---- Sample Report ---- */
.report-page { padding: 60px 0; }
.report-header {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.report-meta {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.report-section { margin-bottom: 40px; }
.report-section h3 {
  color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ---- Pricing ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  transition: border-color 0.3s, transform 0.2s;
}
.pricing-card:hover { border-color: var(--border-active); transform: translateY(-2px); }
.pricing-card.featured {
  border-color: var(--gold);
  border-width: 2px;
  position: relative;
}
.pricing-card.featured::before {
  content: "BEST VALUE";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #0a0a0f;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}
.pricing-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.pricing-price {
  font-size: 2.4rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--gold);
  margin-bottom: 4px;
}
.pricing-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}
.pricing-features li {
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.pricing-features li::before { content: "✓ "; color: var(--green); font-weight: 700; }

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-top: 80px;
}
.footer a { color: var(--text-muted); }

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.section { padding: 80px 0; }
.glow {
  text-shadow: 0 0 20px rgba(201,164,75,0.3), 0 0 40px rgba(201,164,75,0.1);
}
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  counter-reset: step;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -16px;
  left: -16px;
  width: 36px;
  height: 36px;
  background: var(--gold);
  color: #0a0a0f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.step h4 { font-size: 0.95rem; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 0.85rem; }

/* Responsive */
@media (max-width: 640px) {
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 0.78rem; }
  .hero { padding: 48px 0 36px; }
  .card { padding: 20px; }
  .section { padding: 48px 0; }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
}
