/* Double Game Specific Styles */

.double-colors {
    display: flex;
    gap: 10px;
}

.color-btn {
    flex: 1;
    border: 2px solid transparent;
    padding: 12px 0;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    color: white;
    transition: transform 0.2s, border-color 0.2s;
}

.color-btn.green {
    background-color: var(--primary-green);
    color: #000;
}
.color-btn.white {
    background-color: #ffffff;
    color: #000;
}
.color-btn.black {
    background-color: #242838;
}

.color-btn:hover {
    transform: translateY(-2px);
}
.color-btn.selected {
    border-color: #ffffff;
    transform: scale(1.05);
}

/* Roulette Area */
.double-game-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Prevents flex child from expanding parent */
}

.double-progress-wrap {
    width: 100%;
    margin-bottom: 20px;
}

.progress-bg {
    background: var(--bg-dark);
    height: 25px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: #007bff; /* blue progress */
    height: 100%;
    width: 100%;
    transition: width 0.1s linear;
}

.progress-text {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.double-roulette-container {
    background: var(--bg-dark);
    height: 120px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.roulette-center-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ffffff;
    z-index: 30;
    transform: translateX(-50%);
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.roulette-track {
    display: flex;
    gap: 10px;
    padding: 0 10px;
    transition: transform cubic-bezier(0.1, 0.7, 0.1, 1) 5s; /* Smooth spinning */
    height: 100%;
    align-items: center;
    width: max-content; /* crucial to allow it to be wider than screen without pushing parent */
}

.roulette-block {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
}

.roulette-block.green { background-color: var(--primary-green); color: #000; }
.roulette-block.white { background-color: #ffffff; color: #000; }
.roulette-block.black { background-color: #242838; color: #fff; border: 2px solid #333; }

.roulette-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.double-history {
    margin-top: 20px;
}
.double-history .history-item {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    padding: 0;
    font-size: 0.8rem;
}
.double-history .history-item.white { background-color: #fff; color: #000; }
.double-history .history-item.black { background-color: #242838; color: #fff; border: 1px solid #444; }

/* Bets Columns */
.double-bets-columns {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.bet-column {
    flex: 1;
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 15px;
}

.bet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 15px;
}

.color-dot {
    width: 25px; height: 25px;
    border-radius: 6px;
}
.color-dot.green { background: var(--primary-green); }
.color-dot.white { background: #fff; }
.color-dot.black { background: #242838; border: 1px solid #444; }

.bet-total {
    display: flex;
    justify-content: space-between;
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 10px;
}
.bet-total strong { color: white; }

.bet-table-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-gray);
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.bet-list {
    max-height: 200px;
    overflow-y: auto;
}

.bet-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bet-row:last-child { border-bottom: none; }
.bet-row .user { color: var(--text-gray); display: flex; align-items: center; gap: 5px; }
.bet-row .amount { color: var(--text-white); font-weight: 600; }

@media (max-width: 1024px) {
    .double-bets-columns {
        flex-direction: column;
    }
}
