/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo', sans-serif;
    background: linear-gradient(135deg, #0B1426 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Professional Casino Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 69, 0, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.02) 50%, transparent 60%);
    background-size: 200px 200px, 300px 300px, 100px 100px;
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -20px); }
}

/* Hero Section - Header Image as Biggest Element */
.hero-section {
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
}

/* Reset Button in Upper Right Corner */
.reset-button-top {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #FF4444 0%, #FF6B6B 100%);
    border: 2px solid #ffffff;
    color: #ffffff;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.4);
}

.reset-button-top:hover {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF4444 100%);
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.6);
    transform: translateY(-2px);
}

.hero-image-container {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    max-height: 600px;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.7) contrast(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 215, 0, 0.2) 0%,
        rgba(255, 69, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    color: #FFD700;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.6),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.8); }
    to { text-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 60px rgba(255, 215, 0, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.8); }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Main Headline Section */
.main-headline {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%);
    border-radius: 15px;
    margin: 0 1rem 2rem 1rem;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.learn-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #FF4444;
    text-shadow: 0 0 15px rgba(255, 68, 68, 0.6);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.learn-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: #cccccc;
    font-weight: 300;
}

/* Game Container */
.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem 2rem 1rem;
}

/* Introduction Section */
.intro-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.intro-content h3 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #00D4FF;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.intro-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #cccccc;
    line-height: 1.6;
}

/* Betting Controls - Mobile Optimized */
.betting-controls {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 2px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.bet-amount-selector, .bet-type-selector {
    margin-bottom: 2rem;
}

.bet-amount-selector h4, .bet-type-selector h4 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: #FFD700;
    margin-bottom: 1rem;
    text-align: center;
}

.amount-buttons, .bet-type-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.amount-btn, .bet-type-btn {
    background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
    border: 2px solid #FFD700;
    color: #ffffff;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
}

.amount-btn:hover, .bet-type-btn:hover {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000000;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: translateY(-2px);
}

.amount-btn.active, .bet-type-btn.active {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000000;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.bet-type-btn {
    flex-direction: column;
    min-width: 120px;
    padding: 1rem;
}

.bet-label {
    font-size: 1rem;
    font-weight: 700;
}

.bet-odds {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.3rem;
}

/* Roll Button - More Intuitive */
.roll-button {
    width: 100%;
    padding: 1.5rem;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    background: linear-gradient(135deg, #FF4444 0%, #FF6B6B 100%);
    border: none;
    border-radius: 15px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 5px 20px rgba(255, 68, 68, 0.4);
}

.roll-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF4444 100%);
    box-shadow: 0 8px 30px rgba(255, 68, 68, 0.6);
    transform: translateY(-2px);
}

.roll-button:disabled {
    background: linear-gradient(135deg, #666666 0%, #444444 100%);
    cursor: not-allowed;
    box-shadow: none;
}

/* Game Board - Split Screen */
.game-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.game-side {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid;
    position: relative;
    overflow: hidden;
}

.casino-side {
    border-color: #FF4444;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
}

.home-side {
    border-color: #00D4FF;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 255, 136, 0.05) 100%);
}

.side-header {
    text-align: center;
    margin-bottom: 2rem;
}

.side-header h3 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin-bottom: 0.5rem;
}

.casino-side .side-header h3 {
    color: #FF4444;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.home-side .side-header h3 {
    color: #00D4FF;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.side-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Dice Container */
.dice-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.dice {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #000000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
}

.dice.rolling {
    animation: diceRoll 1s ease-in-out;
}

@keyframes diceRoll {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1.2); }
    75% { transform: rotate(270deg) scale(1.1); }
}

/* Game Stats */
.game-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.game-stats > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.game-stats .label {
    font-weight: 600;
    opacity: 0.8;
}

.game-stats .value {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Payout Info */
.payout-info h4 {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.payout-list {
    font-size: 0.9rem;
    line-height: 1.6;
}

.payout-item {
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.should-pay {
    color: #FF4444;
    font-size: 0.8rem;
    font-style: italic;
}

/* Mathematical Truth Section */
.math-truth-section {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 69, 0, 0.1) 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.math-truth-section h3 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: #FFD700;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.comparison-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    display: block;
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.difference-highlight {
    border: 2px solid #FFD700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 69, 0, 0.1) 100%);
}

.difference-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.difference-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.difference-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 600;
}

.difference-amount {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    font-weight: 900;
    color: #FF4444;
}

.difference-percent {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: #FFD700;
}

.difference-explanation {
    font-size: 0.9rem;
    color: #cccccc;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Results Section */
.results-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.results-section h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: #00D4FF;
    text-align: center;
    margin-bottom: 1.5rem;
}

.results-container {
    max-height: 300px;
    overflow-y: auto;
}

.no-results {
    text-align: center;
    opacity: 0.6;
    font-style: italic;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .reset-button-top {
        top: 10px;
        right: 10px;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .hero-image-container {
        height: 50vh;
        min-height: 300px;
    }
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 4rem);
    }
    
    .game-board {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .betting-controls {
        padding: 1.5rem;
    }
    
    .amount-buttons, .bet-type-buttons {
        gap: 0.3rem;
    }
    
    .amount-btn, .bet-type-btn {
        padding: 0.6rem 1rem;
        min-width: 70px;
        font-size: 0.9rem;
    }
    
    .bet-type-btn {
        min-width: 100px;
        padding: 0.8rem;
    }
    
    .dice {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .comparison-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 0 0.5rem 2rem 0.5rem;
    }
    
    .main-headline {
        margin: 0 0.5rem 2rem 0.5rem;
        padding: 1.5rem;
    }
    
    .hero-image-container {
        height: 40vh;
        min-height: 250px;
    }
    
    .amount-buttons, .bet-type-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .amount-btn, .bet-type-btn {
        width: 100%;
        max-width: 200px;
    }
}

