/* ---------- 3D 地球页(摸鱼·星航线) ---------- */
/* 本样式表仅在 /earth/ 页引入:隐藏主题页头大标题;内容面板透明化,
   避免"主题面板 + 全宽面板"两层叠加的观感 */
#page-header.not-top-img { display: none !important; }
#page .page-title { display: none !important; }
#article-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
/* 主题 custom.css 用 [data-theme="dark"] div#page 上灰底(优先级 0,2,1),这里用同优先级选择器反杀(本文件最后加载,平级时后者胜) */
[data-theme="dark"] div#page,
#page {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
#content-inner { padding-top: 66px !important; }

.earth-wrap {
  /* 全出血:突破文章容器留白 */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0 0 26px;
}

.earth-head {
  max-width: 1080px; margin: 0 auto; padding: 6px 20px 14px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
}
/* 编号标题(仿 dragonir/3d README 的 [4]. 地球 ・ The Earth ・ 地球) */
.earth-index {
  font-size: 24px; font-weight: 700; letter-spacing: 1px; color: #7fc4ff;
  font-family: "Cascadia Code", Consolas, "JetBrains Mono", monospace;
  text-shadow: 0 0 16px rgba(110, 180, 255, .55);
}
.earth-title-box { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.earth-title {
  font-size: 22px; letter-spacing: 6px; font-weight: 600; color: #cfe6ff;
  font-family: "Noto Serif SC", "Source Han Serif SC", "STZhongsong", serif;
}
.earth-sub { font-size: 11px; letter-spacing: 3px; color: #5f7fa6; }
.earth-chips { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.earth-chip {
  font-size: 11px; letter-spacing: 1.5px; color: #8fb6e0;
  border: 1px solid rgba(110, 165, 235, .28); border-radius: 999px; padding: 3px 11px;
  background: rgba(10, 24, 46, .5);
  cursor: pointer; user-select: none; transition: color .2s, border-color .2s, opacity .2s;
}
.earth-chip:hover { color: #fff; border-color: rgba(160, 205, 255, .6); }
.earth-chip.is-off { opacity: .38; text-decoration: line-through; }

/* 城市信息卡(点标签弹出,仿视频右侧详情面板) */
.earth-card {
  position: absolute; z-index: 6; right: 16px; top: 64px; width: 232px;
  background: rgba(7, 18, 38, .88); border: 1px solid rgba(120, 180, 255, .3);
  border-radius: 10px; padding: 14px 16px 12px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translateX(14px);
  transition: opacity .25s, transform .25s, visibility .25s;
}
.earth-card.is-show { opacity: 1; visibility: visible; transform: translateX(0); }
.earth-card-close {
  position: absolute; right: 9px; top: 8px; font-size: 11px; letter-spacing: 1px;
  color: #7d9ec6; background: none; border: none; cursor: pointer; padding: 3px 6px;
}
.earth-card-close:hover { color: #fff; }
.earth-card-tag { font-size: 10px; letter-spacing: 2.5px; color: #6d92bd; margin-bottom: 6px; }
.earth-card-title { margin: 0 0 10px; font-size: 18px; letter-spacing: 4px; color: #e8f3ff; font-weight: 600; }
.earth-card-row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12px; padding: 5px 0; border-top: 1px solid rgba(110, 165, 235, .14);
  color: #9db8d8;
}
.earth-card-row b { color: #e8f3ff; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.earth-card-desc { font-size: 12px; line-height: 1.78; color: #9db8d8; margin: 0 0 10px; text-align: justify; }
.earth-card-back {
  margin-top: 10px; width: 100%; font-size: 12px; letter-spacing: 2px; color: #ffd9a0;
  background: rgba(120, 80, 20, .25); border: 1px solid rgba(255, 200, 110, .45);
  border-radius: 6px; padding: 7px 0; cursor: pointer; transition: background .2s, color .2s;
}
.earth-card-back:hover { background: rgba(200, 130, 40, .42); color: #fff; }

/* 海岛入口标签 */
.earth-label.is-isle {
  color: #c8f0ff; border-color: rgba(120, 220, 255, .6);
  background: rgba(8, 28, 46, .82); font-weight: 600;
  box-shadow: 0 0 12px rgba(90, 200, 255, .3);
}

/* 全球首都标注(小金点 + 首都名;tier1 常显,tier2 拉近显示) */
.earth-cap {
  position: absolute; left: 0; top: 0; z-index: 2;
  font-size: 10px; letter-spacing: .5px; line-height: 12px;
  color: #f2f7ff; text-shadow: 0 1px 3px rgba(2, 14, 34, .95);
  padding-left: 9px; pointer-events: none; user-select: none;
  will-change: transform, opacity; transition: opacity .15s linear;
  white-space: nowrap;
}
.earth-cap::before {
  content: ''; position: absolute; left: 0; top: 50%; margin-top: -2px;
  width: 4px; height: 4px; border-radius: 50%;
  background: #ffd98f; box-shadow: 0 0 6px rgba(255, 200, 110, .85);
}
.earth-cap.is-major { font-size: 11.5px; color: #ffe9c0; font-weight: 600; line-height: 14px; }
.earth-cap.is-major::before { width: 5px; height: 5px; margin-top: -2.5px; }

/* 穿云 / 回退过渡层:轻雾罩 + 三层景深云朵飞掠(地球从云隙透出) */
.earth-whiteout {
  position: absolute; inset: 0; z-index: 8; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .65s ease, visibility .65s;
}
.earth-whiteout.is-on { opacity: 1; visibility: visible; }
.ew-veil {
  position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 50% 40%, rgba(226, 240, 254, .85) 0%, rgba(192, 222, 246, .72) 55%, rgba(164, 202, 236, .62) 100%);
  opacity: .42; transition: opacity .5s ease;
}
.earth-whiteout.ew-peak .ew-veil { opacity: .94; }
.earth-whiteout .ew-text {
  position: absolute; z-index: 5; font-size: 14px; letter-spacing: 6px;
  color: rgba(240, 248, 255, .97); text-shadow: 0 1px 8px rgba(26, 58, 100, .6);
}

.earth-stage {
  position: relative; max-width: 1180px; margin: 0 auto;
  height: min(76vh, 720px); min-height: 440px;
  border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(90, 150, 255, .16);
  background:
    radial-gradient(1100px 560px at 50% 62%, #0a1a33 0%, #051027 48%, #020713 78%, #01040c 100%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5), inset 0 0 90px rgba(20, 60, 120, .14);
}
.earth-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; touch-action: none; cursor: grab; }
.earth-stage.is-dragging canvas { cursor: grabbing; }

/* 城市标签(HTML 层,随 3D 投影移动) */
.earth-label {
  position: absolute; left: 0; top: 0; z-index: 3;
  font-size: 11px; line-height: 1; letter-spacing: 1px; white-space: nowrap;
  color: #cfe6ff; background: rgba(6, 15, 32, .74);
  border: 1px solid rgba(120, 180, 255, .34); border-radius: 4px;
  padding: 3px 7px; pointer-events: none; user-select: none;
  will-change: transform, opacity; transition: opacity .18s linear;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}
.earth-label.is-hub {
  color: #ffe1a1; border-color: rgba(255, 205, 110, .55);
  background: rgba(30, 20, 5, .78); font-weight: 600; font-size: 12px;
  box-shadow: 0 0 12px rgba(255, 190, 80, .28);
}

/* 台词/HUD */
.earth-back {
  position: absolute; z-index: 5; left: 14px; top: 14px;
  font-size: 12px; letter-spacing: 2px; color: #9fc2ea; text-decoration: none;
  border: 1px solid rgba(120, 180, 255, .3); border-radius: 999px; padding: 5px 13px;
  background: rgba(6, 15, 32, .66); backdrop-filter: blur(6px); transition: border-color .2s, color .2s;
}
.earth-back:hover { color: #fff; border-color: rgba(160, 205, 255, .6); }
.earth-hint {
  position: absolute; z-index: 5; right: 14px; top: 14px;
  font-size: 11px; letter-spacing: 1.5px; color: #6d8fb8;
  border-radius: 999px; padding: 5px 12px; background: rgba(6, 15, 32, .55);
  pointer-events: none;
}
.earth-badge {
  position: absolute; z-index: 5; left: 14px; bottom: 12px;
  font-size: 10.5px; letter-spacing: 3px; color: #59779c; pointer-events: none;
}
.earth-fps { position: absolute; z-index: 5; right: 14px; bottom: 12px; font-size: 10px; color: #3c5474; pointer-events: none; font-variant-numeric: tabular-nums; }

/* 实时数据 HUD(航班/地震/ISS) */
.earth-live {
  position: absolute; z-index: 5; right: 14px; bottom: 12px;
  display: flex; gap: 10px; align-items: center;
  font-size: 11px; letter-spacing: 1px; color: #9db8d8;
  background: rgba(6, 15, 32, .66); border: 1px solid rgba(110, 165, 235, .22);
  border-radius: 999px; padding: 5px 13px;
  pointer-events: none; font-variant-numeric: tabular-nums;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.earth-live span[data-ok="0"] { color: #b0685a; }
.earth-live span[data-ok="1"] { color: #a7e0b2; }
.earth-label.is-iss {
  color: #ffe1a1; border-color: rgba(255, 205, 110, .5);
  background: rgba(30, 20, 5, .8); font-weight: 600;
  box-shadow: 0 0 10px rgba(255, 190, 80, .3);
}
.earth-live-hint {
  font-size: 10px; letter-spacing: 1px; color: #4f6b8e; text-align: center; padding: 10px 0 0;
}

/* 加载/降级 */
.earth-loading {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; color: #7fa3cc; font-size: 13px; letter-spacing: 3px;
}
.earth-loading i { font-size: 22px; }
.earth-error {
  position: absolute; inset: 0; z-index: 4; display: none;
  align-items: center; justify-content: center; text-align: center;
  color: #7fa3cc; font-size: 13px; line-height: 2; padding: 30px;
}

@media (max-width: 640px) {
  .earth-stage { height: 64vh; min-height: 400px; border-radius: 14px; }
  .earth-label { font-size: 10px; padding: 2px 6px; }
  .earth-chips { display: none; }
  .earth-hint { display: none; }
  .earth-index { font-size: 19px; }
  .earth-cap { font-size: 9px; padding-left: 7px; }
  .earth-cap.is-major { font-size: 10px; }
  .earth-card { right: 10px; top: 10px; width: 200px; padding: 12px 13px 10px; }
}

/* ==================== 江苏 · 雨夜便利店街角 ==================== */
/* 入口标签(琥珀霓虹) */
.earth-label.is-storemark {
  color: #ffd9a6; border-color: rgba(255, 190, 100, .55);
  background: rgba(34, 18, 6, .84); font-weight: 600;
  box-shadow: 0 0 12px rgba(255, 170, 70, .32);
}
/* 雨夜模式:隐藏全部 HUD,只留纯场景 + 退出按钮 + 返回摸鱼 */
.earth-stage.is-store .earth-hint,
.earth-stage.is-store .earth-badge,
.earth-stage.is-store .earth-live,
.earth-stage.is-store .earth-fps { display: none; }
.earth-stage.is-store canvas { cursor: grab; }
.earth-exit-store {
  position: absolute; z-index: 6; right: 14px; bottom: 14px;
  display: none; align-items: center; gap: 6px;
  font-size: 12px; letter-spacing: 2px; color: #ffd9a6;
  border: 1px solid rgba(255, 190, 100, .45); border-radius: 999px;
  padding: 6px 14px; cursor: pointer;
  background: rgba(20, 14, 6, .68); backdrop-filter: blur(6px);
  transition: background .2s, color .2s, border-color .2s;
}
.earth-exit-store i { font-size: 11px; }
.earth-exit-store:hover { background: rgba(120, 80, 20, .5); color: #fff; border-color: rgba(255, 210, 130, .75); }
.earth-stage.is-store .earth-exit-store { display: inline-flex; }
