/* =========================================================
 *  style.css —— 暗黑高级 · 黑金 / 靛蓝 / 神秘光效
 *  保留全部原有 class 名（app.js 依赖），仅重做视觉与动效
 * ========================================================= */
:root {
  /* 背景与面板 */
  --bg: #060912;
  --bg2: #0a0f1c;
  --panel: rgba(18, 24, 40, .72);
  --panel-solid: #111726;
  --panel2: #161d30;
  --panel3: #1c2438;

  /* 文字 */
  --ink: #e9edf6;
  --ink2: #aeb8cf;
  --ink3: #6f7a94;

  /* 描边 */
  --line: rgba(212, 175, 55, .22);
  --line2: rgba(120, 140, 210, .18);

  /* 主题色 */
  --gold: #d4af37;
  --gold2: #f3d27a;
  --gold-soft: rgba(212, 175, 55, .14);
  --indigo: #5b7cfa;
  --indigo2: #7c5cff;
  --indigo-soft: rgba(124, 92, 255, .16);
  --zhu: #f0637a;          /* 凶 / 警示 */
  --green: #4ad99a;
  --blue: #5b9cff;

  --shadow: 0 4px 18px rgba(0, 0, 0, .45);
  --shadow2: 0 10px 36px rgba(0, 0, 0, .6);
  --glow-gold: 0 0 18px rgba(212, 175, 55, .35);
  --glow-indigo: 0 0 22px rgba(124, 92, 255, .32);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(1400px 800px at 50% -10%, rgba(91, 124, 250, .16), transparent 65%),
    radial-gradient(1000px 600px at 20% 20%, rgba(124, 92, 255, .10), transparent 55%),
    radial-gradient(900px 700px at 85% 30%, rgba(212, 175, 55, .08), transparent 55%),
    radial-gradient(1200px 800px at 50% 120%, rgba(91, 124, 250, .10), transparent 60%),
    linear-gradient(180deg, #03050c 0%, #060912 40%, #080d18 100%);
  color: var(--ink);
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", "Source Han Serif SC", serif;
  font-size: 15px;
  line-height: 1.85;
  padding-bottom: 40px;
  overflow-x: hidden;
}

/* 背景粒子 canvas */
#bgParticles {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

/* 顶部天光光束 */
#lightRays {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  overflow: hidden;
}
.ray-core {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 120vw;
  height: 75vh;
  background: radial-gradient(ellipse at center top, rgba(124, 92, 255, .20), rgba(91, 124, 250, .08) 40%, transparent 72%);
  animation: rayBreathe 6s ease-in-out infinite;
}
.ray-a, .ray-b, .ray-c {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  opacity: .10;
  filter: blur(18px);
}
.ray-a { border-width: 0 18vw 75vh 18vw; border-color: transparent transparent rgba(212, 175, 55, .14) transparent; }
.ray-b { border-width: 0 32vw 80vh 32vw; border-color: transparent transparent rgba(124, 92, 255, .10) transparent; opacity: .07; }
.ray-c { border-width: 0 8vw 55vh 8vw; border-color: transparent transparent rgba(243, 210, 122, .12) transparent; opacity: .12; }
@keyframes rayBreathe { 0%,100%{opacity:.85; transform:translateX(-50%) scale(1);} 50%{opacity:1; transform:translateX(-50%) scale(1.04);} }

/* 华丽八卦盘文字样式 */
.disk-svg .dz-char {
  font-size: 22px;
  fill: #f3d27a;
  font-family: "KaiTi", "STKaiti", "SimSun", "Noto Serif SC", serif;
  text-shadow: 0 0 6px rgba(243, 210, 122, .8);
  filter: drop-shadow(0 0 3px rgba(243, 210, 122, .7));
}
.disk-svg .gua-name {
  font-size: 12px;
  fill: #e9edf6;
  opacity: .8;
  letter-spacing: 1px;
}
.taiji { animation: taijiPulse 3.6s ease-in-out infinite; }
@keyframes taijiPulse { 0%,100%{filter: drop-shadow(0 0 8px rgba(243,210,122,.55));} 50%{filter: drop-shadow(0 0 20px rgba(243,210,122,.95));} }

/* 全局固定八卦圆盘水印 */
.bg-disk-fixed {
  position: fixed;
  right: -150px;
  bottom: -150px;
  width: 420px;
  height: 420px;
  z-index: -1;
  opacity: .06;
  pointer-events: none;
  animation: spinDisk 140s linear infinite;
}
.bg-disk-fixed .disk-svg { width: 100%; height: 100%; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input {
  font-family: inherit;
}

::selection { background: rgba(212, 175, 55, .35); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0f1c; }
::-webkit-scrollbar-thumb { background: #2a3450; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3a4a6e; }

/* ============ Header ============ */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 12, 22, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e9edf6;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 22px rgba(0, 0, 0, .5), 0 1px 0 rgba(212, 175, 55, .25) inset;
}

.hdr-in {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-mark {
  font-size: 26px;
  color: var(--gold2);
  line-height: 1;
  text-shadow: 0 0 14px rgba(243, 210, 122, .7);
  animation: spinDisk 22s linear infinite;
}

.brand-t b {
  display: block;
  font-size: 18px;
  letter-spacing: 3px;
  color: #f4e9cf;
  text-shadow: 0 0 12px rgba(212, 175, 55, .4);
}

.brand-t i {
  display: block;
  font-size: 11px;
  font-style: normal;
  color: #9aa3bd;
  letter-spacing: .5px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav button {
  background: none;
  border: 0;
  color: #b6bdce;
  padding: 7px 13px;
  font-size: 14px;
  border-radius: 4px;
  letter-spacing: 1px;
  transition: .2s;
}

.nav button:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(212, 175, 55, .5);
}

.nav button.on {
  background: var(--gold-soft);
  color: var(--gold2);
  box-shadow: inset 0 -2px 0 var(--gold), 0 0 14px rgba(212, 175, 55, .2);
}

.hdr-user {
  min-width: 150px;
  margin-left: 8px;
}

.hu-lv span {
  font-size: 14px;
  color: var(--gold2);
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(243, 210, 122, .45);
}

.hu-bar {
  height: 5px;
  background: rgba(255, 255, 255, .1);
  border-radius: 3px;
  overflow: hidden;
  margin: 3px 0;
}

.hu-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--indigo), var(--gold2));
  box-shadow: 0 0 10px rgba(124, 92, 255, .6);
  transition: width .5s;
}

.hu-exp {
  font-size: 11px;
  color: #9aa3bd;
}

.hu-exp b {
  color: var(--gold2);
}

.hu-exp em {
  font-style: normal;
  margin-left: 6px;
}

/* ============ Main ============ */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.view {
  display: none;
  animation: fade .4s ease;
}

.view.active {
  display: block;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* 进入时卡片轻微上浮 */
.view.active .cat-card,
.view.active .g-card,
.view.active .bg-card,
.view.active .game-card,
.view.active .ach-cell,
.view.active .hist-item,
.view.active .st-cell,
.view.active .stat-card > * {
  animation: cardIn .55s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.hero {
  position: relative;
  padding: 40px 4px 18px;
  text-align: center;
}
.hero > * { position: relative; z-index: 1; }

/* divine 页面旋转八卦圆盘 */
.disk-deco {
  position: absolute;
  left: 50%;
  top: 36px;
  transform: translate(-50%, 0);
  width: 320px;
  height: 320px;
  opacity: .16;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 34px rgba(124, 92, 255, .45));
  animation: spinDisk 75s linear infinite;
}
.disk-deco .disk-svg { width: 100%; height: 100%; }
.dk-tri { font-size: 30px; fill: #e9edf6; }
.dk-taiji { font-size: 56px; fill: var(--gold2); filter: drop-shadow(0 0 8px rgba(243,210,122,.6)); }

.hero h1 {
  font-size: 25px;
  letter-spacing: 2px;
  color: #f6efdc;
  text-shadow: 0 0 18px rgba(212, 175, 55, .35);
}

.hero.sm h1 {
  font-size: 21px;
}

.hero p {
  margin: 8px auto 0;
  max-width: 720px;
  color: var(--ink2);
  font-size: 14px;
}

/* ============ Steps ============ */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0 20px;
}

.step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink3);
  padding: 4px 10px;
  border: 1px solid var(--line2);
  border-radius: 20px;
  background: var(--panel);
}

.step .sn {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #2a3450;
  color: #cdd4e6;
  font-size: 11px;
  display: grid;
  place-items: center;
}

.step.on {
  color: var(--gold2);
  border-color: rgba(212, 175, 55, .5);
  background: var(--gold-soft);
  box-shadow: var(--glow-gold);
}

.step.on .sn {
  background: linear-gradient(160deg, var(--gold2), var(--gold));
  color: #1a1300;
}

.step.done {
  color: var(--green);
  border-color: rgba(74, 217, 154, .4);
}

.step.done .sn {
  background: var(--green);
  color: #04221a;
}

.arw {
  width: 14px;
  height: 1px;
  background: #2a3450;
  position: relative;
}

.arw::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  border: 3px solid transparent;
  border-left-color: #3a4a6e;
}

/* ============ Section title ============ */
.sec-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 17px;
  margin: 6px 0 14px;
  color: #f1ead7;
  border-left: 4px solid var(--gold);
  padding-left: 10px;
  text-shadow: 0 0 12px rgba(212, 175, 55, .25);
}

.sec-title .sub {
  font-size: 12.5px;
  color: var(--ink3);
  font-weight: 400;
}

.btn-mini {
  background: var(--panel2);
  border: 1px solid var(--line2);
  color: var(--ink2);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 13px;
}

.btn-mini:hover {
  border-color: var(--gold);
  color: var(--gold2);
}

/* ============ Category grid ============ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 14px;
}

.cat-card {
  position: relative;
  background: var(--panel);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line2);
  border-top: 3px solid var(--cc);
  border-radius: 10px;
  padding: 16px 14px 14px;
  box-shadow: var(--shadow);
  transition: .22s;
  cursor: pointer;
  overflow: hidden;
}
.cat-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(120px 80px at 80% 0%, color-mix(in srgb, var(--cc) 22%, transparent), transparent 70%);
  opacity: 0; transition: .25s;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow2), 0 0 22px color-mix(in srgb, var(--cc) 30%, transparent);
  border-color: var(--cc);
}
.cat-card:hover::before { opacity: 1; }

.cc-badge {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 26px;
  color: var(--cc);
  opacity: .55;
  text-shadow: 0 0 12px color-mix(in srgb, var(--cc) 60%, transparent);
}

.cc-name {
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--cc);
}

.cc-cnt {
  font-size: 12px;
  color: var(--ink3);
  margin: 2px 0 6px;
}

.cc-desc {
  font-size: 12.5px;
  color: var(--ink2);
  line-height: 1.7;
}

/* ============ Item chips ============ */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 10px;
}

.item-chip {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 11px 13px;
  transition: .18s;
  color: var(--ink);
}

.item-chip:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, .08);
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

.item-chip b {
  display: block;
  font-size: 15.5px;
  letter-spacing: 1px;
  color: var(--ink);
}

.item-chip span {
  display: block;
  font-size: 12.5px;
  color: var(--ink3);
  line-height: 1.6;
  margin-top: 2px;
}

.item-chip.custom {
  grid-column: 1 / -1;
  border-style: dashed;
  border-color: rgba(212, 175, 55, .5);
  background: rgba(212, 175, 55, .06);
}

.item-chip.custom b {
  color: var(--gold2);
}

.custom-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.custom-box label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--ink);
}

.custom-box textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  font-size: 15px;
  resize: vertical;
  background: rgba(6, 9, 18, .6);
  color: var(--ink);
  box-sizing: border-box;
  font-family: inherit;
}

.custom-box textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--glow-gold);
}

.custom-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* ============ Method tabs ============ */
.m-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.m-tab {
  background: var(--panel2);
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 14px;
  color: var(--ink2);
  transition: .2s;
}

.m-tab:hover { color: var(--ink); border-color: var(--gold); }

.m-tab.on {
  background: linear-gradient(160deg, var(--gold2), var(--gold));
  border-color: var(--gold);
  color: #1a1300;
  box-shadow: var(--glow-gold);
}

.m-pane {
  display: none;
}

.m-pane.on {
  display: block;
}

.pane-in {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.pane-tip {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--ink2);
  background: var(--indigo-soft);
  border-left: 3px solid var(--indigo2);
  padding: 8px 12px;
  line-height: 1.8;
  border-radius: 0 6px 6px 0;
}

.pane-note {
  font-size: 12px;
  color: var(--ink3);
  margin: 6px 0 12px;
}

.inp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.inp-row label {
  width: 108px;
  font-size: 13.5px;
  color: var(--ink2);
  flex: none;
}

.inp-row input,
.fake-inp {
  flex: 1;
  border: 1px solid var(--line2);
  background: rgba(6, 9, 18, .6);
  border-radius: 5px;
  padding: 8px 11px;
  font-size: 14px;
  color: var(--ink);
}

.fake-inp {
  background: rgba(124, 92, 255, .1);
  color: var(--ink2);
}

.inp-row input:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: var(--glow-gold);
}

/* 主按钮（金） */
.btn-main {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 16px auto 0;
  background: linear-gradient(160deg, var(--gold2), var(--gold) 60%, #a8841f);
  color: #1a1300;
  border: 0;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 16px;
  letter-spacing: 4px;
  font-weight: 700;
  box-shadow: var(--glow-gold), 0 4px 14px rgba(0, 0, 0, .4);
  transition: .2s;
}
.btn-main:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 0 26px rgba(243, 210, 122, .5); }

.btn-main:disabled {
  background: #2a3450;
  color: #7c879e;
  box-shadow: none;
  cursor: default;
}

.btn-sec {
  background: var(--panel2);
  border: 1px solid var(--line2);
  color: var(--ink2);
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 14px;
  transition: .2s;
}

.btn-sec:hover {
  border-color: var(--gold);
  color: var(--gold2);
}

/* ============ Coin stage ============ */
.coin-stage {
  min-height: 96px;
  background: rgba(124, 92, 255, .07);
  border: 1px dashed var(--line2);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.coin-row { width: 100%; }

.coin-throw {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-bottom: 1px dotted rgba(120, 140, 210, .2);
  animation: pop .3s;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.coin {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  background: radial-gradient(circle at 32% 30%, var(--gold2), #a8811f);
  color: #2a1d00;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 0 10px rgba(243, 210, 122, .35);
  border: 1px solid #c9a24c;
}

.coin.yang {
  background: radial-gradient(circle at 32% 30%, #e8eefc, #9fa9c6);
  color: #2a3045;
  border-color: #aab4d4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.coin-throw b {
  margin-left: 6px;
  color: var(--gold2);
  font-size: 15px;
}

.coin-throw em {
  font-style: normal;
  font-size: 12.5px;
  color: var(--ink2);
  margin-left: auto;
}

.mind-box {
  min-height: 110px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(124, 92, 255, .18), rgba(6, 9, 18, .6));
  border: 1px solid var(--line2);
  border-radius: 10px;
  font-size: 19px;
  letter-spacing: 5px;
  color: var(--ink2);
  text-shadow: 0 0 14px rgba(124, 92, 255, .5);
}

/* ============ Result ============ */
.res-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  flex-wrap: wrap;
  border-radius: 12px;
  margin-bottom: 16px;
  color: #fff8ec;
  background: linear-gradient(120deg, #1c2438, #111726);
  border: 1px solid var(--line2);
  box-shadow: var(--shadow);
}

.res-head.daji { background: linear-gradient(120deg, #6a5212, #b0811f); border-color: rgba(212,175,55,.5); }
.res-head.ji { background: linear-gradient(120deg, #15402c, #2e7d52); border-color: rgba(74,217,154,.4); }
.res-head.xiaoji { background: linear-gradient(120deg, #1d3358, #345d8c); border-color: rgba(91,156,255,.4); }
.res-head.ping { background: linear-gradient(120deg, #232a3c, #1a2236); }
.res-head.xiaoxiong { background: linear-gradient(120deg, #5a3416, #8a5a2b); border-color: rgba(240,99,122,.3); }
.res-head.xiong { background: linear-gradient(120deg, #5a1a1c, #7d221e); border-color: rgba(240,99,122,.4); }
.res-head.daxiong { background: linear-gradient(120deg, #360f0d, #240b0a); }

.rh-item { font-size: 20px; letter-spacing: 2px; }
.rh-method, .rh-time { font-size: 12px; opacity: .82; }
.rh-custom { font-size: 13px; opacity: .92; margin-top: 4px; line-height: 1.5; max-width: 420px; }
.rh-r { text-align: right; }
.rh-level { font-size: 24px; letter-spacing: 4px; }
.rh-star { color: #ffd97a; letter-spacing: 2px; text-shadow: 0 0 10px rgba(255,217,122,.6); }
.rh-word { font-size: 12.5px; opacity: .85; }

.rh-gua { flex: 0 0 64px; width: 64px; height: 82px; opacity: .95; filter: drop-shadow(0 0 8px rgba(255,217,122,.4)); }
.rh-gua .hex-svg { width: 100%; height: 100%; }
.rh-l { flex: 1 1 auto; min-width: 180px; }

/* 卦象排盘卡 */
.pan-card {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.pan-title {
  text-align: center;
  font-size: 16px;
  letter-spacing: 6px;
  color: var(--gold2);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(212, 175, 55, .3);
}

.pan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pan-b {
  text-align: center;
  padding: 10px 4px;
  border-radius: 8px;
  background: rgba(6, 9, 18, .5);
  border: 1px solid var(--line2);
}

.pb-t { font-size: 13.5px; letter-spacing: 2px; color: var(--ink); }
.pb-t i { display: block; font-style: normal; font-size: 11px; color: var(--ink3); letter-spacing: 0; }

.pb-svg { margin: 4px 0; }
.hex-svg { width: 76px; height: 98px; }
.tri-svg { width: 62px; height: 32px; }

.pb-name { font-size: 15px; letter-spacing: 1px; color: var(--gold2); }
.pb-sub { font-size: 11.5px; color: var(--ink3); }

.pan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dotted var(--line2);
  font-size: 12.5px;
  color: var(--ink2);
}
.pan-meta b { color: var(--ink); }
.pan-meta .rel { padding: 1px 8px; border-radius: 12px; background: var(--panel3); }
.pan-meta .rel.good { background: rgba(74, 217, 154, .16); color: var(--green); }
.pan-meta .rel.bad { background: rgba(240, 99, 122, .16); color: var(--zhu); }

.res-summary {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 15px;
  color: var(--gold2);
  letter-spacing: 1px;
  box-shadow: var(--shadow);
}
.res-summary p { margin: 6px 0 0; font-size: 14px; color: var(--ink2); letter-spacing: 0; line-height: 1.9; }

/* 大白话框 —— 信笺风格（暗夜金边） */
.plain-letter-box {
  position: relative;
  background: linear-gradient(180deg, rgba(28, 24, 14, .9), rgba(18, 22, 36, .9));
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 22px 22px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow2), 0 0 22px rgba(212, 175, 55, .12);
}
.plain-letter-box::before {
  content: '';
  position: absolute;
  left: 14px; right: 14px; top: 8px; bottom: 8px;
  border: 1px solid rgba(243, 210, 122, .3);
  border-radius: 10px;
  pointer-events: none;
}
.plb-head {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold2);
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 12px;
  position: relative;
  text-shadow: 0 0 10px rgba(243, 210, 122, .4);
}
.plb-head::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  margin: 8px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}
.plb-body {
  position: relative;
  font-size: 15.5px;
  line-height: 2.15;
  color: #f1ead7;
  text-align: justify;
  text-indent: 0;
  padding: 4px 8px 0;
}
.plb-sign {
  text-align: right;
  font-size: 12.5px;
  color: var(--ink3);
  margin-top: 12px;
  letter-spacing: 1px;
}
@media (max-width: 640px) {
  .plain-letter-box { padding: 18px 16px 14px; }
  .plb-body { font-size: 14.5px; line-height: 1.95; }
}

.sec-card {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.sec-card h3 { font-size: 15.5px; letter-spacing: 2px; color: #f1ead7; border-bottom: 1px dotted var(--line2); padding-bottom: 7px; margin-bottom: 9px; }
.sec-card p { margin: 6px 0; color: var(--ink2); font-size: 14px; line-height: 1.95; }
.sec-card p.hl { color: var(--ink); background: var(--indigo-soft); border-left: 3px solid var(--indigo2); padding: 7px 11px; border-radius: 0 4px 4px 0; }

.gua-ci {
  font-size: 13.5px;
  color: #d9c89a;
  background: rgba(212, 175, 55, .08);
  border: 1px dashed rgba(212, 175, 55, .35);
  border-radius: 6px;
  padding: 7px 11px;
  margin: 4px 0 8px;
  letter-spacing: .5px;
}

.yao-item { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dotted var(--line2); }
.yao-item:last-child { border: 0; }
.yp { width: 92px; flex: none; font-size: 14px; color: var(--gold2); }
.yp span { display: block; font-size: 11px; color: var(--ink3); line-height: 1.5; }
.yt { flex: 1; font-size: 13.5px; color: var(--ink2); line-height: 1.85; }
.yt .chg { color: var(--green); }

.score-line { font-size: 13px !important; color: var(--gold2) !important; }
.risk-ul { margin: 4px 0; padding-left: 18px; }
.risk-ul li { color: var(--ink2); font-size: 13.5px; line-height: 1.9; margin-bottom: 3px; }
.concl { font-size: 15px !important; color: var(--ink) !important; line-height: 2 !important; }
.tips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tips span { font-size: 12.5px; background: var(--panel3); border: 1px solid var(--line2); border-radius: 14px; padding: 3px 12px; color: var(--ink2); }
.act-ol { margin: 4px 0; padding-left: 20px; }
.act-ol li { color: var(--ink2); font-size: 13.5px; line-height: 1.95; margin-bottom: 4px; }

.fix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.fix-cell { background: rgba(6, 9, 18, .5); border: 1px solid var(--line2); border-radius: 8px; padding: 9px 12px; font-size: 13px; color: var(--ink2); line-height: 1.8; }
.fix-cell i { display: inline-block; font-style: normal; background: linear-gradient(160deg, var(--gold2), var(--gold)); color: #1a1300; border-radius: 4px; padding: 0 7px; font-size: 12px; margin-right: 8px; letter-spacing: 2px; }

.res-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 18px 0 10px; }
.res-btns .btn-main { margin: 0; width: auto; padding: 10px 30px; }
.disclaimer { text-align: center; font-size: 12px; color: var(--ink3); margin: 10px 0 0; }

/* ============ 新结果页视觉卡 ============ */

/* 卦象故事线 */
.story-card {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.sc-title, .ac-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold2);
  text-align: center;
  margin-bottom: 14px;
  position: relative;
  text-shadow: 0 0 10px rgba(212, 175, 55, .3);
}
.sc-title::after, .ac-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 8px auto 0;
  border-radius: 2px;
}
.story-flow { display: flex; align-items: stretch; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.story-step {
  flex: 1 1 0; min-width: 0;
  background: rgba(6, 9, 18, .5);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  position: relative;
}
.st-dot {
  display: inline-block;
  width: 28px; height: 28px; line-height: 28px;
  border-radius: 50%;
  font-size: 12px; font-weight: 700; color: #fff;
  margin-bottom: 8px; letter-spacing: 1px;
  box-shadow: 0 0 12px rgba(0,0,0,.4);
}
.st-dot.now { background: linear-gradient(160deg, var(--gold2), var(--gold)); color: #1a1300; box-shadow: var(--glow-gold); }
.st-dot.mid { background: linear-gradient(160deg, var(--indigo2), var(--indigo)); box-shadow: var(--glow-indigo); }
.st-dot.end { background: linear-gradient(160deg, #5be0a8, var(--green)); color: #04221a; box-shadow: 0 0 12px rgba(74,217,154,.5); }
.st-gua { font-size: 16px; font-weight: 700; color: var(--gold2); margin-bottom: 6px; letter-spacing: 1px; }
.st-core { font-size: 13px; color: var(--ink); font-weight: 600; margin-bottom: 8px; line-height: 1.5; }
.st-duan { font-size: 12.5px; color: var(--ink2); line-height: 1.75; text-align: left; background: rgba(212, 175, 55, .07); border-left: 3px solid var(--gold); padding: 6px 9px; border-radius: 0 5px 5px 0; }
.st-arrow { flex: 0 0 20px; display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 18px; font-weight: 700; }

.moving-hl { background: rgba(124, 92, 255, .08); border: 1px dashed var(--line2); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.mh-title { font-size: 13px; font-weight: 700; color: var(--gold2); letter-spacing: 2px; margin-bottom: 8px; text-align: center; }
.mh-item { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; border-bottom: 1px dotted var(--line2); font-size: 13.5px; line-height: 1.7; color: var(--ink2); }
.mh-item:last-child { border-bottom: none; }
.mh-item b { flex: 0 0 56px; color: var(--gold2); font-size: 14px; }
.mh-item span { flex: 1 1 auto; color: var(--ink2); }
.mh-item em { flex: 1 1 0; font-style: normal; color: var(--ink3); font-size: 12.5px; border-left: 2px solid var(--line2); padding-left: 8px; }

.ti-mini { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 10px 12px; background: rgba(6, 9, 18, .5); border-radius: 8px; font-size: 13px; color: var(--ink2); }
.ti-mini b { color: var(--ink); }
.ti-rel { padding: 2px 10px; border-radius: 12px; background: var(--panel3); font-size: 12.5px; }
.ti-rel.good { background: rgba(74, 217, 154, .16); color: var(--green); }
.ti-rel.bad { background: rgba(240, 99, 122, .16); color: var(--zhu); }

.action-card {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.concl-hl { background: rgba(124, 92, 255, .1); border: 1px solid var(--line2); border-radius: 10px; padding: 14px; font-size: 15px; line-height: 1.9; color: var(--ink); margin-bottom: 14px; text-align: center; }
.act-list { margin-bottom: 14px; }
.act-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px dotted var(--line2); }
.act-item:last-child { border-bottom: none; }
.act-no { flex: 0 0 24px; width: 24px; height: 24px; line-height: 24px; border-radius: 50%; background: linear-gradient(160deg, var(--gold2), var(--gold)); color: #1a1300; text-align: center; font-size: 12px; font-weight: 700; }
.act-item p { flex: 1; margin: 0; font-size: 14px; line-height: 1.75; color: var(--ink2); }

.time-risk { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tr-win, .tr-avoid, .tr-risk { background: rgba(6, 9, 18, .5); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.7; color: var(--ink2); border: 1px solid var(--line2); }
.tr-win b, .tr-avoid b, .tr-risk b { display: block; font-size: 12px; letter-spacing: 1px; color: var(--gold2); margin-bottom: 4px; }
.tr-win b { color: var(--green); }
.tr-avoid b { color: var(--zhu); }
.tr-risk b { color: #e0a05a; }
.tr-risk ul { margin: 0; padding-left: 16px; }
.tr-risk li { margin-bottom: 3px; }

.fix-title { font-size: 14px; font-weight: 700; letter-spacing: 2px; color: var(--gold2); text-align: center; margin: 16px 0 10px; }

/* ============ 起卦成卦仪式（金色光圈 + 六个爻符点亮） ============ */
.cast-ov {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 36px 0;
  min-height: 360px;
}
.cast-disk {
  width: 184px; height: 184px;
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, .55));
  animation: spinDisk 4s linear infinite;
}
.cast-disk .disk-svg { width: 100%; height: 100%; }
.cast-yao { display: flex; flex-direction: column-reverse; gap: 8px; align-items: center; }
.cy {
  width: 100px; height: 14px;
  display: flex; gap: 9px;
  opacity: .22;
  transition: opacity .4s, filter .4s, box-shadow .4s;
}
.cy i {
  height: 14px; border-radius: 3px; flex: 1;
  background: linear-gradient(90deg, #55617e, #8b96b4);
}
.cy.yang i { width: 100px; }
.cy.yin i { width: 45px; }
.cy.on {
  opacity: 1;
  box-shadow: 0 0 16px rgba(243, 210, 122, .85);
}
.cy.on i { background: linear-gradient(90deg, var(--gold), var(--gold2)); }
.cast-tip {
  font-size: 14px; letter-spacing: 4px; color: var(--gold2);
  text-shadow: 0 0 14px rgba(243, 210, 122, .5);
  animation: tipPulse 1.4s ease-in-out infinite;
}
@keyframes tipPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* 金色光圈扩散 */
.ring-layer { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.cast-ring {
  position: fixed;
  width: 14px; height: 14px;
  border: 2px solid var(--gold2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 20px 6px rgba(243, 210, 122, .6), inset 0 0 14px rgba(243, 210, 122, .4);
  animation: ringExpand 1.3s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes ringExpand {
  from { width: 14px; height: 14px; opacity: .95; }
  to { width: 560px; height: 560px; opacity: 0; }
}

/* 结果卡片从下方滑出 */
.rv {
  opacity: 0;
  transform: translateY(36px);
  animation: rvUp .6s cubic-bezier(.22, 1, .36, 1) forwards;
  animation-delay: calc(var(--i, 0) * .11s);
}
@keyframes rvUp { to { opacity: 1; transform: none; } }

/* ============ 六十四卦 ============ */
.g64-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.g64-bar input {
  flex: 1; min-width: 200px;
  border: 1px solid var(--line2);
  background: rgba(6, 9, 18, .6);
  border-radius: 8px; padding: 9px 13px; font-size: 14px; color: var(--ink);
}
.g64-bar input:focus { outline: 0; border-color: var(--gold); box-shadow: var(--glow-gold); }
.g64-bar span { font-size: 12.5px; color: var(--ink3); }

.g64-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 10px; }
.g-card {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 9px;
  padding: 10px 6px 8px;
  text-align: center;
  transition: .18s;
  position: relative;
}
.g-card:hover { transform: translateY(-3px); box-shadow: var(--shadow2), var(--glow-gold); border-color: var(--gold); }
.g-no { position: absolute; left: 7px; top: 6px; font-size: 11px; color: var(--ink3); }
.g-sym { display: block; margin: 4px 0 2px; }
.g-name { display: block; font-size: 14.5px; letter-spacing: 1px; color: var(--ink); }
.g-ji { display: inline-block; margin-top: 4px; font-size: 11px; padding: 0 8px; border-radius: 10px; background: var(--panel3); color: var(--ink2); }
.g-card.j2 .g-ji { background: rgba(212, 175, 55, .18); color: var(--gold2); }
.g-card.j1 .g-ji { background: rgba(74, 217, 154, .16); color: var(--green); }
.g-card.j-1 .g-ji { background: rgba(240, 99, 122, .16); color: var(--zhu); }
.g-card.j-2 .g-ji { background: rgba(240, 99, 122, .24); color: #ff97a8; }

/* ============ Modal ============ */
.modal {
  position: fixed; inset: 0;
  background: rgba(4, 7, 14, .72);
  backdrop-filter: blur(4px);
  display: none; z-index: 100;
  overflow-y: auto; padding: 30px 12px;
}
.modal.show { display: block; }
.modal-box {
  max-width: 760px; margin: 0 auto;
  background: linear-gradient(180deg, var(--panel-solid), #0d1322);
  border: 1px solid var(--line);
  border-radius: 14px; position: relative;
  box-shadow: var(--shadow2), 0 0 30px rgba(212, 175, 55, .12);
  animation: fade .3s;
}
.modal-x {
  position: absolute; right: 4px; top: 4px;
  background: none; border: 0; font-size: 26px; color: var(--ink3); line-height: 1;
  cursor: pointer; z-index: 10;
  min-width: 40px; min-height: 40px;
  display: grid; place-items: center;
  padding: 6px; border-radius: 8px;
  transition: .15s;
}
.modal-x:hover { color: var(--gold2); background: rgba(255,255,255,.06); }
.modal-in { padding: 22px 24px 26px; }
.mg-head { display: flex; gap: 18px; align-items: center; border-bottom: 1px solid var(--line2); padding-bottom: 14px; margin-bottom: 12px; }
.mg-svg { flex: none; background: rgba(6, 9, 18, .6); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 12px; box-shadow: var(--glow-gold); }
.mg-svg .hex-svg { width: 96px; height: 124px; }
.mg-meta h2 { font-size: 21px; letter-spacing: 2px; color: #f1ead7; }
.mg-ji { font-size: 14px; color: var(--ink2); margin: 3px 0; }
.mg-ji.j2 { color: var(--gold2); }
.mg-ji.j1 { color: var(--green); }
.mg-ji.j-1, .mg-ji.j-2 { color: var(--zhu); }
.mg-tags span { display: inline-block; font-size: 11.5px; background: var(--panel3); border: 1px solid var(--line2); color: var(--ink2); border-radius: 10px; padding: 0 9px; margin: 4px 4px 0 0; }
.mg-pair { font-size: 12.5px; color: var(--ink3); margin-top: 5px; }
.mg-sec { margin-top: 14px; }
.mg-sec h4 { font-size: 14.5px; letter-spacing: 2px; color: var(--gold2); margin-bottom: 5px; }
.mg-sec p { margin: 0; font-size: 14px; color: var(--ink2); line-height: 1.95; }
.mg-sec p.ci { font-size: 15px; color: #d9c89a; background: rgba(212, 175, 55, .08); border-left: 3px solid var(--gold); padding: 7px 12px; border-radius: 0 4px 4px 0; letter-spacing: .5px; }
.duan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.duan-cell { background: rgba(6, 9, 18, .5); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 11px; font-size: 13.5px; color: var(--ink2); line-height: 1.85; }
.duan-cell i { font-style: normal; background: linear-gradient(160deg, var(--gold2), var(--gold)); color: #1a1300; border-radius: 3px; padding: 0 7px; font-size: 12px; margin-right: 8px; }

/* ============ 八卦认知 ============ */
.bg-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; justify-content: center; }
.bg-tabs button { background: var(--panel2); border: 1px solid var(--line2); border-radius: 6px; padding: 7px 18px; font-size: 14px; color: var(--ink2); transition: .2s; }
.bg-tabs button:hover { color: var(--ink); border-color: var(--gold); }
.bg-tabs button.on { background: linear-gradient(160deg, var(--gold2), var(--gold)); border-color: var(--gold); color: #1a1300; box-shadow: var(--glow-gold); }

.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.bg-card {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-top: 3px solid var(--ec);
  border-radius: 9px;
  padding: 12px 6px 10px;
  text-align: center;
  transition: .18s;
}
.bg-card:hover { transform: translateY(-3px); box-shadow: var(--shadow2), 0 0 18px color-mix(in srgb, var(--ec) 35%, transparent); }
.bg-card.on { background: rgba(212, 175, 55, .1); border-color: var(--ec); box-shadow: var(--shadow2); }
.bg-sym { display: block; font-size: 40px; line-height: 1.1; color: var(--ec); text-shadow: 0 0 16px color-mix(in srgb, var(--ec) 60%, transparent); }
.bg-name { display: block; font-size: 17px; letter-spacing: 2px; color: var(--ec); }
.bg-full { display: block; font-size: 12px; color: var(--ink2); }
.bg-wx { display: block; font-size: 11.5px; color: var(--ink3); }

.bg-detail { margin-top: 16px; background: var(--panel); border: 1px solid var(--line2); border-left: 4px solid var(--ec); border-radius: 10px; padding: 16px 18px; box-shadow: var(--shadow); }
.bd-head { display: flex; gap: 16px; align-items: center; border-bottom: 1px dotted var(--line2); padding-bottom: 12px; margin-bottom: 10px; }
.bd-sym { font-size: 52px; line-height: 1; color: var(--ec); text-shadow: 0 0 18px color-mix(in srgb, var(--ec) 60%, transparent); }
.bd-head h3 { font-size: 20px; letter-spacing: 3px; color: #f1ead7; }
.bd-head em { font-style: normal; font-size: 13px; color: var(--ink3); margin-left: 8px; letter-spacing: 1px; }
.bd-kw span { display: inline-block; font-size: 12px; background: var(--panel3); border: 1px solid var(--line2); border-radius: 10px; padding: 0 9px; margin: 5px 5px 0 0; color: var(--ink2); }
.bd-table { width: 100%; border-collapse: collapse; }
.bd-table th { width: 88px; text-align: right; padding: 6px 12px 6px 0; font-weight: 400; font-size: 13px; color: var(--ink3); vertical-align: top; white-space: nowrap; }
.bd-table td { padding: 6px 0; font-size: 13.5px; color: var(--ink2); line-height: 1.85; border-bottom: 1px dotted var(--line2); }

/* ============ 圆图 ============ */
.circle-wrap {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap; justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 12px; padding: 20px; box-shadow: var(--shadow);
}
.circle-svg { width: 320px; height: 320px; flex: none; filter: drop-shadow(0 0 16px rgba(124, 92, 255, .3)); }
.c-sym { font-size: 22px; fill: #e9edf6; }
.c-name { font-size: 14px; fill: var(--gold2); }
.c-dir { font-size: 10.5px; fill: #8b95ad; }
.c-title { font-size: 14px; fill: var(--gold2); letter-spacing: 2px; }
.circle-note { flex: 1; min-width: 260px; }
.circle-note h4 { font-size: 16px; letter-spacing: 2px; color: var(--gold2); margin-bottom: 6px; }
.circle-note p { font-size: 13.5px; color: var(--ink2); line-height: 1.95; margin: 6px 0; }

/* ============ 五行 ============ */
.wx-wrap { display: flex; gap: 16px; flex-wrap: wrap; }
.wx-col { flex: 1; min-width: 260px; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 14px 16px; box-shadow: var(--shadow); }
.wx-col h4 { font-size: 15px; letter-spacing: 2px; color: var(--gold2); margin-bottom: 8px; }
.wx-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px dotted var(--line2); }
.wx-b { width: 28px; height: 28px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 14px; box-shadow: 0 0 10px rgba(0,0,0,.4); }
.wx-row i { font-style: normal; font-size: 12px; color: var(--ink3); }
.wx-row em { font-style: normal; font-size: 13px; color: var(--ink2); margin-left: auto; }
.wx-table { margin-top: 16px; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 14px 16px; box-shadow: var(--shadow); overflow-x: auto; }
.wx-table h4 { font-size: 15px; letter-spacing: 2px; color: var(--gold2); margin-bottom: 8px; }
.wx-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wx-table th { background: var(--panel3); padding: 7px 10px; text-align: left; color: var(--ink2); font-weight: 400; white-space: nowrap; }
.wx-table td { padding: 7px 10px; border-bottom: 1px dotted var(--line2); color: var(--ink2); line-height: 1.7; }

/* ============ 游戏 ============ */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.game-card {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: .2s;
  cursor: pointer;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow2), var(--glow-indigo); border-color: var(--indigo2); }
.gc-ic {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(160deg, rgba(124,92,255,.25), rgba(91,124,250,.15));
  border: 1px solid var(--line2);
  font-size: 21px; color: var(--gold2); margin-bottom: 8px;
  box-shadow: var(--glow-indigo);
}
.game-card b { display: block; font-size: 17px; letter-spacing: 2px; color: #f1ead7; }
.game-card p { font-size: 12.5px; color: var(--ink3); line-height: 1.75; margin: 6px 0 10px; }
.gc-diff { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.gc-diff button { background: var(--panel3); border: 1px solid var(--line2); border-radius: 14px; padding: 4px 12px; font-size: 12.5px; color: var(--ink2); transition: .2s; }
.gc-diff button:hover { background: linear-gradient(160deg, var(--gold2), var(--gold)); border-color: var(--gold); color: #1a1300; }
.gc-diff span { font-size: 12.5px; color: var(--ink3); }
.gc-diff b { display: inline; font-size: 13px; color: var(--gold2); }

.quiz-wrap { background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.quiz-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink3); border-bottom: 1px dotted var(--line2); padding-bottom: 8px; margin-bottom: 14px; }
.q-diff { background: linear-gradient(160deg, var(--gold2), var(--gold)); color: #1a1300; border-radius: 12px; padding: 1px 12px; }
.q-combo, .q-prog { color: var(--ink2); }
.quiz-q { font-size: 18px; line-height: 1.8; margin: 6px 0 16px; color: var(--ink); }
.quiz-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.q-opt {
  text-align: left; background: rgba(6, 9, 18, .5); border: 1px solid var(--line2); border-radius: 8px;
  padding: 11px 14px; font-size: 14.5px; color: var(--ink); transition: .15s;
  display: flex; gap: 10px; align-items: center;
}
.q-opt:hover:not(:disabled) { border-color: var(--gold); background: rgba(212, 175, 55, .08); }
.q-opt span { width: 22px; height: 22px; border-radius: 50%; background: var(--panel3); color: #cdd4e6; display: grid; place-items: center; font-size: 12px; flex: none; }
.q-opt.right { background: rgba(74, 217, 154, .16); border-color: var(--green); }
.q-opt.right span { background: var(--green); color: #04221a; }
.q-opt.wrong { background: rgba(240, 99, 122, .16); border-color: var(--zhu); }
.q-opt.wrong span { background: var(--zhu); color: #2a0a10; }
.quiz-fb { margin-top: 14px; }
.fb { border-radius: 8px; padding: 11px 14px; font-size: 14px; line-height: 1.85; }
.fb.ok { background: rgba(74, 217, 154, .12); color: var(--green); border: 1px solid rgba(74,217,154,.3); }
.fb.no { background: rgba(240, 99, 122, .12); color: #ff97a8; border: 1px solid rgba(240,99,122,.3); }
.fb p { margin: 5px 0 0; font-size: 13px; color: var(--ink2); }
.quiz-fb .btn-main { max-width: 220px; padding: 8px 20px; letter-spacing: 2px; margin-top: 12px; }
.quiz-end { text-align: center; padding: 20px 0 10px; }
.quiz-end h3 { font-size: 21px; letter-spacing: 3px; color: var(--gold2); }
.qe-score { font-size: 52px; color: var(--gold2); line-height: 1.3; text-shadow: 0 0 18px rgba(243,210,122,.4); }
.qe-score i { font-style: normal; font-size: 20px; color: var(--ink3); }
.quiz-end p { color: var(--ink2); font-size: 14px; }
.qe-btns { display: flex; gap: 12px; justify-content: center; margin-top: 14px; }
.qe-btns .btn-main { margin: 0; width: auto; padding: 9px 26px; }

.flip-wrap { background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.flip-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink2); border-bottom: 1px dotted var(--line2); padding-bottom: 8px; margin-bottom: 12px; }
.flip-top b { color: var(--gold2); }
.flip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 520px; margin: 0 auto; }
.flip-card {
  aspect-ratio: 3/4; border: 1px solid var(--line2); border-radius: 8px;
  background: linear-gradient(160deg, #1c2742, #111726);
  color: var(--gold2); position: relative; overflow: hidden; padding: 0;
  box-shadow: var(--glow-indigo);
}
.flip-card .fc-back { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; }
.flip-card .fc-face {
  position: absolute; inset: 0; display: none; flex-direction: column;
  align-items: center; justify-content: center;
  background: linear-gradient(160deg, #111726, #0c1120);
  color: var(--ink); font-size: 30px; gap: 2px;
}
.flip-card .fc-face i { font-style: normal; font-size: 11px; color: var(--ink3); }
.flip-card .fc-face.sym { font-size: 42px; color: var(--ec, var(--gold2)); }
.flip-card.open .fc-back, .flip-card.done .fc-back { display: none; }
.flip-card.open .fc-face, .flip-card.done .fc-face { display: flex; }
.flip-card.done { border-color: var(--green); box-shadow: 0 0 0 2px rgba(74, 217, 154, .3), 0 0 16px rgba(74,217,154,.3); }
.flip-end { text-align: center; margin-top: 14px; font-size: 16px; color: var(--green); letter-spacing: 1px; }

.daily-wrap { background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.daily-card { display: flex; gap: 18px; flex-wrap: wrap; padding: 14px 0; }
.dc-l { text-align: center; flex: none; }
.dc-svg { background: rgba(6, 9, 18, .6); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 14px; box-shadow: var(--glow-gold); }
.dc-svg .hex-svg { width: 90px; height: 116px; }
.dc-name { font-size: 14px; color: var(--ink2); margin-top: 4px; letter-spacing: 1px; }
.dc-r { flex: 1; min-width: 260px; }
.dc-ji { display: inline-block; font-size: 14px; padding: 1px 14px; border-radius: 12px; background: var(--panel3); color: var(--ink2); }
.dc-ji.j2 { background: rgba(212, 175, 55, .18); color: var(--gold2); }
.dc-ji.j1 { background: rgba(74, 217, 154, .16); color: var(--green); }
.dc-ji.j-1, .dc-ji.j-2 { background: rgba(240, 99, 122, .16); color: var(--zhu); }
.dc-core { font-size: 17px; letter-spacing: 2px; color: var(--gold2); margin: 6px 0; }
.dc-ci, .dc-xiang { font-size: 14px; color: #d9c89a; background: rgba(212, 175, 55, .08); border-left: 3px solid var(--gold); padding: 5px 11px; margin: 5px 0; border-radius: 0 4px 4px 0; }
.dc-bai { font-size: 13.5px; color: var(--ink2); line-height: 1.9; margin: 8px 0 0; }
.daily-yj { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.yj-col { flex: 1; min-width: 220px; border: 1px solid var(--line2); border-radius: 8px; padding: 10px 12px; background: rgba(6,9,18,.5); }
.yj-col h4 { font-size: 15px; letter-spacing: 4px; margin-bottom: 6px; }
.yj-col.yi h4 { color: var(--green); }
.yj-col.ji h4 { color: var(--zhu); }
.yj-col span { display: inline-block; font-size: 13px; background: var(--panel3); border-radius: 12px; padding: 2px 11px; margin: 3px 4px 0 0; color: var(--ink2); }
.daily-lucky { display: flex; gap: 10px 20px; flex-wrap: wrap; font-size: 13px; color: var(--ink2); border-top: 1px dotted var(--line2); padding-top: 10px; margin-top: 8px; }
.daily-lucky i { font-style: normal; color: var(--ink3); margin-right: 6px; }

.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.ach-cell { background: var(--panel3); border: 1px solid var(--line2); border-radius: 9px; padding: 12px 10px; text-align: center; opacity: .55; transition: .25s; }
.ach-cell.on { opacity: 1; background: rgba(212, 175, 55, .1); border-color: var(--gold); box-shadow: var(--glow-gold); }
.ach-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #2a3450; color: #aab4d4; font-size: 15px; margin-bottom: 5px; }
.ach-cell.on .ach-ic { background: linear-gradient(160deg, var(--gold2), var(--gold)); color: #1a1300; }
.ach-cell b { display: block; font-size: 14.5px; letter-spacing: 1px; color: #f1ead7; }
.ach-cell i { font-style: normal; font-size: 12px; color: var(--ink3); }

/* ============ 卦历 ============ */
.stat-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 12px; }
.st-cell { background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 14px; text-align: center; box-shadow: var(--shadow); }
.st-cell b { display: block; font-size: 26px; color: var(--gold2); line-height: 1.3; text-shadow: 0 0 12px rgba(243,210,122,.3); }
.st-cell i { font-style: normal; font-size: 12.5px; color: var(--ink3); }
.st-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.st-cats span { font-size: 12.5px; background: var(--panel3); border: 1px solid var(--line2); border-radius: 12px; padding: 2px 12px; color: var(--ink2); }
.hist-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.hist-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line2); border-left: 4px solid var(--ink3);
  border-radius: 8px; padding: 10px 14px; box-shadow: var(--shadow);
}
.hist-item.lk-daji { border-left-color: var(--gold); }
.hist-item.lk-ji, .hist-item.lk-xiaoji { border-left-color: var(--green); }
.hist-item.lk-ping { border-left-color: #8b95ad; }
.hist-item.lk-xiaoxiong, .hist-item.lk-xiong, .hist-item.lk-daxiong { border-left-color: var(--zhu); }
.hi-l b { font-size: 15px; letter-spacing: 1px; color: #f1ead7; }
.hi-l span, .hi-l em { display: block; font-style: normal; font-size: 12px; color: var(--ink3); line-height: 1.7; }
.hi-r { text-align: right; flex: none; }
.hi-r .lv { display: block; font-size: 16px; color: var(--gold2); letter-spacing: 1px; }
.hi-r .rel { font-size: 11.5px; color: var(--ink3); }
.empty { text-align: center; padding: 50px 20px; color: var(--ink3); background: var(--panel); border: 1px dashed var(--line2); border-radius: 10px; }

/* ============ Footer / Toast / Top ============ */
.ftr { max-width: 1100px; margin: 30px auto 0; padding: 18px 16px 0; border-top: 1px solid var(--line2); text-align: center; color: var(--ink3); font-size: 12px; }
.ftr p { margin: 3px 0; }

.toast {
  position: fixed; left: 50%; bottom: 40px;
  transform: translate(-50%, 20px);
  background: rgba(12, 18, 32, .94);
  border: 1px solid var(--line);
  color: #f4e9cf; padding: 10px 22px; border-radius: 22px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: .3s;
  z-index: 200; max-width: 88vw; text-align: center;
  box-shadow: var(--shadow2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ach { background: linear-gradient(120deg, #6a5212, var(--gold)); color: #1a1300; border-color: var(--gold2); }
.toast.ok { background: rgba(20, 60, 40, .95); border-color: var(--green); }

#btnScrollTop {
  position: fixed; right: 18px; bottom: 40px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel-solid); color: var(--gold2);
  font-size: 17px; opacity: 0; pointer-events: none; transition: .3s; z-index: 60;
  box-shadow: var(--glow-gold);
}
#btnScrollTop.show { opacity: 1; pointer-events: auto; }
#btnScrollTop:hover { border-color: var(--gold); }

/* ============ 华丽玻璃面板与卷轴 ============ */
.panel-ornate {
  position: relative;
  background: rgba(10, 15, 28, .68);
  border: 1px solid rgba(212, 175, 55, .32);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, .55), inset 0 0 40px rgba(212, 175, 55, .04);
  overflow: hidden;
}
.panel-ornate::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(243,210,122,.95), rgba(243,210,122,.95)) left top / 22px 2px no-repeat,
    linear-gradient(180deg, rgba(243,210,122,.95), rgba(243,210,122,.95)) left top / 2px 22px no-repeat,
    linear-gradient(90deg, rgba(243,210,122,.95), rgba(243,210,122,.95)) right top / 22px 2px no-repeat,
    linear-gradient(180deg, rgba(243,210,122,.95), rgba(243,210,122,.95)) right top / 2px 22px no-repeat,
    linear-gradient(90deg, rgba(243,210,122,.95), rgba(243,210,122,.95)) left bottom / 22px 2px no-repeat,
    linear-gradient(180deg, rgba(243,210,122,.95), rgba(243,210,122,.95)) left bottom / 2px 22px no-repeat,
    linear-gradient(90deg, rgba(243,210,122,.95), rgba(243,210,122,.95)) right bottom / 22px 2px no-repeat,
    linear-gradient(180deg, rgba(243,210,122,.95), rgba(243,210,122,.95)) right bottom / 2px 22px no-repeat;
  opacity: .9;
}
.panel-ornate > * { position: relative; z-index: 1; }

.scroll-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(26, 20, 12, .82), rgba(16, 14, 10, .82));
  border-left: 1px solid rgba(212, 175, 55, .38);
  border-right: 1px solid rgba(212, 175, 55, .38);
  border-radius: 4px;
  padding: 28px 16px;
  box-shadow: inset 0 0 30px rgba(212, 175, 55, .06), 0 8px 28px rgba(0,0,0,.45);
}
.scroll-panel::before, .scroll-panel::after {
  content: '';
  position: absolute;
  left: -8px; right: -8px;
  height: 18px;
  background: linear-gradient(180deg, #6e5624, #b8860b, #f3d27a, #b8860b, #6e5624);
  border-radius: 9px;
  box-shadow: 0 0 18px rgba(243, 210, 122, .35);
}
.scroll-panel::before { top: -9px; }
.scroll-panel::after { bottom: -9px; }
.scroll-panel > * { position: relative; z-index: 1; }

/* 电影感入场动画 */
.enter-fade { animation: enterFade .8s cubic-bezier(.22, 1, .36, 1) both; }
.enter-up { animation: enterUp .8s cubic-bezier(.22, 1, .36, 1) both; }
.enter-left { animation: enterLeft .9s cubic-bezier(.22, 1, .36, 1) both; }
.enter-right { animation: enterRight .9s cubic-bezier(.22, 1, .36, 1) both; }
.enter-scale { animation: enterScale 1.1s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes enterFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes enterUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes enterLeft { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
@keyframes enterRight { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes enterScale { from { opacity: 0; transform: scale(.65); } to { opacity: 1; transform: scale(1); } }

/* 英雄区强化 */
.hero { padding-top: 44px; }
.hero h1 {
  font-size: 27px;
  letter-spacing: 3px;
  color: #fff8e1;
  text-shadow: 0 0 22px rgba(243, 210, 122, .45), 0 0 44px rgba(212, 175, 55, .20);
}
.hero p { color: #aeb8cf; text-shadow: 0 0 8px rgba(0,0,0,.6); }
.disk-deco {
  width: 420px;
  height: 420px;
  top: -60px;
  opacity: .22;
  filter: drop-shadow(0 0 50px rgba(212, 175, 55, .55));
  animation: spinDisk 90s linear infinite;
}

/* 步骤条玻璃化 */
.steps { margin-bottom: 24px; }
.step { background: rgba(10, 15, 28, .55); border-color: rgba(120, 140, 210, .22); backdrop-filter: blur(4px); }

/* ============ 旋转关键帧 ============ */
@keyframes spinDisk { to { transform: rotate(360deg); } }

/* ============ Mobile ============ */
@media (max-width:760px) {
  body { font-size: 14.5px; }
  .hdr-in { gap: 8px; padding: 8px 12px; }
  .brand-t i { display: none; }
  .nav { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .nav button { padding: 6px 6px; font-size: 13px; letter-spacing: 0; }
  .hdr-user { min-width: 110px; margin-left: auto; }
  .hero h1 { font-size: 20px; letter-spacing: 1px; }
  .disk-deco { width: 240px; height: 240px; top: 30px; opacity: .12; }
  .pan-grid { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .hex-svg { width: 54px; height: 74px; }
  .pb-name { font-size: 13px; }
  .pb-sub { font-size: 10px; }
  .g64-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .flip-grid { grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .flip-card .fc-face { font-size: 22px; }
  .flip-card .fc-face.sym { font-size: 30px; }
  .circle-svg { width: 260px; height: 260px; }
  .modal-in { padding: 18px 14px 20px; }
  .mg-head { flex-direction: column; text-align: center; }
  .duan-grid { grid-template-columns: 1fr; }
  .bd-table th { width: 74px; font-size: 12px; }
  .hist-item { flex-direction: column; align-items: flex-start; }
  .hi-r { text-align: left; }
  .story-flow { flex-direction: column; }
  .st-arrow { transform: rotate(90deg); height: 20px; }
  .ti-mini { flex-direction: column; align-items: flex-start; }
  .time-risk { grid-template-columns: 1fr; }
  .rh-gua { margin: 0 auto; }
  .res-head { text-align: center; flex-direction: column; }
  .rh-r { text-align: center; width: 100%; }
}

/* 尊重「减少动态效果」系统偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .1s !important; }
  .bg-disk-fixed, .disk-deco, .brand-mark, .cast-disk { animation: none !important; }
}
