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

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f7f7f7;
    font-family: 'Press Start 2P', cursive;
}

h1,
p {
    text-align: center;
    color: gray;
    font-family: 'Press Start 2P', cursive;
    margin-bottom: 10px;
}

h1 {
    font-size: 24px;
}

p {
    font-size: 14px;
    max-width: 600px;
    line-height: 1.5;
}

#start-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: gray;
    text-align: center;
    z-index: 10;
}

#game-container {
    position: relative;
    width: 900px;
    height: 350px;
    border: 2px solid #000;
    border-radius: 2px;
    overflow: hidden;
    background-image: url('public/assets/Chromium_T-Rex-horizon.png');
    background-repeat: repeat-x;
    background-position: bottom;
    animation: horizonScroll 5s linear infinite;
    animation-play-state: paused;
}

@keyframes horizonScroll {
    from { background-position-x: 0; }
    to { background-position-x: -800px; }
}

#dino {
    position: absolute;
    bottom: 0px;
    left: 50px;
    width: 55px;
    height: 60px;
    background-image: url('public/assets/Chromium_T-Rex-standby.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.cactus {
    position: absolute;
    bottom: 0px;
    width: 35px;
    height: 50px;
    background-image: url('public/assets/1_Cactus_Chrome_Dino.webp.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.cactus-group-3 {
    background-image: url('public/assets/3_Cactus_Chrome_Dino.webp.png');
    background-size: contain;
    background-repeat: no-repeat;
    width: 65px;
    height: 50px;
}

.cloud {
    position: absolute;
    width: 100px;
    height: 50px;
    background-image: url('public/assets/Chromium_T-Rex-cloud.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: -1;
}

.bird {
    position: absolute;
    width: 60px;
    height: 50px;
    background-image: url('public/assets/Chrome_Pterodactyl.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 0;
}

#score {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    color: gray;
}

#game-over {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: gray;
}

#restart-button {
    cursor: pointer;
    margin-top: 10px;
}

.jump {
    animation: jump 0.8s linear;
}

@keyframes jump {
    0% { bottom: 0px; }
    50% { bottom: 100px; }
    100% { bottom: 0px; }
}
