/* ======================================================
   Blöf: King/Pis Yedili ile aynı masa (kozlu.css: koltuk, avatar, el, durum balonu). Burada yalnızca Blöf'e özgü
   parçalar var: oyuncu sayısına göre koltuk yerleşimi, ortadaki kapalı yığın ve güncel ilan, itiraz sonucu (masanın
   ortasında, yerleşimi kaydırmayan katman), değer seçimi ve çoklu kart seçimi.
   ====================================================== */
.bf-page [hidden] { display: none !important; }
.bf-page .kz-avatar { display: grid; place-items: center; }
.bf-page .kz-avatar img, .bf-page .kz-avatar-me { grid-area: 1 / 1; }

/* ---------- Koltuklar: 3 kişide üst-sol/üst-sağ, 4 kişide sol/üst/sağ ---------- */
.bf-table[data-players="3"] { grid-template-areas: "tl . tr" ". center ." "me me me"; }
.bf-table .kz-seat[data-pos="tl"] { grid-area: tl; }
.bf-table .kz-seat[data-pos="tr"] { grid-area: tr; }
.kz-seat.is-low .bf-count { color: #ffb4a8; }
.bf-tag {
    align-self: inherit;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(229, 169, 59, .18);
    color: var(--p-mustard);
}
.bf-tag[data-kind="pass"] { background: rgba(0, 0, 0, .35); color: var(--p-sage); }

/* ---------- Orta: yığın ve ilan (sabit ölçü) ---------- */
.bf-center { width: 100%; }
.bf-board {
    --cw: clamp(48px, min(5.8vw, 8vh), 74px);
    --ch: calc(var(--cw) * 1.4);
    --radius: calc(var(--cw) * 0.09);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 2.6vw, 30px);
    width: 100%;
    min-height: calc(var(--ch) + 60px);
}
.bf-pile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bf-pile-cards { position: relative; width: calc(var(--cw) + 20px); height: calc(var(--ch) + 8px); }
.bf-pile-cards:empty::before {
    content: "";
    position: absolute;
    inset: 4px 10px 4px 10px;
    border: 2px dashed rgba(246, 231, 208, .3);
    border-radius: var(--radius);
}
.bf-pile-card { position: absolute; left: 0; top: 4px; width: var(--cw); height: var(--ch); transform: translate(calc(var(--i) * 4px), calc(var(--i) * -2px)) rotate(calc((var(--i) - 2) * 3deg)); }
.bf-pile-count {
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(20, 11, 7, .85);
    color: var(--p-cream);
    font: 600 13px/1.4 var(--sans);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.bf-claim {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: min(260px, 46vw);
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(20, 11, 7, .72);
    border: 1px solid rgba(229, 169, 59, .35);
}
.bf-claim-main { color: var(--p-cream); font: 400 clamp(20px, 2.4vw, 28px)/1.15 var(--serif, "DM Serif Display", Georgia, serif); }
.bf-claim[data-state="empty"] .bf-claim-main { color: var(--p-sage); }
.bf-claim[data-state="last"] { border-color: #ffb4a8; box-shadow: 0 0 0 3px rgba(224, 120, 106, .3); }
.bf-claim-sub { color: var(--p-sage); font-size: 14px; }
.bf-claim[data-state="last"] .bf-claim-sub { color: #ffd9d4; font-weight: 600; }
.bf-out { color: var(--p-sage-dim, #9fb3a5); font-size: 13px; }

/* İtiraz sonucu: masanın ortasında katman; altındaki yerleşim değişmez. */
.bf-reveal {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: min(440px, 92%);
    padding: 12px 16px 14px;
    border-radius: 16px;
    background: rgba(20, 11, 7, .94);
    border: 2px solid var(--p-mustard);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
    text-align: center;
    --cw: clamp(44px, 5vw, 64px);
    --ch: calc(var(--cw) * 1.4);
    --radius: calc(var(--cw) * 0.09);
}
.bf-reveal[data-truth="false"] { border-color: #e0786a; }
.bf-reveal[data-truth="true"] { border-color: #86d7a6; }
.bf-reveal-title { margin: 0; color: var(--p-cream); font-weight: 700; font-size: 16px; }
.bf-reveal[data-truth="false"] .bf-reveal-title { color: #ffb4a8; }
.bf-reveal[data-truth="true"] .bf-reveal-title { color: #9fe0b8; }
.bf-reveal-cards { display: flex; gap: 6px; justify-content: center; }
.bf-reveal-card { display: block; width: var(--cw); height: var(--ch); box-shadow: 0 4px 10px rgba(0, 0, 0, .45); border-radius: var(--radius); }
.bf-reveal-card.is-off { box-shadow: 0 0 0 3px #e0786a, 0 4px 10px rgba(0, 0, 0, .45); }
.bf-reveal-note { margin: 0; color: var(--p-sage); font-size: 14px; }
@media (prefers-reduced-motion: no-preference) {
    .bf-reveal:not([hidden]) { animation: bf-in .25s ease; }
}
@keyframes bf-in { from { opacity: 0; transform: translate(-50%, -46%); } }

/* ---------- Kontroller ---------- */
.bf-turnrow { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 12px; min-height: 52px; }
/* Kontrol satırı sabit yükseklikte: düğmeler gelip gidince el kaymaz. */
.bf-controls { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 100px; justify-content: flex-end; padding-bottom: 6px; }
.bf-ranks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 720px; }
.bf-rank {
    min-width: 42px;
    min-height: 42px;
    padding: 0 8px;
    border-radius: 10px;
    border: 1px solid rgba(229, 169, 59, .45);
    background: rgba(20, 11, 7, .7);
    color: var(--p-cream);
    font: 700 16px/1 var(--sans);
    cursor: pointer;
}
.bf-rank:hover { border-color: var(--p-mustard); }
.bf-rank.is-on { background: var(--p-mustard); color: var(--p-brown, #2a170d); border-color: var(--p-mustard); }
.bf-rank:focus-visible { outline: 3px solid var(--p-mustard); outline-offset: 2px; }
.bf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bf-actions .pg-btn { min-height: 44px; }
.bf-actions .pg-btn:disabled { opacity: .55; cursor: not-allowed; }
.bf-challenge { background: #b23a2c; color: #fff; border: 1px solid #e0786a; font-weight: 700; letter-spacing: .02em; }
.bf-challenge:hover { background: #c94a3b; }

/* ---------- El: çoklu seçim ---------- */
.bf-card.is-selected { transform: translateY(-14px); box-shadow: 0 0 0 3px var(--p-mustard), 0 10px 18px rgba(0, 0, 0, .5); z-index: 2; }
.kz-hand .bf-card.is-selected:hover { transform: translateY(-16px); }
.bf-card.is-drawn:not(.is-selected) { box-shadow: 0 0 0 3px #86d7a6, 0 8px 14px rgba(0, 0, 0, .45); }
.kz-hand.is-locked .bf-card { cursor: default; }

@media (max-width: 600px) {
    .bf-table[data-players="3"] { grid-template-areas: "tl tl tr tr" "center center center center" "me me me me"; grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .bf-table[data-players="4"] { grid-template-areas: "left top right" "center center center" "me me me"; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bf-table[data-players="4"] .kz-seat-top { flex-direction: column; text-align: center; gap: 5px; }
    .bf-table[data-players="4"] .kz-seat-top .kz-seat-info { align-items: center; }
    .bf-table .kz-seat-left, .bf-table .kz-seat-right { flex-direction: column; }
    .bf-board { --cw: clamp(40px, 11vw, 54px); gap: 12px; }
    .bf-claim { min-width: 0; padding: 8px 12px; }
    .bf-claim-main { font-size: 19px; }
    .bf-claim-sub { font-size: 12.5px; }
    .bf-rank { min-width: 40px; min-height: 40px; font-size: 15px; }
    .bf-controls { min-height: 140px; }
    .bf-card.is-selected { transform: translateY(-8px); }
    .kz-hand .bf-card.is-selected:hover { transform: translateY(-8px); }
    .bf-page .kz-main { padding-left: 12px; padding-right: 12px; }
    /* kozlu.css dar ekranda merkezi konumsuz bırakır; itiraz sonucu yine yalnızca orta alanın üstünde dursun. */
    .bf-table .bf-center { position: relative; }
    .bf-reveal { width: 100%; padding: 8px 10px 10px; gap: 6px; --cw: 38px; }
    .bf-reveal-title { font-size: 14px; }
    .bf-reveal-note { font-size: 12.5px; }
}
