/* ==========================================================================
   HEARTS BOARD LAYOUT (4-seat cross layout + center trick zone)
   ========================================================================= */
.table {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto 15px auto;
  align-items: center;
}

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

.seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: white;
}

.seat-top {
  grid-column: 2;
  grid-row: 1;
}

.seat-left {
  grid-column: 1;
  grid-row: 2;
}

.seat-right {
  grid-column: 3;
  grid-row: 2;
}

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

.cardback-fan {
  position: relative;
  height: 82px;
  width: 120px;
}

.cardback-fan .card-back {
  position: absolute;
  width: 56px;
  height: 81px;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.cardback-fan .fan-count {
  position: absolute;
  bottom: -2px;
  right: 0;
}

.hand-score-badge {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border-radius: 8px;
  padding: 0 6px;
}

.seat-bottom-info .hand-score-badge {
  margin-left: 8px;
}

.trick-zone {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  width: 340px;
  height: 290px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.trick-card {
  position: absolute;
  width: 90px;
  height: 130px;
}

.trick-card.pos-bottom {
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
}

.trick-card.pos-top {
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
}

.trick-card.pos-left {
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
}

.trick-card.pos-right {
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
}

.hand-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.hand-row .card-slot {
  position: relative;
  width: 100px;
}

.hand-row .card-img {
  cursor: pointer;
  transition: transform 0.15s;
}

.hand-row .card-img.playable:hover {
  transform: translateY(-8px);
}

.hand-row .card-img.unplayable {
  opacity: 0.5;
  cursor: default;
}

.hand-row .card-img.selected-card {
  transform: translateY(-10px);
}

.pass-bar {
  max-width: 900px;
  margin: 0 auto 10px auto;
  text-align: center;
  color: white;
}

.pass-bar button {
  margin-top: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  background: #2e7d32;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.pass-bar button:disabled {
  background: #555;
  cursor: not-allowed;
  opacity: 0.6;
}

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

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

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

@media (max-width: 700px) {
  .trick-zone {
    width: 190px;
    height: 170px;
  }

  .trick-card {
    width: 46px;
    height: 67px;
  }

  .hand-row .card-slot {
    width: 46px;
  }

  .cardback-fan {
    width: 60px;
    height: 44px;
  }

  .cardback-fan .card-back {
    width: 30px;
    height: 44px;
  }
}
