
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.container {
    background: #ffffff;
    max-width: 800px;
    width: 90%;
    margin: 40px auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
}

#explosions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 10;
}

.explosion-emoji {
    position: absolute;
    font-size: 2rem;
    will-change: transform, opacity;
    animation: explodeFall 2s ease-out forwards;
}

@keyframes explodeFall {
    0% {
        transform: translate(0,0) scale(1);
        opacity: 1;
    }
    20% {
        transform: translate(var(--x), var(--y)) scale(1.5);
        opacity: 1;
    }
    100% {
        transform: translate(calc(var(--x) / 2), 600px) scale(1);
        opacity: 0;
    }
}

h1 {
    margin-bottom: 20px;
    color: #333;
}

.scoreboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#score {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.stake-control {
    display: flex;
    align-items: center;
}

.stake-control label {
    margin-right: 8px;
    font-size: 1rem;
    color: #333;
}

.stake-control button {
    width: 30px;
    height: 30px;
    font-size: 1rem;
    margin: 0 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f9fafb;
    cursor: pointer;
    transition: background 0.3s;
}

.stake-control button:disabled {
    background: #e2e8f0;
    cursor: not-allowed;
}

.stake-control button:hover:not(:disabled) {
    background: #edf2f7;
}

#stake {
    width: 60px;
    padding: 5px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
}

.slot-machine {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reels {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.slot {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    background: #f9fafb;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.slot.match {
    animation: glow 1s ease-in-out infinite alternate, bounce 0.5s ease-in-out 3;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px 2px rgba(255,215,0, 0.5);
    }
    to {
        box-shadow: 0 0 20px 6px rgba(255,215,0, 1);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

#spinBtn {
    padding: 10px 30px;
    font-size: 1rem;
    background: linear-gradient(135deg, #6b73ff, #000dff);
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: background 0.3s;
}

#spinBtn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

#spinBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #000dff, #6b73ff);
}

#message {
    margin-top: 10px;
    min-height: 1.2em;
    font-size: 1rem;
}

#message.win {
    color: green;
}

#message.lose {
    color: red;
}

footer {
    margin-top: auto;
    padding: 20px;
    color: #555;
}
