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

body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    line-height: 1.5;
    overflow-x: hidden;
    padding-bottom: 50px;
}

a, a:visited {
    color: #ffcc00;
    text-decoration: none;
}
a:hover {
    color: #ffd700;
    text-decoration: underline;
}

/* Header + Logo */
header {
    text-align: center;
    padding: 20px;
    background-color: #111;
}
.header-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}
h1 {
    font-size: 1.8em;
    margin-bottom: 5px;
}
p.headline-sub {
    font-size: 0.9em;
    color: #ccc;
}

/* Login / Menüzeile oben */
.user-actions {
    text-align: right;
    padding: 10px 20px;
    background: #111;
    font-size: 0.95em;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
.user-actions a {
    font-weight: bold;
    color: #ffcc00;
}

/* Kategorie-Filter */
.category-filter,
.filter-links {
    text-align: center;
    margin: 10px 0;
    flex-wrap: wrap;
}
.category-filter a,
.filter-links a {
    background: #003399;
    color: #ffcc00;
    padding: 8px 14px;
    margin: 5px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    font-size: 0.9em;
}
.category-filter a:hover,
.filter-links a:hover {
    background: #0055cc;
    color: #fff;
}
.category-filter a.active {
    background: #ffcc00;
    color: #000;
}

/* Fahrzeugbox */
.car-box {
    background-color: #000066;
    border: 1px solid #003399;
    max-width: 960px;
    margin: 20px auto;
    padding: 16px;
    border-radius: 8px;
}

.car-header-with-share {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    background-color: #003399; /* Sonderfarbe zurück! */
    color: #fff;               /* Text in weiß */
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
}

.car-header-text {
    font-weight: bold;
    font-size: 1em;
    flex: 1;
    line-height: 1.4;
    color: #fff; /* ← neu oder überschreibend */
}

.share-btn {
    background: #003399;
    color: #ffcc00;
    border: 2px solid #ffcc00;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0; /* entfernt ggf. unerwünschten Außenabstand */
    align-self: center;
}

}
.share-btn:hover {
    background: #0055cc;
    color: #fff;
    border-color: #fff;
}

.car-description,
.car-modifications {
    margin-top: 10px;
    font-size: 0.95em;
}
.car-updated,
.car-dates {
    font-size: 0.8em;
    color: #ccc;
    margin-top: 5px;
}
.car-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.car-actions button {
    background: #444;
    color: #ffcc00;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}
.car-actions button:hover {
    background: #666;
}

.share-menu {
    display: none;
    background: #222;
    border: 1px solid #444;
    padding: 8px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 0.9em;
}
.share-menu a {
    display: block;
    color: #ffcc00;
    padding: 4px 0;
}
.share-menu a:hover {
    color: #fff;
}
.car-share {
    margin-top: 10px;
    text-align: right;
}
.car-share button {
    background: #003399;
    color: #ffcc00;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.9em;
    cursor: pointer;
}
.car-share button:hover {
    background: #0055cc;
    color: #fff;
}

/* Seitenzahlen */
.pagination {
    text-align: center;
    margin: 20px 0;
}
.pagination a {
    color: #ffcc00;
    background-color: #003399;
    margin: 3px;
    padding: 6px 12px;
    font-weight: bold;
    border-radius: 5px;
    display: inline-block;
}
.pagination a:hover {
    background-color: #0055cc;
    color: #fff;
}
.pagination a.active {
    background-color: #ffcc00;
    color: #000;
}

/* Swiper-Galerie */
.swiper {
    width: 100%;
    height: auto;
    margin-top: 10px;
}
.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}
.swiper-slide img {
    width: 100%;
    max-height: 540px;
    object-fit: contain;
}
.swiper-pagination-bullet {
    background: #aaa;
    opacity: 1;
}
.swiper-pagination-bullet-active {
    background: #ffcc00;
}

/* Vorschau-Bilder unter dem großen Bild */
.car-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}
.car-thumbnails img {
    max-height: 80px;       /* Begrenze die Höhe */
    height: auto;           /* Erlaube automatische Höhe */
    width: auto;            /* Erlaube variable Breite */
    border-radius: 4px;
    border: 2px solid #555;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    object-fit: contain;    /* verhindert Verzerrung bei ungewöhnlichen Formaten */
}
.car-thumbnails img.active {
    border-color: #ffcc00;
    transform: scale(1.05);
}

/* Formularbereich */
.edit-form,
.form-box {
    max-width: 1000px;
    margin: 30px auto;
    background-color: #222;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px #000;
    color: #fff;
}
label {
    font-weight: bold;
    margin-top: 20px;
    display: block;
}
input[type="text"],
input[type="number"],
input[type="file"],
input[type="password"],
select,
textarea {
    width: 100%;
    margin: 8px 0 16px;
    padding: 10px;
    border-radius: 4px;
    border: none;
    font-size: 1rem;
    background: #111;
    color: #fff;
    border: 1px solid #444;
}
textarea {
    min-height: 120px;
    resize: vertical;
    font-size: 16px;
}
button[type="submit"],
button {
    background-color: #ffcc00;
    color: #000;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    margin-top: 20px;
    cursor: pointer;
    font-weight: bold;
}
button:hover,
button[type="submit"]:hover {
    background-color: #ffd700;
}

/* Bildvorschau mit Delete-Button */
.image-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.image-col {
    width: calc(20% - 10px);
    min-width: 120px;
    background: #222;
    border: 2px dashed #444;
    padding: 10px;
    margin: 5px;
    border-radius: 6px;
    box-sizing: border-box;
}
.bild-vorschau {
    position: relative;
    margin-bottom: 10px;
}
.bild-vorschau img {
    max-width: 100%;
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(0,0,0,0.5);
}
.bild-vorschau button.delete-button {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
}

/* Footer */
footer {
    margin-top: 40px;
    text-align: center;
    font-size: 0.9em;
    color: #ccc;
}

/* Mobile Optimierungen */
@media (max-width: 768px) {
    header {
        padding: 10px;
    }
    .header-image {
        max-width: 320px;
    }
    .car-box {
        margin: 10px;
        padding: 12px;
    }
    .pagination a {
        padding: 6px 10px;
    }
    .category-filter a,
    .filter-links a {
        font-size: 0.8em;
        padding: 6px 10px;
    }
    .car-header {
        font-size: 0.95em;
    }
    .edit-form,
    .form-box {
        padding: 15px;
        margin: 20px 10px;
        border-radius: 6px;
    }
    textarea {
        font-size: 1rem;
        min-height: 100px;
    }
    input,
    select,
    input[type="password"],
    textarea {
        font-size: 1rem;
    }
    .image-col {
        width: 100%;
        margin-bottom: 12px;
    }

    /* Thumbnails im mobilen Layout ausblenden */
/* Thumbnails bei schmalen Browserfenstern ausblenden */
@media (max-width: 768px) {
    .car-thumbnails {
        display: none !important;
    }
}

/* Thumbnails auf Touchgeräten mit grobem Zeiger (z. B. iPhone) ausblenden */
@media (hover: none) and (pointer: coarse) {
    .car-thumbnails {
        display: none !important;
    }
}

}

