/* ===== ROLL GAME SPECIFIC STYLES ===== */

/* Game Container - Visual styling only, no layout constraints */
.game-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Unified Dice Sections - Glass morphism effect */
.dice-balance-section {
    background: rgba(255,255,255,0.4);
    backdrop-filter: blur(10px);
    border-radius: 15px 15px 0 0;
    padding: 1rem;
    margin-bottom: 0;
    text-align: center;
}

.dice-control-section {
    padding: 20px;
    background: rgba(255,255,255,0.9);
    margin: 0;
    color: #333;
}

.dice-result-section {
    text-align: center;
    padding: 1rem;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    border-radius: 0 0 15px 15px;
    margin-top: 0;
    transition: all 0.5s ease;
}

/* Balance Display */
.balance-item {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.balance-label {
    opacity: 0.9;
}

.balance-value {
    color: #ffeb3b;
    font-size: 2rem;
    margin: 0 0.5rem;
}

.currency-display {
    color: #ffeb3b;
    opacity: 0.9;
}

/* Faucet Button Enhancement */
.faucet-countdown-btn {
    background: linear-gradient(45deg, #4caf50, #2e7d32);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.faucet-countdown-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    background: linear-gradient(45deg, #43a047, #1b5e20);
}

.faucet-countdown-btn:disabled {
    opacity: 0.7;
    transform: none;
    cursor: not-allowed;
}

/* Control Table Styling */
.dice-control-section table {
    width: 100%;
    border-collapse: collapse;
}

.dice-control-section td {
    padding: 12px;
    vertical-align: middle;
}

.dice-control-section td[style*="font-weight: bold"] {
    font-weight: bold;
    color: #333;
}

/* Enhanced Input Styling */
#betAmount, #payoutMultiplier {
    font-size: 1.3em;
    font-weight: bold;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    width: 120px;
    height: 48px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#betAmount:focus, #payoutMultiplier:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

/* Key Number Emphasis */
.key-number {
    font-size: 1.8em;
    background-color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: inline-block;
}

/* High/Low Toggle Button */
.highlow-toggle {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.3);
}

.highlow-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4);
    background: linear-gradient(45deg, #ff5252, #d32f2f);
}

/* Roll Button */
.roll-button {
    background: linear-gradient(45deg, #4caf50, #2e7d32);
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.roll-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.4);
    background: linear-gradient(45deg, #43a047, #1b5e20);
}

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

.roll-button.rolling {
    animation: pulse 1s infinite;
    background: linear-gradient(45deg, #ff9800, #f57c00);
}

@keyframes pulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 10px 30px rgba(76, 175, 80, 0.5);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
    }
}

/* Roll Result Display */
.roll-number {
    font-size: 3rem;
    font-weight: bold;
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    margin-bottom: 0.25rem;
    transition: all 0.5s ease;
}

.result-status {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    transition: all 0.5s ease;
}

.result-payout {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

/* Also support the correct CSS class names for consistency */
.result-number {
    font-size: 3rem;
    font-weight: bold;
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    margin-bottom: 0.25rem;
    transition: all 0.5s ease;
}

/* Win/Lose States */
.dice-result-section.win {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.5);
}

.dice-result-section.win .result-number,
.dice-result-section.win .roll-number {
    color: #ffeb3b;
    animation: glow 1s ease-in-out;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.dice-result-section.win .result-status {
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.dice-result-section.lose {
    background: linear-gradient(135deg, #f44336, #c62828);
    box-shadow: 0 0 30px rgba(244, 67, 54, 0.5);
}

.dice-result-section.lose .result-number,
.dice-result-section.lose .roll-number {
    color: #ffcdd2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.dice-result-section.lose .result-status {
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.dice-result-section.rolling {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

@keyframes glow {
    0% { text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
    50% { text-shadow: 0 0 20px #ffeb3b, 2px 2px 4px rgba(0,0,0,0.5); }
    100% { text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
}

/* Fixed width for roll threshold to prevent layout shifts */
#rollThreshold {
    display: inline-block;
    min-width: 3em;
    text-align: center;
}

/* Color enhancements for better contrast */
.dice-control-section .key-number#winChance {
    color: #28a745;
}

.dice-control-section .key-number#potentialPayout {
    color: #007bff;
}

.dice-control-section .key-number#rollThreshold {
    color: #007bff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 1.5rem;
        margin: 0 0.5rem 2rem;
    }
    
    .balance-value {
        font-size: 1.5rem;
    }
    
    .result-number {
        font-size: 2.5rem;
    }
    
    .roll-button {
        padding: 12px 30px;
        font-size: 1.2rem;
    }
    
    #betAmount, #payoutMultiplier {
        width: 100px;
        font-size: 1.1em;
    }
    
    .key-number {
        font-size: 1.5em;
        padding: 6px 10px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
