html, body {
    display: flex;
    justify-content: center;
    height: 100vh; /* Stellt sicher, dass es sich über die ganze Höhe zentriert */
    margin: 0; /* Entfernt unerwünschte Außenränder */
    background-color: #3a3a3a;
    color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    animation: slideInTop 0.8s ease-in-out forwards;
}

div {
    animation: slideInLeft 0.8s ease-in-out forwards;
}

hr {
    animation: slideInLeft 0.8s ease-in-out forwards;
}

.img-scale {
    animation: slideInTop 0.8s ease-in-out forwards;
    width: auto; /* Einheitliche Breite für alle Screens */
    height: auto; /* Behält das korrekte Seitenverhältnis */
    max-width: 100%; /* Falls kleinerer Bildschirm, bleibt es proportional */
}


@keyframes slideInTop {
    from { opacity: 0; transform: translateY(-100%); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-100%); }
    to { opacity: 1; transform: translateX(0); }
}

/*login*/
.login-container {
    width: 300px;
    padding: 20px;
    background: #292929;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-align: center;
    position: relative; /* Falls absolute Probleme macht */
}

.login-input[type="text"], .login-input[type="password"] {
    width: 100%; /* Stellt sicher, dass das Input-Feld immer zur Container-Breite passt */
    max-width: 280px; /* Verhindert zu große Felder */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 10px; /* Fügt einen Abstand zwischen den Feldern hinzu */
    background-color: #444;
    color: #fff;
}

.login-input[type="text"]:focus, .login-input[type="password"]:focus {
    border-color: #ff4400;
    background: #444;
    color: #fff;
    box-shadow: 0 0 8px rgba(255, 68, 0, 0.4);
}

.login-button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #ff4400;
    color: white;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.login-button[type="submit"]:hover {
    background: darkred;
}

/*news*/
.blog-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    padding: 40px 20px;
    max-width: 90vw; /* Nutzt fast die gesamte Bildschirmbreite */
    margin: auto; /* Hält alles schön zentriert */
}

.blog-block {
    display: grid;
    grid-template-rows: auto 1fr;
    background: #292929;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    width: 100%; /* Stellt sicher, dass sich die Blöcke anpassen */
}

.blog-block:first-child {
    position: relative !important;
    top: 0 !important;
}

.blog-block img {
    width: 100%;
    border-radius: 6px;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background: #ff4400;
    color: white;
    border-radius: 4px;
    text-decoration: none;
}

.read-more:hover {
    background: darkred;
}

@media (max-width: 600px) {
    .blog-container {
        display: flex;
        flex-direction: column; /* Stellt sicher, dass Beiträge untereinander erscheinen */
    }

    .blog-block {
        width: 90%; /* Nutzt fast die gesamte Bildschirmbreite */
        margin: auto; /* Sorgt für zentrierte Darstellung */
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .blog-container {
        grid-template-columns: repeat(2, 1fr); /* Nur 2 Spalten auf z.B. iPads */
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    .blog-container {
        grid-template-columns: repeat(3, 1fr); /* Stellt sicher, dass 3 Spalten genutzt werden */
    }
}

@media (min-width: 1201px) {
    .blog-container {
        grid-template-columns: repeat(4, 1fr) /* Stellt sicher, dass 4 Spalten genutzt werden */
    }
}

/* Allgemeines Styling für das Dashboard */
.admin-dashboard {
    padding: 20px;
    max-width: 1000px;
    margin: auto;
    background: #292929;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Nutzer-Tabelle */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #292929;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.user-table th {
    background: #ff4400;
    color: white;
    padding: 12px;
    text-align: left;
}

.user-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

/* Buttons */
.edit-btn, .publish-btn, .delete-btn {
    width: 100%;
    padding: 8px 14px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: bold;
}

/* Farben der Buttons */
.edit-btn {
    background: #ffcc00;
    color: black;
}

.publish-btn {
    background: green !important;
    color: white !important;
}

.delete-btn {
    background: red;
    color: white;
}

.add-btn {
    width: 150px; /* Feste Größe für konsistente Darstellung */
    padding: 10px;
    background: green;
    color: white;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

/* Hover-Effekte */
.edit-btn:hover {
    background: #e6b800;
    transform: scale(1.05);
}

.delete-btn:hover {
    background: darkred;
    transform: scale(1.05);
}

.add-btn:hover {
    background: darkgreen;
    transform: scale(1.05);
}

/* Eingabefelder */
.user-input {
    padding: 10px;
    border: 2px solid #ff4400;
    border-radius: 6px;
    width: 100%;
    max-width: 90%; /* Verhindert Überschreiten des Containers */
    background: #444;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease-in-out;
}

.user-input:focus, .role-select:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 10px rgba(255, 68, 0, 0.5);
}

.form-group {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    margin-left: 23px; /* Grobe Anpassung */
}

.role-select {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 2px solid #ff4400;
    border-radius: 6px;
    background: #444;
    color: #fff;
    font-size: 16px;
}

.role-select2 {
    width: 100%;
    max-width: 70%;
    padding: 10px;
    border: 2px solid #ff4400;
    border-radius: 6px;
    background: #444;
    color: #fff;
    font-size: 16px;
}

/* Nutzer hinzufügen Formular */
.user-create-form {
    background: #292929;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

@media (max-width: 768px) {
    .form-group {
        margin-left: 10px; /* Weniger Verschiebung auf kleineren Screens */
        flex-direction: column; /* Dropdown & Button untereinander */
        align-items: flex-start; /* Natürliche Ausrichtung */
        width: 100%;
    }

    .role-select2 {
        max-width: 95%;
    }

    .add-btn {
        width: 95%;
    }
}

.confirm-dialog {
    position: fixed;
    inset: 0; /* Positioniert das Element über die gesamte Fläche */
    margin: auto; /* Setzt es exakt in die Mitte */
    width: fit-content; /* Passt sich dem Inhalt an */
    background: #292929;
    color: #fff;
    padding: 25px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    z-index: 2001;
    border-radius: 12px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5); /* Halbtransparent */
    z-index: 2000; /* Über dem Menü */
}

.confirm-btn {
    width: 100%;
    padding: 12px;
    background: #ff4400;
    color: white;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.3s;
    z-index: 2001;
}

.confirm-btn:hover {
    background: darkred;
}

.cancel-btn {
    width: 100%;
    padding: 12px;
    background: #ccc;
    color: black;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.3s;
    z-index: 2001;
}

.cancel-btn:hover {
    background: gray;
}

/* operator-blog */
.operator-blog-container {
    max-width: 900px;
    margin: auto;
    background: #292929;
    color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: slideInLeft 0.8s ease-in-out forwards;
}

.operator-blog-textarea, .operator-blog-title-input {
    width: 95%;
    padding: 12px;
    border: 2px solid #ff4400;
    border-radius: 6px;
    font-size: 16px;
    background: #444;
    color: #fff;
}

.operator-blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    max-width: 90vw;
    gap: 40px;
    padding-top: 20px;
}

.operator-blog-post {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 10px;
    background: #292929;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    height: 100%;
}

.operator-blog-list-containers:first-of-type {
    grid-row: 1; /* Bleibt oben */
}

.operator-blog-list-containers:last-of-type {
    grid-row: 3; /* Bleibt garantiert unten */
}

.operator-blog-post img {
    width: 100%;
    border-radius: 6px;
}

.operator-blog-button {
    background: #ff4400; /* Kräftiges Rot */
    color: white;
    padding: 12px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.3s;
}

.operator-blog-button:hover {
    background: darkred;
}

.operator-blog-file-input {
    display: block;
    background: #ff4400; /* Hauptfarbe aus `freestyler.css` */
    color: white;
    font-size: 16px;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s ease-in-out;
}

.operator-blog-file-input:hover {
    background: darkred;
}

.operator-blog-file-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.operator-blog-file-button {
    background: #ff4400;
    color: white;
    padding: 11px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

.operator-blog-file-button:hover {
    background: darkred;
}

.operator-blog-file-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.operator-blog-button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Buttons untereinander bei kleiner Auflösung */
@media (max-width: 600px) {
    .operator-blog-button-container {
        flex-direction: column;
        align-items: center;
    }

    .operator-blog-file-wrapper {
        width: 100%;
    }

    .operator-blog-button,
    .operator-blog-file-button {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 45px;
        width: 100%; /* Einheitliche Breite für alle Buttons */
        padding: 12px 18px;
        font-size: 16px;
        border-radius: 6px;
        transition: all 0.3s ease-in-out;
    }
}

/* Buttons nebeneinander bei großer Auflösung */
@media (min-width: 601px) {
    .operator-blog-button-container {
        flex-direction: row;
    }
}

/* BlockPosts */
.blog-post-container {
    max-width: 800px;
    margin: auto;
    padding: 30px;
    background: #292929;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    animation: slideInLeft 0.8s ease-in-out forwards;
}

.blog-post-header {
    text-align: center;
    margin-bottom: 20px;
}

.blog-date {
    font-size: 14px;
    color: gray;
}

.blog-title {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    animation: slideInTop 0.8s ease-in-out forwards;
}

.blog-image-wrapper {
    text-align: center;
}

.blog-image {
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    animation: slideInTop 0.8s ease-in-out forwards;
}

.blog-content {
    font-size: 18px;
    line-height: 1.6;
    color: #fff;
    margin-top: 20px;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 30px;
    padding: 10px 15px;
    background: #ff4400;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s;
}

.back-link:hover {
    background: darkred;
}

.error-message {
    text-align: center;
    font-size: 20px;
    color: red;
    font-weight: bold;
}

.admin-back-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    padding: 10px 15px;
    background: #0077cc; /* Blau für Admin-Links */
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.admin-back-link:hover {
    background: #0055aa;
}

/* user-settings */
.password-change-form {
    margin-top: 20px;
    padding: 15px;
    background: midnightblue;
    border-radius: 8px;
}

.change-password-btn {
    background: red;
    color: white;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.change-password-btn:hover {
    background: darkred;
}

/* Neues Overlay für Vorschau */
.overlay-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2500;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-box {
    background: #292929;
    color: #fff;
    padding: 20px;
    border-radius: 6px;
    width: 90%; /* Erweitert die Vorschau auf 90% des Bildschirms */
    max-width: 1200px;
    max-height: 80vh; /* Damit sie scrollbar bleibt */
    overflow: auto;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Spezielle Buttons für Vorschau */
.preview-close-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 12px;
    background: #ccc;
    color: black;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.3s;
}

.preview-close-btn:hover {
    background: gray;
}

/* operator-createpage */
.operator-createpage-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 900px; /* Maximale Breite */
    margin: auto; /* Zentriert das Element */
    background: #292929; /* Hintergrundfarbe */
    color: #fff;
    padding: 25px; /* Innenabstand */
    border-radius: 8px; /* Abgerundete Ecken */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); /* Dezenterer Schatten */
    animation: slideInLeft 0.8s ease-in-out forwards; /* Gleiche Animation */
}

.operator-createpage-form {
    width: 100%;
    max-width: 900px; /* Gleiche Breite wie alle anderen Elemente */
}

/* Inputs & Textarea */
.operator-createpage-title-input {
    width: 100%; /* Volle Breite innerhalb des Containers */
    max-width: 600px; /* Begrenzt die Breite auf großen Bildschirmen */
    padding: 10px;
    font-size: 16px;
    border: 2px solid #E65100;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px;
    background-color: #444;
    color: #fff;
}

.operator-createpage-textarea {
    width: 100%;
    max-width: 900px; /* Gleiche Breite wie die anderen Elemente */
    min-height: 400px; /* Mehr Platz für die Eingabe */
    padding: 10px;
    font-size: 16px;
    border: 2px solid #E65100;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px;
    background-color: #444;
    color: #fff;
}

/* Button Container */
.operator-createpage-button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* Allgemeine Button-Styling */
.operator-confirm-btn, .operator-createpage-file-button, .operator-createpage-button {
    background-color: #E65100; /* Warmer Orange-Ton */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.operator-confirm-btn:hover, .operator-createpage-file-button:hover, .operator-createpage-button:hover {
    background-color: #BF360C; /* Dunkleres Orange beim Hover */
}

.operator-createpage-dropdown {
    width: 100%; /* Volle Breite innerhalb des Containers */
    max-width: 600px; /* Gleiche Breite wie andere Eingabeelemente */
    padding: 10px;
    font-size: 16px;
    border: 2px solid #E65100;
    border-radius: 4px;
    background-color: #444;
    color: #fff;
    cursor: pointer;
}

.operator-createpage-dropdown:focus {
    border-color: #BF360C;
    outline: none;
}

/* Dropdown-Optionen */
.operator-createpage-dropdown option {
    background-color: #444;
    color: #fff;
    padding: 5px;
}

/* Datei-Upload Wrapper */
.operator-createpage-file-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.operator-createpage-file-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.operator-createpage-file-button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    text-align: center;
    background-color: #E65100;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.operator-createpage-file-button:hover {
    background-color: #BF360C;
}

.operator-createpage-file-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.operator-createpage-title-input,
.operator-createpage-textarea,
.operator-createpage-dropdown,
.operator-createpage-file-wrapper,
.operator-createpage-file-button,
.operator-confirm-btn {
    width: 100%;
    max-width: 900px; /* Gleiche Breite für alles */
    display: block;
}

.operator-createpage-button-container {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: space-between; /* Elemente gleichmäßig über die Breite verteilen */
    width: 100%;
}

.operator-createpage-button,
.operator-createpage-dropdown {
    flex: 1; /* Jedes Element nimmt gleichmäßig Platz ein */
}

/* Responsivität */
@media (max-width: 768px) {
    .operator-createpage-container {
        width: 95%; /* Mehr Platz auf kleinen Bildschirmen */
        height: auto; /* Flexible Höhe */
        padding: 15px;
    }

    .operator-createpage-title-input,
    .operator-createpage-textarea {
        max-width: 100%;
        font-size: 14px;
    }
}

/* ContactForm.razor */
.contact-container {
    max-width: 90vw;
    width: 80vw;
    max-height: fit-content;
    min-height: 80vh;
    margin: auto;
    padding: 20px;
    background-color: #292929; /* Helleres Grau */
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.contact-content-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.contact-title {
    text-align: center;
    font-size: 22px;
    color: #fff;
}

.contact-group {
    margin-bottom: 15px;
}

.contact-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: white;
}

.contact-input, .contact-textarea {
    width: 100%;
    padding: 10px 0 10px 0;
    border: none;
    border-radius: 4px;
    background: #444; /* Hellere Eingabefelder */
    color: #fff;
}

.contact-input {
    height: 30px;
}

.contact-textarea {
    height: 50vh;
}

.contact-btn {
    width: 100%;
    padding: 10px;
    background: #008CFF;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.contact-btn:hover {
    background: #0070CC;
}

.contact-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    background: #444;
    color: #fff;
}

/* Dynamic Pages */
.page-container {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    align-self: start;
}

@media (max-width: 600px) {
    .contact-content-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

/* ImageSlideshow */
.slider {
    position: relative;
    width: 95vw;
    height: 95vh;
    overflow: hidden;
}

.slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider img:not(.active) {
    opacity: 0 !important; /* Alle nicht-aktiven Bilder bleiben unsichtbar */
}

.slider img.active {
    opacity: 1;
}

.slider img:first-child {
    opacity: 1; /* Standardmäßig erstes Bild anzeigen */
}

@keyframes slide {
    0% { opacity: 0; }
    20% { opacity: 1; }
    40% { opacity: 0; }
}

.slider img:nth-child(1) { animation-delay: 0s; }
.slider img:nth-child(2) { animation-delay: 3s; }
.slider img:nth-child(3) { animation-delay: 6s; }

/* Slideshow -> Schwebende Buttons */
.nav-area {
    position: absolute;
    top: 5%;
    height: 90%;
    width: 15%;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#prev-area {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
}

#next-area {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
}

/* Gedrehter Text */
.nav-area span {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
    transform-origin: center;
    transform: rotate(-90deg);
    white-space: nowrap; /* Verhindert Zeilenumbrüche */
}

#prev-area span {
    transform: rotate(-90deg);
}

#next-area span {
    transform: rotate(90deg);
    white-space: nowrap;
}

.nav-area:active {
    background: rgba(255, 255, 255, 0.2); /* Kurz heller beim Berühren */
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-grid {
    display: grid;
    grid-template-columns: repeat(3, 12px);
    gap: 5px;
    justify-content: center;
}

.loader-grid div {
    width: 12px;
    height: 12px;
    background-color: orange;
    animation: fade 1.2s infinite;
}

.loader-grid div:nth-child(1) { animation-delay: 0s; }
.loader-grid div:nth-child(2) { animation-delay: 0.2s; }
.loader-grid div:nth-child(3) { animation-delay: 0.4s; }
.loader-grid div:nth-child(4) { animation-delay: 0.6s; }
.loader-grid div:nth-child(5) { animation-delay: 0.8s; }
.loader-grid div:nth-child(6) { animation-delay: 1s; }
.loader-grid div:nth-child(7) { animation-delay: 1.2s; }
.loader-grid div:nth-child(8) { animation-delay: 1.4s; }
.loader-grid div:nth-child(9) { animation-delay: 1.6s; }

@keyframes fade {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Slideshow -> Thumbnails */
.image-slideshow-container {
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    background-color: #3a3a3a;
    color: #fff;
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
}

.slider {
    position: relative;
    width: 100%;
    height: calc(100vh - 120px);
    overflow: hidden;
    margin: 0 auto;
}

.thumbnail-container {
    position: relative;
    width: 100%;
    height: 100px;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-x: auto;
    margin: 0 auto;
}

.thumbnail-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin: 0 auto;
    width: max-content;
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.thumbnail.active-thumbnail {
    border-color: #ff4400;
    transform: scale(1.1);
}

/* Verbesserte Scrollbar-Styles */
.thumbnail-container::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.thumbnail-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
}

@media (max-width: 768px) and (orientation: portrait) {
    .image-slideshow-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        height: 100dvh; /* Dynamic viewport height */
    }

    .slider {
        flex: 1;
        position: relative;
        width: 100%;
        height: calc(100dvh - 100px); /* Dynamische Höhe minus Thumbnail-Höhe */
    }

    .thumbnail-container {
        flex: 0 0 100px; /* Feste Höhe, kein Wachsen/Schrumpfen */
        width: 100%;
        background-color: rgba(0, 0, 0, 0.7);
    }

    /* Optimierung für die Bilder */
    .slider img {
        object-fit: contain;
        max-height: calc(100dvh - 100px);
    }
}

/* Calendar Base Styles - Dark Theme */
.calendar {
    padding: 20px;
    height: fit-content;
    width: 95vw;
    margin: 10px;
    background: #1f1f1f;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    color: white;
    /* Touch-Events aktivieren */
    touch-action: pan-y; /* Erlaubt vertikales Scrollen, aber horizontale Swipes werden abgefangen */
    user-select: none; /* Verhindert Textauswahl während Swipe */
}

/* Verhindert Konflikte mit Event-Clicks */
.day,
.day-event-item,
.mobile-week-event,
.event {
    touch-action: manipulation; /* Schnellere Touch-Reaktion für Klicks */
}

.calendar-header {
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.calendar-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    color: white;
}

.calendar-nav-btn {
    padding: 10px 15px;
    font-size: 18px;
    background: #ff4400;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.calendar-nav-btn:hover {
    background: #e63900;
}

.calendar-toolbar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.view-selector {
    display: flex;
    gap: 5px;
}

.view-selector button {
    padding: 8px 16px;
    border: 1px solid #555;
    background: #292929;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}

.view-selector button.active {
    background: #ff4400;
    color: white;
    border-color: #ff4400;
}

.view-selector button:hover {
    background: #333;
}

.view-selector button.active:hover {
    background: #e63900;
}

.new-event-btn {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.new-event-btn:hover {
    background: #218838;
}

/* Desktop Calendar Grid - Dark Theme */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #333;
    border-radius: 8px;
    overflow: hidden;
}

.day-header {
    background: #161616;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    border-bottom: 1px solid #333;
    color: white;
}

.day {
    background: #292929;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    min-height: 11vh;
}

.day:hover {
    background: #333;
}

.day.today {
    background: #0055aa;
}

.day.other-month {
    background: #1a1a1a;
    color: #666;
}

.day.current-month {
    color: white;
}

.date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.date-number {
    font-weight: bold;
    font-size: 14px;
}

.highlight-marker {
    color: #ffd700;
    font-size: 12px;
}

.events-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event {
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 16px;
    color: white;
    cursor: pointer;
    margin-bottom: 1px;
    line-height: 1.2;
    word-wrap: normal;
}

.event-time {
    font-weight: bold;
    margin-right: 4px;
}

.more-events {
    font-size: 10px;
    color: #ccc;
    font-style: italic;
    text-align: center;
    padding: 2px;
}

/* Day View - Dark Theme */
.day-view {
    background: #1f1f1f;
    border-radius: 8px;
    padding: 20px;
    margin: 0 auto;
    width: 70vw;
    height: 75vh;
}

.day-view-header {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    padding: 15px;
    background: #161616;
    border-radius: 6px;
    color: white;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.day-event-item {
    padding: 15px;
    background: #292929;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.day-event-item:hover {
    background: #333;
}

.day-event-item .event-time {
    font-size: 14px;
    color: #ccc;
    font-weight: bold;
}

.day-event-item .event-title {
    font-size: 18px;
    font-weight: bold;
    margin-top: 5px;
    color: white;
}

.day-event-item .event-description {
    font-size: 14px;
    color: #ccc;
    margin-top: 8px;
}

.no-events {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
    font-size: 16px;
}

/* Week View - Desktop - Dark Theme */
.week-view.desktop-week {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 1px;
    background: #333;
    border-radius: 8px;
    overflow: hidden;
    min-height: 600px;
}

.time-column {
    background: #161616;
    padding: 10px 5px;
}

.hour-marker {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-bottom: 1px solid #333;
    color: #ccc;
    position: relative;
    top: 26px;
}

.day-column {
    background: #292929;
    position: relative;
    min-height: 1440px;
}

.day-column .day-header {
    background: #161616;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border-bottom: 1px solid #333;
    color: white;
    font-size: 12px;
}

.hours-container {
    position: relative;
    height: 1440px; /* 24 Stunden * 60 Minuten */
}

.hour-slot {
    height: 60px;
    border-bottom: 1px solid #ddd;
}

.event-container {
    position: absolute;
    left: 0;
    width: 100%;
    background: #444;
    border-radius: 4px;
    padding: 4px;
    margin: 1px;
    overflow: hidden;
    color: white;
}

.event-recurrence {
    font-size: 0.8em;
    opacity: 0.8;
    margin-top: 4px;
}

/* Wenn mehrere Events zur gleichen Zeit existieren */
.event-container.concurrent-2 { width: 48%; }
.event-container.concurrent-2:nth-child(2n) { left: 50%; }

.event-container.concurrent-3 { width: 32%; }
.event-container.concurrent-3:nth-child(2n) { left: 33%; }
.event-container.concurrent-3:nth-child(3n) { left: 66%; }

.event-container.concurrent-4 { width: 24%; }
.event-container.concurrent-4:nth-child(2n) { left: 25%; }
.event-container.concurrent-4:nth-child(3n) { left: 50%; }
.event-container.concurrent-4:nth-child(4n) { left: 75%; }

.event-block {
    position: absolute;
    padding: 4px;
    border-radius: 4px;
    overflow: hidden;
    color: white;
    cursor: pointer;
    box-sizing: border-box;
    min-height: 25px;
    max-width: calc(100% - 2px); /* Verhindert Überlauf */
    margin-right: 1px; /* Kleiner Abstand zum rechten Rand */
}

.event-block .event-time {
    font-weight: bold;
    font-size: 16px;
}

.event-block .event-title {
    font-size: 16px;
    line-height: 1.2;
}

/* Mobile Styles */
.mobile-text {
    display: none;
}

.desktop-text {
    display: inline;
}

.mobile-day {
    display: none;
}

.desktop-day {
    display: inline;
}

.mobile-events {
    display: none;
}

.desktop-events {
    display: block;
}

.mobile-week {
    display: none;
}

.week-view.mobile-week {
    display: none;
}

/* Modal Styles - Dark Theme */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
}

.modal-content {
    background: #1f1f1f;
    padding: 20px 30px 20px 30px;
    border-radius: 8px;
    max-width: fit-content;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    color: white;
}

.modal-content h3 {
    margin-top: 0;
    color: white;
}

.form-group {
    margin-bottom: 15px;
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: white;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #555;
    border-radius: 4px;
    box-sizing: border-box;
    background: #292929;
    color: white;
    margin-right: 20px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #ff4400;
    outline: none;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding-left: 15px;
}

.form-check-label {
    color: white;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    margin-bottom: 20px;
}

.btn-primary {
    background: #ff4400;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary:hover {
    background: #e63900;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-danger:hover {
    background: #c82333;
}

/* Mobile Media Queries */
@media (max-width: 768px) {
    .calendar {
        padding: 10px;
        margin: 10px;
        width: 90vw;
        height: fit-content;
    }

    .calendar-title {
        font-size: 16px;
    }

    .calendar-nav-btn {
        padding: 6px 10px;
        font-size: 14px;
    }

    .calendar-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .view-selector button {
        padding: 6px 12px;
        font-size: 12px;
    }

    .mobile-text {
        display: inline;
    }

    .desktop-text {
        display: none;
    }

    .mobile-day {
        display: inline;
    }

    .desktop-day {
        display: none;
    }

    .mobile-events {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        min-height: 30px;
    }

    .desktop-events {
        display: none;
    }

    .event-dots {
        display: flex;
        gap: 3px;
        align-items: center;
        flex-wrap: wrap;
        justify-content: center;
    }

    .event-dot {
        width: 25px;
        height: 25px;
        border-radius: 50%;
        cursor: pointer;
        margin: 1px;
    }

    .more-events-indicator {
        font-size: 10px;
        color: #ccc;
        margin-left: 3px;
    }

    /* Mobile Calendar Grid */
    .calendar-grid {
        gap: 1px;
    }

    .day-header {
        padding: 8px 4px;
        font-size: 12px;
    }

    .day {
        padding: 4px;
        min-height: 11vh;
    }

    .date-header {
        margin-bottom: 2px;
    }

    .date-number {
        font-size: 12px;
    }

    .highlight-marker {
        font-size: 10px;
    }

    /* Mobile Day View */
    .day-view {
        padding: 15px;
    }

    .day-view-header {
        font-size: 18px;
        padding: 10px;
    }

    .day-event-item {
        padding: 12px;
    }

    .day-event-item .event-title {
        font-size: 16px;
    }

    .day-event-item .event-time {
        font-size: 12px;
    }

    .day-event-item .event-description {
        font-size: 12px;
    }

    /* Mobile Week View */
    .week-view.mobile-week {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .week-view.desktop-week {
        display: none;
    }

    .mobile-week-day {
        background: #292929;
        border-radius: 8px;
        padding: 12px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }

    .mobile-week-day-header {
        font-weight: bold;
        margin-bottom: 8px;
        padding-bottom: 5px;
        border-bottom: 1px solid #555;
        font-size: 14px;
        color: white;
    }

    .mobile-week-events {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .mobile-week-event {
        padding: 8px;
        border-radius: 4px;
        color: white;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 12px;
    }

    .mobile-event-time {
        font-weight: bold;
    }

    .mobile-event-title {
        flex: 1;
        margin-left: 8px;
    }

    .no-events-small {
        color: #666;
        font-style: italic;
        font-size: 12px;
        text-align: center;
        padding: 10px;
    }

    /* Modal Anpassungen für Mobile */
    .modal-content {
        max-width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 8px;
    }

    .modal-footer button {
        width: 100%;
    }
}

/* Tablet Ansicht */
@media (min-width: 769px) and (max-width: 1024px) {
    .calendar {
        margin: 0;
        height: 90vh;
        width: 90vw;
    }

    .day {
        max-height: 10vh;
        max-width: 12vw;
    }

    .event {
        font-size: 10px;
    }

    .calendar-title {
        font-size: 20px;
    }
}

/* Kategorie-spezifische Styles - Dark Theme */
.category-form-group {
    margin-bottom: 15px;
}

.category-dropdown-wrapper {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 15px;
}

.category-select {
    flex: 1;
    width: 100%;
    padding: 8px;
    border: 1px solid #555;
    border-radius: 4px;
    box-sizing: border-box;
    background: #292929;
    color: white;
}

.category-button {
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    min-width: 30px;
}

.category-button.add {
    background: #28a745;
    color: white;
}

.category-button.edit {
    background: #007bff;
    color: white;
}

.category-button.delete {
    background: #dc3545;
    color: white;
}

.category-button.save {
    background: #28a745;
    color: white;
}

.category-button.cancel {
    background: #6c757d;
    color: white;
}

.category-modal {
    z-index: 1100;
}

.category-color-picker-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.category-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #555;
    border-radius: 4px;
    box-sizing: border-box;
    background: #292929;
    color: white;
    margin-right: 20px;
}

.category-color-picker {
    width: 50px;
    height: 40px;
    padding: 0;
    border: 1px solid #555;
    background: #292929;
}

.category-color-preview {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid #555;
}

.category-button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

.warning-modal {
    background: #3a2f0a;
    border: 1px solid #8a6914;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
}

.warning-modal p {
    margin: 0 0 10px 0;
    color: #ffcc00;
}

/* Database Admin Styles */
.db-admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.db-loading {
    text-align: center;
    padding: 2rem;
}

.db-content {
    animation: slideInLeft 0.8s ease-in-out forwards;
}

.db-title {
    color: #fff;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.db-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Cards */
.db-card {
    background: #292929;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.db-card-header {
    background: #333;
    padding: 1rem;
    border-bottom: 1px solid #444;
}

.db-card-header h5 {
    margin: 0;
    color: #fff;
    font-size: 1.2rem;
}

.db-card-body {
    padding: 1rem;
    box-sizing: border-box;
}

/* Status Items */
.db-status-item {
    padding: 1rem;
    border-bottom: 1px solid #444;
}

.db-status-item:last-child {
    border-bottom: none;
}

.db-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.db-status-header h6 {
    margin: 0;
    color: #fff;
}

.db-status-info {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Badges */
.db-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.db-badge.success {
    background: #28a745;
}

.db-badge.error {
    background: #dc3545;
}

/* Progress Bars */
.db-progress {
    background: #444;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}

.db-progress-bar {
    height: 100%;
    width: 100%;
    transition: width 0.3s ease;
}

.db-progress-bar.success {
    background: #28a745;
}

.db-progress-bar.error {
    background: #dc3545;
}

.db-progress-bar.animated {
    background: linear-gradient(90deg, #444, #666, #444);
    background-size: 200% 100%;
    animation: progress-animation 1.5s infinite;
}

@keyframes progress-animation {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Form Elements */
.db-form-group {
    margin-bottom: 1rem;
}

.db-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
}

.db-select, .db-input {
    width: 100%;
    padding: 0.5rem;
    background: #444;
    border: 1px solid #666;
    border-radius: 4px;
    color: #fff;
}

.db-input {
    width: calc(100% - 2px); /* 2px für die Border */
    padding: 0.5rem;
    background: #444;
    border: 1px solid #666;
    border-radius: 4px;
    color: #fff;
    box-sizing: border-box; /* Wichtig: Verhindert, dass Padding die Breite vergrößert */
    margin-right: 1rem; /* Zusätzlicher Abstand rechts */
}

.db-select:focus, .db-input:focus {
    border-color: #ff4400;
    box-shadow: 0 0 0 2px rgba(255, 68, 0, 0.25);
    outline: none;
}

.db-help-text {
    display: block;
    margin-top: 0.25rem;
    color: #999;
    font-size: 0.875rem;
}

/* Buttons */
.db-button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.db-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.db-btn.primary {
    background: #ff4400;
    color: white;
}

.db-btn.secondary {
    background: #666;
    color: white;
}

.db-btn.info {
    background: #17a2b8;
    color: white;
}

.db-btn.warning {
    background: #ffc107;
    color: #000;
}

.db-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Modal */
.db-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.db-modal-content {
    background: #292929;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    z-index: 1001;
}

.db-modal-header {
    padding: 1rem;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.db-modal-body {
    padding: 1rem;
}

.db-modal-footer {
    padding: 1rem;
    border-top: 1px solid #444;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.db-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.db-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

/* Error Page */
.db-error {
    text-align: center;
    padding: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .db-button-group {
        flex-direction: column;
    }

    .db-btn {
        width: 100%;
    }
}