:root {
  font-family: "Space Mono", "IBM Plex Mono", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f5f5f5;
  background-color: #05030f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(48, 12, 90, 0.8), #05030f 60%);
}

.viewport {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem 1rem 3rem;
}

.hero {
  text-align: center;
  letter-spacing: 0.06em;
}

.hero p {
  margin: 0.3rem 0;
}

.hero .primary-btn {
  margin-top: 1.25rem;
}

.hero.hidden {
  display: none;
}

#app {
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.center-card {
  background: rgba(9, 12, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  width: min(520px, 90vw);
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.center-card h2 {
  margin-top: 0;
}

.glyph-grid {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.glyph-button {
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  border-radius: 12px;
  width: 64px;
  height: 64px;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease;
  color: #05030f;
  box-shadow: inset 0 0 0 0 rgba(107, 229, 255, 0.45);
}

.glyph-button:hover,
.glyph-button:focus-visible {
  border-color: #6be5ff;
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 999px rgba(107, 229, 255, 0.18), 0 0 20px rgba(107, 229, 255, 0.35);
  color: #ffffff;
}

.timer-display {
  font-size: 2.5rem;
  margin: 1rem 0;
  letter-spacing: 0.1em;
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.timer-controls button,
.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.6rem;
  font-size: 1rem;
  cursor: pointer;
  background: #6be5ff;
  color: #0b0e1d;
  font-weight: 600;
  transition: transform 120ms ease, opacity 120ms ease;
}

.timer-controls button:disabled,
.primary-btn:disabled,
.secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.timer-controls button:hover:not(:disabled),
.primary-btn:hover:not(:disabled),
.secondary-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.boxes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.color-box {
  height: 80px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.color-box.blank {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.3);
}

.color-box select {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

.pin-input {
  font-size: 2rem;
  text-align: center;
  letter-spacing: 0.5em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.5rem 1rem;
  color: #fff;
  width: 100%;
}

.map-surface {
  position: relative;
  width: 100%;
  height: 260px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 40%, rgba(80, 150, 255, 0.6), rgba(5, 3, 15, 0.9)),
    linear-gradient(135deg, rgba(36, 206, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  cursor: crosshair;
}

.map-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.map-marker {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #f5f5f5;
  background: #ff6262;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.leaderboard {
  text-align: left;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
  table-layout: fixed;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 0.6rem 0.4rem;
  text-align: left;
}

.leaderboard-table th:nth-child(2),
.leaderboard-table td:nth-child(2) {
  text-align: center;
}

.leaderboard-table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.leaderboard-table th:last-child {
  text-align: right;
  padding-right: 0.75rem;
}

.leaderboard-table tbody tr {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-table tbody tr:first-child {
  border-top: none;
}

.leaderboard-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  width: 30%;
  padding-right: 0.75rem;
}

.link-btn {
  background: none;
  border: none;
  color: #6be5ff;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}

.link-btn:hover {
  color: #ffffff;
}

.profile-chart {
  width: 100%;
  margin: 1rem 0 1.5rem;
}

.chart-axis text {
  fill: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
}

.chart-axis path,
.chart-axis line {
  stroke: rgba(255, 255, 255, 0.2);
}

.scorecard-list {
  width: 100%;
  margin-bottom: 1.5rem;
  text-align: left;
}

.scorecard-list details {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.scorecard-list summary {
  cursor: pointer;
  font-weight: 600;
}

.scorecard-challenges {
  list-style: none;
  padding-left: 0;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.5rem;
}

.scorecard-challenges li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.9rem;
}

.scorecard-challenges code {
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}

.subtle {
  color: #a8b0ff;
  font-size: 0.85rem;
  margin-top: 1rem;
}

