/* ========== GLOBAL ========== */
body, html {
  margin: 0;
  background: linear-gradient(to bottom right, #14532d, #065f46);
  font-family: system-ui, sans-serif;

  /* větší karty */
  --card-w: 108px;   /* zvětšeno z ~82px */
}

/* ░░░  JEDEN ZELENÝ STŮL  ░░░ */
.table-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #14532d;
  border: 2px solid #0d4322;
  padding: 18px;
  margin: 0;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* nová info-linie */
.info-line {
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  text-align: center;
}

.top-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ───────── sloty pro štych ───────── */
.trick-slots {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--card-w);
}

/* Držák = přesně podle rozměru obrázku (žádné aspect-ratio, žádný ořez) */
.card-holder {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* držák nemá vlastní výšku – převezme ji z obrázku */
  width: var(--card-w);
  /* žádný aspect-ratio zde! */

  border: 2px dashed rgba(255, 255, 255, .35);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, .05);

  position: relative;
  overflow: visible; /* nic neořezávat */
}
.card-holder.winner {
  outline: 3px solid gold;
  outline-offset: 0;
}

/* Děti nejsou absolutní – ať drží rozměr holderu */
.card-holder > * {
  position: static !important;
  inset: auto !important;
}

/* Obrázek karty řídí velikost holderu */
.card-holder .card-img {
  width: var(--card-w) !important;  /* řídí šířku */
  height: auto !important;          /* výška z poměru obrázku = bez ořezu */
  display: block;
  border-radius: 0.75rem;           /* srazí rohy stejně jako holder */
  object-fit: fill;                  /* jistota, ale bez vlivu díky height:auto */
}

.slot-name {
  margin-top: 4px;
  font-size: .75rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
  white-space: nowrap;
}

/* ───────── tabulka závazků ───────── */
.bid-table {
  width: 160px;
  border-collapse: separate;
  border-spacing: 0;
  color: #fff;
  font-variant-numeric: tabular-nums;
  border-radius: 0.5rem;
  overflow: hidden;
}
.bid-table th {
  background: rgba(0, 0, 0, .3);
  font-weight: 600;
  padding: 6px 8px;
  font-size: .85rem;
}
.bid-table td {
  background: rgba(255, 255, 255, .08);
  padding: 6px 8px;
  border-top: 1px solid rgba(255, 255, 255, .15);
  font-size: .85rem;
}
.bid-table tr.current td {
  background: #fff4d6;
  color: #000;
}
.bid-table td span {
  display: inline-block;
  min-width: 1.2em;
  text-align: center;
}

/* ───────── box hráče ───────── */
.player-box {
  width: 100%;
  max-width: 830px;
  min-height: 320px;
  margin-top: 18px;
  position: relative;
}
.player-box > * {
  position: absolute;
  inset: 0;
}

/* ───────── drobnosti ───────── */
button {
  margin-right: 8px;
  padding: 6px 14px;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  background: #059669;
  color: #fff;
  font-weight: bold;
  transition: background-color 0.2s, transform 0.2s;
}
button:hover {
  background: #047857;
  transform: scale(1.02);
}
button.secondary {
  background: #4b5563;
}
button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.hand {
  border: 2px solid #0d4322;
  border-radius: 0.75rem;
  background: #14532d;
  color: #fff;
  padding: 16px;
}
.hand.active {
  outline: 2px dashed rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.hand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
h3 {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
}

.badge {
  background: gold;
  color: #000;
  font-size: .65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.tricks,
.player-bid,
.player-trump,
.waiting,
.subtitle {
  font-size: .85rem;
  margin: 4px 0;
  color: #fff;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.cards.play {
  cursor: pointer;
}
.cards.play .disabled {
  opacity: .4;
  pointer-events: none;
}

.trump-select {
  margin: 6px 0;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.chip {
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  user-select: none;
  transition: background .2s, color .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff;
}
.chip.active {
  background: #fff;
  color: #000;
}
.hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.ok {
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-weight: bold;
}
.ok:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* ───────── hráči ───────── */
.players-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  width: 100%;
}

.player-self {
  width: 100%;
  max-width: 880px;
  min-height: 320px;
  position: relative;
}
.player-self.active {
  outline: 2px dashed yellow;
  outline-offset: 2px;
}
.player-self > * {
  position: absolute;
  inset: 0;
}

.opponents-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.opponent-box {
  background: #14532d;
  border: 2px solid #0d4322;
  border-radius: 0.75rem;
  padding: 12px;
  width: 200px;
  min-height: 120px;
  color: white;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.opponent-box.active {
  outline: 2px dashed yellow;
  outline-offset: 2px;
}

.opponent-info .name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.opponent-info p {
  font-size: 0.85rem;
  margin: 2px 0;
}

/* ========== RESPONSIVE zvětšené karty ========== */
@media (max-width: 480px) {
  :root { --card-w: 84px; }   /* dříve 64px/72px */
}
@media (max-width: 350px) {
  :root { --card-w: 72px; }   /* dříve 54px/60px */
}
