* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
  background:
    radial-gradient(circle at top, rgba(57, 95, 192, 0.22), transparent 35%),
    linear-gradient(180deg, #050816 0%, #080d22 40%, #05070f 100%);
}
.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 24px;
  padding: 24px;
}
.panel {
  align-self: center;
  background: rgba(10, 15, 33, 0.72);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 24px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
h1 { margin: 0 0 10px; font-size: 34px; }
.subtitle { margin: 0 0 20px; color: rgba(255,255,255,.78); line-height: 1.5; }
.coords-card {
  background: rgba(255,255,255,.04);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
}
.coords-title { font-size: 14px; color: rgba(255,255,255,.7); margin-bottom: 8px; }
.coords-text { font-size: 18px; font-weight: bold; min-height: 24px; }
button {
  width: 100%; border: 0; border-radius: 14px; padding: 14px 16px; font-size: 16px;
  background: linear-gradient(135deg, #7f5cff, #2dc7ff);
  color: #fff; cursor: pointer; font-weight: bold; transition: transform .15s ease, opacity .15s ease;
}
button:hover { transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: not-allowed; }
.message { min-height: 42px; margin-top: 14px; color: #9ce8ff; line-height: 1.45; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.stats div { background: rgba(255,255,255,.04); border-radius: 18px; padding: 16px; }
.stats span { display:block; font-size: 28px; font-weight: bold; }
.stats small { color: rgba(255,255,255,.72); }
.legend { margin-top: 20px; display:flex; gap:10px; align-items:flex-start; color: rgba(255,255,255,.78); line-height:1.45; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #6df4ff; box-shadow: 0 0 14px #6df4ff; margin-top: 4px; flex: none; }
.globe-wrap {
  position: relative; min-height: calc(100vh - 48px); border-radius: 28px; overflow: hidden;
  background: radial-gradient(circle at center, rgba(11,23,61,.45), rgba(4,6,14,0) 60%);
  touch-action: none;
}
#globeCanvas { width: 100%; height: 100%; display:block; cursor: crosshair; }
.globe-hint {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(12,18,39,.72);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.86);
  font-size: 14px;
  pointer-events: none;
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 14px; gap: 14px; }
  .panel { order: 2; padding: 18px; border-radius: 20px; }
  .globe-wrap { order: 1; min-height: 58vh; border-radius: 22px; }
  h1 { font-size: 30px; }
}


.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(6, 12, 30, 0.78), rgba(4, 7, 16, 0.92));
  z-index: 30;
  transition: opacity .35s ease, visibility .35s ease;
}
.loading-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}
.loading-card {
  max-width: 320px;
  padding: 18px 22px;
  border-radius: 18px;
  background: rgba(10, 17, 38, 0.88);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
  color: rgba(255,255,255,.92);
  text-align: center;
  line-height: 1.45;
  font-size: 18px;
}

.secondary-button {
  margin-top: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}
.secondary-button:hover {
  background: rgba(255,255,255,0.12);
}
.panel-links {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.panel-links a {
  color: #9ce8ff;
  text-decoration: none;
  line-height: 1.4;
}
.panel-links a:hover {
  text-decoration: underline;
}
