* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.dark {
    background-color: rgb(38, 0, 59);
}

.dark .car-div {
    background-color: purple;
    color: white;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.top {
    width: 100%;
    max-width: 1200px;
    display: flex;
    margin-left: auto;
    margin-right: auto;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
}


.botirdev {
    text-decoration: none;
    font-weight: bold;
    color: black;
}

.botirdev:hover {
    color: deepskyblue;
    transition: 0.4s ease;
}

.dark .botirdev {
    color: white;
}

#dark-mode {
    cursor: pointer;
}

#carsContainer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
    align-items: center;
    gap: 60px;
    margin-top: 60px;
}

.car-div {
    background-color: white;
    padding: 15px;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

body { font-family: Arial, sans-serif;
transition: background-color 0.5s ease, color 0.5s ease;
}

.true {
  display: none;
  min-width: 200px;
  background: green;
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 12px;
  position: fixed;
  top: 5px;
  right: 30px;
  z-index: 9999;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.5s, bottom 0.5s;
}

.true.show {
  display: block;
  opacity: 1;
  top: 50px;
}

.car-color {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
}

.car-country {
    font-weight: bold;
}

.cars-country {
    margin-top:10px;
    margin-bottom: 10px;
}

.car-turkum {
    font-weight: bold;
}
.cars-turkum {
    margin-bottom: 10px;
}

.car-colorName {
    font-weight: bold;
}

.car-title {
    font-weight: bold;
    font-size: 22px;
    margin-bottom: 15px;
}

.delete-btn {
    background-color: rgb(245, 120, 120);
    display: flex;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    padding: 5px;
}

.edit-btn {
    background-color: rgb(236, 73, 163);
    display: flex;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    padding: 5px;
}

.info-btn {
    background-color: rgb(88, 193, 235);
    display: flex;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    padding: 5px;
}

.buttons {
    margin-top: 30px;
    position: relative;
    margin-left: 200px;
    gap: 10px;
    display: flex;
}


.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(34, 34, 34, 0.5);
    backdrop-filter: blur(3px);
    z-index: 10;
}

.hidden {
    display: none;
}

.add-modal {
    position: fixed;
    overflow-y: scroll; 
    top: 10px;
    overflow-x: hidden;
    margin-left: 50px;
    margin-right: auto;
    width: 1100px;
    max-height: 90vh; 
    background: white;
    backdrop-filter: blur(3px);
    z-index: 20;
    border-radius: 16px;
}

.dark .info-modal {
    background-color: rgb(66, 6, 34);
    color: white;
}

.dark .modal-top {
    color: black;
}

.dark .add-modal {
    background-color: rgb(66, 6, 34);
    color: white;
}

.dark .modal-top {
    color: black;
}

.dark .edit-modal {
    background-color: rgb(66, 6, 34);
    color: white;
}

.dark .modal-top {
    color: black;
}

.modal-top {
    display: flex;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
    width: 100%;
    justify-content: space-between;
    background-color: silver;
    border-bottom: black 2px solid;
}

#close {
    cursor: pointer;
}

#editClose {
    cursor: pointer;
}

#infoClose {
    cursor: pointer;
} 

.overfloww {
    overflow: hidden;
}

.add-btn {
    cursor: pointer;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
    width: 300px;
    height: 50px;
    color: white;
    background-color: black;
    font-weight: bold;
    font-size: 20px;
    position: relative;
}

.edit-modal {
    position: fixed;
    top: 10px;
    margin-left: 50px;
    margin-right: auto;
    width: 1100px;
    max-height: 90vh; 
    background: white;
    backdrop-filter: blur(3px);
    overflow-x: hidden;
    z-index: 20;
    border-radius: 16px;
    overflow-y: scroll;
}

.info-modal {
    position: fixed;
    overflow-y: scroll; 
    top: 10px;
    margin-left: 50px;
    margin-right: auto;
    width: 1100px;
    overflow-x: hidden;
    height: 940px; 
    background: white;
    backdrop-filter: blur(3px);
    z-index: 20;
    border-radius: 16px;
}

/* Form */
.form-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: start;
    margin-left: 3%;
    margin-top: 15px;
    width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-section-title {
    font-weight: bold;
    font-size: 20px;
}

.label-car-name,
.label-add-trim,
.label-add-year,
.label-add-engine, 
.label-add-country,
.label-add-category,
.label-add-max-speed,
.label-add-fuel-type,
.label-add-door-count,
.label-add-seat-count,
.label-add-horsepower,
.label-add-color-code,
.label-add-generation,
.label-add-color-name,
.label-add-description,
.label-add-acceleration,
.label-add-fuel-consumption-city, 
.label-add-fuel-consumption-highway, 
.label-add-fuel-consumption-combined{
    padding-right: 10px;
    font-weight: 700;
    font-size: 18px;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

.add-btn-submit {
    position: absolute;
    display: flex;
    margin-left: auto;
    margin-right: auto;
    width: 300px;
    height: 60px;
    bottom: 10px;
    right: 10px;
    border-radius: 16px;
    cursor: pointer;
    border: skyblue 2px solid;
    background-color: white;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

.add-btn-submit:hover {
    background-color: skyblue;
    border: black 2px solid;
    color: white;
    transition: 0.5s ease;
}

.form-group {
    display: flex;
    align-items: center;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#addName,
#addTrim,
#addYear,
#addGeneration,
#addCategory,
#addCountry,
#addColorCode,
#addColorName,
#addDoorCount,
#addSeatCount,
#addMaxSpeed,
#addAcceleration,
#addEngine,
#addHorsepower,
#addFuelType,
#addFuelConsumptionCity,
#addFuelConsumptionHighway,
#addFuelConsumptionCombined,
#addDescription {
    padding-left: 10px;
    width: 200px;
    font-size: 13px;
    font-weight: bold;
    height: 25px;
    border-radius: 8px;
    border: skyblue 2px solid;
}

#addDescription {
    width: 300px;
    height: 40px;
}

.infoClass {
    font-weight: bold;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

#infoRangKodi {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
}

#infoRangNomi {
    font-weight: bold;
}

.infoDiv {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 20px;
}

.infoContainer {
    display:flex;
    flex-direction: column;
    position: fixed;
    width: 600px;
    
}

.infoMainName {
    margin-top: 20px;
    margin-left: 20px;
    font-size: 22px;
}

#infoName,
#infoTrim,
#infoAvlod,
#infoYear,
#infoKategoriya,
#infoMamlakat,
#infoRangKodi,
#infoRangNomi,
#infoEshikSoni,
#infoOrindiqSoni,
#infoMaksTezlik,
#infoDvigatel,
#infoOtKuch,
#infoYoqilgi,
#infoShYS,
#infoTYS,
#infoAYS,
#infoTavsif,
#InfoTezlanish {
    font-size: 20px;
    font-weight: bold;
    color: rgb(0, 102, 255);
}

.infoClass {
    font-weight: 800;
    font-size: 17px;
}

@media (max-width: 1250px) {
    #carsContainer {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 400px;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }

    .top {
        padding-right: 20px;
        padding-left: 20px;
    }

    .info-modal {
        width: 1000px;
    }
    .add-modal {
        width: 1000px;
    }

    .edit-modal {
        width: 1000px;
    }

}

@media (max-width: 1105px) {
    .info-modal {
        width: 700px;
    }
    .add-modal {
        width: 700px;
    }
    .edit-modal {
        width: 700px;
    }
}

@media (max-width: 810px) {
    #carsContainer {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        width: 300px;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }

    .top {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .car-div {
        width: 300px;
    }

    .buttons {
        position: relative;
        margin-left: 130px;
    }

    .info-modal {
        width: 500px;
    }
    .add-modal {
        width: 500px;
        height: 1000px;
    }
    .edit-modal {
        width: 500px;
        height: 1000px;
    }
    .form-row {
        margin-left: 10px;
    }

    .form-section-title {
        margin-left: 10px;
    }
}


@media (max-width: 590px) {
    .info-modal {
        width: 400px;
    } 
    .add-modal {
        margin-left: 10px;
        width: 400px;
        height: 1410px;
        align-items: center;
        justify-content: center;
    }

    .edit-modal {
        margin-left: 10px;
        width: 400px;
        height: 1410px;
        align-items: center;
        justify-content: center;
    }

    .form-group {
        display: flex;
        flex-direction: column;
    }

    .form-row {
        margin-left: 30px;
    }

    #addDescription {
        width: 280px;
        margin-left: -20px;
    }
}

@media (max-width: 492px) {
    .info-modal {
        width: 300px;
        margin-left: 10px;
        height: 650px;
    }

    .add-modal {
        margin-left: 10px;
        width: 300px;
        height: 1410px;
        align-items: center;
        justify-content: center;
    }

    .edit-modal {
        margin-left: 10px;
        width: 300px;
        height: 1390px;
    }

    .add-btn-submit {
        width: 280px;
    }

    .add-modal {
        width: 300px;
    }

    #infoName,
    #infoTrim,
    #infoAvlod,
    #infoYear,
    #infoKategoriya,
    #infoMamlakat,
    #infoRangKodi,
    #infoRangNomi,
    #infoEshikSoni,
    #infoOrindiqSoni,
    #infoMaksTezlik,
    #infoDvigatel,
    #infoOtKuch,
    #infoYoqilgi,
    #infoShYS,
    #infoTYS,
    #infoAYS,
    #infoTavsif,
    #InfoTezlanish {
    font-size: 14px;
    font-weight: bold;
    color: rgb(0, 102, 255);
    }

    .infoDiv {
        margin-left: 8px;
    }


    .infoMainName{
        font-size: 18px;
        margin-left: 8px;
    }
    .infoClass {
        font-size: 13px;
    }
}