* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #060c1a;
  color: #eef2ff;
}
body {
  min-height: 100vh;
}
.hidden { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: linear-gradient(180deg, #0d1830 0%, #060c1a 100%);
  border-bottom: 2px solid #1c2b4a;
}
.topbar h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 2px;
  color: #ff2d4d;
  text-shadow: 0 0 12px rgba(255,45,77,0.6);
}
.topbar .actions button {
  margin-left: 8px;
}

/* ---------- Buttons ---------- */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  transition: transform .08s ease, box-shadow .15s ease;
}
button:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(180deg, #2f6bff, #1948c9);
  color: #fff;
  box-shadow: 0 4px 14px rgba(41,90,255,0.4);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(41,90,255,0.6); }
.btn-danger {
  background: linear-gradient(180deg, #ff4d6d, #c9163b);
  color: #fff;
}
.btn-secondary {
  background: #1c2b4a;
  color: #cdd8f5;
}
.btn-secondary:hover { background: #263a63; }
.btn-ghost {
  background: transparent;
  color: #8ea0d0;
  border: 1px solid #29406e;
}

/* ---------- Board grid ---------- */
.board-wrap {
  padding: 24px;
  max-width: 1500px;
  margin: 0 auto;
}
.board {
  display: grid;
  grid-auto-flow: column;
  gap: 10px;
  width: 100%;
}
.category-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.category-header {
  background: linear-gradient(180deg, #ff3b57, #b6122f);
  color: #fff;
  text-align: center;
  padding: 14px 8px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(182,18,47,0.35);
}
.tile {
  background: linear-gradient(180deg, #1e3f8f, #142c66);
  border: 1px solid #2c4c9e;
  border-radius: 8px;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  padding: 22px 8px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 4px 12px rgba(20,44,102,0.5);
  cursor: pointer;
  user-select: none;
  transition: transform .1s ease, box-shadow .15s ease;
}
.tile:hover:not(.tile-empty) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(47,107,255,0.5);
}
.tile-empty {
  background: #0c1730;
  border-color: #16223f;
  color: #2c3a5e;
  cursor: default;
  box-shadow: none;
}
.tile-icon { font-size: 15px; opacity: 0.85; display: block; margin-top: 4px; }

/* ---------- Modal (player question overlay) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,7,18,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-card {
  background: linear-gradient(180deg, #10203f, #0a1730);
  border: 1px solid #2b4482;
  border-radius: 16px;
  padding: 36px 44px;
  max-width: 900px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.modal-cat {
  color: #ff5470;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 14px;
  margin-bottom: 4px;
}
.modal-points {
  font-size: 40px;
  font-weight: 800;
  color: #ffd23f;
  margin-bottom: 18px;
}
.modal-question {
  font-size: 24px;
  line-height: 1.5;
  margin: 18px 0;
}
.modal-image {
  max-width: 100%;
  max-height: 360px;
  border-radius: 10px;
  margin: 16px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.modal-answer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed #2b4482;
  font-size: 22px;
  color: #6bffb0;
  font-weight: 700;
}
.modal-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.audio-play-btn {
  background: linear-gradient(180deg, #ffd23f, #e0a800);
  color: #2a1e00;
  font-size: 18px;
  padding: 16px 28px;
  border-radius: 50px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a1123; }
::-webkit-scrollbar-thumb { background: #2b4482; border-radius: 6px; }
