/* 玄机阁 · 前台样式（移动端优先 / 国风深色） */
:root {
  --bg: #0c0a10;
  --bg-2: #14101a;
  --bg-3: #1b1524;
  --card: rgba(255, 255, 255, .035);
  --card-2: rgba(255, 255, 255, .06);
  --line: rgba(212, 175, 55, .18);
  --line-2: rgba(255, 255, 255, .08);
  --gold: #d4af37;
  --gold-2: #f0d67b;
  --gold-3: #b8912a;
  --red: #c0392b;
  --red-2: #e05b5b;
  --text: #ece7dd;
  --text-2: #b9b2a6;
  --text-3: #8b8579;
  --ok: #4fae86;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --maxw: 720px;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(212, 175, 55, .10), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(192, 57, 43, .10), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 45%, var(--bg) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 12% 22%, rgba(212,175,55,.05) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 62%, rgba(212,175,55,.045) 0 2px, transparent 3px);
  background-size: 120px 120px, 160px 160px;
}
a { color: var(--gold-2); text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }

/* 头部 */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, rgba(12,10,16,.96), rgba(12,10,16,.82));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-serif); font-size: 19px; letter-spacing: 3px; color: var(--gold-2); font-weight: 700; }
.logo .seal {
  width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red), #8e1f14); color: #fff; font-size: 14px; letter-spacing: 0;
  box-shadow: 0 0 12px rgba(192, 57, 43, .5);
}
.nav { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--text-2); }
.nav a { color: var(--text-2); }
.nav a:hover { color: var(--gold-2); }

/* 通用块 */
.section-title { display: flex; align-items: center; gap: 8px; margin: 26px 0 14px; font-family: var(--font-serif); font-size: 18px; color: var(--gold-2); letter-spacing: 2px; }
.section-title::before { content: ""; width: 3px; height: 16px; background: linear-gradient(180deg, var(--gold-2), var(--red)); border-radius: 2px; }
.section-sub { color: var(--text-3); font-size: 12px; margin: -6px 0 14px; }

.card {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px; position: relative; overflow: hidden;
}
.card.gold { border-color: var(--line); background: linear-gradient(160deg, rgba(212,175,55,.08), rgba(255,255,255,.02)); }
.hero {
  margin: 18px 0 8px; padding: 22px 18px; border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(500px 200px at 90% -20%, rgba(212,175,55,.18), transparent 70%),
    linear-gradient(150deg, rgba(212,175,55,.10), rgba(192,57,43,.06) 60%, rgba(255,255,255,.02));
  box-shadow: var(--shadow);
}
.hero h1 { font-family: var(--font-serif); font-size: 25px; margin: 0 0 8px; letter-spacing: 2px; line-height: 1.4; }
.hero p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.hero .tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 11.5px; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--line); color: var(--gold-2); background: rgba(212,175,55,.06); }

/* 工具矩阵 */
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
.tool-card {
  display: block; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: linear-gradient(165deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tool-card:active { transform: scale(.98); }
.tool-card:hover { border-color: var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.tool-card .tc-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-serif); font-size: 17px; color: #120e08; background: linear-gradient(135deg, var(--gold-2), var(--gold-3)); margin-bottom: 9px; }
.tool-card .tc-name { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: 1px; }
.tool-card .tc-desc { font-size: 11.5px; color: var(--text-3); margin-top: 4px; line-height: 1.6; min-height: 36px; }
.tool-card .tc-meta { margin-top: 8px; font-size: 11px; color: var(--gold); display: flex; justify-content: space-between; align-items: center; }
.hot-flag { font-size: 10px; padding: 1px 6px; border-radius: 10px; background: rgba(192,57,43,.85); color: #fff; }

/* 表单 */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 7px; }
.form-item .hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
input[type="text"], input[type="date"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px; color: var(--text); font-size: 15px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line-2); outline: none; font-family: inherit;
  appearance: none; -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.12); }
select { background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 13.5px; color: var(--text-2); cursor: pointer; background: rgba(0,0,0,.25); }
.radio-row input { display: none; }
.radio-row input:checked + span { color: var(--gold-2); }
.radio-row label:has(input:checked) { border-color: var(--gold); background: rgba(212,175,55,.12); color: var(--gold-2); }

.btn {
  display: block; width: 100%; padding: 14px; border: none; border-radius: 12px; font-size: 16px;
  font-family: var(--font-serif); letter-spacing: 2px; cursor: pointer; text-align: center;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3)); color: #1a1305; font-weight: 700;
  box-shadow: 0 8px 22px rgba(212,175,55,.22); transition: transform .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn.ghost { background: transparent; border: 1px solid var(--gold); color: var(--gold-2); box-shadow: none; }
.btn.red { background: linear-gradient(135deg, var(--red-2), #a52f22); color: #fff; box-shadow: 0 8px 22px rgba(192,57,43,.25); }
.btn.small { padding: 9px 14px; font-size: 13.5px; letter-spacing: 1px; width: auto; display: inline-block; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* 加载动画（仪式感） */
.ritual {
  display: none; position: fixed; inset: 0; z-index: 90; place-items: center;
  background: radial-gradient(500px 300px at 50% 40%, rgba(212,175,55,.12), transparent 70%), rgba(6,5,9,.94);
}
.ritual.show { display: grid; }
.ritual-inner { text-align: center; width: 260px; }
.ritual-ring { width: 132px; height: 132px; margin: 0 auto 20px; position: relative; }
.ritual-ring i {
  position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(212,175,55,.35);
  animation: spin 6s linear infinite;
}
.ritual-ring i:nth-child(2) { inset: 14px; border-style: dashed; animation-duration: 9s; animation-direction: reverse; }
.ritual-ring i:nth-child(3) { inset: 30px; border-color: rgba(192,57,43,.4); animation-duration: 4s; }
.ritual-ring b {
  position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-serif);
  font-size: 30px; color: var(--gold-2); text-shadow: 0 0 22px rgba(212,175,55,.5);
}
@keyframes spin { to { transform: rotate(360deg); } }
.ritual-text { font-family: var(--font-serif); color: var(--gold-2); letter-spacing: 4px; font-size: 15px; }
.ritual-bar { height: 2px; background: rgba(255,255,255,.1); border-radius: 2px; margin-top: 14px; overflow: hidden; }
.ritual-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); animation: loadbar 1.6s ease forwards; }
@keyframes loadbar { to { width: 100%; } }

/* 结果页 */
.free-summary { border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(155deg, rgba(212,175,55,.09), rgba(255,255,255,.02)); padding: 16px; }
.free-badge { display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 20px; background: rgba(79,174,134,.16); color: #7fd3ae; border: 1px solid rgba(79,174,134,.35); }
.free-score { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 6px; }
.free-score .fs-num { font-family: var(--font-serif); font-size: 44px; color: var(--gold-2); line-height: 1; text-shadow: 0 0 24px rgba(212,175,55,.35); }
.free-score .fs-label { color: var(--text-2); font-size: 14px; }
.free-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 12px; margin: 14px 0 0; }
.free-items dt { font-size: 12px; color: var(--text-3); margin: 0; }
.free-items dd { margin: 0 0 6px; font-size: 14px; color: var(--text); }
.free-text { margin: 12px 0 0; font-size: 14px; color: var(--text-2); border-top: 1px dashed var(--line-2); padding-top: 12px; }

.gap-hint { margin: 14px 0; padding: 13px 15px; border-radius: 12px; border-left: 3px solid var(--gold); background: rgba(212,175,55,.08); color: var(--text-2); font-size: 13.5px; }

.chart-box { background: rgba(0,0,0,.28); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px 10px 4px; margin-bottom: 14px; }
.chart-title { font-size: 13px; color: var(--gold-2); margin: 2px 0 6px 6px; letter-spacing: 1px; }
.chart { width: 100%; height: 230px; }
.chart.tall { height: 320px; }

/* 付费墙 */
.paywall { margin: 18px 0 10px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: linear-gradient(150deg, rgba(212,175,55,.14), rgba(192,57,43,.08) 55%, rgba(255,255,255,.02)); padding: 18px; box-shadow: var(--shadow); }
.paywall h3 { font-family: var(--font-serif); font-size: 18px; margin: 0 0 6px; color: var(--gold-2); letter-spacing: 1px; }
.paywall .pw-desc { font-size: 13px; color: var(--text-2); }
.paywall .pw-price { display: flex; align-items: baseline; gap: 8px; margin: 12px 0; }
.paywall .pw-price b { font-size: 30px; color: var(--gold-2); font-family: var(--font-serif); }
.paywall .pw-price s { color: var(--text-3); font-size: 14px; }
.pw-list { list-style: none; padding: 0; margin: 12px 0; }
.pw-list li { font-size: 13px; color: var(--text-2); padding-left: 18px; position: relative; margin-bottom: 5px; }
.pw-list li::before { content: "◆"; position: absolute; left: 0; color: var(--gold); font-size: 10px; top: 2px; }
.preview-box { position: relative; max-height: 210px; overflow: hidden; border-radius: 12px; border: 1px solid var(--line-2); padding: 14px; background: rgba(0,0,0,.25); font-size: 13.5px; color: var(--text-2); }
.preview-box::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 110px; background: linear-gradient(180deg, transparent, rgba(12,10,16,.96)); }
.preview-tip { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 8px; }

.price-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.price-table th, .price-table td { padding: 9px 8px; border-bottom: 1px solid var(--line-2); text-align: center; }
.price-table th { color: var(--gold-2); font-weight: 500; }
.price-table td:first-child { text-align: left; color: var(--text-2); }
.price-table .best { color: var(--gold-2); }
.badge-rec { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: rgba(212,175,55,.2); color: var(--gold-2); margin-left: 4px; }

/* 报告正文 */
.report-body { font-size: 15px; color: var(--text); }
.report-body .rep-h2 { font-family: var(--font-serif); font-size: 18px; color: var(--gold-2); margin: 26px 0 10px; padding-left: 12px; position: relative; letter-spacing: 1px; }
.report-body .rep-h2::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: linear-gradient(180deg, var(--gold-2), var(--red)); }
.rep-body p { margin: 10px 0; color: var(--text-2); }
.rep-body strong { color: var(--gold-2); font-weight: 600; }
.rep-body ul, .rep-body ol { padding-left: 20px; color: var(--text-2); }
.rep-body li { margin: 6px 0; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; }
.rep-table th, .rep-table td { border: 1px solid var(--line-2); padding: 8px; text-align: center; color: var(--text-2); }
.rep-table th { background: rgba(212,175,55,.08); color: var(--gold-2); font-weight: 500; }
.rep-body .poem { font-family: var(--font-serif); font-size: 17px; color: var(--gold-2); text-align: center; letter-spacing: 2px; line-height: 2; margin: 14px 0; }

/* 每日运势 */
.sign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 520px) { .sign-grid { grid-template-columns: repeat(4, 1fr); } }
.sign-card { text-align: center; padding: 12px 8px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); }
.sign-card .sc-name { font-size: 13.5px; color: var(--text); }
.sign-card .sc-score { font-family: var(--font-serif); font-size: 20px; color: var(--gold-2); }
.sign-card .sc-bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); margin-top: 6px; overflow: hidden; }
.sign-card .sc-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); }
.almanac-row { display: flex; gap: 10px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.almanac-row span { padding: 3px 9px; border-radius: 8px; background: rgba(255,255,255,.05); }
.yi-ji { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.yi-ji .box { border-radius: 12px; padding: 10px; font-size: 12.5px; border: 1px solid var(--line-2); }
.yi-ji .yi { background: rgba(79,174,134,.08); border-color: rgba(79,174,134,.25); }
.yi-ji .ji { background: rgba(192,57,43,.08); border-color: rgba(192,57,43,.25); }
.yi-ji .box b { display: block; margin-bottom: 5px; font-family: var(--font-serif); letter-spacing: 2px; }

/* 分享海报 */
.poster-layer { display: none; position: fixed; inset: 0; z-index: 95; background: rgba(4,3,6,.92); overflow: auto; padding: 20px 16px; }
.poster-layer.show { display: block; }
.poster-canvas-wrap { max-width: 330px; margin: 0 auto; }
.poster-canvas-wrap canvas, .poster-canvas-wrap img { width: 100%; border-radius: 14px; box-shadow: var(--shadow); }
.poster-actions { display: flex; gap: 10px; margin: 14px auto 0; max-width: 330px; }

/* 页脚 */
.site-footer { margin-top: 34px; padding: 22px 0 30px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; text-align: center; }
.site-footer .fb-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 10px; }
.site-footer .fb-links a { color: var(--text-3); }
.site-footer .fb-links a:hover { color: var(--gold-2); }
.disclaimer-bar { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px dashed var(--line); line-height: 1.7; }
.disclaimer-bar strong { color: var(--gold); }
.minor-tip { margin-top: 8px; color: #c9a227; }

/* 报告页顶部 */
.report-head { border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 18px; background: linear-gradient(150deg, rgba(212,175,55,.12), rgba(255,255,255,.02)); margin: 16px 0; }
.report-head h1 { font-family: var(--font-serif); font-size: 21px; margin: 0 0 6px; color: var(--gold-2); }
.report-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: rgba(20,16,26,.96); border: 1px solid var(--line); color: var(--gold-2); padding: 10px 18px; border-radius: 22px; font-size: 13.5px; z-index: 120; opacity: 0; transition: opacity .25s ease; pointer-events: none; max-width: 84vw; text-align: center; }
.toast.show { opacity: 1; }
.empty { text-align: center; color: var(--text-3); padding: 30px 0; font-size: 13px; }
.pager { display: flex; gap: 6px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.pager a, .pager span { padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-2); }
.pager .active { background: rgba(212,175,55,.15); color: var(--gold-2); border-color: var(--line); }
.member-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: linear-gradient(135deg, var(--gold-2), var(--gold-3)); color: #1a1305; }
.order-item { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; margin-bottom: 10px; font-size: 13px; color: var(--text-2); }
.order-item .oi-top { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--text); }
.status-ok { color: #7fd3ae; }
.status-wait { color: #e0c05b; }
.status-off { color: var(--text-3); }
.tabs { display: flex; gap: 6px; margin: 14px 0; overflow-x: auto; }
.tabs a { padding: 7px 13px; border-radius: 20px; border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); white-space: nowrap; }
.tabs a.on { background: rgba(212,175,55,.14); color: var(--gold-2); border-color: var(--line); }
.notice { font-size: 12.5px; color: var(--text-3); background: rgba(255,255,255,.03); border-radius: 10px; padding: 10px 12px; margin: 10px 0; line-height: 1.7; }
.notice b { color: var(--gold); }

/* 紫微斗数命盘 */
.zw-pan { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 8px 0; }
.zw-cell {
  min-height: 86px; padding: 6px; border-radius: 8px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,.025); font-size: 10.5px; line-height: 1.5; color: var(--text-2); position: relative;
}
.zw-cell.zw-center { border-color: rgba(212,175,55,.25); background: radial-gradient(circle at 50% 50%, rgba(212,175,55,.14), rgba(255,255,255,.01)); }
.zw-gz { color: var(--gold); font-size: 10.5px; }
.zw-main { color: var(--gold-2); font-size: 12px; font-weight: 600; margin: 2px 0; min-height: 16px; }
.zw-main i { color: var(--text-3); font-weight: 400; font-style: normal; font-size: 10.5px; }
.zw-aux { color: var(--text-3); font-size: 9.5px; word-break: break-all; }
.zw-aux b { color: var(--red-2); }
.zw-name { position: absolute; right: 6px; bottom: 4px; color: var(--gold); font-size: 10px; }
.zw-flag { display: inline-block; margin-left: 3px; background: rgba(212,175,55,.85); color: #1a1305; border-radius: 4px; padding: 0 3px; font-size: 9px; }
.zw-flag.body { background: rgba(192,57,43,.85); color: #fff; }

/* 塔罗牌 */
.tarot-row { display: flex; gap: 10px; padding: 8px 4px 12px; }
.tarot-card {
  flex: 1; text-align: center; padding: 14px 6px; border-radius: 12px;
  border: 1px solid var(--line); background: linear-gradient(160deg, rgba(212,175,55,.12), rgba(192,57,43,.06));
}
.tarot-card .tc-pos { font-size: 11px; color: var(--text-3); }
.tarot-card .tc-name { font-family: var(--font-serif); font-size: 16px; color: var(--gold-2); margin: 6px 0 3px; letter-spacing: 1px; }
.tarot-card .tc-dir { font-size: 11px; color: var(--text-2); }
