:root {
    --color-crust: rgb(17, 17, 27);
    --color-base: rgb(30, 30, 46);
    --color-surface-0: rgb(49, 50, 68);
    --color-surface-1: rgb(69, 71, 90);
    --color-peach: rgb(245, 169, 127);
    --color-link: #89dceb;
    --color-link-hover: #f5e0dc;
    --color-text: #cdd6f4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 100vw;
    background: var(--color-base);
    font-family: sans-serif;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--color-text);
}

footer {
    color: var(--color-text);
    font-size: 1rem;
    inset: auto 0px 0px;
    padding: 1rem 1.5rem;
    position: fixed;
    text-align: center;
    width: 100%;
    font-family: sans-serif;
}

a {
    color: var(--color-link);
}

a:hover {
    color: var(--color-link-hover);
}

#startZone {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    margin: 50px 0;
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: var(--color-surface-0);
}

#endZone {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    margin: 200px 0;
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: var(--color-surface-0);
}

#startZone.inProgress {
    background-color: green;
}

#endZone.fail {
    background-color: red;
}

#endZone.success {
    background-color: green;
}

#endZone.success::before {
    content: "🎉";
    position: relative;
    margin:0;
    padding:0;
    left: -100px;
    font-size: xx-large;
    animation: pulse 0.5s ease-in-out infinite;
}

#endZone.success::after {
    content: "🎉";
    position: relative;
    margin:0;
    padding:0;
    left: 100px;
    font-size: xx-large;
    animation: pulse 0.5s ease-in-out infinite;
}

#endZone.fail::before {
    content: "😢";
    position: relative;
    margin:0;
    padding:0;
    left: -100px;
    font-size: xx-large;
    animation: pulse 0.5s ease-in-out infinite;
}

#endZone.fail::after {
    content: "😢";
    position: relative;
    margin:0;
    padding:0;
    left: 100px;
    font-size: xx-large;
    animation: pulse 0.5s ease-in-out infinite;
}

.course-container {
    position: relative;
    margin: 0 auto 100px auto;
    width: 100vw;
    max-width: 100vw;
}

.course {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
}

.bar {
    height: 20px;
    background-color: var(--color-peach);
    position: relative;
    left: 0;
    animation: bounce 2s ease-in-out 0s infinite alternate;
    margin-bottom: 7px;
}

.bar:nth-child(1) {animation-delay: 0s; width: 15vw;}
.bar:nth-child(2) {animation-delay: 0.3s; width: 30vw;}
.bar:nth-child(2) {animation-delay: 0.6s; width: 10vw;}
.bar:nth-child(3) {animation-delay: 1.4s; width: 40vw;}
.bar:nth-child(4) {animation-delay: 2.8s; width: 50vw;}
.bar:nth-child(5) {animation-delay: 0.1s; width: 30vw;}
.bar:nth-child(6) {animation-delay: 1.2s; width: 30vw;}
.bar:nth-child(7) {animation-delay: 0.9s; width: 30vw;}
.bar:nth-child(8) {animation-delay: 3.2s; width: 30vw;}
.bar:nth-child(9) {animation-delay: 1.7s; width: 30vw;}
.bar:nth-child(10) {animation-delay: 1.1s; width: 30vw;}

@keyframes bounce {
    0% {
        left: 0;
    }
    100% {
        left: calc(100% - 15vw);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1) rotate(-5deg);
    }
    50% {
        transform: scale(1.3) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(-5deg);
    }
}