/* ============================================================
 * 全站样式 · 深蓝 #0F2C5C + 香槟金 #B89968
 * ============================================================ */

:root{
  --navy:#0F2C5C;
  --navy-deep:#0A1F42;
  --navy-ink:#071834;
  --gold:#B89968;
  --gold-light:#D9C08D;
  --gold-soft:rgba(184,153,104,.16);
  --paper:#F7F5F0;
  --paper-2:#FFFFFF;
  --ink:#1E2A44;
  --ink-soft:#5A6478;
  --line:rgba(15,44,92,.12);
  --radius:14px;
  --shadow:0 10px 30px rgba(7,24,52,.10);
  --shadow-lg:0 24px 60px rgba(7,24,52,.18);
  --max:1160px;
}

*{ margin:0; padding:0; box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  font-family:"Noto Sans SC","Inter",-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  background:var(--paper); color:var(--ink);
  line-height:1.75; -webkit-font-smoothing:antialiased;
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
button{ font-family:inherit; cursor:pointer; border:none; }

.container{ max-width:var(--max); margin:0 auto; padding:0 22px; }

/* ============ 顶部导航 ============ */
.nav{
  position:sticky; top:0; z-index:60;
  background:rgba(247,245,240,.88);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.nav-inner{
  max-width:var(--max); margin:0 auto; padding:0 22px;
  height:66px; display:flex; align-items:center; gap:26px;
}
.logo{ display:flex; align-items:center; gap:10px; font-weight:600; letter-spacing:.5px; }
.logo-mark{
  width:32px;height:32px;border-radius:9px; position:relative; flex:0 0 auto;
  background:linear-gradient(145deg,var(--navy),var(--navy-deep));
  display:grid;place-items:center; color:var(--gold-light); font-size:16px;
  box-shadow:inset 0 0 0 1px rgba(184,153,104,.5);
}
.logo-text b{ color:var(--navy); font-weight:600; }
.logo-text span{ color:var(--gold); font-size:11px; letter-spacing:2px; display:block; line-height:1; }

.nav-links{ display:flex; gap:4px; margin-left:auto; }
.nav-links a{
  padding:8px 13px; border-radius:9px; font-size:14.5px; color:var(--ink-soft);
  transition:.2s;
}
.nav-links a:hover{ color:var(--navy); background:var(--gold-soft); }
.nav-links a.active{ color:var(--navy); background:var(--gold-soft); font-weight:500; }

.nav-cta{
  padding:9px 18px !important; border-radius:10px !important; font-weight:500;
  background:var(--navy) !important; color:#fff !important;
  box-shadow:0 4px 14px rgba(15,44,92,.25);
}
.nav-cta:hover{ background:#16407f !important; }

.nav-burger{ display:none; margin-left:auto; background:none; font-size:22px; color:var(--navy); padding:8px; }

/* ============ 通用 ============ */
.eyebrow{
  font-size:12px; letter-spacing:3px; text-transform:uppercase;
  color:var(--gold); font-weight:500; margin-bottom:14px;
}
h1{ font-size:clamp(30px,4.6vw,52px); line-height:1.22; color:var(--navy); font-weight:600; letter-spacing:.5px; }
h2{ font-size:clamp(24px,3.2vw,36px); line-height:1.3; color:var(--navy); font-weight:600; }
h3{ font-size:19px; color:var(--navy); font-weight:600; }
.lead{ font-size:17px; color:var(--ink-soft); max-width:640px; }

.section{ padding:86px 0; }
.section-head{ margin-bottom:44px; }
.section-head.center{ text-align:center; display:flex; flex-direction:column; align-items:center; }

.btn{
  display:inline-flex; align-items:center; gap:9px;
  padding:14px 30px; border-radius:12px; font-size:15.5px; font-weight:500;
  transition:.22s; letter-spacing:.3px;
}
.btn-primary{ background:var(--navy); color:#fff; box-shadow:0 6px 20px rgba(15,44,92,.28); }
.btn-primary:hover{ transform:translateY(-2px); background:#16407f; box-shadow:0 12px 30px rgba(15,44,92,.34); }
.btn-gold{ background:linear-gradient(135deg,var(--gold),var(--gold-light)); color:#fff;
  box-shadow:0 6px 20px rgba(184,153,104,.32); }
.btn-gold:hover{ transform:translateY(-2px); filter:brightness(1.05); }
.btn-ghost{ border:1.5px solid var(--line); color:var(--navy); background:transparent; }
.btn-ghost:hover{ border-color:var(--gold); color:var(--gold); }
.btn-sm{ padding:9px 18px; font-size:13.5px; border-radius:9px; }

.divider{
  width:56px; height:2px; background:var(--gold); margin:20px 0; border-radius:2px;
}
.divider.center{ margin:20px auto; }

.card{
  background:var(--paper-2); border:1px solid var(--line);
  border-radius:var(--radius); padding:28px; transition:.25s;
}
.card:hover{ box-shadow:var(--shadow-lg); transform:translateY(-3px); border-color:rgba(184,153,104,.4); }

/* ============ Hero ============ */
.hero{
  position:relative; overflow:hidden;
  background:linear-gradient(170deg,#0F2C5C 0%,#0A1F42 55%,#071834 100%);
  color:#fff; padding:96px 0 110px;
}
.hero::before{
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(184,153,104,.14), transparent 65%),
    radial-gradient(ellipse 45% 40% at 15% 85%, rgba(143,176,201,.10), transparent 60%);
}
.hero-inner{ position:relative; max-width:var(--max); margin:0 auto; padding:0 22px; }
.hero .eyebrow{ color:var(--gold-light); }
.hero h1{ color:#fff; max-width:720px; }
.hero p.lead{ color:rgba(255,255,255,.72); margin-top:20px; }
.hero-actions{ display:flex; gap:14px; margin-top:36px; flex-wrap:wrap; }
.hero-actions .btn-ghost{ border-color:rgba(255,255,255,.25); color:#fff; }
.hero-actions .btn-ghost:hover{ border-color:var(--gold-light); color:var(--gold-light); }

.hero-stats{ display:flex; gap:44px; margin-top:56px; flex-wrap:wrap; }
.stat b{ font-size:30px; color:var(--gold-light); font-weight:600; display:block; line-height:1.2; }
.stat span{ font-size:13px; color:rgba(255,255,255,.55); letter-spacing:1px; }

/* ============ 3D 牌桌区 ============ */
.table-wrap{
  position:relative; height:640px; border-radius:22px; overflow:hidden;
  background:var(--navy-ink);
  box-shadow:var(--shadow-lg), inset 0 0 0 1px rgba(184,153,104,.22);
}
.table-wrap.full{ height:calc(100vh - 66px); min-height:560px; border-radius:0; }
#three-container{ position:absolute; inset:0; }

.table-overlay{
  position:absolute; inset:0; pointer-events:none;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-end;
  padding:26px; gap:16px;
}
.table-overlay > *{ pointer-events:auto; }

.table-hint{
  background:rgba(7,24,52,.78); backdrop-filter:blur(10px);
  border:1px solid rgba(184,153,104,.35); border-radius:12px;
  padding:13px 24px; color:#EFE8DA; font-size:15px; text-align:center;
  transition:.3s;
}
.table-toolbar{ display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
.table-toolbar .btn{ background:rgba(247,245,240,.94); color:var(--navy); }
.table-toolbar .btn.active{ background:var(--gold); color:#fff; }

.pick-progress{
  font-size:13px; letter-spacing:1.5px; color:var(--gold-light);
  min-height:20px;
}

/* ============ 2D 兜底牌桌 ============ */
.t2d-stage{
  position:absolute; inset:0; overflow:hidden;
  background:
    radial-gradient(ellipse at 50% 46%, #1a3f78 0%, #122f5e 45%, #071834 78%, #050f24 100%);
}
.t2d-felt{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:min(88%, 760px); aspect-ratio:1.6;
  border:1px solid rgba(184,153,104,.28); border-radius:50%;
  box-shadow:inset 0 0 90px rgba(0,0,0,.35);
}
.t2d-deck{ position:absolute; left:50%; top:56%; }
.t2d-card{
  position:absolute; left:0; top:0;
  width:92px; height:150px; border-radius:9px;
  transform:translate(-50%,-50%);
  transition:transform .5s cubic-bezier(.22,.68,.35,1), opacity .4s, width .4s, height .4s;
  box-shadow:0 6px 18px rgba(0,0,0,.42);
  backface-visibility:hidden; overflow:hidden;
}
.t2d-card.back{
  background:
    linear-gradient(140deg,#123063 0%,#0f2c5c 50%,#0a2148 100%);
  border:2px solid #b89968;
}
.t2d-card.back::before{
  content:""; position:absolute; inset:6px; border:1px solid rgba(184,153,104,.55); border-radius:5px;
}
.t2d-card.back::after{
  content:"✦"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  color:#d9c08d; font-size:30px; text-shadow:0 0 14px rgba(184,153,104,.7);
}
.t2d-card.front{ background:#0b1e3d; border:2px solid #b89968; }
.t2d-card.front img{ width:100%; height:100%; object-fit:cover; display:block; }
.t2d-card.pickable{ cursor:pointer; }
.t2d-card.pickable:hover{ box-shadow:0 14px 30px rgba(0,0,0,.5), 0 0 0 2px rgba(184,153,104,.75); }
.t2d-card.picked{ box-shadow:0 0 0 2px var(--gold-light), 0 10px 26px rgba(0,0,0,.45); }
.t2d-card.flying{ transition:transform .45s ease-out; }

/* ============ 卡片网格 ============ */
.grid{ display:grid; gap:20px; }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-4{ grid-template-columns:repeat(4,1fr); }

.step{ display:flex; gap:18px; align-items:flex-start; }
.step-num{
  font-size:13px; color:var(--gold); letter-spacing:2px; font-weight:600;
  border:1px solid var(--gold); border-radius:8px; padding:3px 10px; flex:0 0 auto;
}

/* ============ 牌图鉴 ============ */
.tarot-card{
  position:relative; border-radius:12px; overflow:hidden;
  aspect-ratio:0.62; background:var(--navy-deep);
  box-shadow:var(--shadow); transition:.28s;
  cursor:pointer;
}
.tarot-card img{ width:100%; height:100%; object-fit:cover; transition:.45s; }
.tarot-card:hover{ transform:translateY(-6px) scale(1.02); box-shadow:var(--shadow-lg); }
.tarot-card:hover img{ transform:scale(1.06); }
.tarot-card .t-label{
  position:absolute; left:0; right:0; bottom:0; padding:26px 12px 10px;
  background:linear-gradient(transparent, rgba(7,24,52,.94));
  color:#fff; font-size:13.5px; text-align:center; letter-spacing:.5px;
}
.tarot-card .t-label b{ display:block; font-size:15px; font-weight:500; }
.tarot-card .t-label span{ color:var(--gold-light); font-size:11px; letter-spacing:1px; }
.tarot-card.rev img{ transform:rotate(180deg); }
.tarot-card.rev .rev-badge{
  position:absolute; top:8px; right:8px; background:var(--gold); color:#fff;
  font-size:10px; padding:3px 8px; border-radius:20px; letter-spacing:1px;
}

.filter-bar{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:30px; }
.chip{
  padding:8px 16px; border-radius:30px; font-size:13.5px;
  border:1px solid var(--line); background:#fff; color:var(--ink-soft); transition:.2s;
}
.chip:hover{ border-color:var(--gold); color:var(--gold); }
.chip.active{ background:var(--navy); color:#fff; border-color:var(--navy); }

/* ============ 牌详情页 ============ */
.detail-hero{
  display:grid; grid-template-columns:340px 1fr; gap:52px; align-items:start;
  padding:60px 0;
}
.detail-img{
  border-radius:14px; overflow:hidden; box-shadow:var(--shadow-lg);
  border:1px solid var(--line); position:relative;
}
.detail-img img{ width:100%; transition:.5s; }
.detail-img.rev img{ transform:rotate(180deg); }
.detail-kw{ display:flex; gap:8px; flex-wrap:wrap; margin:18px 0; }
.kw-tag{
  background:var(--gold-soft); color:#8a6f42; padding:6px 14px;
  border-radius:20px; font-size:13px;
}
.toggle-group{ display:inline-flex; border:1px solid var(--line); border-radius:10px; overflow:hidden; margin:20px 0; }
.toggle-group button{
  padding:9px 22px; background:#fff; color:var(--ink-soft); font-size:14px;
}
.toggle-group button.active{ background:var(--navy); color:#fff; }

.prose h2{ font-size:24px; margin:38px 0 16px; }
.prose h3{ font-size:18px; margin:26px 0 10px; }
.prose p{ color:var(--ink-soft); margin-bottom:16px; }
.prose ul{ margin:0 0 16px 20px; color:var(--ink-soft); }
.prose li{ margin-bottom:8px; }

/* ============ 表格 ============ */
table{ width:100%; border-collapse:collapse; background:#fff; border-radius:12px; overflow:hidden; box-shadow:var(--shadow); }
th,td{ padding:14px 18px; text-align:left; border-bottom:1px solid var(--line); font-size:14.5px; }
th{ background:var(--navy); color:#fff; font-weight:500; letter-spacing:.5px; }
tr:last-child td{ border-bottom:none; }
td b{ color:var(--navy); font-weight:600; }

/* ============ 占卜师 ============ */
.reader-avatar{
  width:64px;height:64px;border-radius:50%; display:grid; place-items:center;
  font-size:26px; font-weight:600; color:#fff; margin-bottom:16px;
  box-shadow:0 6px 18px rgba(15,44,92,.2);
}

/* ============ 追问聊天 ============ */
.chat-panel{
  background:#fff; border:1px solid var(--line); border-radius:16px;
  max-height:520px; display:flex; flex-direction:column; overflow:hidden;
}
.chat-log{ flex:1; overflow-y:auto; padding:22px; display:flex; flex-direction:column; gap:14px; min-height:220px; }
.msg{ max-width:82%; padding:13px 18px; border-radius:14px; font-size:14.5px; line-height:1.7; }
.msg.ai{ background:var(--paper); border:1px solid var(--line); border-top-left-radius:4px; align-self:flex-start; }
.msg.user{ background:var(--navy); color:#fff; border-top-right-radius:4px; align-self:flex-end; }
.msg .msg-meta{ font-size:11px; color:var(--gold); letter-spacing:1px; margin-bottom:6px; }
.msg.user .msg-meta{ color:var(--gold-light); }
.chat-input{ display:flex; gap:10px; padding:14px; border-top:1px solid var(--line); background:#fff; }
.chat-input input{
  flex:1; padding:12px 16px; border:1px solid var(--line); border-radius:10px;
  font-size:14.5px; font-family:inherit; outline:none;
}
.chat-input input:focus{ border-color:var(--gold); }
.chat-input button{ background:var(--navy); color:#fff; padding:0 24px; border-radius:10px; font-size:14.5px; }
.chat-input button:disabled{ opacity:.45; cursor:not-allowed; }

/* ============ 阅读结果 ============ */
.reading-result{ margin-top:46px; display:none; }
.reading-result.show{ display:block; animation:fadeUp .5s ease; }
@keyframes fadeUp{ from{opacity:0; transform:translateY(20px);} to{opacity:1; transform:none;} }

.placed-cards{ display:flex; gap:18px; flex-wrap:wrap; margin-bottom:34px; }
.placed-card{
  width:132px; background:#fff; border:1px solid var(--line); border-radius:12px;
  overflow:hidden; box-shadow:var(--shadow); text-align:center; padding-bottom:10px;
}
.placed-card img{ width:100%; aspect-ratio:.62; object-fit:cover; }
.placed-card.rev img{ transform:rotate(180deg); }
.placed-card .pc-pos{ font-size:11px; color:var(--gold); letter-spacing:1px; padding-top:8px; }
.placed-card .pc-name{ font-size:14px; color:var(--navy); font-weight:500; }
.placed-card .pc-ori{ font-size:11px; color:var(--ink-soft); }

.reading-text{
  background:#fff; border:1px solid var(--line); border-left:3px solid var(--gold);
  border-radius:14px; padding:30px 34px; line-height:1.9; color:var(--ink-soft);
  white-space:pre-wrap;
}
.reading-text.typing::after{
  content:"▍"; color:var(--gold); animation:blink 1s infinite;
}
@keyframes blink{ 50%{opacity:0;} }

/* ============ 历史 ============ */
.history-item{
  display:flex; gap:16px; align-items:center; padding:16px;
  background:#fff; border:1px solid var(--line); border-radius:12px; margin-bottom:10px;
  cursor:pointer; transition:.2s;
}
.history-item:hover{ border-color:var(--gold); box-shadow:var(--shadow); }
.history-item img{ width:44px; border-radius:6px; }
.history-item .hi-meta{ flex:1; }
.history-item .hi-q{ font-size:14.5px; color:var(--navy); font-weight:500;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.history-item .hi-time{ font-size:12px; color:var(--ink-soft); }

/* ============ 弹窗 ============ */
.modal-mask{
  position:fixed; inset:0; background:rgba(7,24,52,.6); backdrop-filter:blur(4px);
  display:none; align-items:center; justify-content:center; z-index:100; padding:20px;
}
.modal-mask.show{ display:flex; }
.modal{
  background:#fff; border-radius:18px; padding:36px; max-width:400px; width:100%;
  box-shadow:var(--shadow-lg); position:relative; animation:fadeUp .3s ease;
}
.modal h3{ margin-bottom:6px; }
.modal .sub{ font-size:13.5px; color:var(--ink-soft); margin-bottom:22px; }
.modal input{
  width:100%; padding:13px 16px; border:1px solid var(--line); border-radius:10px;
  margin-bottom:12px; font-size:14.5px; font-family:inherit; outline:none;
}
.modal input:focus{ border-color:var(--gold); }
.modal .btn{ width:100%; justify-content:center; margin-top:6px; }
.modal-close{
  position:absolute; top:16px; right:20px; background:none; font-size:22px;
  color:var(--ink-soft); line-height:1;
}
.modal-switch{ text-align:center; font-size:13px; color:var(--ink-soft); margin-top:16px; }
.modal-switch a{ color:var(--gold); cursor:pointer; }

/* ============ 页脚 ============ */
.footer{
  background:var(--navy-ink); color:rgba(255,255,255,.6);
  padding:64px 0 30px; margin-top:60px;
}
.footer-grid{ display:grid; grid-template-columns:1.5fr 1fr 1fr 1fr; gap:36px; margin-bottom:44px; }
.footer h4{ color:#fff; font-size:15px; margin-bottom:16px; font-weight:500; }
.footer a{ display:block; font-size:13.5px; margin-bottom:9px; transition:.2s; }
.footer a:hover{ color:var(--gold-light); }
.footer .logo-text b{ color:#fff; }
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.1); padding-top:24px;
  font-size:12.5px; display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap;
}

/* ============ CTA ============ */
.cta-band{
  background:linear-gradient(135deg,var(--navy),var(--navy-deep));
  border-radius:22px; padding:64px 50px; color:#fff; text-align:center; position:relative; overflow:hidden;
}
.cta-band::before{
  content:""; position:absolute; inset:0;
  background:radial-gradient(ellipse 50% 60% at 80% 20%, rgba(184,153,104,.2), transparent 60%);
}
.cta-band > *{ position:relative; }
.cta-band h2{ color:#fff; margin-bottom:14px; }
.cta-band p{ color:rgba(255,255,255,.68); margin-bottom:30px; }

/* ============ 响应式 ============ */
@media (max-width:960px){
  .grid-4{ grid-template-columns:repeat(2,1fr); }
  .grid-3{ grid-template-columns:repeat(2,1fr); }
  .detail-hero{ grid-template-columns:1fr; gap:30px; padding:34px 0; }
  .detail-img{ max-width:300px; }
  .footer-grid{ grid-template-columns:1fr 1fr; }
  .nav-links{ display:none; position:absolute; top:66px; left:0; right:0;
    background:#fff; flex-direction:column; padding:14px 22px 20px;
    border-bottom:1px solid var(--line); box-shadow:var(--shadow-lg); }
  .nav-links.open{ display:flex; }
  .nav-burger{ display:block; }
  .table-wrap{ height:520px; }
  .section{ padding:60px 0; }
}
@media (max-width:560px){
  .grid-3,.grid-4{ grid-template-columns:repeat(2,1fr); }
  .cta-band{ padding:44px 24px; }
  .reading-text{ padding:22px 20px; }
  .table-wrap{ height:440px; }
}
