/**
 * 101 Okey Pro - Realistic Tabletop & Lobby Stylesheet
 * Lüks Zümrüt / Teal Çuha Masa, Beveled Altın Ray, Gerçekçi Ahşap Istaka,
 * Canlı El Puanı Sayaçları (ELDE 89 / 11 TAŞ), 3D SERİ 102 Bannerı,
 * Canlı Sohbet Çekmecesi ve PHP 8.4 Uyumlu Yönetim Modalleri.
 */

:root {
  --wood-dark: #1a0e05;
  --wood-mid: #381d09;
  --wood-light: #5c3214;
  --gold-primary: #f0c365;
  --gold-secondary: #c29947;
  --gold-brass: #e6b85c;
  
  --clr-red: #d32f2f;
  --clr-blue: #1976d2;
  --clr-black: #212121;
  --clr-yellow: #f57f17;
  
  --font-main: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-numbers: 'Arial Black', Impact, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #060d13;
  font-family: var(--font-main);
  color: #fff;
}

/* ========================================================
   GÖRÜNÜM YÖNETİMİ (VIEWS)
   ======================================================== */
.view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hidden {
  display: none !important;
}

.auth-tab-content {
  display: none;
}
.auth-tab-content.active {
  display: block !important;
}
.auth-tab-content.hidden {
  display: none !important;
}

.gate-pane {
  display: none;
}
.gate-pane.active {
  display: block !important;
}
.gate-pane.hidden {
  display: none !important;
}

.view.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
  display: none !important;
}

/* ========================================================
   0. ZORUNLU GİRİŞ VE KAYIT KAPISI (AUTH GATEWAY VIEW)
   ======================================================== */
.auth-gateway-view {
  background: radial-gradient(circle at 50% 30%, #152b3c 0%, #08141f 55%, #02070c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

.auth-gateway-container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: auth-card-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes auth-card-fade-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-gateway-brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand-chip-glow {
  width: 68px;
  height: 68px;
  margin: 0 auto 12px;
  background: radial-gradient(circle, #f0c365 0%, #c29947 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(240, 195, 101, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.5);
  border: 2px solid #fff;
}

.brand-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #ffffff 0%, #f0c365 50%, #c29947 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.brand-tagline {
  color: #90a4ae;
  font-size: 13px;
  margin-top: 4px;
  font-weight: 500;
}

.auth-card-main {
  width: 100%;
  background: rgba(14, 25, 36, 0.95);
  border: 1.5px solid rgba(240, 195, 101, 0.4);
  border-radius: 16px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(240, 195, 101, 0.15);
  padding: 24px;
  backdrop-filter: blur(12px);
}

.auth-card-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.auth-card-tabs .auth-tab-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  color: #90a4ae;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-card-tabs .auth-tab-btn.active {
  background: linear-gradient(180deg, #c29947 0%, #8c651e 100%);
  color: #1a0e05;
  border-color: #ffd54f;
  box-shadow: 0 0 15px rgba(240, 195, 101, 0.5);
}

.btn-block-auth {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-top: 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-demo-hint {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: #78909c;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

/* ========================================================
   1. LOBİ GÖRÜNÜMÜ (CASINO / CLUB LOBBY)
   ======================================================== */
#lobby-view {
  background: radial-gradient(ellipse at 50% 20%, #10212e 0%, #08121a 60%, #03080c 100%);
}

.lobby-header {
  height: 68px;
  background: linear-gradient(180deg, #121c26 0%, #0a1118 100%);
  border-bottom: 2px solid var(--gold-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 35px;
  box-shadow: 0 4px 25px rgba(0,0,0,0.7);
  z-index: 100;
}

.lobby-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lobby-logo h1 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--gold-primary);
  text-shadow: 0 2px 10px rgba(240, 195, 101, 0.3);
}

.lobby-user-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.balance-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 25, 36, 0.85);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.chips-widget {
  border-color: rgba(240, 195, 101, 0.4);
}

.chips-widget .balance-num {
  font-size: 13px;
  font-weight: 800;
  color: #ffd54f;
}

.diamonds-widget {
  border-color: rgba(79, 195, 247, 0.4);
}

.diamonds-widget .balance-num {
  font-size: 13px;
  font-weight: 800;
  color: #4fc3f7;
}

.gift-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2b1708 0%, #4a270f 100%);
  border: 1px solid #ff9800;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}

.gift-widget:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.gift-countdown {
  font-size: 12px;
  font-weight: 800;
  color: #ffb74d;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 14px 4px 6px;
  border-radius: 25px;
  border: 1px solid rgba(240, 195, 101, 0.35);
  cursor: pointer;
  transition: all 0.2s;
}

.user-profile-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-primary);
}

.user-avatar-mini {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gold-brass);
  overflow: hidden;
}

.user-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-text-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.user-lvl-tag {
  font-size: 10px;
  font-weight: 600;
  color: #81c784;
}

.lobby-controls {
  display: flex;
  gap: 10px;
}

.lobby-content {
  flex: 1;
  padding: 25px 45px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.quick-play-banner {
  background: linear-gradient(135deg, #1b3842 0%, #0d232a 50%, #1a160d 100%);
  border: 1.5px solid var(--gold-secondary);
  border-radius: 16px;
  padding: 24px 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.1);
}

.quick-play-info h2 {
  font-size: 24px;
  font-weight: 900;
  color: var(--gold-primary);
}

.quick-play-info p {
  font-size: 13px;
  color: #cfd8dc;
  margin-top: 4px;
}

.btn-hero {
  background: linear-gradient(180deg, #f0c365 0%, #c29947 100%);
  color: #1a0e05;
  font-size: 15px;
  font-weight: 900;
  padding: 12px 28px;
  border-radius: 25px;
  border: 1px solid #ffe6a3;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
}

.btn-hero:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.lobby-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lobby-section-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #eceff1;
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.room-card {
  background: linear-gradient(180deg, #12202c 0%, #0a131a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}

.room-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-secondary);
  box-shadow: 0 10px 25px rgba(194, 153, 71, 0.2);
}

.room-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.room-name {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.room-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(194, 153, 71, 0.15);
  color: var(--gold-primary);
  border: 1px solid rgba(194, 153, 71, 0.35);
}

.room-stake {
  font-size: 13px;
  font-weight: 800;
  color: #ffd54f;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.room-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.room-tag {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 7px;
  border-radius: 5px;
  color: #b0bec5;
}

.room-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

.room-players {
  font-size: 12px;
  color: #81c784;
  font-weight: 700;
}

/* ========================================================
   2. MASA GÖRÜNÜMÜ (3D MASTER 101 REALISTIC TABLETOP)
   ======================================================== */
#table-view {
  background: #04090e;
}

/* Masa Üst Kontrol Çubuğu */
.table-top-bar {
  height: 52px;
  background: linear-gradient(180deg, #0e1b24 0%, #081118 100%);
  border-bottom: 1.5px solid rgba(240, 195, 101, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0,0,0,0.7);
}

.table-balance-strip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.balance-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(8, 20, 28, 0.9);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.chips-pill {
  color: #fff;
  border-color: rgba(240, 195, 101, 0.4);
}

.chips-pill span:last-child {
  color: #ffd54f;
}

.diamonds-pill {
  color: #4fc3f7;
  border-color: rgba(79, 195, 247, 0.4);
}

.gift-box-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(38, 20, 10, 0.95) 0%, rgba(20, 10, 5, 0.95) 100%);
  border: 1px solid rgba(255, 152, 0, 0.5);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  color: #ffb74d;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}

.gift-box-pill:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.table-actions-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-top-nav {
  background: linear-gradient(180deg, #152735 0%, #0d1822 100%);
  color: #e0f2f1;
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
}

.btn-top-nav:hover {
  border-color: var(--gold-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.btn-icon-only {
  padding: 6px 10px;
}

/* Lüks Zümrüt / Teal Çuha Masa (Gold Beveled Rail) */
.table-surface {
  flex: 1;
  background: radial-gradient(ellipse at 50% 50%, #0d3840 0%, #07262c 60%, #03171c 100%);
  border: 4px solid #caa246;
  outline: 6px solid #142830;
  border-radius: 28px;
  margin: 10px 14px 8px 14px;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.95), 0 0 30px rgba(0, 0, 0, 0.8), inset 0 0 3px #ffe699;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

/* 3D Açılış Başarı Başlığı (SERİ 102 / ÇİFT 5) */
.meld-3d-banner {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 64px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff9c4;
  text-shadow: 
    0 1px 0 #ffd54f,
    0 2px 0 #ffca28,
    0 3px 0 #ffb300,
    0 4px 0 #ffa000,
    0 5px 0 #ff8f00,
    0 6px 0 #ff6f00,
    0 8px 14px rgba(0,0,0,0.85),
    0 0 35px rgba(255, 179, 0, 0.85);
  z-index: 150;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.meld-3d-banner.pop-show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.15);
  animation: banner-float 2.4s ease forwards;
}

@keyframes banner-float {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  75% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(0.9); }
}

/* Oyuncu İstasyonları (Seats) */
.seat {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 20;
  transition: all 0.25s ease;
}

.seat.active {
  filter: drop-shadow(0 0 16px rgba(240, 195, 101, 0.75));
}

.seat.active .avatar-wrap {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--gold-primary), 0 0 24px rgba(240, 195, 101, 0.9);
  animation: pulse-active 1.4s infinite alternate ease-in-out;
}

.turn-avatar-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(240, 195, 101, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.seat.active .turn-avatar-glow {
  opacity: 1;
  animation: spin-glow 8s linear infinite;
}

@keyframes spin-glow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse-active {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.turn-timer-gauge {
  position: absolute;
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #091720;
  border: 2px solid #00e5ff;
  color: #00e5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.seat-turn-pill {
  display: none;
  background: linear-gradient(135deg, #f0c365 0%, #c29947 100%);
  color: #1a0e05;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.seat.active .seat-turn-pill {
  display: inline-block;
  animation: pulse-active 1.4s infinite alternate;
}

.action-float-badge {
  position: absolute;
  top: -26px;
  background: rgba(16, 23, 32, 0.95);
  color: #f0c365;
  border: 1px solid #e6b85c;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 60;
}

.action-float-badge.show {
  animation: float-and-fade 1.5s ease forwards;
}

@keyframes float-and-fade {
  0% { opacity: 0; transform: translateY(8px) scale(0.85); }
  20% { opacity: 1; transform: translateY(0) scale(1); }
  75% { opacity: 1; transform: translateY(-4px) scale(1); }
  100% { opacity: 0; transform: translateY(-16px) scale(0.9); }
}

.seat-top {
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: row;
  gap: 10px;
  align-items: center;
  background: rgba(4, 23, 31, 0.88);
  padding: 4px 14px 4px 6px;
  border-radius: 28px;
  border: 1px solid rgba(240, 195, 101, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
  z-index: 25;
}

.seat-top .avatar-wrap {
  width: 44px;
  height: 44px;
}

.seat-top .player-info {
  margin-top: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.seat-top .opponent-rack-preview {
  display: none;
}
.seat-left { left: 24px; top: 32%; transform: translateY(-50%); }
.seat-right { right: 24px; top: 32%; transform: translateY(-50%); }

.avatar-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #1b130b;
  border: 2px solid var(--gold-brass);
  position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

.avatar-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.opponent-rack-preview {
  width: 80px;
  height: 22px;
  background: url('/public/gfx/rack-oppo.webp') 50% 50% no-repeat;
  background-size: contain;
  margin-top: 4px;
  opacity: 0.85;
}

.player-info {
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.8);
  padding: 2px 9px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.player-name { font-size: 11px; font-weight: 700; color: #fff; }
.player-lvl { font-size: 9px; color: #90a4ae; }
.player-meld-status { font-size: 10px; font-weight: 700; color: #ffd54f; }
.player-meld-status.not-opened { color: #ef9a9a; }

/* Konuşma Baloncuğu */
.speech-bubble {
  position: absolute;
  top: -32px;
  background: #ffffff;
  color: #111;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 50;
}

.speech-bubble:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0;
  border-style: solid;
  border-color: #fff transparent;
}

.speech-bubble.show {
  opacity: 1;
  transform: translateY(0);
}

.speech-bubble.speech-bubble-bottom {
  top: -38px;
  left: 0;
}

/* ========================================================
   MASANIN ORTASI (CENTER TABLE)
   ======================================================== */
.center-board {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--board-scale, 1));
  transform-origin: center center;
  width: 860px;
  height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  touch-action: none;
}

/* Masa Üst Kontrol Çubuğu İçi Bilgi Plaketi (#LAL2Y6 | Klasik | Tek | Cezalı) */
.table-info-pill-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(4, 23, 31, 0.94);
  border: 1.5px solid rgba(240, 195, 101, 0.45);
  border-radius: 20px;
  padding: 4px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.table-info-pill-bar .room-code-tag {
  font-size: 12px;
  font-weight: 900;
  color: #ffca28;
  letter-spacing: 0.5px;
}

.table-info-pill-bar .info-sep {
  color: rgba(240, 195, 101, 0.4);
  font-size: 11px;
}

.table-info-pill-bar .table-info-row {
  font-size: 11px;
  color: #cfd8dc;
  font-weight: 700;
}

.table-info-pill-bar .table-info-el {
  font-size: 11px;
  font-weight: 800;
  color: #00e5ff;
}

/* Açılan Seriler & Çiftler: Her Oyuncunun Kendi Önündeki Açılmış Taş Alanı */
.table-melds-container {
  width: 100%;
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  grid-template-rows: auto auto auto;
  gap: 8px;
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 4px;
  align-items: center;
  box-shadow: none;
}

.player-melds-zone {
  background: rgba(2, 18, 25, 0.45);
  border: 1px solid rgba(240, 195, 101, 0.22);
  border-radius: 10px;
  padding: 5px 8px;
  min-height: 48px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.player-melds-zone:hover {
  border-color: rgba(240, 195, 101, 0.55);
}

.player-melds-zone.zone-top {
  grid-column: 2;
  grid-row: 1;
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

.player-melds-zone.zone-left {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  max-height: 130px;
  overflow-y: auto;
}

.player-melds-zone.zone-right {
  grid-column: 3;
  grid-row: 2;
  width: 100%;
  max-height: 130px;
  overflow-y: auto;
}

.player-melds-zone.zone-bottom {
  grid-column: 2;
  grid-row: 3;
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

.zone-header {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.zone-badge {
  font-size: 10px;
  font-weight: 800;
  color: #ffca28;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(240, 195, 101, 0.15);
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid rgba(240, 195, 101, 0.3);
}

.zone-melds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 38px;
  align-items: center;
}

.zone-melds:empty::after {
  content: 'Henüz açmadı';
  font-size: 10px;
  color: rgba(255, 255, 255, 0.28);
  font-style: italic;
  margin-left: 4px;
}

.table-meld {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(240, 195, 101, 0.35);
  border-radius: 6px;
  padding: 3px 5px;
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.table-meld:hover {
  transform: scale(1.04);
  border-color: var(--gold-primary);
}

.table-meld.selected {
  border: 2px solid var(--gold-primary);
  box-shadow: 0 0 12px rgba(240, 195, 101, 0.8);
}

/* 101 Okey Kuralı: Açılan serilerde/çiftlerde Okey TERS koyulur */
.table-meld .tile.is-okey,
.zone-melds .tile.is-okey {
  transform: rotate(180deg) !important;
  border: 1.5px solid #ffb300;
  box-shadow: 0 0 8px rgba(255, 179, 0, 0.6);
}

/* Masa Sıra Çubuğu (Turn Compass Bar) */
.turn-bar {
  width: 100%;
  height: 38px;
  background: linear-gradient(180deg, #12212d 0%, #0a141c 100%);
  border: 1px solid rgba(240, 195, 101, 0.35);
  border-radius: 20px;
  padding: 0 14px;
  margin: 6px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
  position: relative;
  z-index: 15;
}

.turn-slot {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #78909c;
  padding: 4px 10px;
  border-radius: 12px;
  transition: all 0.25s ease;
  user-select: none;
}

.turn-slot .dir-icon {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.turn-slot.active {
  background: linear-gradient(180deg, #f0c365 0%, #c29947 100%);
  color: #1a0e05;
  font-weight: 900;
  box-shadow: 0 0 14px rgba(240, 195, 101, 0.7);
  transform: scale(1.08);
}

.turn-center-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 16px;
  border-radius: 14px;
  transition: all 0.3s ease;
}

.turn-center-pill.your-turn {
  background: rgba(240, 195, 101, 0.18);
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(240, 195, 101, 0.5);
  animation: your-turn-glow 1.5s infinite alternate ease-in-out;
}

@keyframes your-turn-glow {
  0% { box-shadow: 0 0 10px rgba(240, 195, 101, 0.3); }
  100% { box-shadow: 0 0 22px rgba(240, 195, 101, 0.8); }
}

.turn-pulse-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #78909c;
  transition: background 0.3s ease;
}

.turn-center-pill.your-turn .turn-pulse-indicator {
  background: #00e676;
  box-shadow: 0 0 10px #00e676;
  animation: pulse-green 1s infinite alternate;
}

.turn-center-pill.bot-turn .turn-pulse-indicator {
  background: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-primary);
  animation: pulse-gold 1.2s infinite alternate;
}

@keyframes pulse-green {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.2); opacity: 1; }
}

@keyframes pulse-gold {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.2); opacity: 1; }
}

.turn-texts {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.turn-title {
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}

.turn-center-pill.your-turn .turn-title {
  color: #ffe082;
}

.turn-subtitle {
  font-size: 9px;
  font-weight: 600;
  color: #b0bec5;
}

/* Deste, Gösterge & Herkesin Kendi Sağına Atacağı Tepsiler */
.table-middle-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  position: relative;
}

.deck-and-indicator {
  display: flex;
  align-items: center;
  gap: 16px;
}

.draw-pile-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.draw-pile-wrap:hover .tile-back { transform: translateY(-3px); }

.draw-pile-wrap.can-draw {
  animation: draw-pile-pulse 1.3s infinite alternate ease-in-out;
}

@keyframes draw-pile-pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(240, 195, 101, 0.4)); }
  100% { transform: scale(1.08); filter: drop-shadow(0 0 18px rgba(240, 195, 101, 0.95)); }
}

.draw-count {
  font-size: 11px;
  font-weight: 800;
  color: #ffeb3b;
  margin-top: 3px;
}

.indicator-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.indicator-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-top: 3px;
  letter-spacing: 0.5px;
}

/* Gerçek Masadaki Sağa Taş Atma Tepsileri (4 Köşe Pozisyonları) */
.discard-tray.corner-tray {
  position: absolute;
  z-index: 28;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.2s ease;
}

/* 1. Nur'un Sağı: Üst-Sol Köşe (Nur'un sağ eli, Ebru'nun üstü) */
.tray-top-left {
  top: 75px;
  left: 160px;
}

/* 2. Ebru'nun Sağı: Alt-Sol Köşe (Ebru'nun sağ eli, Sizin solunuz - Buradan taş çekilir) */
.tray-bottom-left {
  bottom: 160px;
  left: 60px;
}

/* 3. Sizin Sağınız: Alt-Sağ Köşe (Sizin sağ eliniz, Istakanın sağı - Buraya taş atılır) */
.tray-bottom-right {
  bottom: 160px;
  right: 60px;
}

/* 4. Doğan'ın Sağı: Üst-Sağ Köşe (Doğan'ın sağ eli, Doğan'ın üstü - Nur buradan çeker) */
.tray-top-right {
  top: 75px;
  right: 160px;
}

.discard-tray.corner-tray:hover {
  transform: scale(1.08);
}

.discard-tray.corner-tray .discard-slot {
  width: 48px;
  height: 62px;
  border: 1.5px dashed rgba(240, 195, 101, 0.45);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.6);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.discard-tray.corner-tray.can-draw .discard-slot {
  border-color: #00e676;
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.85);
  animation: tray-draw-pulse 1.2s infinite alternate;
}

@keyframes tray-draw-pulse {
  0% { box-shadow: 0 0 5px rgba(0, 230, 118, 0.4); }
  100% { box-shadow: 0 0 20px rgba(0, 230, 118, 0.95); }
}

.discard-tray-label {
  font-size: 10px;
  font-weight: 800;
  color: #b0bec5;
  margin-top: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  white-space: nowrap;
}

/* ========================================================
   CANLI EL PUANI & KALAN TAŞ SAYAÇLARI (101 OKEY)
   ======================================================== */
.hand-summary-badges {
  position: absolute;
  left: 20px;
  bottom: 175px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 35;
  pointer-events: auto;
}

.hand-badge-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  transition: all 0.25s ease;
}

.hand-badge-item .badge-label {
  font-size: 9px;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.hand-meld-pill {
  background: linear-gradient(135deg, #102a3a 0%, #081722 100%);
  border: 1.5px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
}

.hand-meld-pill.ready-to-open {
  background: linear-gradient(135deg, #1b5e20 0%, #0d3813 100%);
  border-color: #69f0ae;
  color: #b9f6ca;
  box-shadow: 0 0 16px rgba(105, 240, 174, 0.6);
  animation: meld-ready-glow 1.4s infinite alternate;
}

@keyframes meld-ready-glow {
  0% { box-shadow: 0 0 6px rgba(105, 240, 174, 0.4); }
  100% { box-shadow: 0 0 20px rgba(105, 240, 174, 0.85); }
}

.hand-pair-pill {
  background: linear-gradient(135deg, #2b1f3d 0%, #170d24 100%);
  border: 1.5px solid rgba(179, 136, 255, 0.4);
  color: #b388ff;
}

.hand-pair-pill.ready-to-open {
  background: linear-gradient(135deg, #4a148c 0%, #2a0845 100%);
  border-color: #ea80fc;
  color: #f8bbd0;
  box-shadow: 0 0 16px rgba(234, 128, 252, 0.6);
  animation: meld-ready-glow 1.4s infinite alternate;
}

.hand-select-pill {
  background: linear-gradient(135deg, #e65100 0%, #bf360c 100%);
  border: 1.5px solid #ffb74d;
  color: #fff;
  font-weight: 900;
}

.hand-penalty-pill {
  background: linear-gradient(135deg, #b71c1c 0%, #7f0000 100%);
  border: 1.5px solid #ff8a80;
  color: #ffebee;
}

.hand-count-pill {
  background: rgba(4, 25, 33, 0.9);
  border: 1px solid rgba(240, 195, 101, 0.5);
  color: #ffd54f;
}

/* ========================================================
   ÖZGÜN TAŞLAR (AUTHENTIC TILES)
   ======================================================== */
.tile {
  width: 58px;
  height: 72px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfbf8 75%, #ebe3d5 100%);
  border: 1px solid #d4c7b6;
  border-radius: 4px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.95), inset 0 -2px 0 rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  user-select: none;
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.5);
}

.tile.selected {
  transform: translateY(-12px);
  border: 2px solid var(--gold-primary);
  box-shadow: 0 8px 20px rgba(240, 195, 101, 0.7);
}

.tile-number {
  font-family: var(--font-numbers);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.5px;
}

.tile-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 3px;
}

.tile.red .tile-number { color: var(--clr-red); }
.tile.red .tile-dot { background: var(--clr-red); }

.tile.blue .tile-number { color: var(--clr-blue); }
.tile.blue .tile-dot { background: var(--clr-blue); }

.tile.black .tile-number { color: var(--clr-black); }
.tile.black .tile-dot { background: var(--clr-black); }

.tile.yellow .tile-number { color: var(--clr-yellow); }
.tile.yellow .tile-dot { background: var(--clr-yellow); }

.tile.is-okey::after {
  content: '★';
  position: absolute;
  top: 1px;
  right: 2px;
  font-size: 10px;
  color: #ff9800;
}

.tile.is-fake .tile-number {
  display: none;
}

.tile-fake-symbol {
  font-size: 26px;
  line-height: 1;
  color: #d81b60;
  text-shadow: 0 0 8px rgba(216, 27, 96, 0.45);
}

.table-meld .tile .tile-fake-symbol,
.zone-melds .tile .tile-fake-symbol {
  font-size: 15px;
}

.tile-back {
  width: 44px;
  height: 58px;
  background: repeating-linear-gradient(45deg, #1b3842, #1b3842 4px, #0e2229 4px, #0e2229 8px);
  border: 1.5px solid #d4af37;
  border-radius: 5px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.45);
}

.table-meld .tile { width: 30px; height: 42px; }
.table-meld .tile .tile-number { font-size: 17px; }
.table-meld .tile .tile-dot { width: 4px; height: 4px; }

@keyframes tile-deal-anim {
  0% { opacity: 0; transform: translateY(-70px) scale(0.7); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.tile.dealing {
  animation: tile-deal-anim 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  animation-delay: calc(var(--delay, 0) * 20ms);
}

/* ========================================================
   OYUNCUNUN ISTAKASI (BOTTOM RACK - SEAT 0)
   ======================================================== */
.player-station-bottom {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%) scale(var(--rack-scale, 1));
  transform-origin: bottom center;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 40;
  transition: box-shadow 0.3s ease;
  touch-action: none;
}

.player-turn-banner {
  display: none;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #f0c365 0%, #c29947 100%);
  color: #1a0e05;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 18px;
  border-radius: 14px;
  margin-bottom: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.55), 0 0 16px rgba(240, 195, 101, 0.6);
  animation: banner-pop 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

#seat-0.active .player-turn-banner {
  display: flex;
}

#seat-0.active .rack {
  box-shadow: 0 -10px 35px rgba(240, 195, 101, 0.55), inset 0 0 15px rgba(240, 195, 101, 0.2);
}

@keyframes banner-pop {
  0% { opacity: 0; transform: translateY(10px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.turn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1a0e05;
  animation: pulse-green 1s infinite alternate;
}

/* Oyuncu Kimlik Şeridi */
.player-identity-strip {
  position: absolute;
  left: -20px;
  top: -38px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(3, 20, 26, 0.88);
  padding: 3px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 50;
}

.player-avatar-small {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.player-avatar-small img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #ffd54f;
  object-fit: cover;
}

.dealer-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffd54f;
  color: #1a0e05;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #1a0e05;
}

.player-meta {
  display: flex;
  flex-direction: column;
}

.player-user-name {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.player-user-lvl {
  font-size: 9px;
  color: #90a4ae;
}

/* Istaka Kapsayıcısı ve Yan Kontroller */
.rack-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.rack-left-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-rack-action {
  background: linear-gradient(180deg, #162b36 0%, #0d1a22 100%);
  color: #e0f2f1;
  border: 1px solid rgba(0, 229, 255, 0.35);
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  white-space: nowrap;
}

.btn-rack-action:hover {
  border-color: #ffd54f;
  color: #ffd54f;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.7);
}

.rack-right-discard {
  display: flex;
  align-items: center;
  justify-content: center;
}

.discard-perch-slot {
  width: 48px;
  height: 64px;
  background: linear-gradient(180deg, #ffffff 0%, #eceff1 100%);
  border: 2px solid #b0bec5;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.discard-perch-slot:hover {
  transform: translateY(-3px);
  border-color: #ff9800;
  box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
}

.discard-perch-slot .perch-label {
  font-size: 13px;
  font-weight: 900;
  color: #c62828;
}

/* Ahşap Istaka */
.rack {
  width: 940px;
  height: 163px;
  background: url('/public/gfx/rack.webp') 50% 50% no-repeat,
              linear-gradient(180deg, #a67c52 0%, #7d4f26 15%, #613b19 50%, #48290f 85%, #331c0a 100%);
  background-size: 940px 163px, cover;
  border-radius: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 2px solid #1a0d05;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.75), inset 0 2px 4px rgba(255, 255, 255, 0.2), inset 0 -3px 6px rgba(0, 0, 0, 0.5);
  position: relative;
  padding: 6px 36px 10px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  filter: drop-shadow(0 -8px 25px rgba(0, 0, 0, 0.7));
  touch-action: none;
  transition: box-shadow 0.2s ease;
}

.rack.drag-over {
  box-shadow: 0 -8px 30px rgba(240, 195, 101, 0.65), inset 0 0 20px rgba(240, 195, 101, 0.3);
}

.rack-screw {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #b0bec5 0%, #37474f 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,0.6);
  top: 50%;
  transform: translateY(-50%);
}

.rack-screw-left { left: 6px; }
.rack-screw-right { right: 6px; }

.rack-row {
  display: flex;
  gap: 2px;
  height: 72px;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.rack-slot {
  width: 58px;
  height: 72px;
  flex: 0 0 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 4px;
  background: transparent;
  border: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  user-select: none;
  touch-action: none;
}

.rack-slot.empty {
  background: transparent;
  border: none;
  opacity: 1;
}

.rack-slot.empty:hover {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.rack-slot.drag-over {
  background: rgba(240, 195, 101, 0.35) !important;
  border: 2px dashed var(--gold-primary) !important;
  box-shadow: inset 0 0 14px rgba(240, 195, 101, 0.6) !important;
  transform: scale(1.06);
}

.tile.source-dragging {
  opacity: 0.25;
  transform: scale(0.9);
}

.tile.dragging-ghost {
  cursor: grabbing !important;
  pointer-events: none;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.8)) !important;
}

.drag-over-discard {
  border-color: #ef5350 !important;
  box-shadow: 0 0 18px rgba(239, 83, 80, 0.85) !important;
  transform: scale(1.08);
}

.drag-over-meld {
  border-color: #ffca28 !important;
  box-shadow: 0 0 20px rgba(255, 202, 40, 0.9) !important;
  transform: scale(1.07);
}

.drag-over-board {
  border-color: rgba(240, 195, 101, 0.7) !important;
  box-shadow: inset 0 0 25px rgba(240, 195, 101, 0.35) !important;
}

/* Buton Çubuğu */
.action-bar {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  margin-bottom: 2px;
  flex-wrap: nowrap;
  justify-content: center;
  z-index: 50;
}

.action-bar .btn {
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 8px;
  letter-spacing: 0.3px;
}

.btn {
  background: linear-gradient(180deg, #c29947 0%, #8c651e 100%);
  color: #1a0e05;
  border: 1px solid #e6b85c;
  padding: 6px 13px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  transition: all 0.15s ease;
}

.btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:disabled {
  opacity: 0.28 !important;
  cursor: not-allowed !important;
  filter: grayscale(1) brightness(0.6) !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

.btn.btn-ready-glow {
  background: linear-gradient(180deg, #43a047 0%, #2e7d32 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #a5d6a7 !important;
  box-shadow: 0 0 16px rgba(76, 175, 80, 0.9), 0 4px 10px rgba(0,0,0,0.5) !important;
  animation: ready-pulse 1.2s infinite alternate ease-in-out;
  filter: none !important;
  cursor: pointer !important;
  opacity: 1 !important;
  pointer-events: all !important;
}

@keyframes ready-pulse {
  0% { transform: scale(1); box-shadow: 0 0 8px rgba(76, 175, 80, 0.6); }
  100% { transform: scale(1.06); box-shadow: 0 0 20px rgba(76, 175, 80, 1), 0 0 8px #a5d6a7; }
}

.btn-danger.btn-ready-glow {
  background: linear-gradient(180deg, #e53935 0%, #c62828 100%) !important;
  border-color: #ff8a80 !important;
  box-shadow: 0 0 16px rgba(229, 57, 53, 0.9) !important;
  animation: ready-pulse-red 1.2s infinite alternate ease-in-out;
  filter: none !important;
  cursor: pointer !important;
  opacity: 1 !important;
  pointer-events: all !important;
}

@keyframes ready-pulse-red {
  0% { transform: scale(1); box-shadow: 0 0 8px rgba(229, 57, 53, 0.6); }
  100% { transform: scale(1.06); box-shadow: 0 0 20px rgba(229, 57, 53, 1); }
}

.btn-secondary {
  background: linear-gradient(180deg, #23313d 0%, #141c24 100%);
  color: #e0e0e0;
  border-color: #455a64;
}

.btn-success {
  background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%);
  color: #fff;
  border-color: #66bb6a;
}

.btn-danger {
  background: linear-gradient(180deg, #c62828 0%, #8e0000 100%);
  color: #fff;
  border-color: #ef5350;
}

.btn-host-start {
  background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #81c784 !important;
  box-shadow: 0 0 16px rgba(76, 175, 80, 0.8), 0 4px 10px rgba(0, 0, 0, 0.5) !important;
  animation: host-pulse 1.3s infinite alternate ease-in-out;
  font-weight: 900 !important;
  letter-spacing: 0.5px;
}

@keyframes host-pulse {
  0% { transform: scale(1); box-shadow: 0 0 8px rgba(76, 175, 80, 0.5); }
  100% { transform: scale(1.05); box-shadow: 0 0 20px rgba(76, 175, 80, 0.95), 0 0 8px #a5d6a7; }
}

/* Canlı Masa Sohbet Tetikleyici & Hızlı Mesajlar (Istakayı Asla Örtmez - Üst Köşede) */
.table-chat-trigger {
  position: absolute;
  top: 60px;
  right: 18px;
  bottom: auto;
  left: auto;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.btn-chat-bubble-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #1b3a4b 0%, #0d222e 100%);
  color: #80d8ff;
  border: 1.5px solid #00e5ff;
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(0, 229, 255, 0.25);
  transition: all 0.2s ease;
}

.btn-chat-bubble-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7), 0 0 16px rgba(0, 229, 255, 0.45);
  background: linear-gradient(135deg, #244d64 0%, #133345 100%);
}

.quick-phrases-popup {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: rgba(4, 23, 31, 0.96);
  border: 1.5px solid rgba(0, 229, 255, 0.35);
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 229, 255, 0.15);
  backdrop-filter: blur(8px);
  animation: popup-fade-up 0.25s ease-out;
}

.table-chat-trigger:hover .quick-phrases-popup,
.quick-phrases-popup.open {
  display: flex;
}

@keyframes popup-fade-up {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.quick-phrase-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #e0f2f1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.quick-phrase-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
  color: #fff;
  transform: translateX(3px);
}

.chat-drawer-quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* 101 Okey Kuralı: İşlek taşlar masada işaretlenmez, oyuncu kendisi takip eder */
.tile.is-islek::after {
  display: none !important;
}

@keyframes islek-pulse {
  0% { transform: scale(0.9); box-shadow: 0 0 4px #f44336; }
  100% { transform: scale(1.15); box-shadow: 0 0 12px #ff1744; }
}

.quick-phrase-btn {
  background: rgba(4, 25, 33, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cfd8dc;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-phrase-btn:hover {
  border-color: #00e5ff;
  color: #fff;
  transform: translateY(-1px);
}

.btn-chat-toggle {
  padding: 4px 10px;
  font-size: 10px;
}

.chat-drawer {
  position: absolute;
  bottom: 60px;
  right: 20px;
  width: 320px;
  height: 380px;
  background: rgba(10, 20, 28, 0.96);
  border: 1px solid rgba(240, 195, 101, 0.4);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0,0,0,0.85);
  z-index: 100;
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chat-drawer-header {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-drawer-header h4 {
  font-size: 13px;
  color: var(--gold-primary);
  font-weight: 800;
}

.chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.chat-msg {
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1.3;
}

.chat-msg.system {
  color: #ffca28;
  font-size: 11px;
  text-align: center;
  background: transparent;
}

.chat-msg .sender {
  font-weight: 800;
  color: #4fc3f7;
  margin-right: 4px;
}

.chat-input-bar {
  padding: 8px 12px;
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input-bar input {
  flex: 1;
  background: #060b10;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
}

/* Bildirim Bannerı */
.toast-banner {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 18, 24, 0.95);
  border: 1px solid var(--gold-secondary);
  color: #ffeb3b;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 20px;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.7);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-banner.show { opacity: 1; transform: translateX(-50%) translateY(4px); }
.toast-banner.penalty { background: #b71c1c; border-color: #ff8a80; color: #fff; }

/* Uçuş Animasyon Katmanı */
.animation-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 120;
}

.flying-tile-wrapper {
  position: absolute;
  pointer-events: none;
  z-index: 999;
  will-change: transform;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.8));
}

.flying-tile-wrapper .tile {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.9);
}

/* ========================================================
   MODALLAR
   ======================================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-card {
  background: #141f2b;
  border: 2px solid var(--gold-secondary);
  border-radius: 12px;
  width: 560px;
  max-width: 90%;
  padding: 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.85);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #263849;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.modal-header h2 { font-size: 17px; color: var(--gold-primary); font-weight: 800; display: flex; align-items: center; gap: 8px; }
.modal-close { background: none; border: none; color: #90a4ae; cursor: pointer; display: flex; align-items: center; }
.modal-close:hover { color: #fff; }

/* Auth Modalı */
.auth-tabs {
  display: flex;
  gap: 8px;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: #78909c;
  font-size: 15px;
  font-weight: 800;
  padding: 6px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.auth-tab-btn.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
}

.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 6px;
}

.avatar-choice {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.avatar-choice input { display: none; }

.avatar-choice img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.avatar-choice input:checked + img {
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(240, 195, 101, 0.8);
  transform: scale(1.08);
}

/* Profil Modalı */
.profile-details-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  margin-bottom: 14px;
}

.profile-avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  overflow: hidden;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info-block h3 {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.role-badge {
  display: inline-block;
  background: rgba(240, 195, 101, 0.2);
  color: var(--gold-primary);
  border: 1px solid rgba(240, 195, 101, 0.4);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 10px;
  margin: 4px 0 8px 0;
}

.xp-bar-wrap {
  width: 220px;
  height: 14px;
  background: #081118;
  border-radius: 7px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00e5ff 0%, #00b0ff 100%);
  border-radius: 7px;
}

.xp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  font-weight: 800;
  color: #fff;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.profile-stat-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.pstat-val {
  font-size: 16px;
  font-weight: 800;
  color: #ffd54f;
  display: block;
}

.pstat-lbl {
  font-size: 10px;
  color: #90a4ae;
  margin-top: 2px;
  display: block;
}

/* Masa İçi Menü Modalı */
.modal-menu-card {
  width: 360px;
}

.menu-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-btn {
  background: #0a141e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.menu-btn:hover {
  background: #142332;
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.menu-btn.danger:hover {
  border-color: #ef5350;
  color: #ef5350;
}

/* Çetele Tablosu */
.scoreboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 13px;
  margin-bottom: 14px;
}

.scoreboard-table th, .scoreboard-table td { padding: 8px; border: 1px solid #263849; }
.scoreboard-table th { background: #1c2c3d; color: var(--gold-primary); }
.scoreboard-table tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.scoreboard-table .total-row { background: #261b0d; font-weight: 800; color: #ffeb3b; }

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #1c2c3d;
}

.setting-label h4 { font-size: 13px; font-weight: 700; color: #eceff1; }
.setting-label p { font-size: 11px; color: #78909c; margin-top: 2px; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 12px; color: #b0bec5; font-weight: 700; margin-bottom: 4px; }
.form-control {
  width: 100%;
  background: #081017;
  border: 1px solid #263849;
  color: #fff;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 13px;
}

.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #455a64; transition: .3s; border-radius: 22px;
}
.slider:before {
  position: absolute; content: "";
  height: 16px; width: 16px; left: 3px; bottom: 3px;
  background-color: white; transition: .3s; border-radius: 50%;
}
input:checked + .slider { background-color: #2e7d32; }
input:checked + .slider:before { transform: translateX(18px); }

/* ========================================================
   IN-APP YÖNETİM PANELİ (NATIVE ADMIN DASHBOARD)
   ======================================================== */
.modal-admin-card {
  max-height: 90vh;
  overflow-y: auto;
}

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.astat-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(240, 195, 101, 0.3);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}

.astat-val {
  font-size: 20px;
  font-weight: 900;
  color: #ffd54f;
  display: block;
}

.astat-lbl {
  font-size: 11px;
  color: #90a4ae;
  margin-top: 3px;
  display: block;
}

.admin-section-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.admin-section-header-wrap h4 {
  font-size: 13px;
  font-weight: 800;
  color: #eceff1;
}

.admin-search-input {
  background: #081017;
  border: 1px solid #263849;
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  width: 180px;
}

.admin-table-wrap {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #263849;
  border-radius: 6px;
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.admin-users-table th, .admin-users-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-users-table th {
  background: #101c27;
  color: var(--gold-primary);
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 5;
}

.admin-users-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.admin-btn-action {
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  margin-right: 4px;
}

.admin-btn-chip { background: #f57f17; color: #fff; }
.admin-btn-ban { background: #c62828; color: #fff; }
.admin-btn-unban { background: #2e7d32; color: #fff; }
.admin-btn-role { background: #1565c0; color: #fff; }

.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ========================================================
   MOBİL VE RESPONSIVE UYUMLULUK
   ======================================================== */
.rotate-prompt {
  display: none;
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 23, 32, 0.96);
  border: 1.5px solid var(--gold-primary);
  border-radius: 14px;
  padding: 10px 18px;
  z-index: 99999;
  box-shadow: 0 10px 30px rgba(0,0,0,0.85);
  align-items: center;
  gap: 14px;
  max-width: 92%;
  backdrop-filter: blur(10px);
  animation: prompt-slide-down 0.35s ease;
}

@keyframes prompt-slide-down {
  0% { transform: translate(-50%, -20px); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}

.rotate-icon {
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  animation: rotate-wiggle 2.2s infinite ease-in-out;
}

@keyframes rotate-wiggle {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(90deg); }
}

.rotate-title { font-size: 13px; font-weight: 800; color: #fff; }
.rotate-desc { font-size: 11px; color: #b0bec5; margin-top: 2px; }
.btn-dismiss-rotate { padding: 5px 12px; font-size: 11px; }

/* Varsayılan Buton Metinleri */
.btn-text-full { display: inline; }
.btn-text-mobile { display: none; }

@media (max-width: 900px) {
  .table-top-bar { height: 44px; padding: 0 10px; }
  .table-balance-strip { gap: 6px; }
  .balance-pill { padding: 3px 8px; font-size: 11px; }
  .gift-box-pill { display: none; }
  .table-info-pill-bar { padding: 3px 10px; gap: 4px; }
  .table-info-pill-bar .table-info-row,
  .table-info-pill-bar .info-sep { display: none; }
  .btn-top-nav { padding: 4px 8px; font-size: 11px; }
  #btn-table-rewards, #btn-open-scoreboard, #btn-fullscreen-table { display: none; }
  .seat-top { top: 6px; }
  .seat-left { left: 8px; }
  .seat-right { right: 8px; }
  .avatar-wrap { width: 44px; height: 44px; }
  .opponent-rack-preview { display: none !important; }
  .hand-summary-badges { left: 140px; bottom: 155px; }
  .table-chat-trigger { right: 10px; top: 48px; bottom: auto; left: auto; }
  .btn-chat-bubble-toggle { padding: 6px 12px; font-size: 11px; }
}

@media (max-width: 768px), (max-height: 520px) {
  .btn-text-full { display: none; }
  .btn-text-mobile { display: inline; }

  .table-top-bar { height: 40px; padding: 0 6px; }
  .diamonds-pill { display: none; }
  .balance-pill { padding: 2px 6px; font-size: 10px; }
  .btn-top-nav { padding: 3px 6px; font-size: 10px; min-height: 28px; }

  /* Mobilde Alt Aksiyon Çubuğu: 100% Görünür & Dokunmatik Uyumlu */
  .player-station-bottom {
    bottom: 3px;
    width: 100%;
    max-width: 100vw;
  }

  .rack-container {
    gap: 6px;
    margin-bottom: 2px;
  }

  .rack-left-controls {
    gap: 4px;
  }

  .btn-rack-action {
    padding: 5px 6px;
    font-size: 10px;
    border-radius: 6px;
  }

  .discard-perch-slot {
    width: 38px;
    height: 52px;
  }

  .action-bar {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 3px;
    margin-bottom: 1px;
    padding: 0 4px;
  }

  .action-bar .btn {
    padding: 6px 8px;
    font-size: 11px;
    min-height: 34px;
    border-radius: 6px;
    flex: 1 1 auto;
    max-width: 110px;
    justify-content: center;
  }

  .chat-drawer {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 50px;
    max-height: 55vh;
  }

  .hand-summary-badges {
    bottom: 140px;
    left: 70px;
    gap: 4px;
  }

  .hand-score-pill, .hand-count-pill {
    padding: 2px 7px;
    font-size: 10px;
  }
}

/* ========================================================
   ARKADAŞ, DAVET, İZLEYİCİ & PP YÜKLEME STİLLERİ
   ======================================================== */

/* İzleyici (Seyirci) Modu Rozeti */
.spectator-badge {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  color: #fff;
  border: 1.5px solid #64b5f6;
  padding: 5px 18px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  z-index: 55;
  box-shadow: 0 0 16px rgba(33, 150, 243, 0.7);
  pointer-events: none;
  animation: pulse-blue 2s infinite alternate;
}

@keyframes pulse-blue {
  0% { box-shadow: 0 0 10px rgba(33, 150, 243, 0.5); }
  100% { box-shadow: 0 0 22px rgba(33, 150, 243, 0.95), 0 0 8px #90caf9; }
}

/* Canlı Gelen Davet Bildirimi */
.incoming-invite-card {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  background: linear-gradient(135deg, #0b2230 0%, #05131b 100%);
  border: 2px solid #ffd54f;
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(240, 195, 101, 0.45);
  animation: invite-pop 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes invite-pop {
  0% { opacity: 0; transform: translateY(-30px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.invite-card-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #f0c365;
  flex-shrink: 0;
}

.invite-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invite-card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.invite-card-title {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.invite-card-desc {
  color: #90a4ae;
  font-size: 11px;
}

.invite-card-actions {
  display: flex;
  gap: 8px;
  margin-left: 10px;
}

.btn-sm {
  padding: 6px 12px !important;
  font-size: 11px !important;
  border-radius: 6px !important;
}

/* Profil PP Yükleme Bloğu */
.profile-pp-upload-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(240, 195, 101, 0.4);
  border-radius: 10px;
  padding: 12px;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.btn-upload-pp {
  width: 100%;
  padding: 9px !important;
  font-size: 12px !important;
  font-weight: 800;
  cursor: pointer;
}

.pp-upload-desc {
  font-size: 11px;
  color: #90a4ae;
}

/* Arkadaşlar Listesi */
.friends-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  transition: all 0.2s ease;
}

.friend-row:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(240, 195, 101, 0.35);
}

.friend-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.friend-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.friend-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #081822;
}

.online-dot.online {
  background: #00e676;
  box-shadow: 0 0 8px #00e676;
}

.online-dot.offline {
  background: #78909c;
}

.friend-text {
  display: flex;
  flex-direction: column;
}

.friend-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.friend-meta {
  font-size: 11px;
  color: #90a4ae;
}

.friend-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Davet Modalı Kullanıcı Listesi */
.invite-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
}

.seat-empty-hint {
  font-size: 11px;
  color: #90a4ae;
  font-style: italic;
}

.room-full-badge {
  background: #c62828 !important;
  color: #fff !important;
  border-color: #ef5350 !important;
}

.seat .avatar-wrap {
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.seat .avatar-wrap:hover {
  transform: scale(1.08);
  filter: brightness(1.15);
}

.seat.empty-seat {
  opacity: 0.6;
}

.seat.empty-seat .player-name {
  color: #ffca28;
  font-style: italic;
}

@media (max-height: 850px) {
  .center-board { top: 44%; }
  .seat-top { top: 4px; }
}

/* ========================================================
   12. ZAFER & ŞAMPİYON KUTLAMA MODALI (GRAND CELEBRATION)
   ======================================================== */
.celebration-overlay {
  z-index: 100000;
  background: rgba(2, 8, 14, 0.88);
  backdrop-filter: blur(10px);
}

.celebration-card {
  position: relative;
  max-width: 480px;
  width: 90%;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, #173847 0%, #0d1a22 70%, #060c10 100%);
  border: 2px solid #ffd54f;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.95), 0 0 45px rgba(255, 213, 79, 0.4);
  padding: 30px 24px;
  animation: celebration-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes celebration-pop {
  0% { transform: scale(0.65); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.celebration-trophy-wrap {
  position: relative;
  margin: -10px auto 12px auto;
}

.celebration-trophy-slot {
  font-size: 64px;
  line-height: 1;
  animation: trophy-bounce 1s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
}

@keyframes trophy-bounce {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-8px) scale(1.08); }
}

.celebration-stars {
  font-size: 15px;
  color: #ffd54f;
  letter-spacing: 6px;
  margin-top: 4px;
}

.celebration-ribbon {
  display: inline-block;
  background: linear-gradient(90deg, #d4af37, #f3e5ab, #d4af37);
  color: #1a0e05;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 2px;
  padding: 4px 18px;
  border-radius: 12px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.celebration-title {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

.celebration-type-badge {
  display: inline-block;
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.5);
  color: #80deea;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 16px;
  border-radius: 16px;
  margin-bottom: 16px;
}

.celebration-score-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(240, 195, 101, 0.3);
  border-radius: 12px;
  padding: 10px 18px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.celebration-score-box .score-label {
  font-size: 13px;
  color: #b0bec5;
  font-weight: 700;
}

.celebration-score-box .score-val {
  font-size: 18px;
  color: #ffd54f;
  font-weight: 900;
}

.celebration-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
}

/* ========================================================
   KLASİK (DÜZ) OKEY ÖZEL ARAYÜZ VE GÖRÜNÜM AYARLARI
   ======================================================== */
.duz-okey-mode #table-melds-container,
.duz-okey-mode .player-melds-zone,
.duz-okey-mode .btn-101-only,
.duz-okey-mode #btn-revert-melds,
.duz-okey-mode .player-meld-status,
.duz-okey-mode #hand-meld-badge,
.duz-okey-mode #hand-pair-badge,
.duz-okey-mode #hand-penalty-badge,
.duz-okey-mode #meld-3d-banner,
.duz-okey-mode .info-sep-101,
.duz-okey-mode #table-esli-tag,
.duz-okey-mode #table-ceza-tag {
  display: none !important;
}

.btn-gold {
  background: linear-gradient(135deg, #ffd700 0%, #ff8f00 100%);
  color: #1a0f00 !important;
  font-weight: 900 !important;
  border: 1px solid #ffe082;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.45);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: all 0.22s ease;
}

.btn-gold:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffe082 0%, #ffa000 100%);
  box-shadow: 0 6px 22px rgba(255, 193, 7, 0.75);
  transform: translateY(-2px);
}

.btn-gold.btn-ready-to-finish {
  animation: finish-gold-pulse 1.1s infinite alternate;
  border-color: #ffffff;
  cursor: pointer;
}

@keyframes finish-gold-pulse {
  0% {
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6), inset 0 0 6px rgba(255, 255, 255, 0.4);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.95), inset 0 0 14px rgba(255, 255, 255, 0.8);
    transform: scale(1.06);
  }
}

/* Mobil Uyumlu Köşe Tepsileri */
@media (max-width: 900px) {
  .tray-top-left {
    top: 50px;
    left: 80px;
  }
  .tray-bottom-left {
    bottom: 145px;
    left: 10px;
  }
  .tray-bottom-right {
    bottom: 145px;
    right: 10px;
  }
  .tray-top-right {
    top: 50px;
    right: 80px;
  }
}
