/* ==========================================================================
   CLUEDO BOARD
   19x19 CSS grid. Room/cell placement (grid-column/grid-row) is set inline
   by cluedo.html's render code from the CLUEDO_ROOMS/corridor data, so this
   stylesheet only needs to style the element types, not individual cells.
   ========================================================================= */
.cluedo-board-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto 12px auto;
}

.cluedo-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(19, 1fr);
  grid-template-rows: repeat(19, 1fr);
  width: min(94vw, 62vh);
  aspect-ratio: 1 / 1;
  background: #0d2b1a;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.cluedo-room {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px;
  box-sizing: border-box;
  overflow: hidden;
}

.cluedo-room.suggest-target {
  cursor: pointer;
}

.cluedo-room .room-name {
  color: rgba(255, 255, 255, 0.85);
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  line-height: 1.1;
  pointer-events: none;
}

.cluedo-room.dest-highlight {
  background: rgba(255, 235, 59, 0.28);
  border-color: #ffeb3b;
  cursor: pointer;
}

.cluedo-room .room-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
  margin-top: 2px;
}

.cluedo-cell {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  box-sizing: border-box;
}

.cluedo-cell.dest-highlight {
  background: rgba(255, 235, 59, 0.45);
  cursor: pointer;
}

.cluedo-cell.dest-highlight:hover {
  background: rgba(255, 235, 59, 0.7);
}

.cluedo-pawn {
  width: 68%;
  height: 68%;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: bold;
  color: #222;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition:
    left 0.25s ease-in-out,
    top 0.25s ease-in-out;
  z-index: 5;
}

.cluedo-pawn.eliminated {
  opacity: 0.45;
}

.cluedo-weapon-chip {
  font-size: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  border-radius: 4px;
  padding: 1px 3px;
  white-space: nowrap;
}

.cluedo-passage-icon {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

/* ==========================================================================
   DICE / ACTION BAR / STATUS
   ========================================================================= */
.cluedo-dice-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.cluedo-die {
  width: 34px;
  height: 34px;
  background: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  color: #222;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.cluedo-action-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  min-height: 40px;
}

.cluedo-action-bar button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #2e7d32;
  color: white;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
}

.cluedo-action-bar button:hover {
  background: #1b5e20;
}

.cluedo-action-bar button.secondary {
  background: #555;
}

.cluedo-action-bar button.secondary:hover {
  background: #444;
}

.cluedo-action-bar button.danger {
  background: #c62828;
}

.cluedo-action-bar button.danger:hover {
  background: #b71c1c;
}

.status-line {
  text-align: center;
  color: white;
  font-weight: bold;
  min-height: 20px;
  margin-bottom: 4px;
}

.action-note {
  text-align: center;
  color: #ffeb3b;
  font-weight: bold;
  min-height: 18px;
  margin: 0 0 6px 0;
  font-size: 13px;
}

/* ==========================================================================
   SEAT STRIP (all 6 suspects, top of page)
   ========================================================================= */
.cluedo-seat-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.cluedo-seat-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  padding: 3px 9px;
  color: white;
  font-size: 12px;
}

.cluedo-seat-chip.active-turn {
  background: #ffeb3b;
  color: #222;
}

.cluedo-seat-chip.eliminated {
  opacity: 0.5;
  text-decoration: line-through;
}

.cluedo-seat-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.4);
  flex: 0 0 auto;
}

/* ==========================================================================
   SETUP / PICKER MODALS
   ========================================================================= */
.cluedo-suspect-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.cluedo-suspect-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #f0f0f0;
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
  color: #222;
}

.cluedo-suspect-btn.selected {
  border-color: #2e7d32;
  background: #e0f2e1;
}

.cluedo-suspect-btn .cluedo-seat-dot {
  width: 16px;
  height: 16px;
}

.difficulty-options {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 15px 0;
  flex-wrap: wrap;
}

.difficulty-options button {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: #333;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.difficulty-options button:hover {
  background: #444;
}

.difficulty-options button.selected {
  background: #2e7d32;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}

.score-table th,
.score-table td {
  border: 1px solid #ccc;
  padding: 6px 10px;
  text-align: center;
}

/* ==========================================================================
   NOTEPAD / HISTORY (detective log below the board)
   ========================================================================= */
.cluedo-panels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: 900px;
  margin: 0 auto 20px auto;
}

.cluedo-panel {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  flex: 1 1 260px;
  max-height: 260px;
  overflow-y: auto;
}

.cluedo-panel h3 {
  margin: 0 0 6px 0;
  color: white;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notepad-heading {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: bold;
  margin: 8px 0 2px 0;
  text-transform: uppercase;
}

.notepad-heading:first-child {
  margin-top: 0;
}

.notepad-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  color: white;
  font-size: 13px;
}

.notepad-mark {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  flex: 0 0 auto;
}

.notepad-mark.auto {
  background: rgba(198, 40, 40, 0.5);
  cursor: default;
  color: white;
}

.cluedo-history p {
  color: white;
  font-size: 12px;
  margin: 0 0 6px 0;
  line-height: 1.35;
}

/* ==========================================================================
   SUGGESTION / ACCUSATION / DISPROVE / REVEAL MODALS
   ========================================================================= */
.cluedo-room-label {
  font-weight: bold;
  color: #2e7d32;
}

.cluedo-picker-group {
  margin-bottom: 10px;
}

.cluedo-picker-group h4 {
  margin: 0 0 6px 0;
  font-size: 13px;
  color: #555;
}

@media (max-width: 700px) {
  .cluedo-board {
    width: min(98vw, 58vh);
  }

  .cluedo-pawn {
    font-size: 6px;
  }

  .cluedo-room .room-name {
    font-size: 8px;
  }

  .cluedo-die {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }
}
