@import url('https://fonts.googleapis.com/css?family=Press+Start+2P&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: #fff;
    height: 100vh;
    overflow: hidden;
    text-align: center;
    background-color: rgb(10, 50, 100);
    font-family: 'Press Start 2P', sans-serif;
}

a {
    color: #fff;
}

h1 {
    line-height: 1.4;
}

.btn {
    border: 0;
    cursor: pointer;
    padding: 15px 20px;
    font-family: inherit;
    background-color: #fff;
    color: rgb(10, 50, 100);
}

.btn:focus {
    outline: none;
}

.btn:hover {
    opacity: 0.8;
}

.screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    transition: margin 0.5s ease-out;
}

.screen.up {
    margin-top: -100vh;
}

.insects-list {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    list-style-type: none;
    justify-content: center;
}

.insects-list li {
    margin: 10px;
}

.choose-insect-btn {
    color: #fff;
    width: 150px;
    height: 150px;
    font-family: inherit;
    border: 2px solid #fff;
    background-color: transparent;
}

.choose-insect-btn:hover {
    background-color: #fff;
    color: rgb(10, 50, 100);
}

.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 {
    top: 20px;
    position: absolute;
}

.time {
    left: 20px;
}

.score {
    right: 20px;
}

.message {
    top: 0;
    left: 50%;
    opacity: 0;
    width: 100%;
    z-index: 100;
    padding: 20px;
    line-height: 1.7;
    text-align: center;
    position: absolute;
    transform: translate(-50%, -150%);
    transition: transform 0.4s ease-in;
    background-color: rgba(0, 0, 0, 0.5);
}

.message.visible {
    opacity: 1;
    transform: translate(-50%, 150%);
}

.insect {
    /* top: 200px;
    left: 300px; */
    width: 100px;
    height: 100px;
    display: flex;
    cursor: pointer;
    position: absolute;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease-out;
    transform: translate(-50%, -50%) scale(1);
}

.insect.caught {
    transform: translate(-50%, -50%) scale(0);
}

.insect img {
    width: 100px;
    height: 100px;
}
