/* ===== CRASH GAME STYLES (Mode Solo) ===== */

/* Layout principal - 2 colonnes */
.crash-game {
    display: flex;
    gap: 20px;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    border: 1px solid rgba(79, 172, 254, 0.1);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* ===== ZONE GAUCHE - AFFICHAGE DU JEU ===== */
.crash-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 350px;
    padding: 20px;
}

/* Historique des crashs - 5 derniers */
.crash-history {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.crash-history .no-history {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.crash-history-item {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.crash-history-item:hover {
    transform: scale(1.1);
}

.crash-history-item.low {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.crash-history-item.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.crash-history-item.high {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.crash-history-item.mega {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

/* Indicateur si gagne ou perdu */
.crash-history-item.won {
    border: 2px solid rgba(16, 185, 129, 0.5);
}

.crash-history-item.lost {
    border: 2px solid rgba(239, 68, 68, 0.3);
    opacity: 0.7;
}

/* Conteneur du multiplicateur */
.crash-multiplier-container {
    text-align: center;
    margin: 20px 0;
}

.crash-status {
    margin-bottom: 10px;
}

.crash-status .status-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Multiplicateur principal */
.crash-multiplier {
    display: flex;
    align-items: baseline;
    justify-content: center;
    transition: all 0.1s ease;
}

.crash-multiplier .multiplier-value {
    font-size: 5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.crash-multiplier .multiplier-x {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 5px;
}

/* Multiplicateur par couleur selon la valeur */
.crash-multiplier.low .multiplier-value {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.crash-multiplier.medium .multiplier-value {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.crash-multiplier.high .multiplier-value {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.crash-multiplier.mega .multiplier-value {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.crash-multiplier.crashed .multiplier-value {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    -webkit-background-clip: text;
    background-clip: text;
    animation: crash-shake 0.5s ease;
}

@keyframes crash-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* Resultat */
.crash-result {
    margin-top: 15px;
    padding: 15px 25px;
    border-radius: 12px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.crash-result.win {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.crash-result.lose {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.crash-result .result-text {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.crash-result.win .result-text {
    color: #10b981;
}

.crash-result.lose .result-text {
    color: #ef4444;
}

.crash-result .result-amount {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
}

.crash-result.win .result-amount {
    color: #34d399;
}

.crash-result.lose .result-amount {
    color: #f87171;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Barre de progression */
.crash-progress {
    width: 100%;
    max-width: 400px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 30px;
    overflow: hidden;
}

.crash-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* ===== ZONE DROITE - CONTROLES ===== */
.crash-controls {
    width: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Balance */
.crash-controls .game-balance {
    background: rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.2);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.crash-controls .game-balance label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.crash-controls .game-balance .balance-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.crash-controls .game-balance .coin-icon {
    width: 20px;
    height: 20px;
}

/* Control group */
.crash-controls .control-group {
    margin-bottom: 10px;
}

.crash-controls .control-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Bet input group */
.crash-controls .bet-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crash-controls .bet-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.crash-controls .bet-input-wrapper .bet-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
}

.crash-controls .bet-input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
}

.crash-controls .bet-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
}

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

.crash-controls .bet-btn {
    flex: 1;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crash-controls .bet-btn:hover {
    background: rgba(79, 172, 254, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Boutons d'action */
.crash-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.crash-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.crash-btn-play {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.crash-btn-play:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.crash-btn-play:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.crash-btn-cashout {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    flex-direction: column;
}

.crash-btn-cashout:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.4);
}

.crash-btn-cashout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.crash-btn-cashout .cashout-amount {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .crash-game {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }

    .crash-display {
        min-height: 280px;
        padding: 15px;
    }

    .crash-controls {
        width: 100%;
    }

    .crash-multiplier .multiplier-value {
        font-size: 4rem;
    }

    .crash-multiplier .multiplier-x {
        font-size: 2rem;
    }

    .crash-history-item {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .crash-game {
        padding: 12px;
    }

    .crash-display {
        min-height: 240px;
    }

    .crash-multiplier .multiplier-value {
        font-size: 3rem;
    }

    .crash-multiplier .multiplier-x {
        font-size: 1.5rem;
    }

    .crash-controls {
        padding: 15px;
    }
}
