*, *::before, *::after {
    box-sizing: border-box;
    user-select: none;
}

body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* everything is absolutely positioned inside world */
.world {
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 200px;
}

.score {
    position: absolute;
    font-size: 3vmin;
    right: 1vmin;
    top: 1vmin;
}

.start-screen {
    position: absolute;
    font-size: 5vmin;

    /* center of screen */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* hide start-screen class when game starts */
.hide {
    display: none;
}

.ground {
    --left: 0;
    position: absolute;
    width: 300%;
    bottom: 0;
    left: calc(var(--left) * 1%)
}

.dino {
    --bottom: 0;
    position: absolute;

    /* initial position of dinosaur */
    left: 1%;

    /* size of dinosaur */
    height: 30%;
    bottom: calc(var(--bottom) * 1%);
}
  
.cactus {
    position: absolute;
    left: calc(var(--left) * 1%);
    height: 30%;

    /* touching ground */
    bottom: 0;
}

/* display score text in lose messages */
u:hover{
    color: red;
    cursor: pointer;
}