/* Base Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

/* Header */
header {
    background-color: #20232a;
    padding: 20px;
    text-align: center;
    color: #61dafb;
}

nav a {
    margin: 0 15px;
    color: #61dafb;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Container for Car Items */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 30px;
    max-width: 1200px;
    margin: auto;
}

/* Car Item Box */
.car-item {
    border: 1px solid #ddd;
    border-radius: 10px;
    margin: 15px;
    width: 280px;
    text-align: center;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.car-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.car-item img {
    width: 100%;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.car-info {
    padding: 15px;
}

/* Filter Section */
.filter {
    margin: 20px;
    text-align: center;
}

.filter input {
    padding: 12px;
    width: 250px;
    border-radius: 5px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.filter input:focus {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-color: #20232a;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

/* Modal Content Box */
.modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #20232a;
    cursor: pointer;
}

/* Animations */
@keyframes slideIn {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    .filter input {
        width: 90%;
    }
}
