body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
    touch-action: none; /* Prevenir o zoom ao tocar */
}

.game-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #333;
    margin: 0 auto; /* Centraliza o cont¨ºiner do jogo */
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Alinha o carro no fundo da tela */
    overflow: hidden;
}

.car {
    position: absolute;
    bottom: 10px; /* Ajuste para garantir que o carro esteja vis¨ªvel */
    width: 50px;
    height: 100px;
    background: url('img/carro.png') no-repeat center center;
    background-size: contain;
    transition: left 0.2s;
}

.obstacle {
    position: absolute;
    width: 50px;
    height: 100px;
    background: url('img/carro-obstaculo.png') no-repeat center center;
    background-size: contain;
    transition: top 0.2s;
}

.score {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: white;
}

.line {
    position: absolute;
    width: 5px;
    height: 100%;
    background-color: white;
}

.left-line {
    left: 0;
}

.right-line {
    right: 0;
}

.dotted-line {
    position: absolute;
    width: 3px;
    height: 100%;
    background: repeating-linear-gradient(
        white,
        white 10px,
        transparent 10px,
        transparent 20px
    );
}

/* Estilo adicional para dispositivos m¨®veis */
@media (max-width: 768px) {
    .car {
        width: 30px;
        height: 60px;
    }
    .obstacle {
        width: 30px;
        height: 60px;
    }
}

.game-over {
    display: none; /* Inicialmente oculto */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.game-over p {
    margin: 0 0 10px;
}

.game-over button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}


