/* ================= VARIABLES ================= */
:root {
    --bg-color: #1a1a1a;
    --panel-color: #252525;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --radius: 20px;
    --shadow: 0 10px 30px rgba(0,0,0,0.5);
}

body, html {
    margin: 0; padding: 0;
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    overflow: hidden;
}

/* ================= LAYOUT ================= */
.app-container {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    height: 100vh;
    width: 100vw;
    background: var(--bg-color);
}

/* ================= LINKER BEREICH (Galerie) ================= */
.gallery-panel {
    background: var(--bg-color);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.photo-wrapper {
    position: relative;
    width: 96%;
    height: 94%; /* Desktop: Viel Platz nutzen */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* AMBIENT BLUR IM HINTERGRUND */
#bg-photo {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: blur(20px) brightness(0.6);
    z-index: 1;
    transform: scale(1.1); /* Ränder abschneiden */
}

/* HAUPTBILD */
#current-photo {
    position: relative;
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    z-index: 2;
    transition: opacity 0.3s ease;
    user-select: none; pointer-events: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* Info Leiste */
.info-overlay {
    position: absolute;
    bottom: 40px;
    left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(12px);
    padding: 10px 20px; border-radius: 30px;
    text-align: center; min-width: 200px;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 25; pointer-events: none;
}
.info-overlay h2 { margin: 0; font-size: 1rem; }
.info-overlay p { margin: 2px 0 0 0; font-size: 0.8rem; color: var(--text-muted); }

/* ================= HEADER BUTTONS ================= */
.info-btn {
    position: absolute; top: 30px;
    width: 45px; height: 45px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%; color: var(--text-main);
    cursor: pointer; display: flex; justify-content: center; align-items: center;
    transition: all 0.2s ease; z-index: 50; backdrop-filter: blur(4px);
}
.info-btn:hover { background: var(--accent-color); border-color: var(--accent-color); transform: scale(1.1); }
.info-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.help-pos  { left: 30px; }
.stats-pos { right: 30px; }

/* ================= KARTE ================= */
.map-panel {
    height: 100%; width: 100%;
    display: flex; justify-content: center; align-items: center;
    background: var(--bg-color);
}
#map {
    width: 96%; height: 94%;
    border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); z-index: 1;
}

/* ================= NAVIGATION BUTTONS ================= */
.nav-btn {
    position: absolute; background: var(--accent-color); color: white; border: none;
    border-radius: 50%; cursor: pointer; display: flex; justify-content: center; align-items: center;
    transition: all 0.2s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.4); z-index: 20;
}
.nav-btn:hover { background: var(--accent-hover); transform: scale(1.1); }
.nav-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.nav-btn.prev, .nav-btn.next { width: 55px; height: 55px; top: 50%; transform: translateY(-50%); }
.nav-btn.prev { left: 25px; } .nav-btn.next { right: 25px; }
.nav-btn.loc-prev, .nav-btn.loc-next { width: 45px; height: 45px; left: 50%; transform: translateX(-50%); background: #374151; }
.nav-btn.loc-prev { top: 25px; } .nav-btn.loc-next { bottom: 100px; }

/* ================= MODALS ================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 1000;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-content {
    background: #1e1e1e; padding: 30px; border-radius: var(--radius);
    width: 85%; max-width: 450px; text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    position: relative; transform: translateY(20px); transition: transform 0.3s ease;
}
.modal-overlay.show .modal-content { transform: translateY(0); }
.close-modal {
    position: absolute; top: 15px; right: 20px;
    background: none; border: none; color: #666; font-size: 2rem; cursor: pointer;
}
.close-modal:hover { color: #fff; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 20px; }
.stat-box { background: rgba(255,255,255,0.05); padding: 15px; border-radius: 15px; }
.stat-value { display: block; font-size: 1.6rem; font-weight: 800; color: var(--accent-color); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.tutorial-steps { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 20px 0; text-align: center; }
.step-box { display: flex; flex-direction: row; align-items: center; text-align: left; }
.step-icon { min-width: 50px; width: 50px; height: 50px; background: rgba(59, 130, 246, 0.2); color: var(--accent-color); border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-right: 15px; }
.action-btn { background: var(--accent-color); color: white; border: none; padding: 12px 30px; border-radius: 30px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: transform 0.2s; margin-top: 15px; width: 100%; }

/* ================= LOGIN PAGE ================= */
.login-container { display: flex; justify-content: center; align-items: center; height: 100vh; width: 100vw; background-color: var(--bg-color); }
.login-box { background: var(--panel-color); padding: 40px; border-radius: var(--radius); text-align: center; width: 90%; max-width: 400px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.05); }
.icon-circle { width: 60px; height: 60px; margin: 0 auto 20px; background: rgba(255,255,255,0.05); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: var(--accent-color); }
.contact-btn { display: inline-block; text-decoration: none; width: 100%; padding: 15px; border-radius: 8px; background: var(--accent-color); color: white; font-weight: 600; box-sizing: border-box; }

/* ================= MOBILE OPTIMIERUNG ================= */
@media (max-width: 768px) {
    .app-container { grid-template-columns: 1fr; grid-template-rows: 60% 40%; }
    .gallery-panel { padding: 0; }

    .photo-wrapper { width: 94%; height: 94%; border-radius: var(--radius); }

    .info-btn { top: 4%; width: 40px; height: 40px; background: rgba(0,0,0,0.5); }
    .help-pos { left: 5%; }
    .stats-pos { right: 5%; }
    .info-overlay { width: 80%; bottom: 5%; padding: 8px; }

    .map-panel { padding-top: 0; }
    #map { width: 94%; height: 92%; margin: 0; }

    .nav-btn { display: none !important; }
}