/* ============================================
   MAIN MENU - Defence Tactical Style
   ============================================ */

#main-menu-panel {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10000;
    width: 300px;
    max-height: calc(90vh - 24px); /* Desktop: angemessene Höhe */
    background: rgba(10, 14, 20, 0.95);
    border: 1px solid var(--border-primary, #1a3a4a);
    border-left: 3px solid var(--accent-cyan, #00d4aa);
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(0, 212, 170, 0.2);
    display: none;
    flex-direction: column;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* iOS Safari spezifische Fixes */
@supports (-webkit-touch-callout: none) {
    #main-menu-panel {
        max-height: calc(100dvh - 24px); /* iOS: volle Höhe */
    }
    
    @supports (height: -webkit-fill-available) {
        #main-menu-panel {
            max-height: calc(-webkit-fill-available - 24px);
        }
    }
}

#main-menu-panel.open {
    display: flex;
}

#main-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(0, 40, 50, 0.5) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-primary, #1a3a4a);
}

#main-menu-header h3 {
    font-family: 'Orbitron', 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-accent, #00ffcc);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

#main-menu-close {
    background: none;
    border: none;
    color: var(--text-secondary, #8ba89e);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    transition: color 0.2s ease;
}

#main-menu-close:hover {
    color: var(--text-accent, #00ffcc);
}

#main-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.menu-section {
    margin-bottom: 24px;
}

.menu-section:last-child {
    margin-bottom: 0;
}

.menu-section-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-cyan, #00d4aa);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-primary, #1a3a4a);
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(15, 25, 35, 0.4);
    border: 1px solid var(--border-primary, #1a3a4a);
    margin-bottom: 8px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
}

.menu-item.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-item.clickable:hover {
    background: rgba(0, 50, 60, 0.4);
    border-color: var(--accent-cyan, #00d4aa);
}

.menu-label {
    color: var(--text-secondary, #8ba89e);
}

.menu-value {
    color: var(--text-accent, #00ffcc);
    font-weight: bold;
    word-break: break-all;
}

.menu-button {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: linear-gradient(180deg, rgba(20, 35, 45, 0.9) 0%, rgba(10, 20, 30, 0.95) 100%);
    border: 1px solid var(--border-primary, #1a3a4a);
    border-left: 3px solid var(--accent-cyan, #00d4aa);
    color: var(--text-primary, #e0f0e8);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.menu-button:hover {
    background: linear-gradient(180deg, rgba(0, 50, 60, 0.9) 0%, rgba(0, 30, 40, 0.95) 100%);
    border-color: var(--accent-cyan, #00d4aa);
    color: var(--text-accent, #00ffcc);
    box-shadow: 0 0 10px rgba(0, 212, 170, 0.3);
}

.menu-button i {
    font-size: 1.2rem;
}

/* Clickable Logo */
.clickable-logo {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-logo:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Users List */
.users-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 8px;
}

.users-list .menu-item {
    padding: 8px 12px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.users-list .menu-item.clickable:hover {
    background: rgba(0, 50, 60, 0.4);
    border-color: var(--accent-cyan, #00d4aa);
    transform: translateX(2px);
}

.users-list .menu-status {
    font-size: 0.9rem;
    display: inline-block;
}

/* Photo Gallery */
.photos-gallery {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px 0;
}

.photo-gallery-item {
    margin: 8px 0;
    padding: 8px;
    background: rgba(0, 60, 50, 0.2);
    border: 1px solid var(--border-primary, #1a3a4a);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.photo-gallery-item:hover {
    background: rgba(0, 80, 70, 0.3);
    border-color: var(--accent-cyan, #00d4aa);
    box-shadow: 0 0 10px rgba(0, 212, 170, 0.3);
}

.photo-gallery-item img {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    margin-bottom: 8px;
    display: block;
}

.photo-gallery-item > div {
    color: var(--text-secondary, #8ba89e);
    font-size: 0.75rem;
    font-family: 'Share Tech Mono', monospace;
    text-align: center;
}

/* Mobile */
@media (max-width: 600px) {
    #main-menu-panel {
        width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
        top: 8px;
        left: 8px;
    }
    
    /* iOS Safari spezifische Fixes */
    @supports (-webkit-touch-callout: none) {
        #main-menu-panel {
            max-height: calc(-webkit-fill-available - 24px);
        }
    }
    
    #main-menu-header {
        padding: 10px 12px;
    }
    
    #main-menu-header h3 {
        font-size: 0.8rem;
    }
    
    #main-menu-content {
        padding: 12px;
    }
    
    .menu-section {
        margin-bottom: 16px;
    }
    
    .menu-section-title {
        font-size: 0.7rem;
    }
    
    .menu-item {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    .menu-button {
        padding: 10px 12px;
        font-size: 0.75rem;
    }
    
    .users-list {
        max-height: 150px;
    }
    
    .photos-gallery {
        max-height: 200px;
    }
    
    .photo-gallery-item {
        padding: 6px;
    }
    
    .photo-gallery-item img {
        max-width: 100%;
    }
    
    .photo-gallery-item > div {
        font-size: 0.7rem;
    }
}

