html, body {
    position: fixed;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    overflow: hidden; /* Prevent body scroll, handle scroll in containers */
    overscroll-behavior: none;
}

.app-container {
    height: calc(100dvh - 66px); /* Adjusted for larger logo navbar height */
    margin-top: 66px;
}

#map {
    z-index: 1; /* Leaflet defaults to higher, we want offcanvas to go over */
}

.leaflet-control-container .leaflet-top {
    margin-top: 10px;
}

.plane-wrapper {
    background: transparent;
    border: none;
}

/* Custom Plane Marker */
.plane-marker {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    transition: transform 0.5s linear;
    transform-origin: center center;
}

.plane-marker svg {
    filter: drop-shadow(0px 2px 3px rgba(0,0,0,0.4));
    transition: all 0.2s ease;
}

.plane-marker.selected svg {
    filter: drop-shadow(0px 0px 8px rgba(13, 110, 253, 0.8));
    transform: scale(1.3);
}

.plane-label {
    background-color: rgba(255,255,255,0.85);
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Altitude Legend */
.legend-box {
    opacity: 0.95;
    min-width: 150px;
}

.legend-color {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border-radius: 3px;
}

/* Altitude Colors */
.color-green { color: #198754 !important; }
.color-yellow { color: #ffc107 !important; }
.color-orange { color: #fd7e14 !important; }
.color-red { color: #dc3545 !important; }
.color-gray { color: #6c757d !important; }

.legend-green { background-color: #198754; }
.legend-yellow { background-color: #ffc107; }
.legend-orange { background-color: #fd7e14; }
.legend-red { background-color: #dc3545; }

/* Status Dot */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot.connected {
    background-color: #28a745;
}
.status-dot.disconnected {
    background-color: #dc3545;
}

/* Flight List Table */
.flight-list-table {
    font-size: 0.85rem;
}
.flight-list-table tr {
    cursor: pointer;
}
.flight-list-table tr.active {
    background-color: rgba(13, 110, 253, 0.1);
}

/* Detail Panel Sidebar (Desktop) */
.sidebar-container {
    background-color: #f8f9fa;
}

/* Offcanvas tweaks */
.detail-offcanvas {
    height: auto !important;
    max-height: 60vh;
}

/* Loading Overlay */
.meta-loading {
    transition: opacity 0.3s;
}

/* Search Dropdown */
#searchDropdown {
    border: 1px solid rgba(255,255,255,0.1);
    border-top: none;
    backdrop-filter: blur(12px);
}
#searchDropdown .search-result-item:hover {
    background: rgba(255,255,255,0.08) !important;
}
#searchDropdown .search-result-item:last-child {
    border-bottom: none !important;
}

/* User Location Dot */
.user-location-dot {
    width: 14px;
    height: 14px;
    background: #4285F4;
    border: 2.5px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(66, 133, 244, 0.6);
    position: relative;
}
.user-location-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    border-radius: 50%;
    background: rgba(66, 133, 244, 0.2);
    animation: userPulse 2s ease-out infinite;
    pointer-events: none;
}
@keyframes userPulse {
    0%   { transform: scale(0.3); opacity: 1; }
    100% { transform: scale(1);   opacity: 0; }
}
