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

body {
  background: #1a1a2e;
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #eee;
}

#game-container {
  background: #16213e;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}

/* 顶栏 */
#top-bar {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 16px;
}
.stat {
  background: #0f3460;
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 18px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.stat span:last-child {
  font-weight: bold;
  color: #f0c040;
  min-width: 32px;
  text-align: right;
}

/* 主区域：画布 + 侧边栏 */
#main-area {
  display: flex;
  gap: 16px;
}

canvas {
  background: #2d5a27;
  border-radius: 12px;
  display: block;
  cursor: crosshair;
}

/* 炮塔选择栏 */
#tower-panel {
  width: 180px;
  background: #0f3460;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#tower-panel h3 {
  text-align: center;
  font-size: 16px;
  border-bottom: 1px solid #1a1a4e;
  padding-bottom: 8px;
}

.tower-card {
  background: #1a1a4e;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  border: 2px solid transparent;
}
.tower-card:hover {
  background: #2a2a6e;
  transform: translateY(-1px);
}
.tower-card.selected {
  border-color: #f0c040;
  background: #2a2a5e;
}
.tower-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.tower-info {
  display: flex;
  flex-direction: column;
  font-size: 13px;
}
.tower-info strong { font-size: 14px; }
.tower-info small { color: #aaa; font-size: 11px; }

#startWaveBtn {
  margin-top: 4px;
  padding: 10px;
  background: #e67e22;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background .15s;
}
#startWaveBtn:hover { background: #d35400; }
#startWaveBtn:disabled {
  background: #555;
  cursor: not-allowed;
}

#selected-info {
  font-size: 12px;
  color: #aaa;
  text-align: center;
  margin-top: auto;
  padding-top: 8px;
}
