/* GLOBAL */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f4f4f7;
    color: #333;
}

main {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

/* HEADER */
header {
    background: #1f1f1f;
    color: white;
    padding: 25px 0;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

header h1 {
    margin-bottom: 10px;
    font-size: 28px;
    letter-spacing: 1px;
}

/* NAVIGATION */
nav ul {
    display: flex;
    justify-content: center;
    gap: 35px;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 17px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: 0.2s;
}

nav a:hover {
    background: #444;
}

.back-btn {
    background: #333;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    margin-bottom: 15px;
    transition: 0.2s;
}

.back-btn:hover {
    background: #555;
    transform: translateX(-3px);
}

.logout-btn {
    background: #c62828;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    transition: 0.2s;
}

.login-btn {
    background: #017c12;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    transition: 0.2s;
}

.login-btn:hover {
    background: #009113;
}

.logout-btn:hover {
    background: #e53935;
}

/* LOGIN */
.login-box input {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #bbb;
    margin-right: 5px;
}

#userGreeting {
    font-weight: bold;
    margin-top: 10px;
}

.user-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

/* TABLES */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background: #333;
    color: white;
}

th, td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

.brand-link {
    color: #0077cc;
    cursor: pointer;
    font-weight: bold;
}

.brand-link:hover {
    text-decoration: underline;
}

/* CAR CARDS */
.car-card {
    display: flex;
    background: white;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: 0.2s;
}

.car-card:hover {
    transform: translateY(-3px);
}

.car-card img {
    width: 220px;
    border-radius: 8px;
    object-fit: cover;
}

.car-card .info {
    padding-left: 20px;
}

/* GRID (brand models) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.grid div {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: 0.2s;
}

.grid div:hover {
    transform: translateY(-3px);
}

.grid img {
    width: 100%;
    border-radius: 8px;
}

/* COMMENTS */
.comment-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* HIDDEN */
.hidden {
    display: none;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 25px;
    width: 420px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* SEARCH INPUT */
#searchInput {
    display: none;
}
