/*
 * 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);
    }
}*/

#winner {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 1rem;
    transform: translateX(-50%);
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 3rem;
    text-align: center;
    color: #ffd700;              /* oro */
    text-shadow:
            0 0 5px #ff0000,
            0 0 10px #ff0000,
            0 0 20px #ff4500,
            2px 2px 4px black;
    letter-spacing: 3px;
    animation: blink 1s infinite alternate;
}

/* effetto lampeggiante */
@keyframes blink {
    0% { opacity: 1; transform: scale(1.05) translateX(-47%); }
    100% { opacity: 0.5; transform: scale(1)  translateX(-50%); }
}

.hidden {
    display: none;
}

#spin {
    display: block;
    margin: 2rem auto 0 auto;
    padding: 1rem 2.5rem;
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 2rem;
    letter-spacing: 2px;
    color: #fff;
    background: linear-gradient(#d40000, #8a0000);
    border: 4px solid #ffcc00;
    border-radius: 12px;
    cursor: pointer;
    text-shadow: 2px 2px 3px black;
    box-shadow: 0 0 10px #ff0000, 0 0 20px #ff4500;
    transition: transform 0.1s, box-shadow 0.1s;
}

#spin:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px #ff0000, 0 0 30px #ff4500;
}

#spin:active {
    transform: scale(0.95);
    box-shadow: 0 0 5px #ff0000;
}