/* 见道宇宙 · 公道官网风格（深空版 v0.3） */
:root {
  --navy: #1a2332;
  --navy-glow: rgba(26,35,50,0.72);
  --cream: #f5f0e8;
  --gold: #c9a96e;
  --blue: #4f8fd9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #05070d; }
#scene { position: fixed; inset: 0; }
#scene canvas { display: block; }

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--cream);
}
h1, h2, h3 { font-family: Georgia, "Songti SC", "SimSun", serif; }

/* ===== 顶栏 ===== */
.hud-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.8rem;
  background: linear-gradient(to bottom, rgba(5,7,13,0.72), transparent);
  pointer-events: none;
}
.brand {
  font-family: Georgia, "Songti SC", serif;
  font-size: 1.35rem; letter-spacing: 0.12em;
}
.brand .en { color: var(--gold); font-size: 0.74rem; letter-spacing: 0.26em; margin-left: 0.45rem; }
.hud-right { display: flex; align-items: center; gap: 0.7rem; }
.view-label { font-size: 0.78rem; color: rgba(245,240,232,0.65); letter-spacing: 0.12em; }
.back-btn {
  pointer-events: auto; cursor: pointer;
  background: rgba(26,35,50,0.55); border: 1px solid rgba(201,169,110,0.45);
  color: var(--gold); font-size: 0.75rem; letter-spacing: 0.08em;
  padding: 0.3rem 0.9rem; border-radius: 20px;
  transition: all 0.25s; font-family: inherit;
}
.back-btn:hover { background: rgba(201,169,110,0.2); }

/* ===== 底部道 ===== */
.hud-bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 15;
  text-align: center; padding: 0.8rem 2rem 1rem;
  background: linear-gradient(to top, rgba(5,7,13,0.78), transparent);
  pointer-events: none;
}
.dao-text {
  max-width: 900px; margin: 0 auto;
  font-size: 0.74rem; line-height: 1.7;
  color: rgba(245,240,232,0.6);
}
.dao-text .gold { color: var(--gold); }

/* ===== 大气层图例（左下，可点击开关） ===== */
.legend {
  position: fixed; left: 1.4rem; bottom: 4.2rem; z-index: 18;
  background: rgba(10,14,22,0.66);
  border: 1px solid rgba(201,169,110,0.22);
  border-radius: 6px; padding: 0.7rem 0.9rem;
  backdrop-filter: blur(6px);
  user-select: none;
}
.legend-title { font-size: 0.72rem; color: var(--gold); letter-spacing: 0.15em; margin-bottom: 0.35rem; }
.legend-title .legend-tip { color: rgba(245,240,232,0.38); font-size: 0.62rem; letter-spacing: 0.05em; margin-left: 0.3rem; }
.legend-item {
  display: flex; align-items: center; gap: 0.45rem;
  width: 100%; text-align: left;
  font-size: 0.68rem; color: rgba(245,240,232,0.78); letter-spacing: 0.03em;
  padding: 0.22rem 0.3rem; margin: 0.08rem 0;
  background: transparent; border: 1px solid transparent; border-radius: 4px;
  cursor: pointer; font-family: inherit;
  transition: all 0.2s;
}
button.legend-item:hover { background: rgba(201,169,110,0.12); border-color: rgba(201,169,110,0.35); }
button.legend-item.off { opacity: 0.35; }
.legend-item .sw { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.legend-item .tx { flex: 1; }
.legend-item .eye { color: var(--gold); font-size: 0.6rem; }
.legend-item.static { cursor: default; }
.legend-item.static:hover { background: transparent; border-color: transparent; }

/* ===== 信息面板 ===== */
.info-panel {
  position: fixed; top: 50%; right: 1.6rem; transform: translateY(-50%);
  width: 350px; max-height: 82vh; overflow-y: auto;
  z-index: 30;
  background: var(--navy-glow);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201,169,110,0.35);
  border-radius: 6px;
  padding: 1.6rem 1.5rem;
  display: none;
  scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
}
.info-panel.open { display: block; animation: fadeSlide 0.4s ease; }
@keyframes fadeSlide { from { opacity: 0; transform: translate(10px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }
.close-btn {
  position: absolute; top: 0.7rem; right: 0.8rem;
  background: none; border: none; color: var(--gold);
  font-size: 1rem; cursor: pointer; opacity: 0.8;
}
.close-btn:hover { opacity: 1; }
.info-panel h2 { font-size: 1.3rem; letter-spacing: 0.06em; }
.info-panel .brand-line { color: var(--gold); font-size: 0.78rem; letter-spacing: 0.18em; margin: 0.2rem 0 0.6rem; line-height: 1.7; }
.info-panel .motto { font-size: 0.8rem; color: rgba(245,240,232,0.75); font-style: italic; margin-bottom: 0.8rem; }
.info-panel h3 {
  font-size: 0.8rem; color: var(--gold); letter-spacing: 0.16em;
  margin: 1rem 0 0.5rem; padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(201,169,110,0.2);
}
.skill-group { margin-bottom: 0.4rem; }
.skill-group .gname { font-size: 0.7rem; color: rgba(245,240,232,0.5); letter-spacing: 0.08em; }
.skill-group .gskills { display: flex; flex-wrap: wrap; gap: 0.32rem; margin-top: 0.28rem; }
.skill-chip {
  font-size: 0.7rem; padding: 0.12rem 0.5rem; border-radius: 20px;
  background: rgba(245,240,232,0.08); border: 1px solid rgba(245,240,232,0.16);
}
.skill-chip .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 0.32rem; }
.combine-item { font-size: 0.76rem; padding: 0.26rem 0; color: rgba(245,240,232,0.85); border-bottom: 1px dashed rgba(245,240,232,0.08); }
.combine-item .st { float: right; font-size: 0.64rem; color: var(--gold); letter-spacing: 0.08em; }
.combine-item a { color: var(--blue); text-decoration: none; }

/* ===== 详情面板表格 ===== */
/* 技能详情 · 飞书链接 */
.feishu-box { margin: .8rem 0 .4rem; padding: .6rem .8rem; border: 1px solid rgba(79,143,217,.45);
              background: rgba(79,143,217,.1); border-radius: 8px; }
.feishu-label { font-size: .74rem; letter-spacing: .12em; color: rgba(245,240,232,.6); margin-bottom: .35rem; }
.feishu-link { display: inline-flex; align-items: center; gap: .3rem; background: linear-gradient(135deg,#4f8fd9,#3a6fb0);
               color: #fff !important; text-decoration: none; border-radius: 6px; padding: .35rem .85rem;
               font-size: .82rem; font-weight: 600; }
.feishu-link:hover { filter: brightness(1.1); }
.feishu-url { margin-top: .4rem; font-size: .72rem; word-break: break-all; color: rgba(156,196,240,.8); }

.panel-sub {
  font-size: 0.74rem; color: var(--gold); letter-spacing: 0.14em;
  margin: 0.9rem 0 0.3rem;
}
.kv-table { width: 100%; border-collapse: collapse; font-size: 0.76rem; }
.kv-table td {
  color: rgba(245,240,232,0.85); padding: 0.32rem 0.2rem;
  border-bottom: 1px dashed rgba(245,240,232,0.1);
  line-height: 1.55;
}
.kv-table tr:last-child td { border-bottom: none; }
.kv-table td.dim, .dim { color: rgba(245,240,232,0.35); font-style: italic; }
.drop-tag {
  display: inline-block; font-size: 0.66rem; letter-spacing: 0.1em;
  border: 1px solid; border-radius: 3px; padding: 0.05rem 0.5rem;
  margin-right: 0.5rem; vertical-align: middle;
}
.need-item { font-size: 0.78rem; padding: 0.28rem 0; color: rgba(245,240,232,0.85); border-bottom: 1px dashed rgba(245,240,232,0.08); }
.need-item::before { content: '▸ '; color: var(--gold); }

/* ===== Toast ===== */
.toast {
  position: fixed; top: 4.6rem; left: 50%; transform: translateX(-50%);
  z-index: 40; background: var(--navy-glow); border: 1px solid rgba(201,169,110,0.4);
  color: var(--cream); font-size: 0.82rem; padding: 0.45rem 1.1rem; border-radius: 4px;
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; }

/* ===== 移动端 ===== */
@media (max-width: 768px) {
  .info-panel { width: min(88vw, 340px); right: auto; left: 50%; top: auto; bottom: 4.6rem;
    transform: translateX(-50%); max-height: 56vh; }
  .info-panel.open { animation: fadeUp 0.4s ease; }
  @keyframes fadeUp { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
  .dao-text { font-size: 0.68rem; }
  .legend { left: 0.8rem; bottom: 3.8rem; padding: 0.55rem 0.7rem; }
  .hud-top { padding: 0.8rem 1rem; }
}
