:root {
  --bg: #11131a;
  --panel: #1b2130;
  --panel-2: #252f44;
  --text: #f1f1f1;
  --accent: #ffd74a;
  --accent-2: #8fd8ff;
  --danger: #ff7a7a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  background:
    radial-gradient(circle at top, #2f3c64 0%, #121621 55%, #090b10 100%);
  color: var(--text);
}

.page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px;
}

.hud-shell,
.game-shell {
  background: rgba(8, 10, 16, 0.78);
  border: 3px solid #4b5a7a;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.hud-shell {
  padding: 16px 18px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

h1 {
  margin: 0;
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.subtitle {
  margin: 6px 0 0;
  color: #c9d5ef;
}

.mini-help {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.95rem;
  color: var(--accent-2);
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-weight: 700;
}

.lang-switch select {
  background: #1a2234;
  color: var(--text);
  border: 2px solid #5a6893;
  border-radius: 10px;
  padding: 6px 10px;
  font: inherit;
}

.game-shell {
  display: grid;
  grid-template-columns: minmax(0, 960px) minmax(260px, 1fr);
  gap: 16px;
  padding: 16px;
  align-items: start;
}

canvas {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 3px solid #6c7aa4;
  background: #090d17;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.sidepanel {
  display: grid;
  gap: 14px;
}

.sidepanel section {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 2px solid #5a6893;
  border-radius: 14px;
  padding: 14px;
}

.sidepanel h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--accent);
}

.sidepanel ul,
.highscores {
  margin: 0;
  padding-left: 18px;
}

.sidepanel li {
  margin-bottom: 8px;
  line-height: 1.35;
}

.highscores li {
  margin-bottom: 6px;
}

.note {
  margin: 10px 0 0;
  color: #bfc9e8;
  font-size: 0.9rem;
}

@media (max-width: 1160px) {
  .game-shell {
    grid-template-columns: 1fr;
  }

  .hud-shell {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-right {
    align-items: flex-start;
  }

  .mini-help {
    justify-content: flex-start;
  }
}
