* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%);
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}
.game-wrap {
  background: rgba(0,0,0,0.35);
  border-radius: 20px;
  padding: 24px;
  max-width: 840px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
h1 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 16px;
}
.sub {
  display: block;
  font-size: 14px;
  font-weight: normal;
  opacity: 0.8;
  margin-top: 4px;
}
.scoreboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: bold;
}
.team .pts {
  font-size: 32px;
  margin-top: 4px;
}
.red .pts { color: #f87171; }
.blue .pts { color: #60a5fa; }
.vs { font-size: 20px; opacity: 0.7; }
canvas {
  width: 100%;
  background: linear-gradient(to bottom, #87ceeb 0%, #a7f3d0 70%, #65a30d 70%);
  border-radius: 12px;
  display: block;
  margin-bottom: 12px;
}
.power-wrap { margin-bottom: 12px; }
.power-label { font-size: 12px; opacity: 0.8; margin-bottom: 4px; }
.power-bar {
  height: 14px;
  background: rgba(255,255,255,0.15);
  border-radius: 7px;
  overflow: hidden;
}
.power-fill {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #f87171, #fbbf24, #60a5fa);
  transition: width 0.3s;
}
.question-box {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  text-align: center;
}
.q-text { font-size: 16px; margin-bottom: 10px; line-height: 1.4; }
#qAnswer {
  width: 120px;
  padding: 8px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
  text-align: center;
  margin-right: 8px;
}
#submitBtn, #startBtn, #resetBtn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  background: #fbbf24;
  color: #000;
  margin: 2px;
}
#submitBtn:disabled { opacity: 0.5; cursor: not-allowed; }
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
#levelSel {
  padding: 8px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
}
.status {
  text-align: center;
  font-size: 16px;
  min-height: 24px;
  font-weight: bold;
}
