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

.action-message {
  text-align: center;
  color: #ffcdd2;
  font-weight: bold;
  min-height: 20px;
  margin: 0 0 8px 0;
}

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

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

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

.opponent-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: white;
  margin-bottom: 12px;
}

.seat-name {
  font-weight: bold;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 10px;
  border-radius: 10px;
}

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

.seat-score {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.seat-bottom-info {
  text-align: center;
  color: white;
  margin-bottom: 8px;
}

/* ==========================================================================
   TILES
   ========================================================================= */
.rk-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 56px;
  flex: 0 0 auto;
  background: #f5f0e6;
  border: 1px solid #c8bfa8;
  border-radius: 6px;
  font-weight: bold;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
  user-select: none;
  transition: transform 0.1s;
}

.rk-tile.rk-red {
  color: #c62828;
}

.rk-tile.rk-blue {
  color: #1565c0;
}

.rk-tile.rk-yellow {
  color: #f9a825;
}

.rk-tile.rk-black {
  color: #212121;
}

.rk-tile.rk-joker {
  color: #6a1b9a;
  font-size: 22px;
}

.rk-tile.rk-selected {
  outline: 3px solid #ffeb3b;
  transform: translateY(-6px);
}

.rk-gap {
  width: 14px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.rk-gap:hover {
  background: rgba(255, 235, 59, 0.4);
}

/* ==========================================================================
   BOARD
   ========================================================================= */
.board-area {
  max-width: 900px;
  margin: 0 auto 10px auto;
  min-height: 60px;
  padding: 0 4px;
}

.rk-set {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  overflow-x: auto;
}

.rk-set.rk-set-invalid {
  outline: 2px dashed #e53935;
}

.new-set-zone {
  display: block;
  width: auto;
  margin: 0 auto 15px auto;
  padding: 10px 20px;
  border: 2px dashed rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: transparent;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

/* ==========================================================================
   POOL
   ========================================================================= */
.pool-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 15px 0;
}

.pile {
  position: relative;
  width: 70px;
  height: 90px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.pile .card-back {
  width: 100%;
  height: 100%;
  margin: 0;
}

.pile.clickable {
  cursor: pointer;
  box-shadow: 0 0 0 3px #ffeb3b;
}

.pile.clickable:hover {
  transform: translateY(-4px);
}

.pile-count {
  position: absolute;
  bottom: -10px;
  right: -10px;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 10px;
  padding: 2px 7px;
}

.pile-label {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  margin-top: 6px;
}

/* ==========================================================================
   RACK & ACTIONS
   ========================================================================= */
.rk-return-zone {
  display: flex;
  align-items: center;
  padding: 0 12px;
  height: 56px;
  border-radius: 6px;
  background: rgba(255, 235, 59, 0.25);
  border: 2px dashed #ffeb3b;
  color: white;
  font-weight: bold;
  cursor: pointer;
  margin-right: 6px;
  flex: 0 0 auto;
}

.rack-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
  padding: 0 4px 20px 4px;
}

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

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

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

#resetBtn,
#sortRackBtn {
  background: #555;
}

#resetBtn:hover,
#sortRackBtn:hover {
  background: #444;
}

#drawBtn {
  background: #c62828;
}

#drawBtn:hover {
  background: #b71c1c;
}

.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;
}

@media (max-width: 700px) {
  .rk-tile,
  .rk-gap {
    width: 32px;
    height: 46px;
    font-size: 16px;
  }

  .pile {
    width: 54px;
    height: 70px;
  }
}
