/**
 * Premium Table UI — 40 Kart Oyununun Tamamı İçin Evrensel AAA Tasarım Sistemi
 * (Poker / Hearthstone / VIP Games Standardı: Tüm Masalara %100 Uyumlu)
 */

/* ==========================================================================
   1. MASA VE ÇUHA ZEMİNİ (Radial Kumaş, 3D Ahşap Çerçeve & Vignette Derinlik)
   ========================================================================== */
#game-table-container,
.wood-frame,
.felt-green,
.game-arena-fit,
.premium-game-table {
    position: relative !important;
    background: radial-gradient(circle at 50% 48%, #1d6e44 0%, #135C38 52%, #082a18 100%) !important;
    box-shadow: 
        inset 0 0 120px rgba(0, 0, 0, 0.75),
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 10px #2d180c,
        0 0 0 12px #4a2814,
        0 0 0 14px rgba(245, 197, 66, 0.25) !important;
    border-radius: 28px !important;
    overflow: hidden !important;
    user-select: none !important;
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Çuha İçi Dikiş Çizgisi */
#game-table-container::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1.5px dashed rgba(245, 197, 66, 0.18);
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}

/* Gece Mavisi ve Bordo Çuha Temaları */
.theme-blue #game-table-container,
#game-table-container.felt-blue {
    background: radial-gradient(circle at 50% 48%, #173852 0%, #122b3b 52%, #06131c 100%) !important;
}

.theme-bordeaux #game-table-container,
#game-table-container.felt-bordeaux {
    background: radial-gradient(circle at 50% 48%, #4f1821 0%, #3b1219 52%, #1a0509 100%) !important;
}

.wood-frame { 
    background-color: #2b180a; 
    border: 6px solid #3d2311; 
    border-radius: 24px; 
    box-shadow: inset 0 0 16px rgba(0,0,0,0.9), 0 10px 30px rgba(0,0,0,0.5), 0 0 0 1.5px rgba(212,175,55,0.4); 
    position: relative; 
    width: 100%; 
    max-width: 1140px; 
    margin: 0 auto; 
    overflow: hidden; 
    touch-action: none !important;
    user-select: none !important;
}

.game-arena-fit { 
    width: 100%; 
    height: 100% !important; 
    min-height: 520px;
    max-height: 100%;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    align-items: center; 
    padding: 8px 16px 12px 16px !important; 
    position: relative; 
    user-select: none !important; 
    touch-action: none !important;
    box-sizing: border-box; 
}

.felt-green { background: radial-gradient(ellipse at 50% 45%, #227c41 0%, #14562b 55%, #0b2f17 100%); }
.felt-blue { background: radial-gradient(ellipse at 50% 45%, #1e4c82 0%, #123158 55%, #091a30 100%); }
.felt-bordeaux { background: radial-gradient(ellipse at 50% 45%, #7a1928 0%, #4e0f19 55%, #2b080d 100%); }

/* ==========================================================================
   2. TÜM 40 OYUNDA HEARTHSTONE / POKER OYUNCU KOLTUKLARI (Player Seats & Capsules)
   ========================================================================== */
.player-capsule,
.player-seat,
[id^="hud-"],
[id*="-hud-"],
[id*="hud_"] {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 4px 12px !important;
    background: rgba(10, 14, 26, 0.88) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 9999px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: #ffffff !important;
    user-select: none !important;
    z-index: 25 !important;
}

/* Aktif Sıra Parlaması (Turn Active Golden Aura) */
.player-capsule.turn-active,
.player-seat.turn-active,
.turn-active {
    border-color: #F5C542 !important;
    box-shadow: 0 0 25px rgba(245, 197, 66, 0.65), inset 0 0 12px rgba(245, 197, 66, 0.3) !important;
    transform: scale(1.04) !important;
}

/* Avatar Çemberi */
.seat-avatar {
    position: relative !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #2a2050, #140e2b) !important;
    border: 2px solid #F5C542 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4) !important;
    flex-shrink: 0 !important;
}

.seat-avatar svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
}

/* Bilgi Alanı */
.seat-info {
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important;
    line-height: 1.25 !important;
}

.seat-name {
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.seat-score {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #F5C542 !important;
}

/* Kişilik Rozeti */
.personality-tag {
    font-size: 9px !important;
    font-weight: 800 !important;
    padding: 1px 6px !important;
    border-radius: 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: inline-flex !important;
    align-items: center !important;
}
.personality-tag.aggressive { background: rgba(239, 68, 68, 0.35) !important; color: #fca5a5 !important; border: 1px solid rgba(239, 68, 68, 0.5) !important; }
.personality-tag.tactical   { background: rgba(59, 130, 246, 0.35) !important; color: #93c5fd !important; border: 1px solid rgba(59, 130, 246, 0.5) !important; }
.personality-tag.joker      { background: rgba(245, 158, 11, 0.35) !important; color: #fde047 !important; border: 1px solid rgba(245, 158, 11, 0.5) !important; }
.personality-tag.player     { background: rgba(16, 185, 129, 0.35) !important; color: #6ee7b7 !important; border: 1px solid rgba(16, 185, 129, 0.5) !important; }

/* ==========================================================================
   3. TÜM OYUNLARDA GPU HIZLANDIRMALI KART VE HOVER GLOW EFEKTİ
   ========================================================================== */
.playing-card {
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.15s ease !important;
    will-change: transform;
    cursor: grab !important;
    border-radius: 8px !important;
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-user-drag: none !important;
    -webkit-touch-callout: none !important;
}

.playing-card:active {
    cursor: grabbing !important;
}

/* Sadece Oyuncu Elindeki Kartlar Hover Yapınca Yukarı Fırlar (Tablo Kolonları Asla Bozulmaz) */
#hand-player .playing-card:hover,
#pisti-hand-player .playing-card:hover,
[id*="hand-player"] .playing-card:hover,
.hand-card:hover {
    transform: translateY(-16px) scale(1.05) !important;
    box-shadow: 0 0 20px rgba(245, 197, 66, 0.75), 0 12px 24px rgba(0, 0, 0, 0.6) !important;
    z-index: 45 !important;
}

/* Oyuncu Eli Hizalaması (Asla Aşağı Taşmaz) */
#hand-player,
#pisti-hand-player,
[id*="hand-player"] {
    margin-bottom: 2px !important;
    min-height: 80px !important;
    overflow: visible !important;
    z-index: 30 !important;
}

/* 60 FPS Ultra Akıcı Sürükle - Bırak (Drag & Drop) Stilleri */
.drag-ghost {
    position: fixed !important;
    pointer-events: none !important;
    z-index: 999999 !important;
    transform-origin: 20px 20px;
    filter: drop-shadow(0 20px 35px rgba(0,0,0,0.85));
    will-change: transform;
    cursor: grabbing !important;
}

.card-dragging {
    opacity: 0.20 !important;
    filter: grayscale(0.6);
}

.drop-target-active {
    box-shadow: 0 0 0 3px #F5C542, 0 0 25px rgba(245, 197, 66, 0.65) !important;
    background: rgba(245, 197, 66, 0.20) !important;
    border-radius: 10px !important;
    transition: all 0.12s ease;
}

/* Lüks Yuva & Hücre Tasarımı */
[data-drop-target="freecell"],
[data-drop-target="foundation"],
.foundation-slot,
.freecell-slot {
    background: rgba(0, 0, 0, 0.45) !important;
    border: 1.5px dashed rgba(255, 255, 255, 0.25) !important;
    border-radius: 10px !important;
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.7) !important;
}

/* Ters Kart Deseni */
.card-pattern-back {
    background: #8b0000 url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 0l6 6-6 6-6-6z' fill='%23a10000' fill-opacity='0.4'/%3E%3C/svg%3E") !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
}

/* ==========================================================================
   4. MERKEZİ POT VE LÖVE ALANLARI
   ========================================================================== */
#batak-pot,
#pisti-pot,
#pot,
.table-pot,
.poker-pot {
    background: radial-gradient(circle, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.15) 70%, transparent 100%) !important;
    border: 1.5px dashed rgba(245, 197, 66, 0.3) !important;
    border-radius: 50% !important;
}

.center-stage-crystal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(8, 12, 20, 0.90);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(245, 197, 66, 0.4);
    border-radius: 30px;
    padding: 5px 16px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    z-index: 30;
}

/* ==========================================================================
   5. SAĞ ALT ZARİF SOHBET ÇEKMECESİ (Kartlara Asla Değmez)
   ========================================================================== */
.mini-chat-floating-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(10, 14, 24, 0.92);
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(245, 197, 66, 0.6);
    border-radius: 24px;
    color: #F5C542;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}
.mini-chat-floating-btn:hover {
    background: #000;
    transform: scale(1.05);
    border-color: #F5C542;
}

.mini-chat-side-drawer {
    position: absolute;
    top: 12px;
    right: 12px;
    bottom: 12px;
    width: 280px;
    background: rgba(8, 12, 22, 0.95);
    backdrop-filter: blur(16px);
    border: 1.5px solid rgba(245, 197, 66, 0.4);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    z-index: 70;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
}

.mini-chat-side-drawer.closed {
    transform: translateX(110%);
    opacity: 0;
    pointer-events: none;
}
