/* Tailwind ile karşılanamayan stiller: kart görselleri, masa zemini, animasyonlar */

:root {
  --red: #dc2626;
  --black: #18181b;
  --card-bg: #fafaf9;
  --card-back: #1e3a8a;
}

/* Masa zemini */
.batak-felt {
  background:
    radial-gradient(ellipse at center, #15803d 0%, #064e3b 70%, #022c22 100%);
  box-shadow: inset 0 0 60px rgba(0,0,0,0.45);
}

/* ============ Kartlar ============ */
.card {
  width: 64px;
  height: 92px;
  background: var(--card-bg);
  color: var(--black);
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px 7px;
  font-weight: 700;
  user-select: none;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, margin 0.15s ease;
  border: 1px solid rgba(0,0,0,0.12);
  font-family: 'Georgia', serif;
}
.card.red { color: var(--red); }
.card .rank-top, .card .rank-bottom {
  font-size: 14px;
  line-height: 1;
}
.card .rank-bottom { transform: rotate(180deg); align-self: flex-end; }
.card .suit-big {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
}

/* Kart arkası */
.card.back {
  background:
    repeating-linear-gradient(45deg, var(--card-back) 0 6px, #1e40af 6px 12px);
  color: transparent;
  border: 1px solid #1e3a8a;
}
.card.back::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid #fbbf24;
  border-radius: 4px;
  opacity: 0.6;
}

/* ============ Eller ============ */
/* Alt (insan) — fan yapısı */
.hand-bottom .card {
  margin-left: -34px;
}
.hand-bottom .card:first-child { margin-left: 0; }
.hand-bottom .card.playable { cursor: pointer; }
.hand-bottom .card.playable:hover {
  transform: translateY(-16px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.6);
  z-index: 5;
}
.hand-bottom .card.disabled {
  opacity: 0.5;
  filter: grayscale(0.6);
  cursor: not-allowed;
}

/* Üst (Bot 2) */
.hand-top .card {
  width: 38px;
  height: 54px;
  margin-left: -28px;
  padding: 3px 4px;
}
.hand-top .card:first-child { margin-left: 0; }
.hand-top .card .suit-big { font-size: 16px; }
.hand-top .card .rank-top, .hand-top .card .rank-bottom { font-size: 9px; }

/* Yan (sol/sağ — Bot 1 / Bot 3) */
.hand-side .card {
  width: 44px;
  height: 38px;
  margin-top: -20px;
  padding: 3px 4px;
}
.hand-side .card:first-child { margin-top: 0; }
.hand-side .card .suit-big { font-size: 14px; }
.hand-side .card .rank-top, .hand-side .card .rank-bottom { font-size: 9px; }

/* ============ Trick alanı ============ */
.trick-slot .card {
  animation: dropIn 0.25s ease;
}
@keyframes dropIn {
  from { transform: scale(1.25) translateY(-15px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* ============ Aktif oyuncu vurgusu ============ */
.seat.active .player-info {
  box-shadow: 0 0 0 2px #fbbf24, 0 0 14px rgba(251,191,36,0.6);
  background: rgba(251,191,36,0.12);
}

/* Dummy (eşli modda açılan el) — küçük badge */
.dummy-badge {
  font-size: 9px;
  letter-spacing: 1px;
  padding: 1px 4px;
  border: 1px solid #fbbf24;
  border-radius: 3px;
  background: rgba(251,191,36,0.15);
}

/* Dummy hand etkileşimi: yan ve üstteki açık eller tıklanabilir olduğunda */
.hand-top .card.playable,
.hand-side .card.playable {
  cursor: pointer;
}
.hand-top .card.playable:hover {
  transform: translateY(8px) scale(1.15);
  z-index: 5;
  box-shadow: 0 6px 14px rgba(0,0,0,0.6);
}
.hand-side .card.playable:hover {
  transform: scale(1.2);
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}
.hand-top .card.disabled,
.hand-side .card.disabled {
  opacity: 0.5;
  filter: grayscale(0.6);
  cursor: not-allowed;
}

/* Eşli'de insan declarer iken üstteki açık eli (Bot 2) alttaki ile aynı boyda yap */
.seat-dummy-big .hand-top {
  height: 110px;
}
.seat-dummy-big .hand-top .card {
  width: 64px;
  height: 92px;
  margin-left: -34px;
  padding: 5px 7px;
}
.seat-dummy-big .hand-top .card:first-child { margin-left: 0; }
.seat-dummy-big .hand-top .card .rank-top,
.seat-dummy-big .hand-top .card .rank-bottom { font-size: 14px; }
.seat-dummy-big .hand-top .card .suit-big { font-size: 32px; }
.seat-dummy-big .hand-top .card.playable:hover {
  transform: translateY(12px);
}

@media (max-width: 767px) {
  .seat-dummy-big .hand-top { height: 80px; }
  .seat-dummy-big .hand-top .card {
    width: 46px;
    height: 66px;
    margin-left: -28px;
    padding: 3px 5px;
  }
  .seat-dummy-big .hand-top .card .rank-top,
  .seat-dummy-big .hand-top .card .rank-bottom { font-size: 11px; }
  .seat-dummy-big .hand-top .card .suit-big { font-size: 22px; }
}

/* ============ Log girişleri ============ */
#log .log-entry { padding: 2px 0; border-bottom: 1px dashed rgba(255,255,255,0.05); color: #d4d4d8; }
#log .log-entry:last-child { border-bottom: none; }
#log .log-entry.highlight { color: #fbbf24; font-weight: 600; }

/* ============ Mobil ayarlar ============ */
@media (max-width: 767px) {
  .card { width: 46px; height: 66px; padding: 3px 5px; font-size: 13px; }
  .card .rank-top, .card .rank-bottom { font-size: 11px; }
  .card .suit-big { font-size: 22px; }

  .hand-bottom { height: 80px; }
  .hand-bottom .card { margin-left: -28px; }
  .hand-bottom .card.playable:hover { transform: translateY(-12px); }

  .hand-top { height: 50px; }
  .hand-top .card { width: 28px; height: 40px; margin-left: -20px; padding: 2px 3px; }
  .hand-top .card .suit-big { font-size: 12px; }
  .hand-top .card .rank-top, .hand-top .card .rank-bottom { font-size: 8px; }

  .hand-side { height: 180px !important; width: 36px !important; }
  .hand-side .card { width: 34px; height: 28px; margin-top: -14px; padding: 2px 3px; }
  .hand-side .card .suit-big { font-size: 10px; }
  .hand-side .card .rank-top, .hand-side .card .rank-bottom { font-size: 8px; }

  .trick-slot { width: 50px !important; height: 72px !important; }
  .trick-slot .card { width: 50px; height: 72px; }

  /* Seat info badges daha küçük */
  .seat .player-info { padding: 4px 8px; font-size: 10px; gap: 6px; }
}

/* Çok dar (telefon portrait) — daha sıkı */
@media (max-width: 380px) {
  .hand-bottom .card { margin-left: -30px; }
}

/* ============ Bid butonları ============ */
#bid-buttons .btn {
  background: #fbbf24;
  color: #18181b;
  font-weight: 700;
  padding: 8px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.1s ease;
  border: none;
  font-size: 15px;
}
#bid-buttons .btn:hover { background: #fde047; transform: translateY(-1px); }

/* Trump butonları */
.trump-btn {
  background: #fafaf9;
  border: 2px solid #d4d4d8;
  border-radius: 10px;
  padding: 18px 0 14px;
  font-size: 42px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}
.trump-btn:hover {
  border-color: #fbbf24;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(251,191,36,0.3);
}

/* Trump display in topbar */
#trump-display { font-size: 18px; line-height: 1; }
#trump-display.red { color: #ef4444; }
#trump-display.black { color: #f4f4f5; }

.modal.hidden { display: none; }
