:root {
  --bg: #0b1020;
  --text: #e9eefc;
  --accent: #7aa2ff;
  --card: rgba(255, 255, 255, 0.08);
  --border: rgba(233, 238, 252, 0.12);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Courier New', monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

#game-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#game-canvas {
  border: 2px solid var(--border);
  background: #1a2332;
}

#ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#stats {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(11, 16, 32, 0.8);
  padding: 10px 15px;
  border-radius: 5px;
  border: 1px solid var(--border);
  font-size: 14px;
  pointer-events: auto;
  z-index: 10;
}

#stats > div {
  margin: 5px 0;
}

#shop-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  font-size: 14px;
  pointer-events: auto;
  z-index: 10;
  transition: transform 0.2s, opacity 0.2s;
}

#shop-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

#shop-btn:active {
  transform: translateY(0);
}

#pause-menu, #game-over, #shop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(11, 16, 32, 0.95);
  padding: 30px 50px;
  border-radius: 10px;
  border: 2px solid var(--accent);
  text-align: center;
  pointer-events: auto;
}

#shop {
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

#upgrades-list {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upgrade-item {
  background: var(--card);
  padding: 15px;
  border-radius: 5px;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upgrade-item button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
}

.upgrade-item button:hover {
  opacity: 0.8;
}

.upgrade-item button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

#close-shop, #shop-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  font-size: 14px;
  pointer-events: auto;
}

.hidden {
  display: none !important;
}

h2 {
  color: var(--accent);
  margin-bottom: 15px;
  font-size: 24px;
}

p {
  margin: 10px 0;
  font-size: 16px;
}
