:root {
  --bg: #070806;
  --panel: rgba(18, 20, 17, 0.84);
  --panel-strong: rgba(22, 25, 22, 0.92);
  --border: rgba(232, 238, 221, 0.18);
  --text: #f5f7ef;
  --muted: #aeb6a6;
  --cyan: #6bddff;
  --green: #98f075;
  --amber: #f6c85f;
  --rose: #ff7aa8;
  --violet: #b69cff;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.44);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 40%),
    linear-gradient(135deg, rgba(152, 240, 117, 0.04), rgba(255, 122, 168, 0.035) 48%, rgba(107, 221, 255, 0.04)),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.experiment {
  position: fixed;
  inset: 0;
  min-width: 320px;
  isolation: isolate;
}

#globeMount,
#globeMount canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

#globeMount canvas {
  cursor: grab;
  touch-action: none;
}

#globeMount canvas:active {
  cursor: grabbing;
}

.controls {
  position: fixed;
  z-index: 3;
  top: 16px;
  left: 16px;
  width: min(350px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  text-transform: uppercase;
}

.back-link:hover {
  color: var(--green);
}

.heading {
  margin: 4px 0 14px;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 780;
  letter-spacing: 0;
}

.control {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 18px;
  font-size: 13px;
  font-weight: 750;
}

select {
  width: 100%;
  min-height: 38px;
  padding: 0 34px 0 10px;
  border: 1px solid rgba(245, 247, 239, 0.24);
  border-radius: 8px;
  color: var(--text);
  background: #050605;
  color-scheme: dark;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
}

select option {
  color: var(--text);
  background: #050605;
}

.check-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.check-control input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--green);
}

.tooltip {
  position: fixed;
  z-index: 4;
  display: none;
  max-width: min(270px, calc(100vw - 24px));
  padding: 9px 10px;
  border: 1px solid rgba(232, 238, 221, 0.22);
  border-radius: 8px;
  background: rgba(12, 14, 12, 0.92);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  backdrop-filter: blur(14px);
}

.tooltip strong {
  display: block;
  margin-bottom: 2px;
  color: var(--amber);
  font-size: 13px;
}

.tooltip span {
  color: var(--muted);
}

.loading {
  position: fixed;
  z-index: 2;
  left: 50%;
  top: 50%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  box-shadow: var(--shadow);
  font-size: 12px;
  transform: translate(-50%, -50%);
}

select:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(107, 221, 255, 0.36);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .controls {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    padding: 12px 14px 14px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  h1 {
    font-size: 23px;
  }

  .heading {
    margin-bottom: 10px;
  }

  .control {
    margin-top: 10px;
  }
}

@media (max-height: 640px) and (min-width: 761px) {
  .controls {
    width: min(660px, calc(100vw - 32px));
  }

  .controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
  }

  .back-link,
  .heading {
    grid-column: 1 / -1;
  }
}
