/* ===== BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0b1220;
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px 40px;
  line-height: 1.4;
}

/* ===== WATERMARKS ===== */
.watermark {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.06;
  z-index: 0;
  pointer-events: none;
}

.watermark.left { left: 20px; }
.watermark.right { right: 20px; }

.watermark img {
  height: 220px;
  width: auto;
  filter: invert(1);
}

/* ===== DASHBOARD ===== */
.dashboard {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 920px;
  width: 100%;
}

.dashboard-logo {
  max-height: 72px;
  margin-bottom: 10px;
  filter: invert(1);
}

.dashboard h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.dashboard .subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.game-card {
  background: #1e293b;
  border: 2px solid #334155;
  color: #e2e8f0;
  text-decoration: none;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 10px;
  line-height: 1.25;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.game-card:hover {
  border-color: #38bdf8;
  background: #273549;
  transform: translateY(-2px);
}

/* ===== GAME PAGE ===== */
.game-container {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: 100%;
  text-align: center;
}

.back-link {
  display: inline-block;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.back-link:hover {
  color: #38bdf8;
}

#category-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* Mode buttons */
.mode-btn {
  background: #1e293b;
  border: 2px solid #334155;
  color: #e2e8f0;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin: 6px;
  transition: all 0.15s ease;
}

.mode-btn:hover {
  border-color: #38bdf8;
  background: #273549;
}

/* Score + status */
.score-box {
  background: #1e293b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  color: #38bdf8;
  margin: 8px 0 6px;
}

.highscore-box {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 16px;
}

.turn-indicator {
  font-size: 1.1rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 10px;
  min-height: 26px;
}

.player-scores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 20px;
  margin: 8px 0 14px;
  font-size: 0.9rem;
  color: #cbd5e1;
}

/* Input */
.input-area {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

#player-input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid #334155;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 1rem;
  outline: none;
}

#player-input:focus {
  border-color: #38bdf8;
}

#submit-btn {
  background: #38bdf8;
  color: #0f172a;
  border: none;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

#submit-btn:hover {
  background: #7dd3fc;
}

#submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Messages */
#message {
  min-height: 22px;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

#message.success { color: #4ade80; }
#message.error { color: #f87171; }

/* Answers */
.answers-section {
  text-align: left;
  background: #1e293b;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 8px;
}

.answers-section h3 {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 10px;
  font-weight: 600;
}

#correct-list,
#p1-correct-list,
#p2-correct-list,
#p3-correct-list,
#p4-correct-list,
#incorrect-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#correct-list li,
#p1-correct-list li,
#p2-correct-list li,
#p3-correct-list li,
#p4-correct-list li {
  background: #14532d;
  color: #bbf7d0;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

#incorrect-list li {
  background: #7f1d1d;
  color: #fecaca;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.incorrect-section {
  margin-top: 14px;
  border-top: 1px solid #334155;
  padding-top: 12px;
}

.incorrect-section h3 {
  color: #f87171;
}

/* Multiplayer answer columns */
#multi-answers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.player-answers {
  flex: 1 1 130px;
  background: #0f172a;
  border-radius: 10px;
  padding: 10px;
}

/* Buttons */
.button-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.finish-btn {
  background: #334155;
  color: #e2e8f0;
  border: none;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.finish-btn:hover {
  background: #475569;
}

.reveal-btn {
  background: #7c3aed;
  color: #f5f3ff;
  border: none;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.reveal-btn:hover {
  background: #8b5cf6;
}

/* Player count buttons */
.player-count {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
}

.count-btn {
  background: #1e293b;
  border: 2px solid #334155;
  color: #94a3b8;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.count-btn.active {
  border-color: #38bdf8;
  color: #e2e8f0;
  background: #273549;
}

#multi-setup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 280px;
  margin: 0 auto 16px;
}

#multi-setup input {
  padding: 11px 14px;
  border-radius: 10px;
  border: 2px solid #334155;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 1rem;
  outline: none;
}

#multi-setup input:focus {
  border-color: #38bdf8;
}

/* Mobile */
@media (max-width: 500px) {
  .game-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .game-card {
    font-size: 0.88rem;
    padding: 12px 8px;
  }

  .watermark img {
    height: 140px;
  }
}

/* ===== HEADER ===== */
h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #f8fafc;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 24px;
}

/* ===== SCORE + CONTROLS ===== */
.controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

#score {
  background: #1e293b;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.05rem;
  color: #38bdf8;
}

#reset-btn {
  background: #334155;
  color: #f1f5f9;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

#reset-btn:hover {
  background: #475569;
}

/* ===== MESSAGE ===== */
#message {
  min-height: 28px;
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

#message.success {
  color: #4ade80;
}

#message.error {
  color: #f87171;
}

/* ===== GRID ===== */
#grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 480px;
}

/* ===== CELLS ===== */
.cell {
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 12px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.cell:hover:not(.correct):not(.wrong) {
  border-color: #38bdf8;
  background: #273549;
  transform: translateY(-2px);
}

.cell .label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.3;
  padding: 4px;
}

.cell .answer {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
}

/* ===== STATES ===== */
.cell.correct {
  background: #14532d;
  border-color: #22c55e;
  cursor: default;
}

.cell.correct .answer {
  color: #bbf7d0;
}

.cell.wrong {
  background: #7f1d1d;
  border-color: #ef4444;
  cursor: default;
}

.cell.wrong .answer {
  color: #fecaca;
}

/* ===== FOOTER ===== */
.footer {
  margin-top: 32px;
  font-size: 0.8rem;
  color: #64748b;
  text-align: center;
}

/* ===== MOBILE ===== */
@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  #grid {
    gap: 8px;
  }

  .cell .label {
    font-size: 0.78rem;
  }

  .cell .answer {
    font-size: 0.88rem;
  }
}.logo-container {
  margin-bottom: 16px;
  text-align: center;
}

.logo {
  max-height: 80px;
  width: auto;
  display: block;
  margin: 0 auto;
  filter: invert(1); /* makes the black logo white so it shows on the dark background */
}.watermark {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.07;
}

.watermark img {
  width: 260px;
  max-width: 35vw;
  height: auto;
  filter: invert(1);
}

.watermark.left {
  left: 25px;
}

.watermark.right {
  right: 25px;
}/* ===== DASHBOARD ===== */
.dashboard {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  width: 100%;
  margin-top: 10px;
  padding: 0 12px;
}

.dashboard-logo {
  max-height: 80px;
  width: auto;
  margin-bottom: 12px;
  filter: invert(1);
}

.dashboard h1 {
  margin-bottom: 4px;
}

.dashboard .subtitle {
  margin-bottom: 28px;
}

.game-list {
  display: grid;
 grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.game-card {
  background: #1e293b;
  border: 2px solid #334155;
  color: #e2e8f0;
  text-decoration: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  aspect-ratio: 1 / 1;          /* makes them square */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 12px;
  line-height: 1.25;
}

.game-card:hover {
  border-color: #38bdf8;
  background: #273549;
  transform: translateY(-3px);
}

/* Mobile adjustment */
@media (max-width: 500px) {
  .game-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .game-card {
    font-size: 0.9rem;
    padding: 12px 8px;
  }
}
/* ===== GAME PAGE ===== */
.game-container {
  position: relative;
  z-index: 1;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.back-link {
  display: inline-block;
  color: #94a3b8;
  text-decoration: none;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.back-link:hover {
  color: #38bdf8;
}

.score-box {
  background: #1e293b;
  display: inline-block;
  padding: 8px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.15rem;
  color: #38bdf8;
  margin: 12px 0 24px;
}

.input-area {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

#player-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid #334155;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 1rem;
  outline: none;
}

#player-input:focus {
  border-color: #38bdf8;
}

#submit-btn {
  background: #38bdf8;
  color: #0f172a;
  border: none;
  padding: 0 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

#submit-btn:hover {
  background: #7dd3fc;
}

.answers-section {
  margin-top: 28px;
  text-align: left;
  background: #1e293b;
  border-radius: 12px;
  padding: 16px 20px;
  min-height: 120px;
}

.answers-section h3 {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

#correct-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#correct-list li {
  background: #14532d;
  color: #bbf7d0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.finish-btn {
  margin-top: 24px;
  background: #334155;
  color: #e2e8f0;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}

.finish-btn:hover {
  background: #475569;
}.button-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.reveal-btn {
  background: #7c3aed;
  color: #f5f3ff;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}

.reveal-btn:hover {
  background: #8b5cf6;
}.highscore-box {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #94a3b8;
}

.timer {
  color: #fbbf24;
}.mode-btn {
  background: #1e293b;
  border: 2px solid #334155;
  color: #e2e8f0;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  margin: 8px;
  transition: all 0.2s;
}

.mode-btn:hover {
  border-color: #38bdf8;
  background: #273549;
}

#multi-setup {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 280px;
  margin: 0 auto 20px;
}

#multi-setup input {
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid #334155;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 1rem;
  outline: none;
}

#multi-setup input:focus {
  border-color: #38bdf8;
}

.turn-indicator {
  font-size: 1.15rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 12px;
  min-height: 28px;
}

.player-scores {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 10px 0 16px;
  font-size: 0.95rem;
  color: #cbd5e1;
}#multi-answers {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.player-answers {
  flex: 1;
  background: #0f172a;
  border-radius: 10px;
  padding: 12px;
}

.player-answers h3 {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 10px;
}

.incorrect-section {
  margin-top: 16px;
  border-top: 1px solid #334155;
  padding-top: 14px;
}

.incorrect-section h3 {
  font-size: 0.9rem;
  color: #f87171;
  margin-bottom: 10px;
}

#incorrect-list li {
  background: #7f1d1d;
  color: #fecaca;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin: 4px 4px 0 0;
  display: inline-block;
}.player-count {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
}

.count-btn {
  background: #1e293b;
  border: 2px solid #334155;
  color: #94a3b8;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.count-btn.active {
  border-color: #38bdf8;
  color: #e2e8f0;
  background: #273549;
}

#multi-answers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.player-answers {
  flex: 1 1 140px;
  min-width: 120px;
}/* Current player highlight */
.player-scores .current-player {
  color: #38bdf8;
  font-weight: 700;
}

.player-answers.current-player {
  border: 2px solid #38bdf8;
  background: #1e293b;
}

/* Ranking */
.ranking {
  background: #1e293b;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 12px 0;
  text-align: left;
}

.ranking h3 {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 10px;
}

.ranking ol {
  padding-left: 20px;
  color: #e2e8f0;
}

.ranking li {
  margin-bottom: 4px;
  font-weight: 500;
}

/* Rematch button */
.rematch-btn {
  background: #0ea5e9;
  color: #0f172a;
  border: none;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.rematch-btn:hover {
  background: #38bdf8;
}