:root {
  --primary: #0984E3;
  --secondary: #74B9FF;
  --accent: #FDCB6E;
  --background: #0A0F1A;
  --text: #FFFFFF;
  --font-family: 'Inter', system-ui, sans-serif;
  --radius: 12px;
}

body {
  background-color: var(--background);
  color: var(--text);
  font-family: var(--font-family);
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
}

.game-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats {
  display: flex;
  gap: 20px;
  font-size: 1.1em;
  font-weight: 500;
}

.controls {
  display: flex;
  gap: 10px;
}

button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

button:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

button:disabled {
  background: #333;
  cursor: not-allowed;
  transform: none;
}

canvas {
  background: #111;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.05);
}

.tower-panel {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
}

.tower-select {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
  border: 2px solid transparent;
}

.tower-select:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tower-select.selected {
  border-color: var(--accent);
  background: rgba(253, 203, 110, 0.1);
}

.tower-preview {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-bottom: 5px;
}

.tower-preview.basic { background: blue; }
.tower-preview.rapid { background: cyan; }
.tower-preview.sniper { background: purple; }

.modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  border-radius: var(--radius);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--background);
  padding: 40px;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--primary);
  box-shadow: 0 0 20px rgba(9, 132, 227, 0.3);
}

h2 {
  color: var(--accent);
  margin-top: 0;
}

#upgrade-panel {
  position: absolute;
  bottom: 150px;
  right: 20px;
  background: rgba(10, 26, 26, 0.9);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  width: 200px;
}

#upgrade-panel h3 {
  margin-top: 0;
  color: var(--secondary);
}

#upgrade-panel.hidden {
  display: none;
}
