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

html, body {
  width: 100%; height: 100%;
  background: #0d1117;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #e0e0e0;
  overflow: hidden;
}

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

#game-canvas {
  display: block;
  cursor: pointer;
  border: 2px solid #3a3a5e;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
}

/* Overlay screens */
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 30, 0.88);
  border-radius: 6px;
  gap: 18px;
  padding: 30px;
  text-align: center;
}

#overlay.hidden { display: none; }

#overlay h1 {
  font-size: 2.2rem;
  color: #f5c400;
  text-shadow: 0 2px 12px rgba(245,196,0,0.4);
  letter-spacing: 2px;
}

#overlay h2 {
  font-size: 1.4rem;
  color: #aad4ff;
}

#overlay p {
  font-size: 0.95rem;
  color: #a0b0c0;
  max-width: 420px;
  line-height: 1.6;
}

.btn {
  padding: 12px 36px;
  font-size: 1.05rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover { transform: scale(1.04); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: #3a7acc;
  color: #fff;
}
.btn-primary:hover { background: #4a8adc; }

.btn-secondary {
  background: #3a3a5e;
  color: #c0c8e0;
}
.btn-secondary:hover { background: #4a4a6e; }

#result-line {
  font-size: 1.6rem;
  font-weight: bold;
}
.result-win  { color: #f5c400; }
.result-lose { color: #4488ff; }
.result-draw { color: #88aacc; }

/* Legend */
#legend {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #606880;
  text-align: center;
}
