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

/* Ana Kapsayıcı */
.rulet-game-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: var(--font-main);
}

/* =========================================================================
   ÜST KISIM (GEÇMİŞ VE İSTATİSTİKLER)
   ========================================================================= */
.rulet-history-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4px;
}

.rulet-recent-container, .rulet-stats-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rulet-stats-container {
    align-items: flex-end;
}

.rulet-recent-title, .rulet-stats-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.rulet-recent-colors {
    display: flex;
    gap: 6px;
    overflow-x: auto;
}

.rulet-recent-item {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--surface-800); /* Boş durum için */
    flex-shrink: 0;
}

/* Dolu recent item renkleri js ile eklendiğinde kullanılabilir */
.rulet-recent-item.red { background: linear-gradient(180deg, #ff4e4e 0%, #d32f2f 100%); }
.rulet-recent-item.green { background: linear-gradient(180deg, #00e676 0%, #00b259 100%); }
.rulet-recent-item.black { background: linear-gradient(180deg, #3a3f47 0%, #1e2227 100%); }
.rulet-recent-item.yellow { background: linear-gradient(180deg, #ffca28 0%, #f57f17 100%); }

.rulet-stats-items {
    display: flex;
    gap: 8px;
}

.rulet-stat-item {
    display: flex;
    align-items: center;
}

.rulet-stat-box {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light, #fff);
}

.rulet-stat-box.green { background: #00e676; color: var(--text-on-accent, #000); }
.rulet-stat-box.red { background: #ff4e4e; }
.rulet-stat-box.black { background: #2b3036; }
.rulet-stat-box.yellow { background: #ffca28; color: var(--text-on-accent, #000); }

/* =========================================================================
   BAĞLANTI, SAYAÇ VE İKONLAR
   ========================================================================= */
.rulet-connection-timer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rulet-connection-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rulet-connection-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.rulet-connection-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light, #fff);
}

.rulet-status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

.rulet-timer-wrapper {
    background: var(--surface-800);
    padding: 6px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rulet-timer {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-light, #fff);
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

.rulet-timer-unit {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 2px;
}

.rulet-info-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-light, #fff);
}

.rulet-volume-icon, .rulet-info-icon {
    cursor: pointer;
    transition: opacity 0.2s;
    opacity: 0.8;
}

.rulet-volume-icon:hover, .rulet-info-icon:hover {
    opacity: 1;
}

/* =========================================================================
   RULET TRACK (ÇARK)
   ========================================================================= */
.rulet-track-container {
    position: relative;
    width: 100%;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--surface-700);
    margin-bottom: 8px;
}

/* Ortadaki Mor Çizgi */
.rulet-track-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: calc(100% - 4px); /* border-bottom a kadar */
    background: #8b5cf6; /* Mor renk */
    z-index: 10;
    border-radius: 2px;
}

.rulet-track-wrapper {
    width: 100%;
    overflow: hidden;
    height: 70px;
    position: relative;
}

.rulet-track-inner {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.rulet-track {
    display: flex;
    height: 100%;
    align-items: center;
    transition: transform 5s cubic-bezier(0.1, 0.7, 0.1, 1);
    gap: 6px; /* Track itemlar arası boşluk */
}

/* JavaScript'in ekleyeceği track hücreleri için stiller */
.rulet-track-cell {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 2px solid transparent; /* Kalın kenar */
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.1);
}
.rulet-track-cell.red { background: linear-gradient(180deg, #ff4e4e 0%, #d32f2f 100%); border-top-color: #ff7575; }
.rulet-track-cell.black { background: linear-gradient(180deg, #3a3f47 0%, #1e2227 100%); border-top-color: #535a66; }
.rulet-track-cell.green { background: linear-gradient(180deg, #00e676 0%, #00b259 100%); border-top-color: #33ffa0; }
.rulet-track-cell.yellow { background: linear-gradient(180deg, #ffca28 0%, #f57f17 100%); border-top-color: #ffe066; }
.rulet-track-cell.empty { background: var(--surface-900); }

.rulet-track-cell.centered {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.4);
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* =========================================================================
   BAHİS GİRİŞ ALANI
   ========================================================================= */
.rulet-bet-section {
    margin-bottom: 8px;
}

.rulet-bet-control {
    width: 100%;
}

.rulet-bet-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rulet-bet-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.rulet-bet-input-group {
    display: flex;
    align-items: center;
    background: var(--surface-800);
    border-radius: 8px;
    padding: 6px 12px;
    height: 48px;
}

.rulet-bet-icon-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
}

.rulet-bet-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.rulet-bet-icon-svg {
    width: 100%;
    height: 100%;
}

.rulet-bet-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    outline: none;
    width: 100%;
}

.rulet-bet-buttons {
    display: flex;
    gap: 6px;
}

.rulet-bet-btn {
    background: var(--surface-900);
    border: none;
    color: var(--text-light, #fff);
    padding: 0 14px;
    height: 32px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.rulet-bet-btn:hover {
    background: var(--surface-700);
}

/* =========================================================================
   RENK BAHİSLERİ VE BUTONLAR
   ========================================================================= */
.rulet-color-bets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.rulet-color-bet-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rulet-color-bet-btn {
    width: 100%;
    height: 64px;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    border-radius: 8px;
    color: var(--text-light, #fff);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
}

.rulet-color-bet-btn:hover {
    filter: brightness(1.1);
}

.rulet-color-bet-btn:active {
    transform: scale(0.98);
}

/* Resimdeki Renkler */
.rulet-color-bet-btn.red { background: linear-gradient(180deg, #ff4e4e 0%, #d32f2f 100%); }
.rulet-color-bet-btn.green { background: linear-gradient(180deg, #00e676 0%, #00b259 100%); color: var(--text-on-accent, #000); }
.rulet-color-bet-btn.yellow { background: linear-gradient(180deg, #ffca28 0%, #f57f17 100%); color: var(--text-on-accent, #000); }
.rulet-color-bet-btn.black { background: linear-gradient(180deg, #3a3f47 0%, #1e2227 100%); }

.rulet-bet-multiplier {
    background: rgba(0,0,0,0.3);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

/* Bahis Geçmişi Tablosu */
.rulet-bet-history {
    display: flex;
    flex-direction: column;
    background: var(--surface-800);
    border-radius: 8px;
    padding: 12px;
}

.rulet-bet-history-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light, #fff);
    font-weight: 500;
    padding-bottom: 8px;
}

.rulet-bet-history-title {
    color: var(--text-primary);
}

.rulet-bet-history-total {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rulet-bet-history-total img {
    width: 14px;
    height: 14px;
}

.rulet-bet-history-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--surface-700);
    padding-top: 8px;
    margin-top: 4px;
}

.user-bet-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.user-bet-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-bet-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--surface-600);
    object-fit: cover;
}

.user-bet-amount {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-light, #fff);
    font-weight: 500;
}

.user-bet-amount img {
    width: 12px;
    height: 12px;
}

.rulet-bet-history-mobile {
    display: none;
}

/* =========================================================================
   MOBİL UYUMLULUK
   ========================================================================= */
@media (max-width: 992px) {
    .rulet-history-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .rulet-stats-container {
        align-items: flex-start;
    }
    
    .rulet-color-bets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .rulet-connection-timer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .rulet-info-controls {
        align-self: flex-end;
        margin-top: -30px;
    }
    
    .rulet-color-bet-btn {
        height: 54px;
        font-size: 14px;
    }
    
    .rulet-bet-history {
        display: none;
    }
    
    .rulet-bet-history-mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 8px 0;
        font-size: 13px;
        color: var(--text-secondary);
    }
    
    .rulet-bet-history-mobile-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .rulet-bet-history-mobile-row span:last-child {
        display: flex;
        align-items: center;
        gap: 4px;
        color: var(--text-primary);
        font-weight: 500;
    }
}
