:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0%, #14532d 0%, #05210f 55%);
  color: #ecfdf5;
}

.header, .hud, .controls {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 0.6rem 0.8rem;
}

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1rem;
}

.header h1, .header p { margin: 0; }
.header p { opacity: 0.8; }

.back {
  color: #bbf7d0;
  font-weight: 700;
  text-decoration: none;
}

.hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-weight: 800;
}

.hud div {
  background: rgba(6, 40, 20, 0.72);
  border: 1px solid rgba(187, 247, 208, 0.25);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
}

.stage {
  position: relative;
  width: min(960px, 100%);
  margin: 0 auto;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #102818;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  touch-action: none;
  cursor: crosshair;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.2rem;
  text-align: center;
  background: rgba(6, 24, 14, 0.82);
}

.overlay.hidden { display: none; }

.overlay h1, #overlay-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
}

.hint {
  max-width: 36rem;
  margin: 0.2rem 0 0.4rem;
  line-height: 1.4;
}

.teams {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}

.teams button {
  min-width: 4.4rem;
  border: 3px solid transparent;
  border-radius: 12px;
  padding: 0.55rem 0.45rem;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.teams button.on { border-color: #fef08a; }

.sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.sizes button {
  border: 3px solid transparent;
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: #14532d;
  color: #ecfdf5;
}

.sizes button.on { border-color: #fef08a; }

.overlay-actions {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

#start, #next, .overlay-actions button {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.3rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: #facc15;
  color: #422006;
}

#cup {
  background: #22c55e;
  color: #052e16;
}

.is-hidden { display: none !important; }

.pad {
  width: min(960px, 100%);
  margin: 0.6rem auto 0;
  padding: 0 0.8rem;
  display: flex;
  gap: 0.5rem;
}

.pad button {
  flex: 1;
  border: 0;
  border-radius: 14px;
  padding: 0.75rem 0.5rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: #0ea5e9;
  color: #082f49;
  touch-action: none;
}

.controls {
  opacity: 0.75;
  font-size: 0.92rem;
}
