@import url('https://fonts.googleapis.com/css2?family=Climate+Crisis&family=Gabarito:wght@400;500;600;700;800;900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
    --cartoon-dropshadow: 4px 4px #000;
        --hover-cartoon-dropshadow: 2px 2px #000;
    --cartoon-text-shadow: 2px 0 #000, -2px 0 #000, 0 2px #000, 0 -2px #000,
    1px 1px #000, -1px -1px #000, 1px -1px #000, -1px 1px #000, 6px 6px #000;
    --small-cartoon-dropshadow: 2px 2px #000;
    --cursor-pointer: url(./assets/cartoon-pointer.png), pointer;
    
}

* {
    cursor: url(./assets/cartoon-cursor.png), auto;
}

body {
    background-image: url(./assets/TileBackground.png);
    background-repeat: repeat;
    background-size: 120px;
    background-position-x: 0;

    margin: 0;
    animation: 8s linear 0s infinite running RepeatingBackground;
}

/* Text Styles */
h1, h2, h3, h4, h5, h6, p {
    margin: 0;
}

h1 {
    color: #fff;
    font-family: 'Climate Crisis', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 1px;
    -webkit-text-stroke: .5px #000;
    text-shadow: var(--cartoon-text-shadow);
}

h2 {
    color: #fff;
    -webkit-text-stroke: 1.25px #000;
    text-shadow: var(--small-cartoon-dropshadow);

    font-family: 'Climate Crisis', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 1px;

    margin-bottom: 6px;
}

h5 {
    background-color: #000;
    color: #fff;
    padding: 0 8px;
    border-radius: 8px;;
    font-family: 'Noto Sans Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: lowercase;
}

h6 {
    font-family: 'Noto Sans Mono', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
}

p {
    font-family: 'Noto Sans Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
}

li {
    font-family: 'Noto Sans Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
}

button {
    font-family: 'Noto Sans Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;

    color: #fff;
    background-color: #252525;
    box-shadow: var(--cartoon-dropshadow);

    border-radius: 16px;
    border: solid 4px #000;

    margin-top: 16px;
    margin-right: 4px;
    padding: 4px 16px;
    padding-right: 20px;

    transition: all 200ms ease-out;
    -webkit-transition: all 200ms ease-out;
    -moz-transition: all 200ms ease-out;
}

button:hover {
    cursor: var(--cursor-pointer);
    box-shadow: var(--hover-cartoon-dropshadow);
    transform: translate(2px, 2px);
    -webkit-transform: translate(2px, 2px);
    -moz-transform: translate(2px, 2px);
}

button.active {
    box-shadow: 0 0 #000;
    transform: translate(4px, 4px);
    -webkit-transform: translate(4px, 4px);
    -moz-transform: translate(4px, 4px);
}

.credit {
    position: fixed;
    bottom: 16px;
    right: 16px;
    
    font-family: 'Noto Sans Mono', monospace;
    font-size: 0.6rem;
    font-weight: 600;

    z-index: 99;
}

/* Containers */
.box-container {
    position: fixed;

    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;

    /* z-index: 1000; */
    overflow: hidden;
}

.cartoon-container {
    background-color: #fff;
    box-shadow: var(--cartoon-dropshadow);

    border-radius: 16px;
    border: solid 4px #000;

    padding: 16px 16px;
    padding-right: 20px;
}

/* Loading Screen */
#loading-screen {
    display: none;
    position: fixed;

    width: 100vw;
    height: 100vh;

    background-image: url(./assets/TileBackground.png);
    background-repeat: repeat;
    background-size: 120px;
    background-position-x: 0;

    opacity: 0;

    margin: 0;
    animation: 400ms linear 0s infinite running RepeatingBackground;
    z-index: 100;

    transition: opacity 250ms ease-out;
    -webkit-transition: opacity 250ms ease-out;
    -moz-transition: opacity 250ms ease-out;
}

#loading-screen.active::before {
    display: block;
}

#loading-screen.active {
    opacity: 1;
}

/* Menu */
#game-menu {
    position: fixed;

    background-color: #fff;
    background-image: url(./assets/TileBackground.png);
    background-repeat: repeat;
    background-size: 120px;
    background-position-x: 0;

    animation: 8s linear 0s infinite running RepeatingBackground;
    animation-duration: 8s;

    width: 100vw;
    height: 100vh;
    
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
   
    z-index: 1000;

    transition: opacity, animation-duration, 400ms ease-out;
    -webkit-transition: opacity, animation-duration, 400ms ease-out;
    -moz-transition: opacity, animation-duration, 400ms ease-out;
}

    #game-menu.hide {
        opacity: 0;
    }

#game-menu div {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;

    transition: all 400ms ease-out;
    -webkit-transition: all 400ms ease-out;
    -moz-transition: all 400ms ease-out;
}

#game-menu div.hide {
    display: flex;
    transform: scale(125%);
    -webkit-transform: scale(125%);
    -moz-transform: scale(125%);
    opacity: 0;
}

#game-menu h1 {
    margin-bottom: 8px;
}

#game-menu h5 {
    position: relative;
    margin-left: -2px;
    margin-bottom: -2px;
}

    /* Update Log */
    #game-menu .update-log {
        position: absolute;

        width: 100vw;
        bottom: 32px;
        left: 0;

        /* padding: 16px;
        margin-bottom: 32px; */

        text-align: center;

        display: flex;
        justify-content: flex-end;
        align-items: center;
        flex-direction: column;
    }

    .update-log ul {
        margin: 0;
        padding: 0;

        margin-top: 8px;
        width: 100%;
    }

    .update-log li {
        margin: 0;
        padding: 0;

        list-style: none;
        margin-bottom: 2px;
        font-size: 0.7rem;
    }

/* Navigation */
nav {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 25;
}

nav ul {
    margin: 0;
    padding: 0;

    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    flex-direction: row;

    gap: 16px;
}

nav li {
    width: 28px;
    height: 28px;

    border-radius: 8px;
    /* border: 4px solid #000;
    background-color: #; */

    list-style: none;

    /* box-shadow: var(--cartoon-dropshadow); */

    transition: all 250ms ease-out;
    -webkit-transition: all 250ms ease-out;
    -moz-transition: all 250ms ease-out;
}

nav li:hover {
    cursor: var(--cursor-pointer);

    transform: scale(105%);
    -webkit-transform: scale(105%);
    -moz-transform: scale(105%);
}

nav img {
    position: relative;
    left: -2px;
    top: -2px;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

nav img:hover {
    cursor: var(--cursor-pointer)
}

/* Instructions */
.instructions {
    width: 100vw;
    height: 100vh;
    position: fixed;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 80;
    
    gap: 16px;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    transition: all, 400ms ease-out;
    -webkit-transition: all, 400ms ease-out;
    -moz-transition: all, 400ms ease-out;

}

.instructions.hide {
    opacity: 0;
    
    transform: scale(75%) translateY(-32px);
    -webkit-transform: scale(75%) translateY(-32px);
    -moz-transform: scale(75%) translateY(-32px);

}

.instructions ul, .instructions form {
    box-shadow: var(--cartoon-dropshadow);
    border: 4px solid #000;
    background-color: #fff;
    border-radius: 8px;

    max-width: 300px;
    list-style: none;

    padding: 16px 22px 16px 16px;
    margin: 0;
}

.instructions li {
    list-style: none;
}

.instructions img {
    width: 100%;
    object-fit: cover;
    border: solid 4px #000;
    border-radius: 8px;
    margin-top: 12px;
}

/* Game Options */
input.checkbox {
    opacity: 0;
    aspect-ratio: 1/1;
    height: 24px;
    width: auto;

    border: 8px solid #000 !important;
    border-radius: 16px;
}

input.checkbox:hover {
    cursor: var(--cursor-pointer);
}

label:hover {
    cursor: var(--cursor-pointer);
}
/* .game-options {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-direction: column;

    position: absolute;
    bottom: 64px;
} */

/* Scoreboard */
.scoreboard {
    position: fixed;
    right: 32px;
    top: 16px;
    user-select: none;

    transition: all 200ms ease-out;
    -webkit-transition: all 200ms ease-out;
    -moz-transition: all 200ms ease-out;
}

.scoreboard.active {
    transform: scale(125%);
    right: 64px;
    top: 20px;
}

/* Stats */
.statistics {

    background-color: #fff;
    box-shadow: var(--cartoon-dropshadow);

    border-radius: 16px;
    border: solid 4px #000;

    padding: 16px 16px;
    padding-right: 20px;
    max-width: 400px;
    width: auto;
    
    display: flex;
    justify-content: start;
    align-items: start;
    flex-direction: column;

    position: fixed;
    bottom: 20px;
    left: 16px;
    user-select: none;
}

.statistics .graph {
    width: 100%;
    height: 64px;
    margin-top: 8px;

    border-radius: 8px;
    background-color: #e9e9e9;
    
    overflow: hidden;
}

.statistics .graph div {
    position: relative;
    display: inline-block;
    height: 100%;
    background-color: #000;
    width: 2%;
    opacity: 25%;
    top: 0;
}

/* Prompts */
div.all-prompts {
    position: fixed;

    z-index: 100;
    height: auto;
    width: calc(100vw - 32px);

    bottom: 0;
    margin-bottom: 16px;
    padding: 0 16px;

    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-direction: column;
    gap: 16px;
}

#prompt-template, .prompt-template {
    cursor: var(--cursor-pointer);
    display: block;

    max-width: 400px;
    height: auto;

    transform: translateY(64px) scale(75%);
    -webkit-transform: translateY(64px) scale(75%);
    -moz-transform: translateY(64px) scale(75%);

    opacity: 0;

    transition: 400ms ease-out;
    -webkit-transition: 400ms ease-out;
    -moz-transition: 400ms ease-out;
}

#prompt-template:hover, .prompt-template:hover {
    cursor: var(--cursor-pointer);
    background-color: #ffdcdc;
    transform: scale(105%) rotate(2deg);
    -webkit-transform: scale(105%) rotate(2deg);
    -moz-transform: scale(105%) rotate(2deg);
}

#prompt-template {
    cursor: none;
}

.notify-active {
    opacity: 1;
    transform: translateY(0) scale(100%);
    -webkit-transform: translateY(0) scale(100%);
    -moz-transform: translateY(0) scale(100%);
}

#prompt-template .dot, .prompt-template .dot {
    position: absolute;

    color: #fff;
    
    padding-top: 8px;
    text-align: center;
    font-family: 'Noto Sans Mono', monospace;
    font-weight: 600;
    
    background-color: #c52424;
    border-radius: 32px;

    top: -16px;
    right: -16px;

    width: 32px;
    height: 32px;

    max-width: 32px;
    height: 32px;

    border: 4px solid #000;
    box-shadow: var(--cartoon-dropshadow);
    z-index: 5;
}

#prompt button {
    display: none;
}

/* Objects */
.box {   
    border: 3px solid #000;
    border-radius: 8px;
    background-color: rgb(34, 199, 199);
    -webkit-text-stroke: 2px #000;

    color: #fff;
    line-height: 66px;
    font-family: 'Climate Crisis', sans-serif;
    font-size: 35px;
    text-align: center;

    display: block;
    position: absolute;

    overflow: hidden;

    width: 70px;
    height: 70px;
    cursor: var(--cursor-pointer);

    z-index: 1000;

    user-select: none;
    top: calc(50vh - 35px);
    left: calc(50vw - 35px);  /* <--- Change me! */
    
    transition: opacity 1s ease-out;
}

/* Announcements */
.announcement {
    position: fixed;
    top: 20vh;
    width: 100%;

    opacity: 0;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    transition: all, 400ms ease-out;
    -webkit-transition: all, 400ms ease-out;
    -moz-transition: all, 400ms ease-out;
}

.announcement.active {
    opacity: 1;
    transform: scale(100%);
    -webkit-transform: scale(100%);
    -moz-transform: scale(100%);
}

.announcement img {
    display: inline-block;
    position: absolute;
    z-index: -2;
    filter: saturate(150%);
}

.announcement h2 {
    font-style: italic;
    font-size: 3rem;
    color: #ff562c;

    animation: IntenseShake 400ms linear infinite ;
}

.announcement p {
    font-style: italict;
}

/* Walls */
#wall_left, #wall_right {
    
    background-color: black;
    border-radius: 100%;
    box-shadow: 16px 0 32px 0 #00000050;
    width: 100px;
    height: 100vh;

    position: fixed;
    /* top: calc(50vh - 7.5vh); */
    top: 0;

    z-index: 2;

    transition: all 100ms ease-out;
    -webkit-transition: all 100ms ease-out;
    opacity: 0;
}

#wall_left.Touched, #wall_right.Touched {
    opacity: .5;
}

#wall_left {
    left: -100px;
}

#wall_right {
    box-shadow: -16px 0 32px 0 #00000050;
    right: -100px;
}

/* Animations */
@keyframes RepeatingBackground {
    0% {
        background-position-x: 0;
        background-position-y: 0;
    }

    100% {
        background-position-x: 120px;
        background-position-y: 120px;
    }
}

@keyframes IntenseShake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
  }

/* Responsiveness */
@media only screen and (max-width:650px)  {
    
    /* Text Styles */
    h1 {
        font-size: 2rem;
        line-height: 2.2rem;
        margin-bottom: 16px;
    }

    /* Menu */
    #game-menu div {
        align-items: center;
        padding: 32px;
        text-align: center;
    }

    #game-menu h1 {
        margin-bottom: 8px;
    }

    #game-menu h5 {
        position: relative;
        margin-left: 0;
        margin-bottom: 4px;
    }

    #game-menu .update-log {
        width: calc(100vw - 64px);
        bottom: 8px;
    }

    /* Navigation */
    nav {
        left: 50%;
        top: 88px;

        transform: translateX(-50%);
        -webkit-transform: translateX(-50%);
        -moz-transform: translateX(-50%);
    }

    /* Score */
    .scoreboard {
        left: 0;
        width: 100vw;
        text-align: center;
        top: 32px;
    }

    /* Stats */
    .statistics {
        display: none;
    }

}



/* Event Styles */
.box.CatchMe {
    transition: 250ms ease-out;
}

.box.TeenyTiny {
    transform: Scale(50%);
}

.box.GhostMode {
    opacity: 0;
}