/* ======================================================
   🔴 EUROPEAN ROULETTE (0 - 36 KLASİK AVRUPA RULETİ)
   ====================================================== */

.roulette-modal {
    background: linear-gradient(180deg, #0b111a 0%, #060910 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    width: 100%;
    max-width: 1040px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.95), 0 0 60px rgba(239, 68, 68, 0.12);
    transform: scale(0.96) translateY(12px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .roulette-modal {
    transform: scale(1) translateY(0);
}

.roulette-body {
    display: grid;
    grid-template-columns: 360px 1fr;
    min-height: 520px;
}

@media (max-width: 900px) {
    .roulette-body {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

/* Sol Rulet Çarkı & Bilye */
.roulette-wheel-container {
    background: radial-gradient(circle at 50% 50%, rgba(244, 63, 94, 0.06) 0%, #06080e 80%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border-right: 1px solid #1a2233;
    overflow: hidden;
}

.roulette-wheel-wrapper {
    position: relative;
    width: 310px;
    height: 310px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#rouletteCanvas {
    width: 310px;
    height: 310px;
    border-radius: 50%;
    box-shadow: 0 0 35px rgba(0,0,0,0.9), inset 0 0 25px rgba(0,0,0,0.85);
    transition: transform 5s cubic-bezier(0.12, 0.9, 0.18, 1);
}

.roulette-pointer {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 18px solid #f8fafc;
    z-index: 20;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.9));
}

.roulette-center-hub {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, #1a2333 0%, #0d121c 100%);
    border: 3px solid #d97706;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.9);
    z-index: 10;
}

.roulette-center-hub span.win-num {
    font-size: 16px;
    font-weight: 900;
}

/* Üst Geçmiş */
.roulette-history-bar {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    z-index: 10;
}

.roulette-history-pill {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.roulette-history-pill.red { background: #e11d48; }
.roulette-history-pill.black { background: #1e293b; border: 1px solid rgba(255,255,255,0.15); }
.roulette-history-pill.green { background: #10b981; }

/* Sağ: Rulet Masası (Çuha Alanı) */
.roulette-table-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #090d15;
}

/* Fiş Seçim Barı */
.chip-selector-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.chip-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    border: 2px dashed rgba(255,255,255,0.4);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.chip-btn:hover {
    transform: translateY(-3px) scale(1.05);
}

.chip-btn.active {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 0 16px currentColor;
    border-style: solid;
}

.chip-10 { background: #3b82f6; }
.chip-50 { background: #10b981; }
.chip-100 { background: #f59e0b; }
.chip-500 { background: #8b5cf6; }
.chip-1000 { background: #ef4444; }

/* Rulet Sayı Grid Masası */
.roulette-board-layout {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    user-select: none;
}

.board-zero {
    width: 42px;
    background: #10b981;
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.15s;
    position: relative;
}

.board-zero:hover { filter: brightness(1.15); }

.board-numbers-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(3, 38px);
    gap: 4px;
    flex: 1;
}

.board-tile {
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.08);
    position: relative;
    transition: all 0.15s;
}

.board-tile:hover { filter: brightness(1.25); transform: scale(1.04); z-index: 2; }
.board-tile.red { background: #e11d48; }
.board-tile.black { background: #1e293b; }

/* Masa Dış Bahisleri */
.board-outside-bets {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
    user-select: none;
}

.outside-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.outside-tile {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    color: #cbd5e1;
    cursor: pointer;
    position: relative;
    transition: all 0.15s;
}

.outside-tile:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.outside-tile.red-bet {
    background: rgba(225, 29, 72, 0.2);
    border-color: rgba(225, 29, 72, 0.4);
    color: #fb7185;
}

.outside-tile.black-bet {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}

/* Masadaki Aktif Fiş Rozeti */
.tile-chip-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #f59e0b;
    color: #000;
    font-size: 9px;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 5;
}

/* Buton Barı */
.roulette-action-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-clear-bets {
    padding: 16px 20px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-clear-bets:hover {
    background: #ef4444;
    color: #fff;
}

.btn-roulette-spin {
    flex: 1;
    padding: 16px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 10px 30px -8px rgba(16, 185, 129, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-roulette-spin:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px -8px rgba(16, 185, 129, 0.7);
}

.btn-roulette-spin:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

@media (max-width: 900px) {
    .roulette-modal {
        max-width: 100%;
        height: 94vh;
        max-height: 94vh;
        border-radius: 24px 24px 0 0;
        border-bottom: none;
        display: flex;
        flex-direction: column;
    }

    .roulette-body {
        grid-template-columns: 1fr;
        min-height: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .roulette-wheel-container {
        height: auto;
        min-height: 250px;
        padding: 12px 10px;
        border-right: none;
        border-bottom: 1px solid #1a2233;
        flex-shrink: 0;
    }

    .roulette-history-bar {
        position: static;
        margin-bottom: 8px;
        width: 100%;
        justify-content: center;
    }

    .roulette-wheel-wrapper, #rouletteCanvas {
        width: 200px;
        height: 200px;
    }

    .roulette-table-container {
        padding: 16px 12px 24px;
        flex-grow: 1;
    }

    .chip-selector-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
        margin-bottom: 12px;
        justify-content: flex-start;
    }

    .chip-btn {
        width: 38px;
        height: 38px;
        font-size: 11px;
        flex-shrink: 0;
    }

    /* Sayı masasını taşma olmadan kaydırılabilir yap */
    .roulette-board-layout {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }

    .board-numbers-grid {
        min-width: 480px;
        grid-template-rows: repeat(3, 34px);
    }

    .board-zero {
        min-width: 36px;
    }

    .board-outside-bets {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 14px;
    }

    .outside-row {
        min-width: 480px;
    }

    .outside-tile {
        padding: 6px 4px;
        font-size: 10px;
    }

    .roulette-action-bar {
        flex-direction: column;
        gap: 8px;
    }

    .btn-clear-bets {
        width: 100%;
        padding: 12px;
        order: 2;
    }

    .btn-roulette-spin {
        width: 100%;
        padding: 15px;
        order: 1;
    }
}
