:root {
  --bg: #06080c;
  --ink: #e8f0f4;
  --muted: #8b9aa3;
  --cyan: #3dffc8;
  --gold: #e0b45c;
  --danger: #ff5a6a;
  --panel: rgba(8, 12, 16, 0.78);
  --line: rgba(224, 180, 92, 0.38);
  --glass: rgba(12, 18, 24, 0.62);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope, "Segoe UI", sans-serif;
  overflow: hidden;
}

body {
  cursor: crosshair;
}

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

#scan {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.015) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
}

#overlay {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  pointer-events: none;
}

#overlay.hot {
  pointer-events: auto;
  background:
    radial-gradient(ellipse at center, rgba(5, 8, 12, 0.52), rgba(5, 8, 12, 0.82)),
    var(--hero) center / cover no-repeat;
  backdrop-filter: blur(8px);
}

.screen {
  display: none;
  width: min(920px, calc(100% - 40px));
  pointer-events: auto;
}

.screen.active {
  display: block;
  animation: rise 0.55s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#sc-boot,
#sc-menu {
  text-align: center;
}

.wordmark {
  font-family: Unbounded, sans-serif;
  font-weight: 800;
  font-size: clamp(42px, 9vw, 92px);
  letter-spacing: 0.16em;
  line-height: 0.95;
  background: linear-gradient(180deg, #f4fffb 0%, #3dffc8 55%, #e0b45c 140%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 30px rgba(61, 255, 200, 0.25));
}

.tag {
  font-family: Unbounded, sans-serif;
  letter-spacing: 0.42em;
  font-size: 11px;
  color: var(--gold);
  margin-top: 10px;
}

.lede {
  max-width: 520px;
  margin: 18px auto 0;
  color: var(--muted);
  line-height: 1.55;
}

.pulse {
  margin-top: 36px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--cyan);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

.logo-mark {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: block;
  box-shadow: 0 0 40px rgba(61, 255, 200, 0.35);
  border: 1px solid var(--line);
}

.logo-mark.sm {
  width: 72px;
  height: 72px;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, 100%);
  margin: 28px auto 0;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  appearance: none;
  font-family: Unbounded, sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(40, 48, 56, 0.9), rgba(16, 20, 24, 0.9));
  border: 1px solid rgba(180, 200, 210, 0.18);
  padding: 14px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.16s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(61, 255, 200, 0.25), 0 10px 28px rgba(0, 0, 0, 0.4);
}

.btn:active {
  transform: translateY(1px);
}

.btn.gold {
  border-color: var(--gold);
  color: #1a1408;
  background: linear-gradient(180deg, #f0d08a, #c4923c);
}

.btn.ghost {
  background: transparent;
  box-shadow: none;
  flex: 1;
}

.btn.sm {
  padding: 8px 12px;
  font-size: 11px;
}

.foot {
  margin-top: 28px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  width: min(520px, 100%);
  margin: 0 auto;
}

.panel.wide {
  width: min(920px, 100%);
}

.panel-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

h2 {
  font-family: Unbounded, sans-serif;
  letter-spacing: 0.14em;
  font-size: 18px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.lv {
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(180, 200, 210, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
  font-family: Manrope, sans-serif;
}

.lv:hover:not(:disabled) {
  border-color: var(--cyan);
}

.lv:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.lv .n {
  font-family: Unbounded, sans-serif;
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.14em;
}

.lv .t {
  display: block;
  font-weight: 700;
  margin-top: 4px;
}

.lv.bonus {
  border-color: rgba(224, 180, 92, 0.45);
}

.pw {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.pw label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

input,
select {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(180, 200, 210, 0.2);
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 8px;
  font-family: Unbounded, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.help-grid h3 {
  font-family: Unbounded, sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  margin-bottom: 6px;
}

.help-grid p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

kbd {
  font-family: Unbounded, sans-serif;
  font-size: 10px;
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--gold);
}

.sl,
.chk {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
}

.chk {
  justify-content: flex-start;
}

input[type="range"] {
  width: 160px;
  accent-color: var(--cyan);
}

.score-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.score-cols h3 {
  font-family: Unbounded, sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 8px;
}

.score-cols ol {
  list-style: none;
  counter-reset: s;
}

.score-cols li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.kicker {
  font-family: Unbounded, sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--cyan);
}

#sc-results .kicker.bad {
  color: var(--danger);
}

.score-big {
  font-family: Unbounded, sans-serif;
  font-size: 42px;
  letter-spacing: 0.08em;
  margin: 8px 0 12px;
}

.breakdown {
  list-style: none;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.breakdown li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

#sc-pause .panel,
#sc-results .panel,
#sc-tutorial .panel,
#sc-settings .panel {
  text-align: center;
}

#sc-pause .btn,
#sc-results .btn,
#sc-tutorial .btn,
#sc-settings .btn {
  width: 100%;
  margin-top: 8px;
}

#sc-results .row .btn,
#sc-tutorial .row .btn,
#sc-pause .btn {
  width: auto;
  flex: 1;
}

#sc-settings .panel {
  text-align: left;
}

@media (max-width: 720px) {
  .wordmark {
    letter-spacing: 0.08em;
  }
  .panel {
    padding: 18px;
  }
}
