/* AIS Radar v0.9 -  */

body, html { 
    margin: 0; padding: 0; height: 100%; width: 100%; 
    display: flex; flex-direction: column;
    font-family: 'Segoe UI', Arial, sans-serif;
    overflow: hidden; background: #2c3e50;
}

/* HEADER STRUKTUR */
.app-header {
    width: 100%; height: 50px; background: #2c3e50; color: white;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; box-sizing: border-box; z-index: 2000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.header-logo h1 { font-size: 18px; margin: 0; font-weight: bold; white-space: nowrap; }

/* NAVIGATION & DROPDOWN */
.header-nav { flex: 1; margin-left: 40px; height: 100%; }
.main-menu { list-style: none; margin: 0; padding: 0; display: flex; height: 100%; align-items: center; }
.main-menu > li { position: relative; height: 100%; display: flex; align-items: center; }

.main-menu a {
    color: #bdc3c7; text-decoration: none; font-size: 13px; font-weight: 600;
    padding: 8px 15px; border-radius: 4px; transition: all 0.2s;
}

.main-menu a:hover, .main-menu a.active { color: white; background: #34495e; }

/* Das eigentliche Dropdown-Fenster */
.dropdown-content {
    position: absolute; top: 50px; left: 0; width: 200px;
    background: #2c3e50; list-style: none; padding: 8px 0; margin: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4); border-radius: 0 0 4px 4px;
    
    /* Wichtig für Stabilität */
    display: block; opacity: 0; visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

/* Unsichtbare Brücke schließt die Lücke zwischen Header und Menü */
.dropdown-content::before {
    content: ""; position: absolute; top: -10px; left: 0; width: 100%; height: 10px;
}

.dropdown-content li { width: 100%; }

.dropdown-content a {
    display: block !important; width: 100%; padding: 10px 20px;
    border-radius: 0; color: #ecf0f1 !important; /* IMMER SICHTBAR WEISS */
    box-sizing: border-box; text-align: left;
}

.dropdown-content a:hover { background: #1a252f; color: #2ecc71 !important; }

/* Anzeigen bei Hover */
.dropdown:hover .dropdown-content { opacity: 1; visibility: visible; }

/* RECHTER STATUS-BEREICH */
.header-status { display: flex; align-items: center; color: #ecf0f1; }
.status-meta-block { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.status-item, .vessels-count { font-size: 12px; line-height: 12px; }
.status-dot { height: 8px; width: 8px; border-radius: 50%; margin-left: 6px; background: #bbb; display: inline-block; }
.online { background: #2ecc71; box-shadow: 0 0 6px #2ecc71; }
.offline { background: #e74c3c; }
.status-value { font-weight: bold; }
.time-display { font-family: monospace; font-size: 16px; margin-left: 15px; }
.status-divider { margin: 0 10px; color: #34495e; font-size: 18px; }

/* HAUPT-LAYOUT (MAP & SIDEBAR) */
.main-container { display: flex; flex: 1; width: 100%; flex-direction: row; }
#map { flex: 1; z-index: 1; }
#sidebar { width: 290px; background: #f4f7f6; border-left: 1px solid #bdc3c7; z-index: 1001; }
.sidebar-content { padding: 15px; overflow-y: auto; }

/* SIDEBAR WIDGETS */
.info-card { background: white; padding: 10px; border-radius: 4px; border: 1px solid #dcdde1; margin-bottom: 15px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
#ship-search { width: 100%; padding: 10px; border: none; font-size: 14px; outline: none; }
.filter-group label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.9em; cursor: pointer; }
