:root {
  --bg-1: #0a1020;
  --bg-2: #141f38;
  --panel: rgba(17, 26, 48, 0.82);
  --line: rgba(123, 157, 245, 0.25);
  --text: #eaf1ff;
  --muted: #91a5cf;
  --accent: #3dd9b4;
  --warn: #ffb84f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 15% 15%, #24345e 0%, transparent 40%), radial-gradient(circle at 85% 0%, #194e62 0%, transparent 35%), linear-gradient(130deg, var(--bg-1), var(--bg-2));
  color: var(--text);
  font-family: Manrope, sans-serif;
}

.layout {
  width: min(1180px, 100% - 32px);
  margin: 24px auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.game-card,
.panel > .card,
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.game-card {
  padding: 18px;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-family: "Space Grotesk", sans-serif;
  margin-top: 4px;
  font-size: 28px;
}

.btn {
  border: 1px solid #4dc1a9;
  background: linear-gradient(135deg, #2d8b77, #46d3b3);
  color: #041711;
  font-weight: 800;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

#game {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: block;
  margin-inline: auto;
  background: #0b1120;
}

.help-row {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}

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

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat,
.panel > .card {
  padding: 14px;
}

.stat h3 {
  color: var(--muted);
  font-size: 13px;
}

.stat p {
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
}

.card h2 {
  font-size: 17px;
  margin-bottom: 12px;
}

.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

#progressBar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--warn), var(--accent));
  transition: width 0.2s ease;
}

#levelTarget,
#status {
  margin-top: 10px;
  color: var(--muted);
}

#achievements {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

#achievements li {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  color: #b9c9ec;
}

#achievements li.unlocked {
  border-color: rgba(61, 217, 180, 0.6);
  background: rgba(61, 217, 180, 0.14);
  color: #dbfff6;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 28px);
  background: rgba(5, 16, 22, 0.96);
  border: 1px solid rgba(61, 217, 180, 0.65);
  color: #ddfff7;
  border-radius: 10px;
  padding: 10px 14px;
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .help-row {
    flex-direction: column;
    gap: 4px;
  }
}
