@charset "UTF-8";
/* ARTIRMALI 81 — #game-screen Toto layout'u içine entegre stil */

/* 81-only elementler: varsayılan gizli, gm-81 sınıfı aktif olunca göster */
.o81-only { display: none !important; }
body.gm-81 .o81-only { display: flex !important; }

/* Toto-only elementleri 81 modunda gizle */
body.gm-81 #trick-cards,
body.gm-81 #bid-controls,
body.gm-81 #trump-badge,
body.gm-81 #timer-wrap { display: none !important; }

/* CENTER — deste, ıskarta, baraj (sadece gm-81 modunda görünür) */
body.gm-81 #o81-center {
  display: flex !important;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  background: radial-gradient(ellipse at center, rgba(40, 90, 60, 0.25), rgba(10, 30, 20, 0.4));
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
#o81-center { display: none; }
.o81-pile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.15s ease, background 0.15s ease;
  min-width: 70px;
  min-height: 90px;
}
.o81-pile:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
}
.o81-pile-stack {
  min-height: 56px;
  display: flex; align-items: center; justify-content: center;
}
.o81-pile-stack .card-back {
  background: repeating-linear-gradient(45deg, #1e3a2a, #1e3a2a 6px, #2a4a36 6px, #2a4a36 12px) !important;
}
.o81-pile-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.o81-baraj-badge {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(255, 200, 80, 0.22), rgba(255, 160, 40, 0.10));
  color: #ffd66b;
  border-radius: 10px;
  border: 1px solid rgba(255, 200, 80, 0.35);
  margin-left: auto;
  min-width: 70px;
}
.o81-baraj-label { font-size: 0.65rem; opacity: 0.85; letter-spacing: 0.1em; text-transform: uppercase; }
.o81-baraj-val { font-size: 1.6rem; font-weight: 800; line-height: 1; }

/* 81 ACTION BAR — sağ alt (sadece gm-81 modunda) */
#o81-actions {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 50;
  flex-wrap: wrap;
  gap: 6px;
  display: none;
}
body.gm-81 #o81-actions { display: flex !important; }

/* Tablet/mobil (≤1024): action bar absolute pozisyondan çıksın, hand'in üstünde inline aksın.
   Aksi halde dar ekranda pinfo avatar'ı ile çakışıyor (TESTER ↔ Çifte Git). */
@media (max-width: 1024px) {
  body.gm-81 #o81-actions {
    position: static !important;
    bottom: auto !important;
    right: auto !important;
    width: 100% !important;
    justify-content: center !important;
    margin: 4px 0 2px !important;
    padding: 0 6px !important;
    box-sizing: border-box !important;
  }
  body.gm-81 #o81-quick-meter {
    margin-left: 0 !important;
    flex: 0 0 auto !important;
  }
}
.o81-btn {
  padding: 8px 12px;
  background: rgba(255,255,255,0.08);
  color: #e8f5ee;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 7px;
  cursor: pointer;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.1s ease;
}
.o81-btn:hover:not(:disabled) { background: rgba(255,255,255,0.16); }
.o81-btn:active:not(:disabled) { transform: scale(0.97); }
.o81-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.o81-btn-primary {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  border-color: transparent;
  color: #fff;
}
.o81-btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #34d177, #2dbf6c); }
.o81-btn-warn {
  background: linear-gradient(135deg, #ff8a65, #ff7043);
  border-color: transparent;
  color: #fff;
}

/* AÇIK PERLER (oyuncunun açtığı) — hand'in hemen üstünde, dolu satırı */
body.gm-81 #area-bottom {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 4px;
}
body.gm-81 #o81-mypers {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 4px 12px;
  margin-bottom: 2px;
  max-width: 96%;
  max-height: 130px;
  overflow-y: auto;
  order: 0;
}
body.gm-81 #hand-bottom { order: 1; }
body.gm-81 #pinfo-bottom { order: 2; }

.o81-opens {
  display: flex !important;
  gap: 6px;
  flex-wrap: wrap;
  position: absolute;
  z-index: 4;
}
#o81-opens-top    { top: 100px; left: 50%; transform: translateX(-50%); max-width: 50%; justify-content: center; }
#o81-opens-left   { top: 50%;   left: 130px; transform: translateY(-50%); max-width: 18%; flex-direction: column; }
#o81-opens-right  { top: 50%;   right: 130px; transform: translateY(-50%); max-width: 18%; flex-direction: column; }

.o81-per {
  display: flex; gap: 2px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}
.o81-per.o81-pair {
  background: rgba(255, 200, 80, 0.10);
  border-color: rgba(255, 200, 80, 0.25);
}
.o81-per.o81-clickable { cursor: pointer; }
.o81-per.o81-clickable:hover {
  background: rgba(255, 200, 80, 0.2);
  border-color: #ffd66b;
}
.o81-target-name {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: #ffd66b;
  white-space: nowrap;
}

/* KART ÜZERİNDE JOKER VURGUSU */
.o81-target-joker {
  background: linear-gradient(135deg, #9b59b6, #6c2c91) !important;
  color: #fff !important;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
}
.card.o81-joker {
  background: linear-gradient(135deg, #9b59b6, #6c2c91) !important;
  color: #fff !important;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}

/* KART SEÇİLDİ (selected) */
body.gm-81 #hand-bottom .card.o81-selected,
body.gm-81 #o81-modal .card.o81-selected {
  transform: translateY(-12px);
  box-shadow: 0 10px 18px rgba(255, 214, 107, 0.45);
  outline: 2px solid #ffd66b;
}

/* Az önce çekilen kart vurgusu */
body.gm-81 #hand-bottom .card.o81-just-drawn {
  outline: 2px solid #4cd1ff;
  box-shadow: 0 0 18px rgba(76, 209, 255, 0.55);
  animation: o81-just-drawn-pulse 0.6s ease-out;
}
@keyframes o81-just-drawn-pulse {
  0% { transform: translateY(-22px); }
  100% { transform: translateY(0); }
}

/* AKTİF SIRA — Oyuncu çerçevesi (Toto pinfo'sunu yeniden kullanır) */
body.gm-81 .o81-active-turn {
  outline: 2px solid #ffd66b;
  box-shadow: 0 0 12px rgba(255, 214, 107, 0.5);
  border-radius: 8px;
}

/* MODAL */
.o81-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.o81-modal-box {
  background: linear-gradient(160deg, #1a2920, #0e1812);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px 24px;
  max-width: 720px;
  max-height: 86vh;
  overflow-y: auto;
  color: #e8f5ee;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}
.o81-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffd66b;
}
.o81-modal-sub {
  display: flex; justify-content: space-between;
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 12px;
}
.o81-modal-total b { color: #ffd66b; font-size: 1.05rem; }
.o81-modal-hand {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  margin-bottom: 12px;
  min-height: 80px;
}
.o81-modal-pers {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-bottom: 12px;
  min-height: 60px;
  max-height: 220px;
  overflow-y: auto;
}
.o81-modal-actions {
  display: flex; justify-content: flex-end; gap: 8px;
}
.o81-rm {
  position: absolute;
  top: -8px; right: -8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: none;
  background: #c0392b;
  color: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  line-height: 1;
}

.o81-end-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.o81-end-table th, .o81-end-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.o81-end-table th { color: #ffd66b; font-weight: 600; }

/* Lobi mm-game-card ikonu — 81 */
.mm-game-icon.o81-mm-icon {
  display: flex; align-items: center; justify-content: center;
  font-family: 'Anton', 'Big Shoulders Display', sans-serif;
  font-weight: 900;
}
.mm-game-icon.o81-mm-icon .o81-mm-num {
  font-size: 2.2rem;
  line-height: 1;
  color: #ffd66b;
  text-shadow: 0 0 12px rgba(255, 214, 107, 0.45);
  margin: 0 -2px;
}

/* Lobi başlığı 81 modunda */
body.gm-81-lobby #lp-brand h1::after {
  content: '·';
}

/* Trump badge alanını gizle */
body.gm-81 #trump-badge { display: none !important; }

/* Canlı baraj göstergesi (action bar içinde) */
.o81-quick-meter {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 214, 107, 0.3);
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e8f5ee;
  margin-right: 6px;
}
.o81-qm-label { opacity: 0.7; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.o81-qm-val { font-size: 1.05rem; font-weight: 800; min-width: 24px; text-align: center; }
.o81-qm-vs { opacity: 0.5; }
.o81-qm-need { font-size: 0.85rem; color: #ffd66b; }

/* Pre-bid toast modal (kompakt, ortada) */
.o81-toast-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  animation: o81-toast-in 0.25s ease-out;
}
.o81-toast-modal .o81-toast-box { pointer-events: auto; }
@keyframes o81-toast-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.o81-toast-modal .o81-toast-box {
  animation: o81-toast-box-in 0.25s ease-out;
}
@keyframes o81-toast-box-in {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.o81-toast-box {
  background: linear-gradient(160deg, rgba(20, 30, 24, 0.98), rgba(12, 20, 16, 0.98));
  border: 1px solid rgba(255, 214, 107, 0.35);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  color: #e8f5ee;
  max-width: 460px;
}
.o81-toast-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.o81-toast-title b { color: #ffd66b; }
.o81-toast-sub { font-size: 0.78rem; opacity: 0.75; margin-bottom: 10px; }
.o81-toast-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* Mobile responsive */
@media (max-width: 760px) {
  #o81-center {
    flex-direction: row;
    gap: 8px;
    padding: 6px 8px;
  }
  .o81-pile { min-width: 50px; min-height: 70px; padding: 4px; }
  .o81-pile-stack .card-back, .o81-pile-stack .card { width: 38px !important; height: 54px !important; }
  .o81-baraj-val { font-size: 1.1rem; }
  .o81-baraj-label { font-size: 0.55rem; }
  body.gm-81 #hand-bottom {
    flex-wrap: wrap;
    gap: 2px;
    max-height: 220px;
    overflow-y: auto;
  }
  body.gm-81 #hand-bottom .card { width: 48px !important; height: 70px !important; font-size: 0.7rem !important; }
  #o81-actions { gap: 4px; bottom: 4px; right: 4px; z-index: 60; }
  .o81-btn { padding: 6px 10px; font-size: 0.78rem; }
  #o81-mypers { max-height: 90px; gap: 4px; padding: 2px 6px; }
  #o81-opens-left, #o81-opens-right { display: none !important; }
  #o81-opens-top { top: 60px; max-width: 90%; }
}

/* 81 side hands — 14 kartı kompakt göster, aksi halde aşağı taşıp action bar'ı örtüyorlar.
   transform: scale yerine açık width/height kullanılır — scale layout kutusunu küçültmez. */

/* Tablet (≤1024px): orta boy kart, makul stack yüksekliği */
@media (max-width: 1024px) {
  body.gm-81 #hand-left,
  body.gm-81 #hand-right {
    min-height: 0 !important;
    max-height: 220px !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
  }
  body.gm-81 #hand-left .card-back,
  body.gm-81 #hand-left .card,
  body.gm-81 #hand-right .card-back,
  body.gm-81 #hand-right .card {
    width: 46px !important;
    height: 64px !important;
    transform: none !important;
    margin-top: -50px !important;
    margin-left: 0 !important;
  }
  body.gm-81 #hand-left .card-back:first-child,
  body.gm-81 #hand-left .card:first-child,
  body.gm-81 #hand-right .card-back:first-child,
  body.gm-81 #hand-right .card:first-child { margin-top: 0 !important; }
}

/* Mobil (≤480px): daha sıkı stack */
@media (max-width: 480px) {
  body.gm-81 #hand-left,
  body.gm-81 #hand-right { max-height: 170px !important; }
  body.gm-81 #hand-left .card-back,
  body.gm-81 #hand-left .card,
  body.gm-81 #hand-right .card-back,
  body.gm-81 #hand-right .card {
    width: 36px !important;
    height: 50px !important;
    margin-top: -38px !important;
  }
}

/* Dar mobil (≤375px): en sıkı */
@media (max-width: 375px) {
  body.gm-81 #hand-left,
  body.gm-81 #hand-right { max-height: 140px !important; }
  body.gm-81 #hand-left .card-back,
  body.gm-81 #hand-left .card,
  body.gm-81 #hand-right .card-back,
  body.gm-81 #hand-right .card {
    width: 30px !important;
    height: 42px !important;
    margin-top: -32px !important;
  }
}
