/* ==========================================================================
   1. Allgemeine Premium Basis-Einstellungen
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden; 
    background-color: #0d0d0d;
    color: #f5f5f7;
}

#scroll-wrapper {
    width: 100vw;
    height: calc(100vh - 45px); 
    overflow-y: scroll;         
    scroll-snap-type: y mandatory; 
    scroll-behavior: smooth;
}

/* ==========================================================================
   2. Oberes Menü (Fixiert über allem)
   ========================================================================== */
#top-menu {
    display: flex;
    height: 45px; 
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0 20px;
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 110;
}

.nav-btn {
    background: transparent;
    color: #a1a1a6;
    border: 1px solid transparent;
    padding: 6px 14px; 
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem; 
    transition: all 0.25s ease;
}

.nav-btn:hover, .nav-btn.active-main {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

#sub-menu-bar {
    display: none;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 6px 20px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 45px; 
    left: 0;
    width: 100vw;
    z-index: 105;
}

#sub-menu-bar.bar-active { display: flex; }

.menu-group { display: none; gap: 8px; width: 100%; }
.menu-group.active { display: flex; }

.sub-btn {
    background: rgba(255, 255, 255, 0.03);
    color: #86868b;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4px 12px; 
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.sub-btn:hover, .sub-btn.active-sub {
    color: #0071e3;
    background: rgba(0, 113, 227, 0.08);
    border-color: rgba(0, 113, 227, 0.3);
}

/* ==========================================================================
   3. Starres Sektionen-Layout & Karten-Bild-Synchronisation
   ========================================================================== */
#map-section {
    width: 100%;
    height: calc(100vh - 45px); 
    scroll-snap-align: start;   
    position: relative;
}

#text-section {
    width: 100%;
    height: calc(100vh - 45px); 
    scroll-snap-align: end; 
    position: relative;
    background: #121212;
    display: flex;
    justify-content: center;
    padding: 80px 40px 60px 40px; 
    overflow-y: auto; 
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#text-section.trigger-bounce {
    animation: pushUp 1.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes pushUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-45px); } 
}

#map-container {
    width: 100%;
    height: 100%;
    background-color: #080808;
    overflow: hidden;
    cursor: grab;
}

#map-container:active { cursor: grabbing; }

#panzoom-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

#map-base {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.12s ease-in-out;
}

#map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; 
    opacity: 0;
    transition: opacity 0.12s ease-in-out;
    pointer-events: none;
    z-index: 2; 
}

#map-container.overlay-active #map-overlay { 
    opacity: 1; 
}

/* ==========================================================================
   4. Gebäude-Hotspots (Klickbar & Positionsstabilisiert)
   ========================================================================== */
.hotspot {
    position: absolute;
    width: 45px;  
    height: 45px; 
    /* Verwende Transform für die Klickbox-Zentrierung */
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
}

.hotspot img, .hotspot svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none; /* Verhindert, dass das Bild den Klick auf den Hotspot abfängt */
    animation: hotspotPulse 3s infinite ease-in-out;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.hotspot:hover img, .hotspot:hover svg {
    animation: none;
    transform: scale(1.25);
    filter: drop-shadow(0 0 12px rgba(0, 113, 227, 0.8)) drop-shadow(0 0 4px #fff); 
}

@keyframes hotspotPulse {
    0%, 100% { opacity: 0.6; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* ==========================================================================
   5. Die Textseite & Transparenter Hinweis
   ========================================================================== */
#info-panel {
    width: 100%;
    max-width: 850px; 
    position: relative;
}

.markdown-body {
    margin-top: 30px;
    font-size: 1.1rem;
    color: #e3e3e7;
    line-height: 1.7;
}

.markdown-body h1 { font-size: 2.2rem; color: #fff; margin-bottom: 16px; font-weight: 600; }
.markdown-body h3 { font-size: 1.3rem; color: #fff; margin-top: 24px; margin-bottom: 10px; font-weight: 500; }
.markdown-body p { margin-bottom: 16px; }
.markdown-body hr { border: none; height: 1px; background: rgba(255, 255, 255, 0.1); margin: 24px 0; }
.markdown-body ul { margin-left: 22px; margin-bottom: 16px; }
.markdown-body li { margin-bottom: 8px; }

.default-prompt.active-notice {
    position: absolute;
    top: -80px; 
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    max-width: 1200px;
    height: 75px;
    background: linear-gradient(to top, rgba(18, 18, 18, 1) 15%, rgba(18, 18, 18, 0.8) 50%, rgba(18, 18, 18, 0) 100%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10px; 
    color: #ffffff; 
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 113, 227, 0.4);
    cursor: pointer;
    z-index: 120;
    animation: slideAndFade 3s ease forwards;
}

@keyframes slideAndFade {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    20% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

#close-panel-btn {
    position: absolute;
    top: 15px;
    right: -20px;
    font-size: 2.5rem;
    color: #48484a;
    cursor: pointer;
    transition: color 0.2s ease;
}

#close-panel-btn:hover { color: #ffffff; }

#scroll-wrapper::-webkit-scrollbar { width: 8px; }
#scroll-wrapper::-webkit-scrollbar-track { background: #0d0d0d; }
#scroll-wrapper::-webkit-scrollbar-thumb { background: #2c2c2e; border-radius: 4px; }
#scroll-wrapper::-webkit-scrollbar-thumb:hover { background: #3a3a3c; }

/* ==========================================================================
   6. Vernetztes Lesen (Inline-Text-Buttons)
   ========================================================================== */
.inline-link {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    color: #0071e3;
    border: 1px solid rgba(0, 113, 227, 0.3);
    padding: 2px 10px;
    margin: 0 4px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.inline-link:hover {
    background: rgba(0, 113, 227, 0.1);
    color: #3392ff;
    border-color: #0071e3;
    box-shadow: 0 0 8px rgba(0, 113, 227, 0.3);
    transform: translateY(-1px);
}