/* Allgemeine Stile */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
    color: #333;
    text-align: center;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

h1, h2, h3, p {
    color: #c9652c;
    font-family: Arial, sans-serif;
    text-align: center;
}

form {
    margin: 20px 0;
}

input[type="password"], input[type="file"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

button {
    background-color: #c9652c;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top:5px;
}

button:hover {
    background-color: #a54f24;
}

.error {
    color: red;
    margin: 10px 0;
}

img.banner {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.image-item {
    margin: 3px;
    border: 2px solid #ccc;
    width: 170px; 
    height: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
.image-item img {
    margin: 5px;
    max-width: 165px;
    max-height: 165px;
}
.pagination {
    font-weight: bold;
    color: #a54f24;
    margin-top: 20px;
    margin-bottom: 20px;
}
.pagination a {
    font-weight: normal;
    color: #c9652c;
    margin: 0 5px;
    text-decoration: none;
}
.pagination span {
    margin: 0 5px;
}
.selected {
    border: 2px solid #c9652c;
}

.language-selection {
    margin: 10px 10px 10px 10px;
    text-align: center;
}

.flag {
    width: 40px;
    margin: 0 5px;
    cursor: pointer;
}

/* Modal */
.modal {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Padding hinzugefügt */
    box-sizing: border-box;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Ermöglicht das Scrollen, falls notwendig */
    background-color: rgba(0,0,0,0.9); /* Halbtransparentes Schwarz */
}
.modal-content {
    max-width: 90vw; /* 90% der Viewport-Breite */
    max-height: 80vh; /* 80% der Viewport-Höhe */
    width: auto;
    height: auto;
    display: block;
    margin: auto;
}

#modalImage {
    max-width: 100%;
    max-height: calc(80vh - 50px); /* 80% der Viewport-Höhe minus Platz für Button */
}

#modalCaption {
    color: #ccc;
    text-align: center;
    padding: 10px 0;
}

#downloadButton {
    position: relative;
    margin-top: 10px;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

/* Animations */
@keyframes zoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Darkmode Stile */
body[data-theme="dark"] {
    background-color: #121212;
    color: #f2f2f2;
}

body[data-theme="dark"] .container {
    background-color: #1e1e1e;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] h1, 
body[data-theme="dark"] h2, 
body[data-theme="dark"] h3, 
body[data-theme="dark"] p {
    color: #ff7e50;
}

body[data-theme="dark"] input[type="password"], 
body[data-theme="dark"] input[type="file"] {
    background-color: #333;
    border-color: #555;
    color: #f2f2f2;
}

body[data-theme="dark"] button {
    background-color: #ff7e50;
    color: #121212;
}

body[data-theme="dark"] button:hover {
    background-color: #e0643b;
}

body[data-theme="dark"] .image-item {
    border-color: #444;
}

body[data-theme="dark"] .pagination a {
    color: #ff7e50;
}

body[data-theme="dark"] .selected {
    border-color: #ff7e50;
}

body[data-theme="dark"] .modal {
    background-color: rgba(0, 0, 0, 0.9);
}

body[data-theme="dark"] .close {
    color: #f2f2f2;
}

body[data-theme="dark"] #modalCaption {
    color: #888;
}

/* Toggle-Schalter */
.toggle-container {
    position: absolute;
    top: 10px;
    right: 20px;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    background-color: white;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: 0.4s;
    width: 26px;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #ff7e50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}
