
@import url('https://fonts.googleapis.com/css?family=Press+Start+2P&display=swap');

* {
    box-sizing: border-box; /*if we add border or padding, it doesn't affect the width of it. */
}

html {
    user-select: none;
}

:root {
    --screen-one-basecolor: #516dff;
}

body {
    background-color: var(--screen-one-basecolor);
    color: #fff;
    font-family: 'Press Start 2P', sans-serif;
    height: 100vh;
    overflow: hidden; 
    /*don't want scroll bar to appear.*/
    margin: 0px;
    text-align: center;
}

a {
    color: #fff;
}

h1 {
    line-height: 1.4;
}

.btn {
    border: 0px;
    background-color: #fff;
    color: var(--screen-one-basecolor);
    padding: 15px 20px;
    font-family: inherit;
    cursor: pointer;
}
.btn:hover {
    opacity: 0.9;
}

.btn:focus {
    outline: none;
}

.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    transition: margin 0.5s ease-out;
}

/* to change screens */
.screen.up {
    margin-top: -100vh;
}

.insect-list {
    display: flex;
    flex-wrap: wrap;
    list-style-type: none;
    justify-content: center;
    padding: 0px;
}

.insect-list li {
    margin: 10px;
}

.choose-insect-btn {
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
    font-family: inherit;
    cursor: pointer;
    width: 150px;
    height: 150px;
}

.choose-insect-btn:hover {
    background-color: #fff;
    color: var(--screen-one-basecolor);
}

.choose-insect-btn:active {
    background-color: rgba(255, 255, 255, 0.7);
}

.choose-insect-btn img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.game-container {
    position: relative;
}

.time, .score {
    position: absolute;
    top: 20px;
}

.time {
    left: 20px;
}

.score {
    right: 20px;
}

.message {
    line-height: 1.7;
    background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    padding: 20px;
    z-index: 200;
    text-align: center;
    opacity: 0;
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translate(-50%, -150%);
    transition: transform 0.4s ease-in;
}

.message.visible {
    opacity: 1;
    transform: translate(-50%, 150%);
}

.insect {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    position: absolute;
    /* top: 200px;
    left: 200px; */
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.3s ease-in-out;
}

.insect.caught {
    transform: translate(-50%, -50%) scale(0);
}

.insect img {
    width: 80px;
    height: 80px;
}