/*
 * Some general styling
 */

* {
    box-sizing: border-box;
}

:root {
    --item-height: 100px;
}

body {
    background-color: #444;
    margin: 0;
}

/*
 * Style the orange box
 */

.start-button {
    display: block;
    margin: 1em auto;
}

#container {
    background-color: #fd9b03;
    padding: 50px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -320px;
    margin-top: -220px;
}

.window {
    position: relative;
    overflow: hidden;
    height: calc(3 * var(--item-height));
}

.window::before {
    content: "";
    clear: both;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent);
}

.window::after {
    content: "";
    clear: both;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
}

.window-border {
    padding: 5px;
    background-image: linear-gradient(to bottom, #fcf8ad, #f8f3cd, #f9e13d);
    box-shadow: 0 6px 4px -5px #eca654 inset;
}

/*
 * Reels and icon styling
 */

.icon {
    width: 80px;
    height: var(--item-height);
    display: block;
    position: relative;

    /*animation: wiggle 0.1s linear infinite;*/
}

.outer-col {
    overflow-y: hidden;
    width: 100px;
    float: left;
    background-color: #eee;
    background-image: linear-gradient(#16013c, #741a5e, #430155, #16013c);
    height: calc(var(--item-height) * 3);
}

.outer-spacer {
    width: 8px;
    height: 100%;
    float: left;
    border-right: 2px solid #f7ce6c38;
    background-image: linear-gradient(#be4d01, #893802);
}

.col {
    padding: 0 10px;
    will-change: true;
    transform: translateY(calc(-100% + var(--item-height) * 3));
}

.col img {
    width: 100%;
    height: auto;
    margin: 10px 0;
    position: relative;
    z-index: 3;
}

/* shadow effect behind the items */
.col .icon::after {
    content: "";
    clear: both;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    background-color: white;
    box-shadow: 0 0 35px 30px rgba(12, 0, 14, 0.69);
    z-index: 2;
    border-radius: 100%;
}

/*
 * Spinning animation
 */

#container.spinning .outer-col:nth-of-type(2) .col {
    animation-delay: 0.01s;
}

#container.spinning .outer-col:nth-of-type(3) .col {
    animation-delay: 0.02s;
}

#container.spinning .outer-col:nth-of-type(4) .col {
    animation-delay: 0.03s;
}

#container.spinning .col {
    animation-name: scroll;
    animation-iteration-count: 1;
    animation-timing-function: cubic-bezier(.65, .97, .72, 1);
}

@keyframes scroll {
    to {
        transform: translateY(0);
    }
}

/*@keyframes wiggle {
    0% {
        transform: rotate(7deg);
    }
    50% {
        transform: rotate(-7deg);
    }
    100% {
        transform: rotate(7deg);
    }
}*/

/* L'arrière-plan assombri et flouté */
#prize-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

#prize-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* La carte du lot */
#prize-modal {
    background: white;
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-width: 80%;
    transform: scale(0.7);
    transition: transform 0.4s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}

#prize-overlay.active #prize-modal {
    transform: scale(1);
}

#prize-title { color: #e67e22; font-size: 2rem; margin-top: 0; }

#prize-image-container img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin: 20px 0;
}

#prize-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 30px;
}

#close-modal-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}