body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

h1, h2 {
    text-align: center;
    margin: 0;
    padding: 10px;
    position: absolute;
    width: 100%;
    z-index: 20;
    background: rgba(255, 255, 255, 0.8);
}

.menu-container {
    width: 100vw;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: none;
    opacity: 1;
    visibility: visible;
}

/* --- Horizontale Ansicht --- */
#menu-horizontal {
    display: flex;
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0;
    padding: 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

#menu-horizontal img {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
    opacity: 0;
    display: block;
    position: relative;
    scroll-snap-align: center;
    flex: 0 0 100%;
    transition: opacity 0.5s ease-in-out;
    margin: 0;
    padding: 0;
}

#menu-horizontal img.active {
    display: block;
    opacity: 1;
}

/* --- Vertikale Ansicht --- */
#menu-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

#menu-vertical img {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    margin: 0;
    padding: 0;
    scroll-snap-align: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#menu-vertical img.active {
    opacity: 1;
}

/* Navigation Controls */
.nav-button {
    position: fixed;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 20px;
    cursor: pointer;
    z-index: 30;
    border-radius: 5px;
    transition: opacity 0.3s ease;
}

/* Horizontal Navigation */
#menu-horizontal .nav-button {
    top: 50%;
    transform: translateY(-50%);
}

#menu-horizontal #prev-button {
    left: 10px;
}

#menu-horizontal #next-button {
    right: 10px;
}

/* Vertical Navigation */
#menu-vertical .nav-button {
    left: 50%;
    transform: translateX(-50%);
}

#menu-vertical #prev-button {
    top: 10px;
}

#menu-vertical #next-button {
    bottom: 10px;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .nav-button {
        padding: 15px;
        font-size: 18px;
    }

    h1 {
        font-size: 1.5em;
        padding: 8px;
    }
}

/* Transition für Container */
.menu-container {
    transition: opacity 0.3s ease-in-out;
}

/* Sichtbare Container */
.menu-container[style*="visibility: visible"] {
    opacity: 1;
}
/* Hinweis: Das Umschalten der Sichtbarkeit erfolgt primär über JavaScript,
   um die Orientierung korrekt zu berücksichtigen. */