:root {
  --bg: #090b12;
  --bg-elevated: #111522;
  --bg-card: #161b2c;
  --bg-card-hover: #1d243a;
  --border: rgba(212, 175, 55, 0.22);
  --border-strong: rgba(212, 175, 55, 0.5);
  --gold: #d4af37;
  --gold-light: #f3df9b;
  --gold-dim: #9e7f24;
  --text: #f2efe9;
  --text-muted: #a6adc4;
  --wood: #34d399;
  --fire: #fb7185;
  --earth: #fbbf24;
  --metal: #cbd5e1;
  --water: #38bdf8;
  --radius: 14px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at 20% 0%, rgba(212, 175, 55, 0.08), transparent 42%),
              radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.06), transparent 38%),
              var(--bg);
  color: var(--text);
  line-height: 1.68;
  min-height: 100vh;
}

h1, h2, h3, h4, .brand {
  font-family: Georgia, "Times New Roman", "Palatino Linotype", serif;
  letter-spacing: 0.01em;
}

a { color: var(--gold-light); text-decoration: none; transition: color .2s ease; }
a:hover { color: #fff; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 11, 18, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 16px;
}
.brand {
  font-size: 1.45rem; font-weight: 700; color: var(--gold-light);
  display: inline-flex; align-items: center; gap: 10px;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--gold);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem; color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
}
.nav { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.nav a { color: var(--text-muted); font-size: 0.94rem; font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--gold-light); }
.nav-cta {
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--gold); color: var(--gold-light) !important;
  background: rgba(212, 175, 55, 0.12);
}
.nav-cta:hover { background: var(--gold); color: #090b12 !important; }

/* Hero */
.hero {
  padding: 72px 0 48px;
  text-align: center;
}
.eyebrow {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--gold-light);
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 18px; background: rgba(212, 175, 55, 0.08);
}
.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.45rem);
  line-height: 1.18; max-width: 820px; margin: 0 auto 18px;
  background: linear-gradient(135deg, #fff 15%, var(--gold-light) 65%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.08rem; color: var(--text-muted);
  max-width: 660px; margin: 0 auto 28px;
}
.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 10px; font-weight: 600; font-size: 0.96rem;
  cursor: pointer; border: none; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #0b0d14; box-shadow: 0 8px 24px rgba(212, 175, 55, 0.28);
}
.btn-primary:hover { transform: translateY(-1px); color: #0b0d14; box-shadow: 0 12px 28px rgba(212, 175, 55, 0.42); }
.btn-outline {
  background: rgba(255,255,255,0.03); color: var(--gold-light);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { background: rgba(212, 175, 55, 0.12); color: #fff; }

/* Sections & Cards */
.section { padding: 48px 0; }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.55rem, 2.8vw, 2.15rem); color: #fff; margin-bottom: 8px; }
.section-head p { color: var(--text-muted); max-width: 680px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; padding: 12px 0; }
}

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.field label { display: block; font-size: 0.84rem; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 11px 13px; border-radius: 9px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text); font-size: 0.96rem; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--gold); }

/* Pillars Display */
.pillars-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
  margin: 22px 0;
}
@media (max-width: 640px) { .pillars-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pillar-box {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 12px; text-align: center;
}
.pillar-label { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.pillar-hanzi { font-size: 1.95rem; font-family: Georgia, serif; color: var(--gold-light); margin: 8px 0 4px; }
.pillar-en { font-size: 0.92rem; font-weight: 600; color: #fff; }
.pillar-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; }

/* Element Bars */
.el-bars { display: grid; gap: 10px; margin: 18px 0; }
.el-row { display: grid; grid-template-columns: 76px 1fr 44px; align-items: center; gap: 12px; font-size: 0.9rem; }
.el-track { height: 10px; background: rgba(255,255,255,0.07); border-radius: 999px; overflow: hidden; }
.el-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }
.el-Wood { background: var(--wood); }
.el-Fire { background: var(--fire); }
.el-Earth { background: var(--earth); }
.el-Metal { background: var(--metal); }
.el-Water { background: var(--water); }

/* Tarot Cards */
.tarot-stage { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 22px; }
.tarot-card {
  background: linear-gradient(160deg, #1a2035, #0e1220);
  border: 1px solid var(--border-strong); border-radius: 14px; padding: 20px;
  position: relative; overflow: hidden;
}
.tarot-card::before {
  content: ""; position: absolute; inset: 7px; border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.22); pointer-events: none;
}
.tarot-pos { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); }
.tarot-numeral { font-size: 1.9rem; font-family: Georgia, serif; color: var(--gold-light); margin: 8px 0 2px; }
.tarot-name { font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.tarot-badge {
  display: inline-block; font-size: 0.75rem; padding: 2px 9px; border-radius: 999px;
  margin-bottom: 10px; background: rgba(212, 175, 55, 0.14); color: var(--gold-light);
}
.tarot-badge.reversed { background: rgba(251, 113, 133, 0.15); color: #fda4af; }

/* Upgrade CTA Box */
.upgrade-box {
  margin-top: 24px; padding: 22px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(22, 27, 44, 0.95));
  border: 1px solid var(--gold);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.upgrade-box h3 { color: var(--gold-light); font-size: 1.25rem; margin-bottom: 4px; }
.upgrade-box p { color: var(--text-muted); font-size: 0.94rem; max-width: 600px; }

/* SEO Link Cards */
.link-card {
  display: block; padding: 20px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: border-color .2s ease, transform .15s ease, background .2s ease;
}
.link-card:hover { border-color: var(--gold); background: var(--bg-card-hover); transform: translateY(-2px); }
.link-card .tag { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); }
.link-card h3 { font-size: 1.12rem; color: #fff; margin: 6px 0 8px; }
.link-card p { font-size: 0.9rem; color: var(--text-muted); }

/* Article Layout */
.breadcrumb { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--gold-light); }
.article-wrap { max-width: 860px; margin: 0 auto; }
.article-hero { padding: 44px 0 24px; }
.article-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); color: #fff; line-height: 1.22; margin-bottom: 14px; }
.article-meta { color: var(--text-muted); font-size: 0.9rem; display: flex; gap: 16px; flex-wrap: wrap; }
.prose h2 { font-size: 1.45rem; color: var(--gold-light); margin: 28px 0 12px; }
.prose h3 { font-size: 1.15rem; color: #fff; margin: 20px 0 8px; }
.prose p { margin-bottom: 14px; color: #dcd9d0; }
.prose ul { margin: 0 0 16px 20px; color: #dcd9d0; }
.prose li { margin-bottom: 8px; }

.faq-item {
  border-top: 1px solid var(--border); padding: 16px 0;
}
.faq-item h3 { color: #fff; font-size: 1.05rem; margin-bottom: 6px; }
.faq-item p { color: var(--text-muted); margin: 0; }

/* Search Input */
.search-bar {
  width: 100%; max-width: 520px; padding: 12px 16px; border-radius: 10px;
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  color: #fff; font-size: 1rem; margin-bottom: 24px;
}

/* Footer */
.site-footer {
  margin-top: 64px; padding: 44px 0 36px;
  border-top: 1px solid var(--border);
  background: rgba(5, 7, 12, 0.75);
  color: var(--text-muted); font-size: 0.88rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 28px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: var(--gold-light); margin-bottom: 12px; font-size: 0.98rem; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--text-muted); }
.footer-grid a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.hidden { display: none !important; }
