/* 地理进程 · 地球演化模拟器 —— UI 层遵循深蓝+金铜规范 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #01172e; }
body {
  font-family: "Noto Serif SC", "PingFang SC", system-ui, sans-serif;
  color: #ffdca2;
  user-select: none;
  -webkit-user-select: none;
}

#dl-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.dl-hidden { display: none !important; }

/* ---------- 转场闪光层 ---------- */
#dl-flash {
  position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 60;
  background: radial-gradient(ellipse at center, #ffffff 0%, #cfe6ff 45%, #7fb2e6 100%);
}

/* ---------- 加载屏 ---------- */
#dl-loader {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse at 50% 40%, #0b2140 0%, #01172e 70%, #000b18 100%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.9s ease;
}
.dl-loader-inner { text-align: center; }
.dl-loader-title {
  font-size: 44px; font-weight: bold; letter-spacing: 10px;
  background: linear-gradient(#ffcb75, #fff9ef);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dl-loader-sub { margin-top: 14px; font-size: 15px; color: #c2bfba; letter-spacing: 3px; }
.dl-loader-bar {
  margin: 30px auto 12px; width: 260px; height: 6px; border-radius: 3px;
  background: #1a3354; border: 1px solid #705629; overflow: hidden;
}
#dl-loader-fill {
  width: 0%; height: 100%; border-radius: 3px;
  background: linear-gradient(to right, #fde4bc, #be9d69);
  transition: width 0.25s ease;
}
#dl-loader-msg { font-size: 12px; color: #ffd895; opacity: 0.8; }

/* ---------- 开场动画字幕 ---------- */
#dl-intro { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
#dl-intro-caption {
  position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%);
  font-size: 22px; letter-spacing: 6px; white-space: nowrap;
  background: linear-gradient(#ffcb75, #fff9ef);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 30px rgba(255, 203, 117, 0.2);
  opacity: 0; transition: opacity 1.2s ease;
}
#dl-intro-caption.dl-on { opacity: 1; }
#dl-intro-skip {
  position: absolute; right: 22px; bottom: 22px; pointer-events: auto;
  font-size: 12px; padding: 7px 14px; opacity: 0.75;
}
#dl-intro-skip:hover { opacity: 1; }

/* ---------- HUD ---------- */
#dl-hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px 22px; pointer-events: none;
}
#dl-hud .dl-hud-left, #dl-hud .dl-hud-right { pointer-events: auto; }
.dl-title {
  font-size: 20px; font-weight: bold; letter-spacing: 2px;
  background: linear-gradient(#ffcb75, #fff9ef);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 24px rgba(255, 203, 117, 0.25);
}
.dl-era-chip {
  margin-top: 10px; display: inline-flex; align-items: baseline; gap: 10px;
  background: rgba(11, 33, 64, 0.82); border: 1px solid #c5a36c;
  border-radius: 20px; padding: 6px 16px;
  box-shadow: 0 0 18px rgba(197, 163, 108, 0.18), inset 0 0 12px rgba(1, 23, 46, 0.6);
}
.dl-era-name { font-size: 16px; font-weight: bold; color: #ffcb75; letter-spacing: 3px; }
.dl-era-time { font-size: 12px; color: #c2bfba; }
.dl-hud-right { display: flex; gap: 10px; }

/* ---------- 按钮 ---------- */
.dl-btn {
  font-family: inherit; cursor: pointer; letter-spacing: 2px;
  border-radius: 8px; font-size: 14px; padding: 10px 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.dl-btn:hover { transform: translateY(-1px); }
.dl-btn:disabled { opacity: 0.38; cursor: not-allowed; transform: none; }
.dl-btn-gold {
  border: none; color: #0b2140; font-weight: bold;
  background: linear-gradient(to bottom, #fde4bc, #be9d69);
  box-shadow: 0 2px 14px rgba(253, 228, 188, 0.28);
}
.dl-btn-gold:hover:not(:disabled) { box-shadow: 0 4px 20px rgba(253, 228, 188, 0.45); }
.dl-btn-line {
  background: rgba(11, 33, 64, 0.8); color: #ffd895; border: 1px solid #c5a36c;
}
.dl-btn-line:hover:not(:disabled) { box-shadow: 0 0 14px rgba(197, 163, 108, 0.35); }
.dl-btn-mini { padding: 4px 12px; font-size: 12px; border-radius: 14px; }
.dl-btn-wide { width: 100%; margin-top: 12px; }

/* ---------- 面板 ---------- */
.dl-panel {
  position: fixed; z-index: 45; width: 300px;
  background: rgba(11, 33, 64, 0.9); backdrop-filter: blur(6px);
  border: 1px solid transparent; border-radius: 12px;
  border-image: linear-gradient(#c5a36c, #705629) 1;
  border-image-slice: 1; border-style: solid; border-width: 1px;
  box-shadow: 0 8px 40px rgba(0, 8, 20, 0.6), 0 0 24px rgba(197, 163, 108, 0.12);
}
#dl-ast-panel { top: 96px; right: 22px; }
.dl-panel-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid rgba(197, 163, 108, 0.35);
}
.dl-panel-title { font-size: 15px; font-weight: bold; color: #ffcb75; letter-spacing: 2px; }
.dl-sim-badge {
  font-size: 10px; color: #ffb35c; border: 1px dashed #ffb35c;
  border-radius: 10px; padding: 2px 8px; letter-spacing: 1px;
}
.dl-close {
  margin-left: auto; background: none; border: none; color: #c2bfba;
  font-size: 14px; cursor: pointer;
}
.dl-close:hover { color: #ffd895; }
.dl-panel-body { padding: 14px; }

.dl-field { margin-bottom: 12px; }
.dl-field label {
  display: flex; justify-content: space-between;
  font-size: 12px; color: #ffd895; margin-bottom: 6px; letter-spacing: 1px;
}
.dl-field label em { font-style: normal; color: #ffffff; }
.dl-field input[type="range"] {
  width: 100%; height: 4px; -webkit-appearance: none; appearance: none;
  background: #1a3354; border: 1px solid #705629; border-radius: 2px; outline: none;
}
.dl-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(to bottom, #fde4bc, #be9d69);
  border: 1px solid #705629; cursor: pointer;
}
.dl-target-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #c2bfba; margin: 10px 0 4px;
}
#dl-ast-target-msg.dl-picked { color: #4ade80; }
.dl-energy-row { font-size: 12px; color: #c2bfba; margin-top: 8px; }
.dl-energy-row em { font-style: normal; color: #ffcb75; font-size: 14px; }
.dl-hist-note {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed #997b49;
  font-size: 10px; line-height: 1.7; color: #c2bfba;
}
.dl-hist-note b { color: #ffd895; }

/* ---------- 环境反馈 ---------- */
.dl-status { left: 22px; bottom: 64px; width: 280px; }
.dl-meter-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: #ffd895; margin-bottom: 8px;
}
.dl-meter-row span { width: 52px; }
.dl-meter-row em { font-style: normal; color: #ffffff; width: 48px; text-align: right; font-size: 12px; }
.dl-meter {
  flex: 1; height: 6px; background: #1a3354; border: 1px solid #705629;
  border-radius: 3px; overflow: hidden;
}
.dl-meter > div { height: 100%; width: 0%; transition: width 0.4s ease; }
#dl-m-dust { background: linear-gradient(to right, #8a6a3f, #5a4020); }
#dl-m-sun { background: linear-gradient(to right, #fde4bc, #be9d69); width: 100%; }
#dl-m-temp { background: linear-gradient(to right, #4a7fc9, #1f3f78); }
#dl-feed { margin-top: 10px; }
.dl-feed-line {
  font-size: 11px; line-height: 1.7; color: #c2bfba; margin-bottom: 4px;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.dl-feed-line.dl-on { opacity: 1; transform: none; }
.dl-feed-line b { color: #ffcb75; }
.dl-feed-line.dl-warn b { color: #ff9a5c; }

/* ---------- 场景热点科普卡 ---------- */
#dl-scene-pop {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  z-index: 42; max-width: 480px; padding: 10px 20px; text-align: center;
  background: rgba(11, 33, 64, 0.92); border: 1px solid #c5a36c;
  border-radius: 12px; backdrop-filter: blur(5px);
  box-shadow: 0 6px 28px rgba(0, 8, 20, 0.55);
}
#dl-scene-pop b {
  display: block; font-size: 14px; color: #ffcb75; letter-spacing: 2px; margin-bottom: 4px;
}
#dl-scene-pop span { font-size: 11.5px; color: #d8d4cd; line-height: 1.7; }
#dl-scene-pop em {
  display: inline-block; margin-left: 8px; font-style: normal; font-size: 9px;
  color: #ffd895; border: 1px solid #997b49; border-radius: 9px; padding: 1px 7px;
}

/* ---------- 地表信息条 ---------- */
#dl-surface-chip {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 40; text-align: center; max-width: 640px;
  background: rgba(11, 33, 64, 0.72); border: 1px solid #c5a36c;
  border-radius: 22px; padding: 8px 22px; backdrop-filter: blur(4px);
}
.dl-chip-title { font-size: 13px; font-weight: bold; color: #ffcb75; letter-spacing: 2px; margin-right: 10px; }
.dl-chip-text { font-size: 11px; color: #c2bfba; }

/* ---------- 时间轴 ---------- */
#dl-timeline {
  position: fixed; left: 50%; bottom: 44px; transform: translateX(-50%);
  z-index: 42; width: min(94vw, 1180px);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none;
}
#dl-tl-track {
  pointer-events: auto;
  display: flex; align-items: flex-start; justify-content: space-between;
  width: 100%; padding: 10px 18px 6px;
  background: rgba(4, 20, 40, 0.66); backdrop-filter: blur(6px);
  border: 1px solid rgba(197, 163, 108, 0.45); border-radius: 26px;
  position: relative;
}
#dl-tl-track::before {
  content: ''; position: absolute; left: 26px; right: 26px; top: 20px;
  height: 1px; background: linear-gradient(to right, #705629, #c5a36c, #705629);
  opacity: 0.7;
}
.dl-tl-node {
  position: relative; z-index: 1;
  background: none; border: none; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-family: inherit;
}
.dl-tl-dot {
  width: 9px; height: 9px; border-radius: 50%; margin-top: 6px;
  background: #1a3354; border: 1.5px solid #c5a36c;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.dl-tl-node:hover .dl-tl-dot {
  transform: scale(1.35);
  box-shadow: 0 0 10px rgba(255, 203, 117, 0.6);
}
/* 节点名字：默认不显示，鼠标悬到点上浮现气泡 */
.dl-tl-name {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  padding: 4px 12px; border-radius: 12px; white-space: nowrap;
  background: rgba(11, 33, 64, 0.95); border: 1px solid #c5a36c;
  font-size: 12px; color: #ffd895; letter-spacing: 1px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
  box-shadow: 0 4px 16px rgba(0, 8, 20, 0.5);
}
.dl-tl-node:hover .dl-tl-name { opacity: 1; }
.dl-tl-label {
  font-size: 10px; color: #c2bfba; letter-spacing: 0.5px; white-space: nowrap;
}
.dl-tl-node:hover .dl-tl-label { color: #ffd895; }
@media (max-width: 1100px) {
  .dl-tl-label { font-size: 9px; letter-spacing: 0; }
  #dl-tl-track { padding: 10px 10px 8px; }
}
.dl-tl-star .dl-tl-dot { border-color: #ffcb75; width: 11px; height: 11px; margin-top: 5px; }
.dl-tl-current .dl-tl-dot {
  background: linear-gradient(to bottom, #fde4bc, #be9d69);
  box-shadow: 0 0 12px rgba(255, 203, 117, 0.9);
  animation: dlPulse 2s ease-in-out infinite;
}
.dl-tl-current .dl-tl-label { color: #ffcb75; font-weight: bold; }
@keyframes dlPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 203, 117, 0.55); }
  50% { box-shadow: 0 0 16px rgba(255, 203, 117, 1); }
}

/* 事件卡 */
#dl-event-card {
  pointer-events: auto;
  max-width: 520px; padding: 10px 18px;
  background: rgba(11, 33, 64, 0.88); backdrop-filter: blur(6px);
  border: 1px solid #c5a36c; border-radius: 12px;
  box-shadow: 0 6px 30px rgba(0, 8, 20, 0.55);
  text-align: center;
}
.dl-card-head { display: flex; align-items: baseline; justify-content: center; gap: 10px; flex-wrap: wrap; }
.dl-card-head b { font-size: 15px; color: #ffcb75; letter-spacing: 2px; }
.dl-card-head em { font-style: normal; font-size: 11px; color: #c2bfba; }
.dl-ev-badge {
  font-size: 9px; color: #c2bfba; border: 1px dashed #997b49;
  border-radius: 9px; padding: 1px 7px; letter-spacing: 1px;
}
.dl-ev-badge.dl-ev-solid { border-style: solid; color: #ffd895; }
.dl-card-desc { margin-top: 6px; font-size: 11.5px; line-height: 1.75; color: #d8d4cd; }
.dl-card-extra { margin-top: 5px; font-size: 11px; color: #ffcb75; letter-spacing: 1px; }
.dl-card-pending { margin-top: 5px; font-size: 10px; color: #ffd895; opacity: 0.85; }
.dl-card-busy { opacity: 0.85; }

/* 播放/标签控制行 */
#dl-tl-ctrl { pointer-events: auto; display: flex; gap: 8px; }
#dl-tl-ctrl .dl-btn-mini { font-size: 11px; padding: 5px 14px; }

/* 事件卡：翻页/图鉴/阶梯/抽屉 */
.dl-card-head { position: relative; }
.dl-card-title { flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 10px; flex-wrap: wrap; }
.dl-card-title b { font-size: 15px; color: #ffcb75; letter-spacing: 2px; }
.dl-card-title em { font-style: normal; font-size: 11px; color: #c2bfba; }
.dl-card-nav {
  background: rgba(26, 51, 84, 0.8); border: 1px solid #c5a36c; color: #ffd895;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  font-size: 15px; line-height: 1; flex: none;
}
.dl-card-nav:hover:not(:disabled) { box-shadow: 0 0 10px rgba(255, 203, 117, 0.5); }
.dl-card-nav:disabled { opacity: 0.25; cursor: default; }
.dl-card-close { position: absolute; right: -4px; top: -2px; }
.dl-card-bio {
  margin-top: 8px; display: flex; align-items: center; gap: 12px;
  justify-content: center; text-align: left;
  background: rgba(4, 20, 40, 0.5); border: 1px dashed #997b49;
  border-radius: 8px; padding: 7px 12px;
}
.dl-card-bio canvas { image-rendering: pixelated; flex: none; }
.dl-bio-txt b { display: block; font-size: 12px; color: #ffd895; margin-bottom: 3px; }
.dl-bio-txt span { font-size: 10.5px; color: #c2bfba; line-height: 1.6; }
.dl-bio-none { font-size: 11px; color: #8f8b84; justify-content: center; }
.dl-stage-row {
  margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.dl-stage-ic { image-rendering: pixelated; opacity: 0.22; filter: grayscale(1); }
.dl-stage-ic.dl-stage-on { opacity: 1; filter: none; }
.dl-stage-name { font-size: 10px; color: #ffd895; margin-left: 6px; letter-spacing: 1px; }
.dl-card-more {
  margin-top: 7px; background: none; border: none; color: #c5a36c;
  font-size: 10.5px; cursor: pointer; letter-spacing: 2px; font-family: inherit;
}
.dl-card-more:hover { color: #ffd895; }
.dl-card-drawer { margin-top: 6px; border-top: 1px dashed #997b49; padding-top: 8px; }
.dl-drawer-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  font-size: 11px; color: #d8d4cd;
}
.dl-drawer-row > span { color: #ffd895; flex: none; width: 68px; text-align: right; }
.dl-drawer-row > em { font-style: normal; }
.dl-o2-bar {
  flex: 1; max-width: 150px; height: 7px; background: #1a3354;
  border: 1px solid #705629; border-radius: 3px; overflow: hidden;
}
.dl-o2-bar > div { height: 100%; background: linear-gradient(to right, #4a7fc9, #7ad49a); }
.dl-drawer-note { font-size: 9px; color: #8f8b84; text-align: center; }

/* 地名标签弹窗 */
#dl-label-pop {
  pointer-events: auto; max-width: 420px; padding: 8px 16px;
  background: rgba(11, 33, 64, 0.92); border: 1px solid #c5a36c; border-radius: 10px;
  font-size: 11px; color: #c2bfba; text-align: center;
}
#dl-label-pop b { color: #ffcb75; margin-right: 8px; font-size: 12px; letter-spacing: 1px; }

/* ---------- 底部提示 ---------- */
#dl-hint {
  position: fixed; left: 22px; bottom: 20px; z-index: 40;
  font-size: 11px; color: rgba(255, 216, 149, 0.6); letter-spacing: 2px;
}
#dl-datanote {
  position: fixed; right: 22px; bottom: 20px; z-index: 40;
  font-size: 10px; color: rgba(194, 191, 186, 0.55); max-width: 380px; text-align: right;
}
