body {
    background-color: #050505;
    color: #a80000;
    font-family: 'Creepster', cursive;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    background-image: url('assets/background.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.container {
    text-align: center;
    position: relative;
    z-index: 2;
}

.title {
    font-size: 6rem;
    margin-bottom: 3rem;
    text-shadow: 0 0 10px #ff0000;
    animation: flicker 4s infinite .5s;
}

.slot-machine {
    display: flex;
    gap: 20px;
    background: #111;
    padding: 40px;
    border: 8px solid #444;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(168, 0, 0, 0.3);
    position: relative;
}

.reel-container {
    width: 200px;
    height: 300px;
    background-color: #222;
    border: 4px inset #555;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.reel {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.symbol-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.reel.spinning .symbol-img {
    animation: blur-spin 0.2s infinite;
}

#spin-btn {
    margin-top: 30px;
    padding: 15px 40px;
    font-size: 2rem;
    font-family: 'Metal Mania', cursive;
    background-color: #300;
    color: #d00;
    border: 2px solid #500;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    box-shadow: 0 0 10px #500;
}

#spin-btn:hover {
    background-color: #500;
    color: #f00;
    box-shadow: 0 0 20px #f00;
    transform: scale(1.05);
}

#spin-btn:disabled {
    background-color: #111;
    color: #333;
    border-color: #222;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.3s;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: #1a0000;
    border: 1px solid #ff0000;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 50px #ff0000;
    position: relative;
    max-width: 80%;
    animation: modal-shake 0.5s;
}

.modal-content h2 {
    font-size: 3rem;
    color: #ff0000;
    margin: 0 0 20px 0;
}

.modal-content p {
    font-family: 'Metal Mania', cursive;
    font-size: 1.5rem;
    color: #ccc;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
}

.close-btn:hover {
    color: #fff;
}

/* Animations */
@keyframes flicker {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px #ff0000;
    }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
        opacity: 0.4;
        text-shadow: none;
    }
}

@keyframes blur-spin {
    0% { transform: translateY(-50px); }
    50% { transform: translateY(50px); }
    100% { transform: translateY(-50px); }
}

@keyframes modal-shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* Creepy vignette */
body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 150px #000;
    pointer-events: none;
    z-index: 1;
}
