* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 500px;
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5rem;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
}

.slot-machine {
    background: #333;
    border-radius: 15px;
    padding: 20px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
}

.reels-container {
    position: relative;
    margin-bottom: 20px;
}

.reels {
    display: flex;
    justify-content: space-between;
    height: 150px;
}

.reel {
    width: 30%;
    height: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.3s;
}

.symbols {
    position: absolute;
    width: 100%;
    transition: top 0.5s ease-out;
    text-align: center;
}

.symbol {
    height: 50px;
    line-height: 50px;
    font-size: 2rem;
    transition: transform 0.2s;
    background-color: white; /* Ensure no transparent spaces */
}

.payline {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background: #ff3366;
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: 0 0 10px #ff3366, 0 0 20px #ff3366;
    pointer-events: none;
}

.result {
    text-align: center;
    font-size: 1.5rem;
    height: 40px;
    margin-bottom: 20px;
    color: #ffcc00;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.7);
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.balance-display {
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    min-width: 150px;
    text-align: center;
}

.bet-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bet-display {
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    min-width: 100px;
    text-align: center;
}

button {
    background: #ffcc00;
    color: #333;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
}

.spin-button {
    background: linear-gradient(to bottom, #ff3366, #ff0033);
    color: white;
    padding: 10px 30px;
    font-size: 1.5rem;
    border-radius: 30px;
    width: auto;
    height: auto;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(255, 51, 102, 0.4);
}

.spin-button:hover {
    background: linear-gradient(to bottom, #ff4d7d, #ff1a4d);
}

.spin-button:active {
    transform: scale(0.95);
}

.lights-top, .lights-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 10px;
    display: flex;
    justify-content: space-around;
}

.lights-top {
    top: 0;
}

.lights-bottom {
    bottom: 0;
}

.light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    0% {
        opacity: 0.3;
        box-shadow: 0 0 5px currentColor;
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 15px currentColor;
    }
}

.win-animation {
    animation: win-flash 0.5s 5;
}

@keyframes win-flash {
    0%, 100% {
        background: #333;
    }
    50% {
        background: #ffcc00;
    }
}

.payline-flash {
    animation: payline-flash 0.3s 8;
}

@keyframes payline-flash {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px #ff3366, 0 0 20px #ff3366;
    }
    50% {
        opacity: 0.3;
        box-shadow: 0 0 5px #ff3366;
    }
}

/* Add a highlight effect for the winning symbols */
.symbol.winner {
    animation: winner-pulse 0.5s infinite alternate;
    background-color: rgba(255, 204, 0, 0.2);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.8);
}

@keyframes winner-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
    }
    100% {
        transform: scale(1.1);
        box-shadow: 0 0 15px rgba(255, 204, 0, 0.8);
    }
}


/* Add these styles to your existing CSS */

.reel.spinning .symbols {
    filter: blur(3px);
}

.symbol {
    height: 50px;
    line-height: 50px;
    font-size: 2rem;
    transition: transform 0.2s;
}

.symbol:hover {
    transform: scale(1.1);
}

/* Improve the payline visibility */
.payline {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background: #ff3366;
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: 0 0 10px #ff3366, 0 0 20px #ff3366;
    pointer-events: none; /* Ensure it doesn't interfere with clicks */
}

/* Add a subtle glow to the reels */
.reel {
    width: 30%;
    height: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.3s;
}

.reel.spinning {
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.7);
}

.reel.spinning .symbols {
    filter: blur(3px);
}

/* Add these styles to your existing CSS */

/* Button row for spin and help buttons */
.button-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

/* Help button */
.help-button {
    background: linear-gradient(to bottom, #33ccff, #0099cc);
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(51, 204, 255, 0.4);
}

.help-button:hover {
    background: linear-gradient(to bottom, #66d9ff, #00b3cc);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    margin: 10% auto;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    width: 80%;
    max-width: 600px;
    color: white;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover {
    color: #fff;
}

/* Payout table styles */
.payout-table {
    margin-top: 20px;
}

.payout-section {
    margin-bottom: 20px;
}

.payout-section h3 {
    color: #ffcc00;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 204, 0, 0.3);
    padding-bottom: 5px;
}

.payout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.payout-symbols {
    display: flex;
    align-items: center;
    gap: 5px;
}

.payout-symbol {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 5px;
    min-width: 40px;
    text-align: center;
}

.payout-multiplier {
    font-weight: bold;
    color: #33ccff;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .payout-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .payout-multiplier {
        align-self: flex-end;
    }
}