/* =========================================================================
   BLACKJACK ÖZEL STİLLERİ
   ========================================================================= */

.bj-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: stretch;
}

/* ==================================
   SOL PANEL (BİLGİ & BAHİS)
   ================================== */
.bj-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bj-info-section {
    background: linear-gradient(145deg, var(--surface-800) 0%, var(--surface-900) 100%);
    border: 1px solid var(--surface-700);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.bj-info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient);
}

.bj-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--surface-700);
    padding-bottom: 16px;
}

.bj-logo-box {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: var(--surface-900);
    border: 1px solid var(--surface-600);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 10px rgba(var(--primary), 0.05);
}

.bj-logo-box img {
    width: 80%;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.bj-title-texts h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bj-title-texts p {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
}

.bj-stats-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bj-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bj-value {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    background: var(--surface-900);
    border: 1px solid var(--surface-700);
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.bj-bet-section {
    background: linear-gradient(145deg, var(--surface-800) 0%, var(--surface-900) 100%);
    border: 1px solid var(--surface-700);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bj-chips-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: var(--surface-900);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--surface-700);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.bj-chip {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.bj-chip img {
    width: 100%;
    max-width: 48px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
    transition: transform 0.3s ease;
}

.bj-chip:hover {
    transform: translateY(-4px);
}

.bj-chip:hover img {
    filter: drop-shadow(0 8px 12px rgba(var(--primary), 0.4));
}

.bj-chip:active {
    transform: scale(0.95);
}

.bj-bet-actions {
    display: flex;
    gap: 12px;
}

.bj-btn-clear,
.bj-btn-deal {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
    font-size: 13px;
    font-weight: 800;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bj-btn-clear {
    background: var(--surface-700);
    color: var(--text-secondary);
    border: 1px solid var(--surface-600);
}

.bj-btn-clear:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color, #ef4444);
    border-color: rgba(239, 68, 68, 0.3);
}

.bj-btn-deal {
    background: var(--gradient);
    color: var(--text-on-accent, #000);
    box-shadow: 0 4px 15px rgba(var(--primary), 0.3);
}

.bj-btn-deal:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary), 0.5);
}

.bj-btn-clear:disabled,
.bj-btn-deal:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* ==================================
   SAĞ PANEL (OYUN ALANI)
   ================================== */
.bj-game-area {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--surface-700);
    background: var(--surface-900);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.bj-game-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    z-index: 0;
}

.bj-game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(10, 10, 10, 0.4) 0%, rgba(10, 10, 10, 0.95) 100%);
    z-index: 1;
}

.bj-board {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 16px;
}

.bj-zone {
    flex: 1;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.bj-zone-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: auto;
}

.bj-zone-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bj-score {
    padding: 4px 12px;
    height: auto;
    width: auto;
    border-radius: 20px;
    background: var(--surface-700);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    border: 1px solid var(--surface-600);
    white-space: nowrap;
}

.bj-score:not(:empty) {
    background: var(--gradient);
    color: var(--text-on-accent, #000);
    border: none;
    box-shadow: 0 0 10px rgba(var(--primary), 0.5);
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: -15px;
    min-height: 70px;
    perspective: 1000px;
    margin-top: 10px;
}

@keyframes dealCard {
    0% {
        opacity: 0;
        transform: translateY(-40px) scale(0.9) rotate(-10deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

.blackjack-card {
    width: 60px;
    height: 86px;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--text-secondary, #ddd);
    box-shadow: -3px 3px 10px rgba(0, 0, 0, 0.6);
    margin-left: -20px;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: dealCard 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.cards-container .blackjack-card:first-child {
    margin-left: 0;
}

.blackjack-card:hover {
    transform: translateY(-8px) scale(1.05);
}

/* Oyun İçi Kontrol Butonları (Kart Al, Dur) */
.bj-game-controls {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 24px 20px;
}

.bj-btn-game {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid var(--surface-600);
    background: var(--surface-800);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bj-btn-game:hover:not(:disabled) {
    background: var(--surface-700);
    color: var(--brand-red);
    border-color: var(--brand-red);
}

.bj-btn-game:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Mesaj Alanı */
.bj-message-bar {
    position: relative;
    z-index: 2;
    background: rgba(10, 10, 10, 0.85);
    border-top: 1px solid var(--brand-red);
    padding: 12px;
    text-align: center;
    color: var(--brand-red);
    font-size: 15px;
    font-weight: 800;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(var(--primary), 0.3);
}

.bj-btn-primary {
    background: var(--gradient) !important;
    color: var(--text-on-accent, #000)!important;
    border: none !important;
    box-shadow: 0 0 15px rgba(var(--primary), 0.3);
}

.bj-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(var(--primary), 0.5);
}

/* İstatistik Paneli */
.blackjack-stats-section {
    background: linear-gradient(145deg, var(--surface-800) 0%, var(--surface-900) 100%);
    border: 1px solid var(--surface-700);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* ==================================
   MOBİL (RESPONSIVE YAPI)
   ================================== */
@media (max-width: 992px) {
    .bj-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .bj-sidebar {
        display: contents;
    }

    .bj-info-section {
        order: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px;
        background: var(--surface-800);
        border-radius: 12px;
    }

    .bj-title-row {
        margin-bottom: 0;
        border-bottom: none;
        padding-bottom: 0;
    }

    .bj-logo-box {
        width: 40px;
        height: 40px;
    }

    .bj-title-texts h2 {
        font-size: 15px;
    }

    .bj-stats-block {
        flex-direction: row;
        align-items: center;
        gap: 0px;
    }

    .bj-label {
        display: none;
    }

    .bj-value {
        padding: 8px 12px;
        font-size: 14px;
    }

    .bj-game-area {
        order: 2;
        min-height: 240px;
        /* Mobilde oldukça küçültüldü */
        margin-bottom: 8px;
    }

    .bj-bet-section {
        order: 3;
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .bj-bet-actions {
        order: 3;
        /* Üçüncü sırada butonlar (Dağıt, Temizle) */
    }

    .bj-chips-container {
        order: 4;
        /* En altta çipler */
    }

    .bj-chips-container .bj-label {
        display: block;
        margin-bottom: 12px;
    }

    .bj-board {
        padding: 12px;
        gap: 12px;
    }

    .bj-zone {
        padding: 12px;
    }

    .blackjack-card {
        width: 55px;
        height: 80px;
        margin-left: -10px;
    }

    .cards-container {
        min-height: 60px;
    }

    .bj-game-controls {
        padding: 0 12px 16px;
        gap: 8px;
    }

    .bj-btn-game {
        padding: 8px 12px;
        font-size: 11px;
    }
}