/* Bestehende Galerie-Styles */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.image {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Styles für den Lösch-Button */
.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.image:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background-color: rgba(255, 0, 0, 1);
}

/* Styles für das Lösch-Bestätigungsfenster */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

.delete-confirm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: none;
    text-align: center;
}

.delete-confirm p {
    margin-bottom: 20px;
    font-size: 16px;
}

.delete-confirm button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.delete-confirm button[type="submit"] {
    background-color: #ff4444;
    color: white;
    margin-right: 10px;
}

.delete-confirm button[type="submit"]:hover {
    background-color: #ff0000;
}

.delete-confirm button[type="button"] {
    background-color: #666;
    color: white;
}

.delete-confirm button[type="button"]:hover {
    background-color: #555;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

#myModalBox {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    margin-top: 5vh;
}

.modal-content {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}


/* Grundlegendes Layout */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-align: center;
}

/* Formular-Styling */
form {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.prompt-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-size: 16px;
    min-height: 100px;
    margin-bottom: 15px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.prompt-textarea:focus {
    border-color: #007bff;
    outline: none;
}

/* Button-Styling */
button {
    padding: 12px 20px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

button[type="submit"] {
    background-color: #007bff;
    color: white;
}

button[type="submit"]:hover {
    background-color: #0056b3;
}

button[type="button"] {
    background-color: #6c757d;
    color: white;
}

button[type="button"]:hover {
    background-color: #545b62;
}

/* Modus-Schalter Styling */
.mode-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.mode-container label {
    margin-right: 20px;
    cursor: pointer;
}

/* Generiertes Bild Container */
#imageContainer {
    margin-top: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#imageContainer img {
    max-width: 100%;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#imageContainer img:hover {
    transform: scale(1.02);
}

/* Status-Nachrichten */
#status {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 1000;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    display: block;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: white;
    padding: 10px 0;
    height: auto;
}

/* Radio Button Styling */
input[type="radio"] {
    margin-right: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    button {
        width: 100%;
        margin: 5px 0;
    }

    .mode-container label {
        display: block;
        margin-bottom: 10px;
    }
}