.world-map-page {
  --bg: #030b17;
  --bg-soft: #061426;
  --surface: #07182b;
  --surface-2: rgba(7, 27, 49, 0.78);
  --border: rgba(44, 181, 226, 0.2);
  --border-strong: rgba(44, 181, 226, 0.42);
  --text: #dcf8ff;
  --text-muted: #83a8bb;
  --text-faint: #54768b;
  --accent: #28d9f5;
  --accent-2: #0ba1da;
  --accent-glow: rgba(40, 217, 245, 0.28);
  min-width: 320px;
  background:
    radial-gradient(circle at 50% 32%, rgba(4, 80, 119, 0.2), transparent 42%),
    #030b17;
}

.world-map-page::after { display: none; }
.world-map-page .nav,
[data-theme="light"] .world-map-page .nav,
[data-theme="light"] .world-map-page .nav.scrolled {
  background: rgba(3, 11, 23, 0.86);
  border-color: rgba(44, 181, 226, 0.18);
}

.atlas {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 28px clamp(14px, 3vw, 44px) 72px;
  position: relative;
  z-index: 1;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.clock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(7, 26, 46, 0.82), rgba(4, 17, 32, 0.78));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.03), 0 18px 50px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.clock-card {
  min-height: 122px;
  padding: 18px 24px;
  display: grid;
  place-items: center;
  align-content: center;
  position: relative;
}

.clock-card + .clock-card::before {
  content: "";
  position: absolute;
  left: 0; top: 22%; bottom: 22%;
  width: 1px;
  background: var(--border-strong);
}

.clock-label {
  color: #8fdff0;
  font-size: clamp(14px, 1.45vw, 19px);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.clock-time {
  color: #9befff;
  font-family: var(--mono);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-shadow: 0 0 22px rgba(40, 217, 245, 0.25);
  font-variant-numeric: tabular-nums;
}

.clock-date { color: var(--text-muted); font-size: 13px; }

.map-stage {
  min-height: 560px;
  position: relative;
  display: grid;
  place-items: center;
  margin: 16px 0;
  overflow: hidden;
  isolation: isolate;
}

.map-halo {
  position: absolute;
  inset: 15% 9% 7%;
  z-index: -1;
  background: radial-gradient(ellipse, rgba(17, 153, 205, 0.26), rgba(3, 18, 35, 0.05) 55%, transparent 72%);
  filter: blur(22px);
  animation: map-breathe 6s ease-in-out infinite;
}

@keyframes map-breathe {
  0%, 100% { opacity: 0.55; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.025); }
}

.country-search {
  position: absolute;
  z-index: 4;
  top: 16px;
  right: 18px;
  width: min(320px, calc(100% - 36px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(3, 14, 27, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.map-zoom {
  position: absolute;
  z-index: 4;
  top: 16px;
  left: 18px;
  height: 42px;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(3, 14, 27, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.map-zoom button {
  min-width: 44px;
  border: 0;
  color: #a9edf7;
  background: transparent;
  display: grid;
  place-items: center;
  font: 700 16px var(--sans);
}

.map-zoom button { cursor: pointer; }
.map-zoom button + button { border-left: 1px solid var(--border); }
.map-zoom button:hover:not(:disabled) { color: #fff; background: rgba(40, 217, 245, 0.12); }
.map-zoom button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.map-zoom button:disabled { color: #416174; cursor: not-allowed; }
.map-zoom .zoom-reset { min-width: 54px; padding: 0 10px; font-size: 13px; }

.country-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(40, 217, 245, 0.12), 0 14px 34px rgba(0, 0, 0, 0.28);
}

.country-search input {
  min-width: 0;
  height: 42px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.country-search input::placeholder { color: #6f91a4; }
.country-search input::-webkit-search-cancel-button { filter: invert(1); opacity: 0.6; }

.country-search button {
  min-width: 66px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  color: #02121c;
  background: linear-gradient(135deg, #57e9fa, #19bce7);
  font: 700 14px var(--sans);
  cursor: pointer;
}

.country-search button:hover { filter: brightness(1.08); }
.country-search button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

.search-status {
  position: absolute;
  top: 71px;
  right: 24px;
  z-index: 4;
  min-height: 20px;
  color: #91c9da;
  font-size: 12px;
  text-align: right;
}

.search-status.is-error { color: #ff9d9d; }

.world-map {
  width: 100%;
  aspect-ratio: 2 / 1;
  display: block;
  border: 0;
  filter: drop-shadow(0 0 18px rgba(21, 150, 197, 0.16));
}

.country-panel {
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(7, 27, 49, 0.9), rgba(4, 17, 32, 0.88));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.03), 0 22px 54px rgba(0, 0, 0, 0.22);
  padding: clamp(20px, 3vw, 32px);
}

.country-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.panel-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--accent);
  font: 11px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.country-title-row {
  display: flex;
  align-items: center;
  gap: clamp(9px, 1.2vw, 14px);
}

.country-flag {
  flex: 0 0 auto;
  width: clamp(42px, 4vw, 48px);
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  border-radius: 2px;
  filter: drop-shadow(0 0 8px rgba(40, 217, 245, 0.16));
}

.country-heading h2 {
  color: #d9faff;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.2;
}

.country-heading h2 small {
  color: #83cada;
  font-size: 0.68em;
  font-weight: 500;
}

.prototype-badge {
  flex: 0 0 auto;
  padding: 5px 11px;
  border: 1px solid rgba(40, 217, 245, 0.38);
  border-radius: 999px;
  color: #85eaf7;
  font-size: 12px;
}

.country-facts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  padding-top: 22px;
}

.fact {
  min-width: 0;
  padding: 0 18px;
}

.fact:first-child { padding-left: 0; }
.fact + .fact { border-left: 1px solid var(--border); }
.fact span { display: block; color: #66bad0; font-size: 13px; }
.fact strong {
  display: block;
  margin-top: 6px;
  color: #d8f4fa;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.data-note {
  margin-top: 22px;
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.6;
}

.back-gallery {
  display: inline-block;
  margin-top: 24px;
  color: #79d9e8;
  font-size: 14px;
}

.back-gallery:hover { color: var(--accent); }
.world-map-page .footer { position: relative; z-index: 1; }

@media (max-width: 980px) {
  .map-stage { min-height: 470px; padding-top: 58px; }
  .country-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
  .fact:nth-child(4) { padding-left: 0; border-left: 0; }
}

@media (max-width: 700px) {
  .atlas { padding-top: 18px; }
  .clock-grid { grid-template-columns: 1fr; }
  .clock-card { min-height: 86px; padding: 12px 18px; }
  .clock-card + .clock-card::before { left: 8%; right: 8%; top: 0; bottom: auto; width: auto; height: 1px; }
  .clock-time { font-size: 28px; }
  .map-stage { min-height: 360px; margin-top: 12px; padding-top: 64px; }
  .country-search { top: 8px; left: auto; right: 0; width: min(320px, 100%); }
  .search-status { top: 55px; left: 4px; right: 4px; text-align: left; }
  .map-zoom { top: 64px; left: 0; height: 42px; }
  .map-zoom button { min-width: 40px; }
  .map-zoom .zoom-reset { min-width: 52px; padding: 0 9px; }
  .world-map { margin-top: 40px; }
  .country-panel { border-radius: 14px; padding: 20px 16px; }
  .country-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { padding: 0 13px; }
  .fact:nth-child(odd) { padding-left: 0; border-left: 0; }
  .fact:nth-child(even) { border-left: 1px solid var(--border); }
}

@media (max-width: 430px) {
  .map-stage { min-height: 300px; }
  .country-heading { align-items: flex-start; }
  .country-facts { grid-template-columns: 1fr; gap: 14px; }
  .fact, .fact:nth-child(n) { padding: 0; border-left: 0; }
  .fact + .fact { padding-top: 12px; border-top: 1px solid var(--border); }
}

@media (prefers-reduced-motion: reduce) {
  .map-halo { animation: none; opacity: 0.72; transform: none; }
}
