*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #000;
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
  width: 100dvw;
  height: 100dvh;
}

#globe-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100vw;
  min-height: 100vh;
}

/* ── 로딩 ── */
#loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #000;
  z-index: 100;
  transition: opacity 0.4s ease;
}

#loading.hidden {
  opacity: 0;
  pointer-events: none;
}

#loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

#loading-text {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── HUD ── */
#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px;
  pointer-events: none;
}

#country-badge {
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  letter-spacing: 0.05em;
  pointer-events: auto;
}

/* ── 스코어보드 ── */
#score-board {
  background: rgba(0,0,0,0.65);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 180px;
  backdrop-filter: blur(6px);
}

.score-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 3px 0;
  font-size: 13px;
}

.rank  { color: #aaa; width: 18px; text-align: right; }
.iso   { font-weight: 700; width: 32px; }
.cnt   { color: #ccc; }

/* ── 토스트 ── */
#toast {
  position: fixed;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── 광고 ── */
#ad-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  text-align: center;
  background: rgba(20, 20, 30, 0.85);
  backdrop-filter: blur(8px);
}

#tooltip {
  position: fixed;
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  pointer-events: none;
  z-index: 50;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#tooltip.visible {
  opacity: 1;
  visibility: visible;
}
