/* Crash Game Specific Styles */
.crash-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.crash-main {
    display: flex;
    gap: 20px;
}

.crash-controls {
    width: 300px;
    background-color: var(--bg-lighter);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.controls-tabs {
    display: flex;
    background: var(--bg-dark);
    border-radius: 20px;
    padding: 5px;
}

.controls-tabs button {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-gray);
    padding: 8px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
}

.controls-tabs button.active {
    background: var(--bg-lighter);
    color: var(--text-white);
}

.control-group label {
    font-size: 0.85rem;
    color: var(--text-gray);
    display: block;
    margin-bottom: 5px;
}

.input-wrap {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 10px;
}

.input-wrap .currency {
    color: var(--text-gray);
    margin-right: 5px;
}

.input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 12px 0;
    outline: none;
    font-weight: 600;
}

.input-actions button {
    background: var(--bg-lighter);
    border: none;
    color: var(--text-white);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
    font-weight: 600;
}

.input-actions button:hover {
    background: var(--border-color);
}

.btn-clear {
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-weight: 600;
}

.btn-start-game {
    font-size: 1.1rem;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: 700;
}
.btn-start-game.active-bet {
    background-color: #dc3545; /* Red for cancel/cashout */
}

/* Game Area */
.crash-game-area {
    flex: 1;
    background-color: var(--bg-lighter);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.game-view {
    flex: 1;
    background-color: var(--bg-dark);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#crashCanvas {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.multiplier-display {
    position: absolute;
    font-size: 4rem;
    font-weight: 800;
    color: white;
    z-index: 10;
}
.multiplier-display.crashed {
    color: #dc3545;
}

.game-status {
    position: absolute;
    top: 15px; right: 15px;
    color: var(--primary-green);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
}
.game-status .status-dot {
    width: 8px; height: 8px;
    background: var(--primary-green);
    border-radius: 50%;
}

.game-loader {
    position: absolute;
    bottom: 20px;
    background: rgba(0,0,0,0.6);
    padding: 5px 15px;
    border-radius: 15px;
    color: white;
    font-weight: 600;
    z-index: 10;
}

.game-loader .progress-bar {
    position: absolute;
    bottom: 0; left: 0; height: 3px;
    background: var(--primary-green);
    transition: width 0.1s linear;
}

/* History */
.crash-history-desktop {
    display: flex;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}
.crash-history-mobile {
    display: none;
    align-items: center;
    gap: 10px;
}

.history-label {
    font-size: 0.8rem;
    color: var(--text-gray);
    font-weight: 600;
}

.history-list {
    flex: 1;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.history-item {
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    white-space: nowrap;
}
.history-item.green { background-color: var(--primary-green); color: #000; }
.history-item.gray { background-color: var(--bg-dark); }

.history-btn {
    background: var(--bg-dark);
    border: none;
    color: var(--text-gray);
    width: 35px; height: 35px;
    border-radius: 50%;
    cursor: pointer;
}

/* Players Table */
.crash-players {
    background-color: var(--bg-lighter);
    border-radius: 12px;
    padding: 20px;
}

.players-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.players-tabs button {
    background: transparent;
    border: none;
    color: var(--text-gray);
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
}
.players-tabs button.active {
    color: var(--text-white);
    border-bottom: 2px solid var(--primary-green);
}

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

.players-table {
    width: 100%;
    border-collapse: collapse;
}
.players-table th {
    text-align: left;
    color: var(--text-gray);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.players-table td {
    padding: 12px 0;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}
.players-table tr:last-child td {
    border-bottom: none;
}
.players-table .profit-green {
    color: var(--primary-green);
}

@media (max-width: 1024px) {
    .crash-main {
        flex-direction: column-reverse;
    }
    .crash-controls {
        width: 100%;
    }
    .crash-history-desktop {
        display: none;
    }
    .crash-history-mobile {
        display: flex;
    }
}
