/* ===== JEUX PAGE STYLES ===== */

.jeux-page {
    background: linear-gradient(135deg, #0a0a0f 0%, #12121a 50%, #0a0a0f 100%);
    min-height: 100vh;
}

/* ===== HERO SECTION ===== */
.jeux-hero {
    padding: 120px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, rgba(79, 172, 254, 0.1) 0%, transparent 100%);
}

.jeux-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.jeux-hero h1 i {
    color: #4facfe;
}

.jeux-hero p {
    color: #a0aec0;
    font-size: 1.1rem;
}

/* ===== GAMES TABS ===== */
.games-selection {
    padding: 20px 0;
}

.games-tabs {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.game-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(145deg, #1a1f2e 0%, #0d1117 100%);
    border: 2px solid transparent;
    border-radius: 12px;
    color: #a0aec0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.game-tab i {
    font-size: 1.2rem;
}

.game-tab:hover:not(.disabled) {
    border-color: rgba(79, 172, 254, 0.5);
    color: #fff;
}

.game-tab.active {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.1) 100%);
    border-color: #4facfe;
    color: #fff;
}

.game-tab.active i {
    color: #4facfe;
}

.game-tab.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-tab .coming-soon {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

/* ===== GAME CONTAINER ===== */
.game-container {
    padding: 30px 0 60px;
}

/* ===== DICE GAME ===== */
.dice-game {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    background: linear-gradient(145deg, #0d1117 0%, #161b22 100%);
    border-radius: 20px;
    border: 1px solid rgba(79, 172, 254, 0.1);
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* ===== LEFT PANEL: CONTROLS ===== */
.dice-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Game Balance Display */
.game-balance {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 15px;
}

.game-balance label {
    display: block;
    color: #a0aec0;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.game-balance .balance-value {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f59e0b;
    font-size: 1.5rem;
    font-weight: 700;
}

.game-balance .balance-value i {
    font-size: 1.2rem;
}

/* Daily Limit Display */
.daily-limit {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.daily-limit-info,
.daily-limit-reset {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #a0aec0;
}

.daily-limit-info i {
    color: #6366f1;
    width: 16px;
}

.daily-limit-reset i {
    color: #f59e0b;
    width: 16px;
}

.daily-limit-info strong {
    color: #6366f1;
}

.daily-limit-reset strong {
    color: #f59e0b;
    font-family: 'Courier New', monospace;
}

.daily-limit.limit-warning {
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.daily-limit.limit-reached {
    border-color: rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.daily-limit.limit-reached .daily-limit-info strong {
    color: #ef4444;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    color: #a0aec0;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bet-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.bet-icon {
    position: absolute;
    left: 15px;
    color: #f59e0b;
    font-size: 1rem;
}

.bet-input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: #0a0a0f;
    border: 2px solid rgba(79, 172, 254, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.bet-input-wrapper input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

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

.bet-btn {
    flex: 1;
    padding: 10px;
    background: rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.2);
    border-radius: 8px;
    color: #4facfe;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bet-btn:hover {
    background: rgba(79, 172, 254, 0.2);
    border-color: #4facfe;
}

/* Roll Button */
.roll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.roll-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
}

.roll-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.roll-btn.rolling {
    animation: pulse 0.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.98); }
}

/* Profit Display */
.profit-display {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    padding: 15px;
}

.profit-value {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #10b981;
    font-size: 1.3rem;
    font-weight: 700;
}

.profit-value i {
    color: #f59e0b;
}

/* ===== RIGHT PANEL: GAME AREA ===== */
.dice-game-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px;
}

/* Result Display */
.dice-result {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    background: linear-gradient(145deg, #0a0a0f 0%, #12121a 100%);
    border-radius: 16px;
    border: 2px solid rgba(79, 172, 254, 0.2);
}

.dice-result .result-number {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Poppins', sans-serif;
}

.dice-result.win {
    border-color: #10b981;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.dice-result.win .result-number {
    color: #10b981;
}

.dice-result.lose {
    border-color: #ef4444;
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.dice-result.lose .result-number {
    color: #ef4444;
}

/* ===== SLIDER ===== */
.dice-slider-container {
    padding: 20px 0;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
}

.dice-slider-track {
    position: relative;
    height: 16px;
    background: #1a1f2e;
    border-radius: 10px;
    overflow: visible;
}

.slider-fill-under {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #10b981 100%);
    border-radius: 10px 0 0 10px;
    transition: width 0.1s ease;
}

.slider-fill-over {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #ef4444 100%);
    border-radius: 0 10px 10px 0;
    transition: width 0.1s ease;
}

.dice-slider-track input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    z-index: 10;
}

.dice-slider-track input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 6px;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    cursor: grab;
    margin-top: -6px;
}

.dice-slider-track input[type="range"]::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.dice-slider-track input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 6px;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    cursor: grab;
}

/* ===== ROLL DIRECTION ===== */
.roll-direction {
    display: flex;
    gap: 15px;
}

.direction-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #a0aec0;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.direction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.direction-btn.active[data-direction="under"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-color: #10b981;
    color: #10b981;
}

.direction-btn.active[data-direction="over"] {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    border-color: #ef4444;
    color: #ef4444;
}

/* ===== STATS ===== */
.dice-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(79, 172, 254, 0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.stat-box label {
    display: block;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-box .stat-value {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Poppins', monospace;
}

/* ===== LOGIN REQUIRED ===== */
.login-required {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(145deg, #0d1117 0%, #161b22 100%);
    border-radius: 20px;
    border: 1px solid rgba(79, 172, 254, 0.1);
}

.login-required i {
    font-size: 4rem;
    color: #4facfe;
    margin-bottom: 20px;
}

.login-required h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.login-required p {
    color: #a0aec0;
    margin-bottom: 25px;
}

.login-required .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 10px;
    color: #000;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-required .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}

/* Bouton mobile cache par defaut sur desktop */
.roll-btn-mobile {
    display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .dice-game {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    /* Sur mobile: Zone de jeu en haut */
    .dice-game-area {
        order: 1;
    }

    /* Panneau de controle en bas */
    .dice-controls {
        order: 2;
    }

    /* Cacher le bouton desktop, afficher le bouton mobile */
    .dice-controls .roll-btn {
        display: none;
    }

    .roll-btn-mobile {
        display: flex;
        margin: 15px 0;
    }
}

@media (max-width: 600px) {
    .jeux-hero {
        padding: 100px 0 30px;
    }

    .jeux-hero h1 {
        font-size: 1.8rem;
    }

    .games-tabs {
        flex-direction: column;
        padding: 0 20px;
    }

    .game-tab {
        justify-content: center;
    }

    .dice-game {
        padding: 20px;
        border-radius: 15px;
    }

    /* Resultat compact sur petit ecran */
    .dice-result {
        height: 80px;
        margin-bottom: 10px;
    }

    .dice-result .result-number {
        font-size: 2.5rem;
    }

    /* Bouton Lancer plus visible */
    .roll-btn {
        padding: 15px 20px;
        font-size: 1.1rem;
    }

    /* Slider plus compact */
    .dice-slider-container {
        margin: 15px 0;
    }

    .roll-direction {
        flex-direction: column;
        gap: 10px;
    }

    .direction-btn {
        padding: 12px;
    }

    .dice-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stat-box {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 12px;
    }

    .stat-box label {
        margin-bottom: 0;
    }

    /* Panneau de controle plus compact */
    .dice-controls {
        gap: 12px;
    }

    .game-balance,
    .daily-limit {
        padding: 10px 12px;
    }

    .control-group {
        gap: 8px;
    }
}

/* ===== GAME NOTIFICATIONS ===== */
.game-notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #1a1f2e;
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #fff;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.game-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.game-notification.success {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, #1a1f2e 100%);
}

.game-notification.success i {
    color: #10b981;
}

.game-notification.error {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, #1a1f2e 100%);
}

.game-notification.error i {
    color: #ef4444;
}

.game-notification i {
    font-size: 1.2rem;
}
