:root {
  color-scheme: dark;
  --bg-1: #0d1321;
  --bg-2: #18243c;
  --panel: rgba(9, 16, 29, 0.88);
  --panel-border: rgba(180, 208, 255, 0.16);
  --text-main: #eef5ff;
  --text-muted: #adc0db;
  --accent: #6ae3b9;
  font-family: "Avenir Next", "PingFang SC", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(69, 112, 204, 0.28), transparent 34%),
    radial-gradient(circle at bottom right, rgba(11, 196, 163, 0.22), transparent 30%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  color: var(--text-main);
}

.hub-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 100dvh;
}

.puzzle-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
}

.puzzle-switcher {
  width: min(680px, calc(100vw - 24px));
  margin: 0 auto 14px;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: 0 14px 30px rgba(6, 10, 19, 0.26);
  backdrop-filter: blur(14px);
}

.puzzle-switcher a {
  appearance: none;
  min-width: 92px;
  padding: 10px 14px;
  border: 1px solid rgba(196, 221, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}

.puzzle-switcher a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.puzzle-switcher a.is-active {
  color: #07151f;
  background: linear-gradient(180deg, #87f0d0, #58b49d);
  border-color: rgba(135, 240, 208, 0.34);
}

@media (max-width: 720px) {
  .puzzle-switcher {
    width: calc(100vw - 18px);
    margin-bottom: 10px;
  }

  .puzzle-switcher a {
    min-width: 0;
    flex: 1 1 0;
    padding: 10px 8px;
  }
}
