body {
    font-family: Arial, sans-serif;
    background-image: url('snoopy.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #333;
    margin: 0;
    padding: 0;
    display: block;
    min-height: 100vh;
}

/* NEU: Klasse für die Galerieansicht (Tagesordner) */
.holz-hintergrund {
    background-image: url('holz.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Anpassungen für alle Haupt-Container (Login, Hauptordner, Tagesordner) */
.login-container,
.container {
    background-color: rgba(255, 255, 255, 0.3); /* Milchglaseffekt */
    backdrop-filter: blur(10px); /* Moderner Milchglaseffekt */
    color: #FF0000; /* Rote Schriftfarbe für alle Container */
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 900px;
    margin: 20px auto;
}

/* Spezifische Positionierung für den Login-Container */
.login-container {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
}

h1 {
    text-align: center;
    color: #FF0000; /* Rote Schrift für alle Überschriften */
}

.login-container form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-container label {
    margin-bottom: 10px;
}

.login-container input {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 200px;
}

/* Roter Button für den Anmeldebereich */
.login-container button {
    padding: 10px 20px;
    background-color: #FF0000; /* Roter Hintergrund */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.login-container button:hover {
    background-color: #CC0000; /* Dunkleres Rot beim Hover */
}

.error {
    color: red;
    margin-top: 10px;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.folder-link {
    text-decoration: none;
    color: #333;
}

.folder-link div {
    background-color: rgba(255, 255, 255, 0.5); /* Leichter Milchglaseffekt für Ordner */
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    transition: transform 0.2s;
}

.folder-link div:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.7);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.image-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.image-grid img:hover {
    transform: scale(1.05);
}

.video-placeholder {
    background-color: #333;
}

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3em;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.thumbnail-link {
    position: relative;
    display: block;
}

/* Styling für die "Zurück"-Buttons mit 3D-Effekt */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 20px;
    text-decoration: none;
    color: white;
    background-color: #FF0000; /* Hauptfarbe Rot */
    border: 2px solid #CC0000; /* Dunklerer Rahmen für den 3D-Effekt */
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 6px 0 #990000, /* Tieferer Schatten für 3D-Effekt */
                0 0 15px rgba(0, 0, 0, 0.3); /* Zusätzlicher weicher Schatten */
    transition: all 0.1s ease;
    cursor: pointer;
}

.back-link:hover {
    background-color: #CC0000; /* Dunkleres Rot beim Hover */
    border-color: #990000;
    box-shadow: 0 3px 0 #660000, /* Schatten wird kleiner */
                0 0 20px rgba(0, 0, 0, 0.4); /* Schatten wird intensiver */
    transform: translateY(3px); /* Button bewegt sich nach unten */
}

.back-link:active {
    background-color: #990000; /* Noch dunkleres Rot beim Klicken */
    border-color: #660000;
    box-shadow: 0 0px 0 #660000, /* Schatten verschwindet */
                0 0 10px rgba(0, 0, 0, 0.2);
    transform: translateY(6px); /* Button wird ganz eingedrückt */
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px; /* Bietet Platz für den Schließen-Button */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    text-align: center;
    display: flex; /* Flexbox für Zentrierung des Wrappers */
    align-items: center; /* Vertikale Zentrierung */
    justify-content: center; /* Horizontale Zentrierung */
}

.lightbox-content-wrapper {
    width: 100%; /* Den gesamten verfügbaren Platz im flex-Container nutzen */
    height: 100%; /* Den gesamten verfügbaren Platz im flex-Container nutzen */
    margin: auto;
    display: flex; /* Erneut Flexbox, um Bild/Video zu zentrieren */
    justify-content: center;
    align-items: center;
}

.lightbox-content-wrapper img,
.lightbox-content-wrapper video {
    max-width: 100%; /* Stellt sicher, dass es nicht breiter als der Wrapper wird */
    max-height: 100%; /* Stellt sicher, dass es nicht höher als der Wrapper wird */
    object-fit: contain; /* Skaliert das Medium so, dass es in den Container passt und das Seitenverhältnis beibehält */
    display: block; /* Wichtig für die korrekte Anwendung von margin: auto */
    margin: auto; /* Zentriert das Element im Wrapper */
    transition: transform 0.3s ease; /* Behält die Übergänge bei */
}

/* Separate Regeln für img, falls spezifische Effekte (wie Transition) nur dort angewendet werden sollen */
/* Ansonsten können diese Eigenschaften auch in den kombinierten Selektor oben verschoben werden */
.lightbox-content-wrapper img {
    transition: transform 0.3s ease;
}

/* Styling für den neuen Schließen-Button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 1rem;
    padding: 10px 20px;
    background: #FF0000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 5px 0 #CC0000; /* Der 3D-Effekt */
    transition: all 0.1s ease;
}

.close-btn:hover {
    background: #CC0000;
    box-shadow: 0 3px 0 #990000;
    transform: translateY(2px);
}

.close-btn:active {
    background: #990000;
    box-shadow: 0 0px 0 #990000;
    transform: translateY(5px);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: white; /* Weiße Navigationspfeile */
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* Anpassungen für Handys (vergrößern) */
@media (max-width: 600px) {
    body {
        font-size: 1.2rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .login-container {
        width: 90%;
        top: 20px;
    }

    .login-container input {
        width: 100%;
    }

    .container {
        padding: 10px; /* Reduziertes Padding auf Handys */
    }

    /* Anpassung der mobilen Ansicht für den neuen Button */
    .close-btn {
        font-size: 1.2rem;
        padding: 12px 24px;
        right: 10px;
        top: 10px;
    }

    /* Anpassung für mobile Geräte */
    .back-link {
        padding: 12px 24px;
        font-size: 1.1rem;
    }

    .nav-btn {
        font-size: 65px; /* Größere Navigationspfeile auf Handys */
    }

    .prev-btn {
        left: 5px; /* Etwas näher am Rand */
    }

    .next-btn {
        right: 5px; /* Etwas näher am Rand */
    }
}