/* Tema Halloween condiviso dai giochi in public/games/ */
:root {
  --size: min(92vw, 460px);
  --gap: calc(var(--size) * 0.025);
  --bg: #120a1f;
  --text: #e9dcc9;
  --muted: #b7a6c9;
  --board: #2a1840;
  --cell: #3b2459;
  --cell-hi: #4d2f6e;
  --orange: #ff7518;
  --orange-hi: #ff9a3c;
  --purple: #7b3fa0;
  --slime: #8bd450;
  --blood: #ff4d6d;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 85% 8%, #fff6d6 0 38px, rgba(255, 240, 190, .35) 40px, transparent 120px),
    radial-gradient(ellipse at 50% 120%, #3a1458 0%, transparent 60%),
    linear-gradient(180deg, #0b0614 0%, var(--bg) 60%, #1d0f2e 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
  display: flex;
  justify-content: center;
  padding: 24px 0;
}
.wrap { width: var(--size); }
header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
h1 {
  font-family: "Creepster", "Clear Sans", cursive;
  font-size: clamp(36px, 10vw, 58px);
  margin: 0;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--orange);
  text-shadow: 0 0 12px rgba(255, 117, 24, .7), 0 4px 0 #5a1d00;
}
.scores { display: flex; gap: 6px; }
.score {
  background: var(--board);
  color: #fff;
  border: 1px solid var(--cell-hi);
  border-radius: 6px;
  padding: 6px 12px;
  text-align: center;
  min-width: 66px;
}
.score span { display: block; font-size: 11px; text-transform: uppercase; color: var(--orange-hi); }
.score b { font-size: 20px; }
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.bar p { margin: 0; font-size: 15px; }
strong { color: var(--orange-hi); }
button { font: inherit; }
.btn {
  background: var(--orange);
  color: #1a0b00;
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(255, 117, 24, .45);
}
.btn:hover { background: var(--orange-hi); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost {
  background: var(--board);
  color: var(--text);
  border: 1px solid var(--cell-hi);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--cell); }
.seg { display: inline-flex; border: 1px solid var(--cell-hi); border-radius: 6px; overflow: hidden; }
.seg button {
  background: var(--board);
  color: var(--muted);
  border: 0;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}
.seg button.active { background: var(--purple); color: #fff; }
.panel {
  position: relative;
  background: var(--board);
  border-radius: 8px;
  padding: var(--gap);
  box-shadow: 0 0 30px rgba(123, 63, 160, .55), inset 0 0 20px rgba(0, 0, 0, .5);
}
.msg { min-height: 1.5em; margin: 12px 0 0; text-align: center; font-weight: 700; }
.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  border-radius: 8px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: rgba(11, 6, 20, 0.88);
  text-align: center;
  animation: fade 400ms ease;
}
.overlay.show { display: flex; }
.overlay h2 {
  margin: 0;
  font-family: "Creepster", cursive;
  font-weight: 400;
  font-size: clamp(32px, 9vw, 52px);
  letter-spacing: 2px;
  color: var(--orange);
  text-shadow: 0 0 14px rgba(255, 117, 24, .6);
}
.overlay p { margin: 0; font-size: 17px; font-weight: 700; }
.overlay .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.help { margin-top: 16px; font-size: 14px; line-height: 1.5; color: var(--muted); }
