@font-face {
    font-family: Unicorn;
    src: url(./fonts/Unicorn.TTF);
}
@font-face {
    font-family: Reikna;
    src: url(./fonts/Reikna.ttf);
}
@font-face {
    font-family: Enchanted;
    src: url(./fonts/Enchanted\ Land.otf);
}
@font-face {
    font-family: Coolvetica;
    src: url(./fonts/coolvetica\ rg.otf);
}

body {
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    position: relative;
    flex-direction: column;
    align-items: center;
    background-color: #704f32;
    font-family: Enchanted, Courier, monospace;
    color: rgba(8, 8, 8, 0.8);
}

#woodBackground {
}

/*
Z-INDEX CHART:

1- Zoltar Pic
2- Table
3- Zoltar Depth
4- Hand


*/

:root {
    --background-color: rgb(155, 66, 66);
    --container-width: 400px;
    --container-height: 680px;
    /* --container-width: 320px;
    --container-height: 500px; */
    --width-and-height: calc(
        var(--container-height) + 1 * var(--container-width)
    );

    --zoltar-height: calc(var(--width-and-height) / 2.3);
    --zoltar-hand-size: calc(var(--zoltar-height) / 8);

    --table-height: calc(var(--container-height) / 4);

    --hand-position-width: calc(var(--container-width) / 1.4);
    --hand-position-height: calc(var(--container-height) / 5);

    --lamp-container-height: calc(var(--zoltar-height) / 1.9);
    --lamp-bottom-width: calc(var(--container-width) / 8.4);

    --magic-ball-width: calc(var(--container-height) / 6.5);
    --magic-ball-right: calc(var(--hand-position-width) / 7 - 35px);
    --magic-ball-holder-height: calc(var(--magic-ball-width) / 4);

    --coins-width: calc(var(--magic-ball-width) / 5);
}

.testButton {
    position: absolute;
    border-radius: 0px;
    bottom: 0;
    right: 0;
    margin-right: 40px;
    width: 60px;
    height: 100px;
    z-index: 111;
}

#buttonDiv {
    width: 100%;
    height: 100%;
    background-color: blue;
}

#divButton {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(145, 145, 145);
    position: absolute;
    bottom: 0;
    right: 0;
    margin-right: 40px;
    margin-bottom: -50px;
    width: 60px;
    height: 100px;
    z-index: 20;
    border-style: solid;
    border-width: 4px;
    border-color: gray;
    cursor: pointer;
}

.growUp {
    animation-name: growUp;
    animation-duration: 3s;
    animation-iteration-count: infinite;
}

@keyframes growUp {
    0% {
        transform: scale();
    }
    50% {
        transform: scale(1.03);
    }
    100% {
        transform: scale();
    }
}

#coinSlot {
    height: 90px;
    width: 7px;
    background-color: rgb(73, 73, 73);
}

.buttonLogo {
    position: absolute;
    z-index: 112;
    font-family: Coolvetica, Courier, monospace;
    font-size: 1.4rem;
    left: 0;
    bottom: 0;
    margin-bottom: 38px;
    margin-left: -5px;
    transform: rotate(-90deg);
    color: #555555;
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.064);
}

#zoltarContainer {
    position: relative;
    margin-top: 10px;
    background-color: var(--background-color);
    height: var(--container-height);
    width: var(--container-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#glassTexture {
    opacity: 15%;
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    z-index: 20;
    background-position: center;
}

#zoltarLogo {
    top: 0;
    margin-top: 5px;
    font-family: Unicorn, Courier, monospace;
    position: absolute;
    z-index: 22;
    font-size: 4rem;
    color: red;
    -webkit-text-stroke: 1px rgb(255, 118, 6);
    text-shadow: 0px 30px 10px rgba(0, 0, 0, 8%);
}

#zoltarPicture {
    position: absolute;
    z-index: 1;
    height: var(--zoltar-height);
}

#zoltarDepth {
    position: absolute;
    z-index: 3;
    height: var(--zoltar-height);
}

#zoltarHand {
    position: relative;
    z-index: 4;
    height: var(--zoltar-hand-size);
    margin-right: var(--hand-position-width);
    margin-top: var(--hand-position-height);
}

.moveHand {
    animation-name: moveHand;
    animation-duration: 5s;
    animation-iteration-count: infinite;
}

@keyframes moveHand {
    0% {
        transform: translateX(0);
    }
    40% {
        transform: translateX(20%);
    }
    80% {
        transform: translateX(-20%);
    }
    100% {
        transform: translateX(-2%);
    }
}

#lampsContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 190px;
    position: absolute;
    top: 0;
    width: 100%;
    height: var(--lamp-container-height);
    /* background-color: green; */
}

.lamp {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.topLamp {
    z-index: 4;
    /* TRAPAZOID */
    /* TOP WIDTH */
    width: calc(var(--lamp-bottom-width) / 2);
    height: 0;
    /* BOTH INDENTS */
    border-left: calc(var(--lamp-bottom-width) / 2) solid transparent;
    border-right: calc(var(--lamp-bottom-width) / 2) solid transparent;
    /* BOTTOM WIDTH */
    border-bottom: var(--lamp-bottom-width) solid rgb(203, 202, 176);
}

.lampAnimation {
    animation: lampFlicker;
    animation-duration: 7s;
    animation-iteration-count: infinite;
}

.bottomLamp {
    z-index: 4;
    width: calc(var(--lamp-bottom-width) / 2.6);
    height: 20px;
    background-color: gray;
    border-radius: 0px 0px 5px 5px;
}

.lampBacking {
    z-index: 2;
    position: absolute;
    width: calc(var(--lamp-bottom-width) + 10px);
    height: calc(var(--lamp-bottom-width) + 35px);
    border-radius: 10px;
    background-color: darkgray;
}

.lampCastLight {
    z-index: 3;
    position: absolute;
    width: calc(var(--lamp-bottom-width) / 2);
    height: calc(var(--lamp-bottom-width) / 2);
    border-radius: 50%;

    box-shadow: 2px 2px 70px 40px rgba(223, 213, 23, 0%);
}

.lightAnimation {
    animation: lightFlicker;
    animation-duration: 7s;
    animation-iteration-count: infinite;
}

#zoltarTable {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 0;
    z-index: 2;
    width: 100%;
    height: var(--table-height);
    background-color: rgb(37, 42, 64);
}

#tableContents {
    position: relative;
    width: 100%;
    height: calc(var(--table-height) + 100px);
    margin-bottom: calc(var(--table-height) - 60px);
    /* background-color: rgba(255, 0, 0, 20%); */
}

#magicBallContainer {
    position: absolute;
    height: 130px;
    width: 100px;
    margin-left: var(--magic-ball-right);
    margin-top: 1em;
    /* background-color: rgba(0, 0, 255, 40%); */
    display: flex;
    align-items: center;
    justify-content: center;
}

#magicBall {
    position: absolute;
    width: var(--magic-ball-width);
    height: var(--magic-ball-width);
    background-color: rgb(239, 228, 243);
    border-radius: 50%;
    z-index: 6;
}

.ballColorChange {
    animation-name: color;
    animation-duration: 7s;
    animation-iteration-count: infinite;
}

#ballHolder {
    position: absolute;
    height: var(--magic-ball-holder-height);
    width: calc(var(--magic-ball-holder-height) + 34px);
    background-color: rgb(72, 72, 72);
    bottom: 0;
    border-radius: 0px 0px 5px 5px;
}

#coinsContainer {
    display: flex;
    bottom: 0;
    margin-left: 20px;
    position: absolute;
    width: 150px;
    height: 100px;
}

.coin {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: var(--coins-width);
    height: var(--coins-width);
    background-color: rgb(235, 222, 37);
    border-radius: 50%;
    box-shadow: -0.3px 0.3px rgb(138, 122, 26);
}

.coinFace {
    width: var(--coins-width);
    height: var(--coins-width);
}

.coin1 {
}
.coin2 {
    margin-left: 13px;
    margin-top: 10px;
}
.coin3 {
    margin-top: 30px;
    margin-left: 2px;
}
.coin4 {
    margin-top: 17px;
}
.coin5 {
    margin-left: 25px;
    margin-top: 2px;
}
.coin6 {
    margin-top: 27px;
    margin-left: 20px;
}
.coin7 {
    margin-left: 35px;
    margin-top: 20px;
}

/*------------------ ANIMATIONS -------------------*/
@keyframes color {
    0% {
        background-color: rgb(239, 228, 243);
    }
    20% {
        background-color: rgb(205, 226, 243);
    }
    40% {
        background-color: rgb(251, 210, 197);
    }
    60% {
        background-color: rgb(240, 199, 199);
    }
    80% {
        background-color: rgb(198, 241, 208);
    }
    90% {
        background-color: rgb(187, 225, 227);
    }
    100% {
        background-color: rgb(239, 228, 243);
    }
}

@keyframes lampFlicker {
    0% {
        border-bottom: var(--lamp-bottom-width) solid rgb(203, 202, 176);
    }
    10% {
        border-bottom: var(--lamp-bottom-width) solid rgb(203, 202, 176);
    }
    20% {
        border-bottom: var(--lamp-bottom-width) solid rgb(232, 193, 78);
    }
    30% {
        border-bottom: var(--lamp-bottom-width) solid rgb(203, 202, 176);
    }
    40% {
        border-bottom: var(--lamp-bottom-width) solid rgb(203, 202, 176);
    }
    55% {
        border-bottom: var(--lamp-bottom-width) solid rgb(232, 193, 78);
    }
    70% {
        border-bottom: var(--lamp-bottom-width) solid rgb(203, 202, 176);
    }
    80% {
        border-bottom: var(--lamp-bottom-width) solid rgb(232, 193, 78);
    }
    95% {
        border-bottom: var(--lamp-bottom-width) solid rgb(203, 202, 176);
    }
    100% {
        border-bottom: var(--lamp-bottom-width) solid rgb(203, 202, 176);
    }
}

@keyframes lightFlicker {
    0% {
        box-shadow: 2px 2px 70px 40px rgba(223, 213, 23, 0%);
    }
    10% {
        box-shadow: 2px 2px 70px 40px rgba(223, 213, 23, 0%);
    }
    20% {
        /* THIS ONE */
        box-shadow: 2px 2px 70px 40px rgba(223, 213, 23, 40%);
    }
    30% {
        box-shadow: 2px 2px 70px 40px rgba(223, 213, 23, 0%);
    }
    40% {
        box-shadow: 2px 2px 70px 40px rgba(223, 213, 23, 0%);
    }
    55% {
        /* THIS ONE */
        box-shadow: 2px 2px 70px 40px rgba(223, 213, 23, 40%);
    }
    70% {
        box-shadow: 2px 2px 70px 40px rgba(223, 213, 23, 0%);
    }
    80% {
        /* THIS ONE */
        box-shadow: 2px 2px 70px 40px rgba(223, 213, 23, 40%);
    }
    95% {
        box-shadow: 2px 2px 70px 40px rgba(223, 213, 23, 0%);
    }
    100% {
        box-shadow: 2px 2px 70px 40px rgba(223, 213, 23, 0%);
    }
}

@media screen and (min-device-width: 1200px) and (max-device-width: 1600px) {
    :root {
        --container-width: 320px;
        --container-height: 500px;
    }
    #ballHolder {
        margin-bottom: 17px;
    }
    #coinsContainer {
        margin-bottom: -20px;
    }
    #divButton {
        margin-right: 22%;
    }
}
