body {
    margin: 0;
    overflow: hidden;
    font-family: "Comic Sans MS", "Comic Sans", sans-serif;
}

#game {
    width: 100vw;
    height: 100vh;
    position: relative;
    user-select: none;
}

#durability-bar {
    width: 100vw;
    height: 100vh;
}

#textbox {
    position: absolute;
    left: 50%;
    top: -300px;
    transform: translateX(-50%);
    width: 50%;
    min-height: 200px;
    background: white;
    border: 2px dashed black;
    border-radius: 20px;
    padding: 25px;
    box-sizing: border-box;
    transition: top 0.72s ease-in-out;
    overflow: hidden;
    box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.2);
}

#textbox.show {
    top: 30px;
}

#textbox.hide {
    top: -200px;
}

#textbox-text {
    margin: 0;
    font-size: 28px;
}

#down-arrow {
    position: absolute;
    left: 95%;
    top: 140px;
    animation: bounce 1s infinite ease-in-out;
}

#box {
    position: fixed;
    top: 50%;
    left: 50%;
    scale: 500%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    animation: breath 3s infinite ease-in-out;
}

#score {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    font-weight: bold;
    text-align: center;
    z-index: 5;
}

#game-over {
    position: absolute;
    left: 50%;
    top: -200%;
    transform: translateX(-50%);
    width: 50%;
    min-height: 250px;
    background: white;
    border: 2px dashed black;
    border-radius: 20px;
    padding: 25px;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: top 1.5s ease-in-out;
    box-shadow: 0 0 20px 10px rgba(0, 0, 0, 0.3);
}

.game-over-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#game-over-text {
    margin: 0;
    font-size: 50px;
    color: red;
    text-align: center;
}

#high-score-text {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

#restart-btn {
    font-family: "Comic Sans MS", "Comic Sans", sans-serif;
    font-size: 20px;
    font-weight: bold;
    padding: 10px 30px;
    background-color: #4CAF50;
    color: white;
    border: 2px solid #388E3C;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

#restart-btn:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

#restart-btn:active {
    transform: scale(0.95);
}

#game-over.show {
    top: 30%;
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes breath {
    0% {
        scale: 480%;
    }

    50% {
        scale: 530%;
    }

    100% {
        scale: 480%;
    }
}