/* SkyForge — 暗黑科幻塔台风格 */
:root {
  --bg: #05070f;
  --glass: rgba(10, 16, 36, 0.78);
  --glass-brd: rgba(64, 160, 255, 0.22);
  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, 0.45);
  --magenta: #a78bfa;
  --green: #34f5a0;
  --red: #ff5d7a;
  --amber: #ffd166;
  --txt: #dce4f0;
  --dim: #8aa0bf;
  --font-mono: "SF Mono", "Cascadia Code", Consolas, "Noto Sans Mono CJK SC", monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); color: var(--txt);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif; }

#globe { position: fixed; inset: 0; }
#globe canvas { outline: none; }

.glass { background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 14px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 0 24px rgba(34, 211, 238, 0.04); }

/* ── 控制面板 ── */
#panel { position: fixed; top: 16px; left: 16px; width: 302px; padding: 14px 16px 12px; z-index: 20;
  display: flex; flex-direction: column; gap: 10px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.logo { font-size: 17px; letter-spacing: 0.5px; white-space: nowrap; }
.logo b { color: var(--cyan); text-shadow: 0 0 12px var(--cyan-dim); }
.logo span { margin-left: 8px; font-size: 12px; color: var(--dim); font-weight: normal; }
#langBtn.chip { padding: 2px 10px; font-size: 12px; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11.5px; color: var(--dim); letter-spacing: 0.5px; }
.field input { background: rgba(4, 8, 20, 0.72); border: 1px solid rgba(80, 120, 200, 0.28);
  border-radius: 8px; color: var(--txt); font-size: 14px; padding: 8px 10px; width: 100%;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s; font-family: var(--font-mono); }
.field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.15), 0 0 14px rgba(34, 211, 238, 0.25); }
.field input::placeholder { color: #4d6488; }
.inrow { display: flex; gap: 6px; }
.inrow input { flex: 1; }
.qbtn { width: 38px; border: 1px solid rgba(80, 120, 200, 0.3); border-radius: 8px; background: rgba(20, 30, 60, 0.7);
  color: var(--cyan); font-size: 14px; cursor: pointer; transition: all 0.15s; }
.qbtn:hover { background: rgba(34, 211, 238, 0.16); box-shadow: 0 0 10px var(--cyan-dim); }

.hint { font-size: 12px; color: var(--cyan); min-height: 15px; line-height: 1.45; word-break: break-all; }
.hint.err { color: var(--red); }
.hint.small { min-height: 0; display: flex; flex-direction: column; gap: 1px; color: var(--dim); font-size: 11px; margin-top: 2px; }

.two-col { display: flex; gap: 8px; }
.two-col .field { flex: 1; }

.btnrow { display: flex; gap: 8px; }
.btnrow button { flex: 1; }
button { font-family: inherit; cursor: pointer; border-radius: 9px; border: none; transition: all 0.16s; }
.primary { background: linear-gradient(135deg, #0891b2, #22d3ee); color: #04131c; font-size: 14.5px; font-weight: 700;
  padding: 10px 0; letter-spacing: 1px; box-shadow: 0 0 18px rgba(34, 211, 238, 0.35); }
.primary:hover { filter: brightness(1.12); box-shadow: 0 0 26px rgba(34, 211, 238, 0.55); }
.primary:disabled { filter: grayscale(0.7) brightness(0.7); cursor: not-allowed; box-shadow: none; }
.ghost { background: rgba(20, 32, 66, 0.7); border: 1px solid rgba(120, 140, 200, 0.3); color: var(--txt); font-size: 13px; padding: 8px 0; }
.ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.seg { display: flex; border: 1px solid rgba(80, 120, 200, 0.26); border-radius: 9px; overflow: hidden; }
.seg button { flex: 1; background: transparent; color: var(--dim); font-size: 12.5px; padding: 7px 0; border: none; }
.seg button.on { background: rgba(34, 211, 238, 0.16); color: var(--cyan); }

/* ── 底部信息栏 ── */
#statusBar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 20;
  width: min(760px, calc(100vw - 32px)); padding: 10px 18px 12px; display: flex; flex-direction: column; gap: 7px; }
#statusBar.hidden { display: none; }
.flight-id { font-size: 15.5px; font-weight: 700; color: var(--txt); text-align: center; letter-spacing: 0.3px; }
.flight-id b { color: var(--cyan); text-shadow: 0 0 10px var(--cyan-dim); }
.meta { text-align: center; font-size: 12px; color: var(--dim); }
.meter { height: 5px; background: rgba(60, 80, 140, 0.28); border-radius: 3px; overflow: hidden; }
#barProg { height: 100%; width: 0%; background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 10px var(--cyan-dim); transition: width 0.3s linear; border-radius: 3px; }
.statrow { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--dim); font-family: var(--font-mono); }
.statrow b { color: var(--txt); font-weight: 600; }
.ctrlrow { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.chip { background: rgba(16, 26, 54, 0.85); border: 1px solid rgba(90, 130, 210, 0.3); color: var(--dim);
  font-size: 12px; padding: 4px 12px; border-radius: 999px; }
.chip:hover { color: var(--cyan); border-color: var(--cyan); }
.chip.on { color: var(--cyan); border-color: var(--cyan); background: rgba(34, 211, 238, 0.12); box-shadow: 0 0 10px rgba(34, 211, 238, 0.2); }
.speed-group { display: inline-flex; gap: 4px; margin-left: 6px; }
.speed-group .chip { padding: 4px 8px; }

/* ── Toast / Loader ── */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.toast { background: var(--glass); border: 1px solid var(--glass-brd); border-left: 3px solid var(--cyan);
  border-radius: 10px; padding: 10px 14px; font-size: 13px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  animation: slidein 0.25s ease; backdrop-filter: blur(8px); }
.toast.err { border-left-color: var(--red); color: #ffd0d8; }
.toast.ok { border-left-color: var(--green); }
.toast.fade { opacity: 0; transition: opacity 0.4s; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

#loader { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; gap: 16px;
  align-items: center; justify-content: center; background: rgba(5, 7, 15, 0.88); font-size: 13px; color: var(--dim); letter-spacing: 2px; }
#loader.hidden { display: none; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(34, 211, 238, 0.15);
  border-top-color: var(--cyan); animation: spin 0.9s linear infinite; box-shadow: 0 0 24px rgba(34, 211, 238, 0.2); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 小屏适配 ── */
@media (max-width: 720px) {
  #panel { width: min(302px, calc(100vw - 20px)); top: 10px; left: 10px; padding: 12px 12px 10px; }
  #statusBar { bottom: 8px; width: calc(100vw - 16px); padding: 8px 10px 9px; }
  .statrow { flex-wrap: wrap; gap: 2px 12px; justify-content: center; }
  #toasts { top: 10px; right: 10px; max-width: calc(100vw - 20px); }
}
