* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #05070d;
  color: #e8eef7;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#globe {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
#globe.dragging { cursor: grabbing; }

/* ---------- 通用面板 ---------- */
.glass {
  background: rgba(11, 17, 27, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* ---------- 顶栏 ---------- */
.top {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px 11px 13px;
  pointer-events: auto;
}
.brand .pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4fe3b0;
  box-shadow: 0 0 0 0 rgba(79, 227, 176, 0.7);
  animation: pulse 2.4s ease-out infinite;
  flex: none;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(79, 227, 176, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(79, 227, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 227, 176, 0); }
}
.brand h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.2px;
  line-height: 1.2;
}
.brand p {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: #7d8ba3;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.brand p.stale {
  color: #ff7676;
}

.acts {
  display: flex;
  gap: 8px;
  pointer-events: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.acts button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(11, 17, 27, 0.62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #a9b8cf;
  font: inherit;
  font-size: 12px;
  padding: 0 12px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.acts button:hover { color: #e8eef7; border-color: rgba(255, 255, 255, 0.2); }
.acts button.accent {
  color: #ffd9a0;
  border-color: rgba(255, 190, 120, 0.34);
  background: rgba(38, 24, 12, 0.62);
}
.acts button.accent:hover { color: #ffe9c6; border-color: rgba(255, 200, 130, 0.6); }
.acts button.busy {
  color: #0a1420;
  background: linear-gradient(135deg, #ffd79a, #f0a63c);
  border-color: transparent;
  animation: busyPulse 1.1s ease-in-out infinite;
}
@keyframes busyPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.62; }
}
.acts button.on {
  color: #071019;
  background: linear-gradient(135deg, #7fe3ff, #4fc3f7);
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(79, 195, 247, 0.35);
}

/* ---------- 底部统计 ---------- */
.stats {
  position: fixed;
  left: 18px;
  bottom: 18px;
  display: flex;
  align-items: stretch;
  padding: 12px 6px;
  z-index: 5;
}
.stats .it {
  padding: 0 15px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  min-width: 76px;
}
.stats .it:last-child { border-right: 0; }
.stats .k {
  font-size: 10.5px;
  color: #6d7c93;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
  white-space: nowrap;
}
.stats .v {
  font-size: 16px;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #dbe8f8;
}
.stats .v small { font-size: 10.5px; font-weight: 500; color: #7d8ba3; margin-left: 2px; }

/* ---------- 时钟 ---------- */
.clock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 11px 15px;
  text-align: right;
  z-index: 5;
}
.clock .t {
  font-size: 17px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.4px;
}
.clock .d {
  font-size: 11px;
  color: #7d8ba3;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.clock .rate {
  display: inline-block;
  margin-top: 7px;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(79, 195, 247, 0.14);
  color: #7fe3ff;
  border: 1px solid rgba(79, 195, 247, 0.25);
}

/* ---------- 详情卡 ---------- */
.card {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%) translateX(24px);
  width: 268px;
  padding: 16px 16px 14px;
  z-index: 6;
  opacity: 0;
  visibility: hidden;
  transition: all 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.card.on {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}
.card .x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #8b9ab1;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.card .x:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.card .nm {
  font-size: 14.5px;
  font-weight: 650;
  padding-right: 26px;
  word-break: break-all;
}
.card .tag {
  display: inline-block;
  margin-top: 7px;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(79, 195, 247, 0.13);
  color: #7fe3ff;
  font-variant-numeric: tabular-nums;
}
.card .rows { margin-top: 13px; }
.card .r {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  font-size: 12px;
}
.card .r:last-child { border-bottom: 0; }
.card .r span:first-child { color: #7d8ba3; }
.card .r span:last-child { font-variant-numeric: tabular-nums; font-weight: 550; }

/* ---------- 提示 / 加载 ---------- */
.hint {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  font-size: 11.5px;
  color: #5f6d82;
  z-index: 4;
  pointer-events: none;
  white-space: nowrap;
}

.loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #05070d;
  z-index: 20;
  transition: opacity 0.5s ease;
}
.loading.off { opacity: 0; pointer-events: none; }
.loading .ring {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(127, 227, 255, 0.18);
  border-top-color: #7fe3ff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading p {
  font-size: 12.5px;
  color: #7d8ba3;
  margin: 0;
}
.loading .err { color: #ff9a8b; max-width: 340px; text-align: center; line-height: 1.6; }

/* ---------- 移动端 ---------- */
@media (max-width: 720px) {
  .top {
    top: 12px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .acts { justify-content: flex-start; }
  .brand { padding: 9px 13px 9px 11px; }
  .brand h1 { font-size: 13.5px; }
  .brand p { font-size: 10.5px; }
  .acts { gap: 6px; }
  .acts button { height: 31px; font-size: 11.5px; padding: 0 9px; }
  .stats {
    left: 12px;
    right: 12px;
    bottom: 12px;
    justify-content: space-around;
    padding: 9px 2px;
  }
  .stats .it { padding: 0 8px; min-width: 0; flex: 1; text-align: center; }
  .stats .k { font-size: 9.5px; }
  .stats .v { font-size: 14px; }
  .clock { display: none; }
  .hint { display: none; }
  .card {
    right: 12px;
    left: 12px;
    width: auto;
    top: auto;
    bottom: 78px;
    transform: translateY(16px);
  }
  .card.on { transform: translateY(0); }
}

/* ---------- 嵌入模式 ---------- */
body.embed .top .brand p,
body.embed .hint { display: none; }

/* ---------- 选中卫星浮动标签 ---------- */
.slabel {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -175%);
  padding: 5px 9px 6px;
  border-radius: 8px;
  background: rgba(9, 14, 23, 0.86);
  border: 1px solid rgba(255, 190, 80, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 6;
}
.slabel.on { opacity: 1; }
.slabel b {
  display: block;
  font-size: 11.5px;
  font-weight: 650;
  color: #ffd07a;
  letter-spacing: 0.2px;
}
.slabel span { color: #9fb0c8; }

/* ---------- 图例 ---------- */
.lg {
  position: fixed;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  padding: 8px 15px;
  font-size: 11.5px;
  color: #93a4bc;
  z-index: 5;
  white-space: nowrap;
}
.lg span { display: flex; align-items: center; gap: 6px; }
.lg .d {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.lg .sat { background: #9fe4ff; box-shadow: 0 0 8px rgba(140, 220, 255, 0.95); }
.lg .orb { background: #ffc340; box-shadow: 0 0 8px rgba(255, 195, 64, 0.9); }
.lg .sun { background: #ffd07a; box-shadow: 0 0 8px rgba(255, 208, 122, 0.95); }
.lg .term { background: linear-gradient(90deg, #1b3350, #ff9d4d); }

@media (max-width: 720px) {
  .lg {
    bottom: 82px;
    gap: 10px;
    padding: 6px 11px;
    font-size: 10.5px;
  }
  .slabel { transform: translate(-50%, -190%); }
  .toast { bottom: 150px; font-size: 12px; padding: 8px 14px; }
}

/* ---------- 分享缩略图(仅给抓取用,不显示) ---------- */
.shareimg {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 300px;
  height: 300px;
  overflow: hidden;
  pointer-events: none;
}

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 12px);
  max-width: min(86vw, 520px);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: #cfe3f6;
  background: rgba(10, 17, 28, 0.86);
  border: 1px solid rgba(120, 170, 220, 0.22);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 30;
  text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { color: #b6f5d4; border-color: rgba(80, 220, 160, 0.3); }
.toast.err { color: #ffc0bd; border-color: rgba(240, 120, 110, 0.32); }

