:root {
  color-scheme: light dark;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0b1120 0%, #111c33 50%, #020617 100%);
  color: #cbd5f5;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

main {
  box-sizing: border-box;
  width: min(720px, 100vw);
  margin: 6rem 1.5rem 3rem;
  padding: 2rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.82));
  box-shadow: 0 25px 60px rgba(2, 6, 23, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
  color: #f8fafc;
}

p {
  margin: 0;
  line-height: 1.7;
  color: #cbd5f5;
}

#globe-canvas {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.metrics {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#land-coverage {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #e2e8f0;
}

#best-positions {
  margin: 0;
  padding-left: 1.25rem;
  color: #cbd5f5;
  font-size: 0.95rem;
  line-height: 1.4;
}

#best-positions li {
  margin: 0.1rem 0;
  cursor: pointer;
  transition: color 120ms ease;
}

#best-positions li.active {
  color: #38bdf8;
  font-weight: 600;
}

#best-positions li button {
  all: unset;
  cursor: pointer;
  color: inherit;
}

.coast-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.coast-control input[type='range'] {
  flex: 1 1 200px;
  min-width: 180px;
}

.coast-control span:last-child {
  font-weight: 600;
  color: #38bdf8;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.io-buttons {
  display: flex;
  gap: 0.75rem;
}

#start-search {
  align-self: flex-start;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(150deg, #38bdf8, #2563eb);
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

#start-search:disabled {
  opacity: 0.6;
  cursor: progress;
}

#start-search:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45);
}

#start-search:not(:disabled):active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.secondary-button {
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease, background-color 150ms ease;
}

.secondary-button:hover {
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.35);
  transform: translateY(-1px);
}

.secondary-button:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.25);
}

.toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.toggle-control span {
  color: #38bdf8;
}

.toggle-control input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #38bdf8;
}

