* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Times New Roman', Times, serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #2c3e50;
    overflow: hidden;
}

.game-container {
    width: 100vw;
    height: 100vh;
    background: url("./images/bgimg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.startScreen {
    width: 100%;
    max-width: 400px;
    position: absolute;
    background-color: rgba(0, 99, 26, 0.9);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: white;
    z-index: 1;
    text-align: center;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    letter-spacing: 2px;
    line-height: 1.6;
    text-transform: uppercase;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.5);
}

.ClickToStart {
    font-size: 1.5rem;
    color: white;
    background-color: #514a4a;
    padding: 15px;
    margin-bottom: 14px;
    border: none;
    border-radius: 10px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.ClickToStart:hover {
    background-color: #ff6b6b;
    transform: scale(1.1);
}

.ClickToStart:active {
    transform: scale(1);
}

.score,
.highScore {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 1.5rem;
    padding: 6px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.7);
    text-align: center;
    width: 80%;
    max-width: 300px;
    border-radius: 8px;
    z-index: 10;
}

.highScore {
    top: 50px;
    margin-top: 10px;
}

.hide {
    display: none;
}

.gameArea {
    width: 300px;
    height: 100vh;
    margin: auto;
    background-color: #2d3436;
    position: relative;
    overflow: hidden;
    border-right: 5px dashed #c8d6e5;
    border-left: 5px dashed #c8d6e5;
}


.car {
    width: 40px; 
    height: 70px;
    background-image: url("./images/car1.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    left: 50%;
    bottom: 120px; 
    transform: translateX(-50%);
    z-index: 5;
}

.enemyCar {
    width: 40px; 
    height: 70px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
}

.line {
    width: 8px;
    height: 100px;
    background: white;
    position: absolute;
    left: calc(50% - 4px);
}

@media (max-width: 768px) {
    .startScreen {
        width: 70%;
        font-size: 0.8rem;
        padding: 10px;
    }
    .car,.enemyCar {
        width: 35px; 
        height: 60px; 
      }
    .score,
    .highScore {
        font-size: 1.2rem;
        width: 80%;
        max-width: 280px;
        margin: 0;
    }

    .line {
        width: 2%;
        max-width: 8px;
    }
}

@media (max-width: 480px) {
    .car,.enemyCar {
        width: 30px; 
        height: 55px; 
      }
    .score,
    .highScore {
        font-size: 1rem;
        width: 60%;
        max-width: 250px;
    }

    .line {
        width: 3%;
        max-width: 6px;
    }
}

@media (max-width: 320px) {
    .car,.enemyCar {
        width: 25px; 
        height: 50px; 
      }
    
    .score,
    .highScore {
        font-size: 0.9rem;
        width: 65%;
        max-width: 200px;
    }
}