/* ========================================================================== */
/* Grundlegende Stile für die gesamte Seite                                  */
/* ========================================================================== */

body {
    font-family: Arial, sans-serif;
    background-color: #f0f8ff;
    color: #333;
    margin: 0;
    padding: 0;
    padding-top: 95px; /* Abstand für den fixierten Header */
    line-height: 1.6;
}

/* ========================================================================== */
/* Header-Bereich und Navigation                                             */
/* ========================================================================== */

.main-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 20px;
    background-color: #B19CD9;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 20;
}

#logo-img {
    height: 75px;
    width: auto;
}

/* Hauptnavigation */
.main-nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav li {
    margin-left: 20px;
    /* Hintergrundfarbe wird vom Header geerbt */
    background-color: #B19CD9;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

/* Hamburger-Menü standardmäßig auf Desktop versteckt */
.hamburger-menu {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    padding-right: 20px;
}

/* Stil für die Font Awesome Buttons */
#search-toggle-btn, #random-page-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    font-size: 2.5rem; /* Oder eine Größe, die gut passt */
    width: 60px; /* Breite und Höhe anpassen, damit der Button quadratisch wird */
    height: 60px;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Verschiebt den Such-Button und den nachfolgenden Random-Button nach rechts */
#search-toggle-btn {
    margin-left: auto;
}

/* Stil für die Icons in den Buttons */
#search-toggle-btn i, #random-page-btn i {
    color: #333;
}

#search-toggle-btn:hover i,
#search-toggle-btn:active i,
#random-page-btn:hover i,
#random-page-btn:active i {
    color: white;
}

/* ========================================================================== */
/* Such- und Filter-Funktion                                                 */
/* ========================================================================== */

.filter-container {
    /* Fixed-Positionierung */
    position: fixed;
    background-color: transparent;
    top: 95px; /* Positioniert den Container direkt unter dem Header */
    left: 50%; /* Startet die Position bei 50% von links */
    transform: translateX(-50%); /* Zentriert den Container horizontal */
    z-index: 15; /* Stellt sicher, dass der Container über anderen Elementen liegt */

    /* Standardmäßig ausgeblendet */
    display: none;
    
    /* Bestehende Stile beibehalten */
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 0; /* Margin wird nicht mehr benötigt */
    width: 90%;
    max-width: 800px;
    background-color: #f0f8ff; /* Hintergrundfarbe, damit der Inhalt lesbar bleibt */
    padding: 20px 0;
}

/* Neuer Stil, um den Container sichtbar zu machen, wenn der Button geklickt wird */
.filter-container.active {
    display: flex;
}

.search-bar, .filter-options {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

#image-search {
    width: 100%;
    padding: 12px;
    border: 1px solid #B19CD9; /* Passend zum Header-Farbton */
    border-radius: 5px;
    font-size: 1em;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Wie bei den Ausmalbildern */
}

#category-filter {
    padding: 12px;
    border: none; /* Entfernen des Rahmens für einen Button-Look */
    border-radius: 5px;
    background-color: #5d9cec; /* Passend zum Add-to-List-Button */
    color: white;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
    -webkit-appearance: none; /* Entfernt das Standard-Dropdown-Styling bei Webkit-Browsern */
    -moz-appearance: none; /* Entfernt das Standard-Dropdown-Styling bei Firefox */
    appearance: none;
}

#category-filter:hover {
    background-color: #4a8ad8; /* Passend zum Hover-Effekt des Add-to-List-Buttons */
}

.filter-options label {
    font-weight: bold;
    margin-right: 5px;
    color: #333; /* Standard-Textfarbe */
}

/* ========================================================================== */
/* Galerie-Stile für die Ausmalbilder                                        */
/* ========================================================================== */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
}

.coloring-page {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease;
}

.coloring-page:hover {
    transform: translateY(-5px);
}

.coloring-page img {
    max-width: 100%;
    height: auto;
    display: block;
    justify-self: center;
}

.coloring-page a {
    display: block;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    padding: 10px;
    margin: 10px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.coloring-page a:hover {
    background-color: #45a049;
}

/* ========================================================================== */
/* Footer-Stile und weitere Komponenten                                      */
/* ========================================================================== */

footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: #fff;
}

footer a {
    font-size: 1rem;
    text-decoration: none;
}

.ad-container {
    margin-top: 15px;
    background-color: #fff;
    color: #333;
    padding: 10px;
    border-radius: 5px;
}

.category-section {
    margin-bottom: 40px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.category-section h2 {
    text-align: center;
    color: #ff6347;
    margin-top: 0;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

/* Navigations-Stile (allgemein, wird von spezifischeren überschrieben) */
nav {
    margin-top: 15px;
    background-color: #B19CD9;
    padding: 10px;
    border-radius: 5px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.2em;
    padding: 5px 10px;
    border-radius: 5px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

nav a:hover {
    color: white;
}

.main-nav a.active-link {
    color: #1A237E; /* Farbe für den aktiven Link */
    text-decoration: underline;
}

/* ========================================================================== */
/* Download-Listen- und Popup-Stile                                          */
/* ========================================================================== */

#download-list-container {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 250px;
    z-index: 999;
}

#download-list {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

#download-list li {
    background-color: #f0f8ff;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 5px;
}

#download-all-btn, #print-all-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
}

.print-single-btn {
    display: block;
    width: calc(100% - 20px);
    background-color: #28a745; /* Beispiel: Grüne Farbe */
    color: white;
    text-decoration: none;
    padding: 10px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.print-single-btn:hover {
    background-color: #218838;
}

#download-all-btn {
    background-color: #4CAF50;
    color: white;
}

#print-all-btn {
    background-color: #ff6347;
    color: white;
}

.add-to-list-btn {
    display: block;
    width: calc(100% - 20px);
    background-color: #5d9cec;
    color: white;
    text-decoration: none;
    padding: 10px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.remove-from-list-btn {
    display: block;
    width: calc(100% - 20px);
    background-color: #dc3545;
    color: white;
    text-decoration: none;
    padding: 10px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-to-list-btn:hover {
    background-color: #4a8ad8;
}

.remove-from-list-btn-s {
    background-color: #ff6347;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
    float: right;
    transition: background-color 0.3s ease;
}

.remove-from-list-btn-s:hover {
    background-color: #e5533d;
}

.popup-container {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.popup-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.close-btn, .adblock-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}

.close-btn:hover {
    color: #333;
}

.donate-btn {
    display: inline-block;
    background-color: #0070ba;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
}

.donate-btn:hover {
    background-color: #005f9c;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================================================== */
/* Grundlegende Typografie für die Impressum-Seite                          */
/* ========================================================================== */

.impressum-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.impressum-container h1 {
    font-size: 2.5em;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.impressum-container h2 {
    font-size: 1.8em;
    color: #555;
    margin-top: 30px;
    margin-bottom: 15px;
}

.impressum-container p {
    font-size: 1.1em;
    color: #666;
    line-height: 1.8;
}

.impressum-container strong {
    color: #333;
}

/* ========================================================================== */
/* Responsive Design für Mobilgeräte                                         */
/* ========================================================================== */

@media (max-width: 768px) {
    
    /* Hamburger-Icon anzeigen */
    .hamburger-menu {
        display: block;
        font-size: 2rem;
        background: none;
        border: none;
        cursor: pointer;
        color: #333;
        padding: 0;
        margin-left: 20px;
    }
    
    /* Navigation für Mobilgeräte */
    .main-nav {
        position: absolute;
        top: 95px;
        left: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
        background-color: #B19CD9;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 10;
        padding: 0;
        margin-left: 0; /* Wichtig, um die mobile Ansicht nicht zu stören */
    }

    /* Navigation öffnen */
    .main-nav.nav-open {
        max-height: 300px;
    }
    
    /* Stile für die Listen-Elemente im Menü */
    .main-nav ul {
        flex-direction: column;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    /* Stile für die einzelnen Listenpunkte */
    .main-nav li {
        background-color: #B19CD9;
        margin-left: 0;
        margin: 0;
    }

    /* Links gestalten */
    .main-nav li a {
        display: block;
        padding: 15px;
        text-align: center;
        text-decoration: none;
        color: #333;
        border-bottom: 1px solid #ccc;
    }
}   