@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600&family=Teko:wght@400;600&display=swap");

:root {
  --ink: #e9f2ff;
  --accent: #ffb86b;
  --accent-2: #79f2ff;
  --bg-1: #0b101a;
  --bg-2: #162238;
  --panel: rgba(11, 17, 30, 0.7);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: hidden;
  background: radial-gradient(circle at top, #1a2b4d 0%, #0b101a 50%, #070b12 100%);
  font-family: "Teko", sans-serif;
  color: var(--ink);
}

#game {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

#hud {
  position: fixed;
  bottom: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  z-index: 4;
  pointer-events: none;
}

.hud-left {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hud-block {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 96px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
}

.value {
  font-size: 1.5rem;
  font-weight: 600;
}

.status {
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-align: right;
  padding-top: 10px;
}

#overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(23, 36, 60, 0.75), rgba(7, 10, 16, 0.9));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  text-align: center;
  padding: 32px 20px;
}

#overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.title {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
}

.instructions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 16px;
  max-width: 560px;
}

.key {
  display: inline-block;
  min-width: 50px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  margin-right: 6px;
  font-weight: 600;
  background: rgba(10, 16, 28, 0.6);
}

#start {
  border: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: linear-gradient(120deg, #ffb86b, #79f2ff);
  color: #0b101a;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#start.secondary {
  background: linear-gradient(120deg, #79f2ff, #8fffaa);
}

#start:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(121, 242, 255, 0.3);
}

.menu-actions {
  display: flex;
  gap: 12px;
}

.menu-panel {
  background: rgba(10, 16, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px 20px;
  min-width: min(80vw, 520px);
  backdrop-filter: blur(10px);
}

.panel-title {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

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

.level-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(13, 22, 40, 0.85);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 0;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.08em;
  transition: transform 0.15s ease, border 0.15s ease, box-shadow 0.15s ease;
}

.level-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(121, 242, 255, 0.6);
  box-shadow: 0 8px 16px rgba(121, 242, 255, 0.2);
}

.level-btn.active {
  border-color: rgba(255, 184, 107, 0.9);
  box-shadow: 0 0 0 2px rgba(255, 184, 107, 0.2);
}

#vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0) 45%, rgba(3, 6, 12, 0.55) 100%);
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 2;
}

@media (max-width: 700px) {
  #hud {
    gap: 8px;
  }

  .hud-block {
    min-width: 92px;
  }
}
