body {
    font-family: 'Roboto', sans-serif;
    background: #000;
    color: #fff;
    padding: 20px;
    margin: 0;
}

.pink {
    color: #ee4494;
}

.gruen {
    color: #35b181;
}

#page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

#top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

h1, h2, p {
    color: #fff;
    margin: 0;
}

#gallery-subtitle {
    text-align: left;
    font-size: 1.4em;
    margin-bottom: 10px;
    color: #35b181;
}

#gallery-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

#main-view {
    flex: 1;
    max-width: 60%;
    text-align: center;
}

#main-image {
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    border: 5px solid #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    cursor: zoom-in;
}

#thumbnail-and-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

#thumb-and-desc-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
}

#thumbnail-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    width: 240px;
    flex-shrink: 0;
    padding-right: 5px;
}

#thumbnail-view img {
    width: 70px;
    height: auto;
    cursor: pointer;
    border: 2px solid #555;
    transition: 0.3s;
    background-color: #111;
}

#thumbnail-view img:hover {
    border-color: #fff;
}

#thumbnail-controls-top {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
}

#thumbnail-controls-top button {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #fff;
    transition: 0.3s;
}

#thumbnail-controls-top button:hover {
    color: #999;
}

#thumbnail-controls-top i {
    pointer-events: none;
}

#image-info {
    width: 240px;
    max-height: 600px;
    overflow-y: auto;
    background-color: #111;
    color: #ccc;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9em;
    line-height: 1.4em;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

#image-info::-webkit-scrollbar {
    width: 6px;
}
#image-info::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 3px;
}

#zoom-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.9); /* Direkt hier statt im Background-Div */
    padding: 40px;
    box-sizing: border-box;
}

#zoom-overlay-background {
    display: none; /* Wird nicht mehr benötigt, da Hintergrund im Overlay */
}

#zoom-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    z-index: 1;
    max-width: 95vw;
    max-height: 90vh;
    overflow: auto;
}

#zoomed-image {
    max-width: 60vw;
    max-height: 90vh;
    border: 5px solid white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

#zoomed-text {
    color: white;
    max-width: 300px;
    font-size: 1.1em;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: visible;     /* ? Scrollen verhindern */
    max-height: none;        /* ? Höhe nicht einschränken */
}


#zoom-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 1.3em;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 2;
}

#zoom-controls {
    position: absolute;
    top: 70px;
    right: 30px;
    z-index: 2;
}

#zoom-controls button {
    background: none;
    border: none;
    font-size: 1.2em;
    color: white;
    background-color: rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}

#zoom-controls button:hover {
    background-color: rgba(255,255,255,0.3);
}


@media (max-width: 768px) {
    #gallery-container {
        flex-direction: column;
        align-items: center;
    }

    #main-view {
        max-width: 100%;
    }

    #thumb-and-desc-wrapper {
        flex-direction: column;
        align-items: center;
    }

    #thumbnail-view {
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
        max-height: none;
        justify-items: center;
    }
}

#close-tab-btn {
    position: fixed;
    top: 18px;
    right: 130px;
    font-size: 1.5em;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
    padding: 5px;
    transition: color 0.3s;
}

#close-tab-btn:hover {
    color: #ccc;
}

.zoom-active #close-tab-btn {
    display: none !important;
}

#preloader {
    background-color: #000000;
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: sans-serif;
    font-size: 1.5rem;
}

.preloader-ring {
    position: absolute;
    border: 4px solid #ee4494;
    border-radius: 50%;
    animation: pulse 1.5s infinite ease-out;
}

.preloader-ring:nth-child(1) { width: 50px; height: 50px; animation-delay: 0s; }
.preloader-ring:nth-child(2) { width: 50px; height: 50px; animation-delay: 0.3s; }
.preloader-ring:nth-child(3) { width: 50px; height: 50px; animation-delay: 0.6s; }

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

/* ?? Fixierte Textbox rechts mit automatischem Zeilenumbruch */
#image-sidebar {
    width: 250px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    flex-shrink: 0;
}

#image-sidebar-text {
    margin: 0;
    padding: 10px;
    line-height: 1.4;
    font-size: 0.95em;
    color: #ccc;
    background-color: #111;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
}




