:root {
  --fg: #eef7ff;
  --accent: #7ff6ff;
  --accent-2: #ffd476;
  --danger: #ff6c7b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--fg);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 10%, #1d4461, #08131e 60%, #02060a 100%);
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
}

#hud {
  position: fixed;
  left: 10px;
  right: 10px;
  top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: none;
}

.badge {
  background: rgba(4, 12, 20, 0.75);
  border: 1px solid rgba(127, 246, 255, 0.35);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

#overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 212, 118, 0.18), transparent 45%),
    radial-gradient(circle at 16% 92%, rgba(127, 246, 255, 0.16), transparent 44%),
    rgba(0, 0, 0, 0.62);
}

.card {
  width: min(94vw, 620px);
  border-radius: 16px;
  border: 1px solid rgba(127, 246, 255, 0.38);
  background: linear-gradient(155deg, rgba(12, 34, 51, 0.95), rgba(5, 14, 24, 0.94));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  padding: 24px;
}

h1 {
  margin: 0 0 10px;
  color: var(--accent);
  letter-spacing: 0.4px;
}

p {
  margin: 8px 0;
  line-height: 1.45;
}

.menu-block {
  margin: 14px 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(127, 246, 255, 0.24);
  background: rgba(9, 24, 37, 0.6);
}

.menu-title {
  font-weight: 800;
  margin-bottom: 8px;
}

.difficulty-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.difficulty-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(12, 36, 53, 0.75);
  color: #e8f8ff;
  font-weight: 800;
  padding: 10px 8px;
  cursor: pointer;
}

.difficulty-btn.active {
  border-color: rgba(255, 212, 118, 0.75);
  background: linear-gradient(130deg, rgba(127, 246, 255, 0.22), rgba(255, 212, 118, 0.2));
  color: #fff7df;
}

.hint {
  font-size: 13px;
  opacity: 0.9;
}

.start {
  margin-top: 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(110deg, var(--accent), #c4fff5);
  color: #032536;
  font-weight: 900;
  padding: 11px 20px;
  cursor: pointer;
}

#toast {
  position: fixed;
  left: 50%;
  top: 78px;
  transform: translateX(-50%);
  background: rgba(8, 20, 31, 0.9);
  border: 1px solid rgba(255, 212, 118, 0.6);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 800;
}

.hidden { display: none; }

@media (max-width: 740px) {
  .difficulty-menu { grid-template-columns: 1fr; }
  .badge { font-size: 12px; }
}
