* {
    box-sizing: border-box;
    font-family: "Unbounded", sans-serif;
    padding: 0;
    margin: 0;
}

html {
    font-size: 2vmin;
}

@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url(../../fonts/Unbounded/Unbounded-VariableFont_wght.ttf) format("truetype");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Share Tech Mono';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url(../../fonts/Share_Tech_Mono/ShareTechMono-Regular.ttf) format("truetype");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@property --primary-button-gradient-color-2 {
    syntax: "<color>";
    inherits: false;
    initial-value: rgba(0, 0, 0, 0);
}

@property --secondary-button-gradient-color-2 {
    syntax: "<color>";
    inherits: false;
    initial-value: rgba(0, 0, 0, 0);
}

@property --advertisement-gradient-color-1 {
    syntax: "<color>";
    inherits: false;
    initial-value: #04D9C4;
}

@property --advertisement-gradient-color-2 {
    syntax: "<color>";
    inherits: false;
    initial-value: rgba(0, 0, 0, 0);
}

:root {
    --eerie-black: #151426;
    --robin-egg-blue: #04D9C4;
    --phlox: #EE05F2;
}

@media (orientation:landscape) {
    :root {
        --slot-height: 20rem;
        --slot-translate-z: -83rem;
    }
}

@media (orientation:portrait) {
    :root {
        --slot-height: 30rem;
        --slot-translate-z: -124rem;
    }
}

a:link {
    color: var(--robin-egg-blue);
}

a:visited {
    color: var(--phlox);
}

h1 {
    font-size: 4rem;
}

body {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: black;
}

@media (orientation:landscape) {
    body {
        justify-content: center;
        max-width: 70rem;
        margin: 0 auto;
        padding-left: 2rem;
        padding-right: 2rem;
        overflow: hidden;
    }
}

button {
    cursor: pointer;
    background-color: var(--eerie-black);
    color: var(--phlox);
    border: .1rem solid var(--phlox);
    padding: 1rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

button>svg {
    stroke: var(--phlox);
}

.button-icon {
    height: 1.5rem;
    margin-right: .5rem;
}

.primary-button {
    background: radial-gradient(var(--phlox), var(--primary-button-gradient-color-2));
    color: white;
    transition: --primary-button-gradient-color-2 .5s;
}

.primary-button>svg {
    stroke: white;
}

.primary-button:active,
.primary-button:hover {
    --primary-button-gradient-color-2: var(--phlox);
}

.secondary-button {
    background: radial-gradient(var(--robin-egg-blue), var(--secondary-button-gradient-color-2));
    color: var(--eerie-black);
    transition: --secondary-button-gradient-color-2 .5s;
    border-color: var(--robin-egg-blue);
}

.secondary-button>svg {
    stroke: var(--eerie-black);
}

.secondary-button:active,
.secondary-button:hover {
    --secondary-button-gradient-color-2: var(--robin-egg-blue);
}

dialog {
    background-color: var(--eerie-black);
    color: white;
    border-radius: 1rem;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem;
    width: 60rem;
    height: fit-content;
    text-align: center;
    border: .1rem solid var(--phlox);
    overflow: hidden;
}

.dialog-title {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.dialog-text {
    margin: 1rem auto 0 auto;
    max-width: 70%;
    font-size: 1.5rem;
    color: white;
}

.dialog-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    width: 100vw;
    height: 100vh;
}

#slot-machine-container {
    background-color: var(--eerie-black);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    margin-top: 1rem;
}

@media (orientation:portrait) {
    #slot-machine-container {
        border-top: .1rem solid var(--phlox);
        border-bottom: .1rem solid var(--phlox);
    }
}

@media (orientation:landscape) {
    #slot-machine-container {
        border: .1rem solid var(--phlox);
        border-radius: 1rem;
    }
}

#slot-machine-name {
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (orientation:portrait) {
    #slot-machine-name>h1 {
        font-size: 3rem !important;
    }
}

#slot-machine-name h1 {
    font-size: 2rem;
}

#slot-machine-title {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem;
    width: 100%;
    background-color: var(--eerie-black);
}

@media (orientation:portrait) {
    #slot-machine-title {
        border-bottom: .1rem solid var(--phlox);
    }
}

@media (orientation:landscape) {
    #slot-machine-title {
        border: .1rem solid var(--phlox);
        border-radius: 1rem;
    }
}

#spinner {
    display: grid;
    grid-template-columns: 6fr 1fr;
    grid-template-rows: 6fr;
    gap: .2rem .2rem;
    grid-auto-flow: row;
    grid-template-areas: "slots-container start-spin";
    width: 100%;
    margin-top: 1rem;
}

#slots-container {
    grid-area: slots-container;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 6fr;
    gap: .2rem .2rem;
    grid-auto-flow: row;
    grid-template-areas:
        "slot-1 slot-2 slot-3";
    width: 100%;
    min-height: var(--slot-height);
}

#slot-1 {
    grid-area: slot-1;
    transition-duration: 3s;
}

#slot-2 {
    grid-area: slot-2;
    transition-duration: 4s;
}

#slot-3 {
    grid-area: slot-3;
    transition-duration: 5s;
}

.slot-container {
    width: 100%;
    height: var(--slot-height);
    perspective: var(--slot-height);
    overflow: hidden;
    border: .1rem solid var(--eerie-black);
    border-radius: 1rem;
}

.wheel {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transition-property: rotate;
    transition-duration: inherit;
    translate: 0% 0% var(--slot-translate-z);
}

.wheel .card {
    background-color: var(--eerie-black);
    height: 100%;
    position: absolute;
    width: 100%;
    border-radius: 5%;
    border: .1rem solid var(--phlox);
}

.card>img {
    left: 50%;
    top: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    max-height: 90%;
    max-width: 90%;
    filter: invert();
}

#start-spin {
    grid-area: start-spin;
    font-size: 1.2rem;
    height: 50%;
    align-self: center;
    width: 100%;
    border-width: .25rem;
}

#start-spin:disabled {
    cursor: not-allowed;
}

.image-flipped {
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
}

.advertisement {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    height: 5rem;
    width: 5rem;
    align-self: center;
    padding: .5rem;
    border: .1rem solid var(--robin-egg-blue);
    margin: 0 1rem;
    background: radial-gradient(var(--advertisement-gradient-color-1), var(--advertisement-gradient-color-2));
}

.blink-advertisement {
    animation-name: blink-advertisement;
    animation-timing-function: linear;
    animation-duration: .2s;
    animation-iteration-count: 10;
}

.ad-1 {
    animation-delay: .05s;
}

.ad-2 {
    animation-delay: .1s;
}

.ad-3 {
    animation-delay: .15s;
}

.ad-4 {
    animation-delay: .15;
}

@keyframes blink-advertisement {

    0%,
    100% {
        box-shadow: 0 0 0 0 var(--robin-egg-blue);
    }

    50% {
        box-shadow: 0 0 1rem 1rem var(--robin-egg-blue);
        --advertisement-gradient-color-2: var(--robin-egg-blue);
    }
}

.stats {
    display: flex;
    padding: 1rem 0 1rem 0;
    justify-content: space-between;
    width: 100%;
    margin-top: 1rem;
}

@media (orientation:landscape) {
    .stats {
        justify-content: space-around;
        border: .1rem solid var(--phlox);
        border-radius: 1rem;
    }
}

.counter {
    display: flex;
    padding: .5rem;
    border-radius: .5rem;
    gap: .5rem;
    align-items: center;
    color: white;
    border: .1rem solid var(--robin-egg-blue);
    font-family: "Share Tech Mono", monospace;
}

@media (orientation:portrait) {
    .counter {
        padding: 1rem;
    }
}

.counter-number {
    background-color: var(--eerie-black);
    color: var(--eerie-black);
    background-color: var(--robin-egg-blue);
    padding: .1rem .2rem .1rem .2rem;
    border-radius: .2rem;
    position: relative;
    overflow: hidden;
    width: 2.5rem;
    height: 1.5rem;
    font-family: inherit;
}

.counter-label {
    font-family: inherit;
}

.counter-number-left,
.counter-number-middle,
.counter-number-right {
    font-family: inherit;
    position: absolute;
    top: .2rem
}

.counter-number-left {
    left: .5rem;
}

.counter-number-middle {
    left: 1rem;
}

.counter-number-right {
    left: 1.5rem;
}

.increase-value {
    font-family: inherit;
    position: absolute;
    right: 0;
    padding-right: inherit;
    transform: translateY(1rem);
}

.move-number-up-from-current-position {
    animation-name: move-number-up-from-current-position;
    animation-timing-function: linear;
    animation-duration: .5s;
    animation-iteration-count: 1;
}

@keyframes move-number-up-from-current-position {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-1rem);
    }
}

#attributions-list {
    list-style: none;
}

#attributions-title {
    margin-top: 1rem;
}

#win-image-head {
    height: 20rem;
    filter: invert();
    margin: 1rem 0;
}

.money-with-wings {
    width: 3rem;
    fill: var(--eerie-black);
}

.crow-icon {
    height: 1rem;
    width: 1rem;
    fill: var(--eerie-black);
    stroke: white;
}

.win-icon,
.lose-icon {
    height: 4rem;
    vertical-align: middle;
}

.fireworks {
    fill: white;
    height: 5rem;
}

.face-with-steam-from-nose {
    fill: white;
    height: 10rem;
}

#open-about {
    margin-top: 1rem;
    cursor: pointer;
}

#project-texts {
    display: flex;
    width: 100%;
    gap: .5rem;
    margin-top: 1rem;
    color: white;
}

@media (orientation:landscape) {
    #project-texts {
        flex-direction: row;
    }
}

@media (orientation:portrait) {
    #project-texts {
        flex-direction: column;
    }
}

.project-text {
    border: .1rem solid var(--phlox);
    width: 100%;
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
}

.project-text-image {
    width: 5rem;
    height: 5rem;
    fill: var(--phlox);
    padding-right: .5rem;
    padding-left: .5rem;
    border-left: .1rem solid var(--phlox);
    border-right: .1rem solid var(--phlox);
    border-radius: 1rem;
    margin-right: .5rem;
}

@media (orientation:portrait) {
    .project-text {
        font-size: 1.5rem;
        padding: 2rem;
    }

    .project-text-image {
        width: 10rem !important;
        height: 100% !important;
        margin-right: 1rem;
        padding-right: 1rem;
        padding-left: 1rem;
    }
}

.information-icon {
    height: 1rem;
    width: 1rem;
    fill: var(--phlox);
    border-radius: 2rem;
}

@media (orientation:portrait) {
    .hidden-on-mobile {
        display: none;
    }

    #head-canvas {
        height: 32rem;
        width: 18rem;
    }
}

@media (orientation:landscape) {
    #head-canvas {
        height: 18rem;
        width: 32rem;
    }
}


#firework {
    display: none;
    z-index: 100;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5vmin;
    aspect-ratio: 1;
    background:
        radial-gradient(circle, var(--robin-egg-blue) 0.2vmin, #0000 0) 50% 00%,
        radial-gradient(circle, var(--robin-egg-blue) 0.3vmin, #0000 0) 00% 50%,
        radial-gradient(circle, var(--robin-egg-blue) 0.5vmin, #0000 0) 50% 99%,
        radial-gradient(circle, var(--robin-egg-blue) 0.2vmin, #0000 0) 99% 50%,
        radial-gradient(circle, var(--robin-egg-blue) 0.2vmin, #0000 0) 55% 10%,
        radial-gradient(circle, var(--robin-egg-blue) 0.2vmin, #0000 0) 88% 10%,
        radial-gradient(circle, var(--robin-egg-blue) 0.2vmin, #0000 0) 10% 90%,
        radial-gradient(circle, var(--robin-egg-blue) 0.3vmin, #0000 0) 80% 90%,
        radial-gradient(circle, var(--robin-egg-blue) 0.5vmin, #0000 0) 95% 90%,
        radial-gradient(circle, var(--robin-egg-blue) 0.4vmin, #0000 0) 90% 85%,
        radial-gradient(circle, var(--robin-egg-blue) 0.4vmin, #0000 0) 100% 80%,
        radial-gradient(circle, var(--robin-egg-blue) 0.4vmin, #0000 0) 45% 90%,
        radial-gradient(circle, var(--robin-egg-blue) 0.4vmin, #0000 0) 25% 95%,
        radial-gradient(circle, var(--robin-egg-blue) 0.4vmin, #0000 0) 25% 30%,
        radial-gradient(circle, var(--robin-egg-blue) 0.4vmin, #0000 0) 83% 30%,
        radial-gradient(circle, var(--robin-egg-blue) 0.4vmin, #0000 0) 94% 66%,
        radial-gradient(circle, var(--robin-egg-blue) 0.5vmin, #0000 0) 10% 60%,
        radial-gradient(circle, var(--robin-egg-blue) 0.2vmin, #0000 0) 31% 80%,
        radial-gradient(circle, var(--robin-egg-blue) 0.3vmin, #0000 0) 80% 10%,
        radial-gradient(circle, var(--robin-egg-blue) 0.3vmin, #0000 0) 15% 75%,
        radial-gradient(circle, var(--robin-egg-blue) 0.3vmin, #0000 0) 10% 10%,
        radial-gradient(circle, var(--robin-egg-blue) 0.2vmin, #0000 0) 90% 23%,
        radial-gradient(circle, var(--robin-egg-blue) 0.3vmin, #0000 0) 45% 20%,
        radial-gradient(circle, var(--robin-egg-blue) 0.3vmin, #0000 0) 33% 17%,
        radial-gradient(circle, var(--robin-egg-blue) 0.5vmin, #0000 0) 66% 77%,
        radial-gradient(circle, var(--robin-egg-blue) 0.5vmin, #0000 0) 13% 24%;
    background-size: 0.5vmin 0.5vmin;
    background-repeat: no-repeat;
    opacity: 0;
}

.animate-firework {
    animation-name: firework;
    animation-duration: 2s;
    animation-timing-function: linear;
    animation-iteration-count: 1;
    display: block !important;
}

@keyframes firework {
    0% {
        width: 0.5vmin;
        opacity: 1;
    }

    100% {
        width: 200vmin;
        opacity: 0;
    }
}