* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #1a1a2e;
}

#sidebar {
    width: 320px;
    background: linear-gradient(180deg, #16213e 0%, #1a1a2e 100%);
    color: #fff;
    padding: 20px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

#sidebar h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #e94560;
}

#sidebar h2 {
    font-size: 1rem;
    font-weight: 300;
    color: #a0a0a0;
    margin-bottom: 20px;
}

#sidebar h3 {
    font-size: 0.9rem;
    color: #e94560;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#map {
    flex: 1;
    height: 100vh;
    background: #0f3460;
}

/* Stats Panel */
.stats-panel {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.stat {
    flex: 1;
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid rgba(233, 69, 96, 0.3);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #e94560;
}

.stat-label {
    font-size: 0.75rem;
    color: #a0a0a0;
}

/* Legend */
.legend {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.legend-line {
    width: 30px;
    height: 3px;
    border-radius: 2px;
}

.legend-line.primary {
    background: #e94560;
    box-shadow: 0 0 10px #e94560;
}

.legend-line.secondary {
    background: #ff6b6b;
    opacity: 0.7;
}

.legend-line.maritime {
    background: #4ecdc4;
}

.legend-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-marker.origin {
    background: #e94560;
    box-shadow: 0 0 10px #e94560;
}

.legend-marker.destination {
    background: #ffd93d;
}

.legend-marker.transit {
    background: #6bcb77;
}

/* Controls */
.controls {
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-container input {
    width: 18px;
    height: 18px;
    accent-color: #e94560;
}

.btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn {
    background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
}

/* Info Panel */
.info-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-panel p {
    font-size: 0.85rem;
    color: #c0c0c0;
    line-height: 1.5;
}

.source-info {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.source-info p {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 5px;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: rgba(22, 33, 62, 0.95);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 2000;
    display: none;
    border: 1px solid #e94560;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.tooltip.show {
    display: block;
}

/* Custom Leaflet Styles */
.leaflet-container {
    background: #0f3460;
}

.custom-marker {
    background: transparent;
    border: none;
}

.marker-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 15px currentColor;
}

.marker-origin {
    background: #e94560;
    box-shadow: 0 0 20px #e94560;
}

.marker-destination {
    background: #ffd93d;
    box-shadow: 0 0 15px #ffd93d;
}

.marker-transit {
    background: #6bcb77;
    box-shadow: 0 0 15px #6bcb77;
}

.plane-icon {
    font-size: 16px;
    transform: rotate(0deg);
    transition: transform 0.1s;
}

/* Animated Route */
@keyframes dash {
    to {
        stroke-dashoffset: -20;
    }
}

.animated-route {
    animation: dash 0.5s linear infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

.pulse-marker {
    animation: pulse 2s ease-in-out infinite;
}

/* Popup Styles */
.leaflet-popup-content-wrapper {
    background: rgba(22, 33, 62, 0.95);
    color: white;
    border-radius: 10px;
    border: 1px solid #e94560;
}

.leaflet-popup-tip {
    background: rgba(22, 33, 62, 0.95);
}

.leaflet-popup-content {
    margin: 10px 15px;
}

.popup-title {
    font-size: 1rem;
    font-weight: bold;
    color: #e94560;
    margin-bottom: 5px;
}

.popup-info {
    font-size: 0.85rem;
    color: #c0c0c0;
}

/* Scrollbar */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

#sidebar::-webkit-scrollbar-thumb {
    background: #e94560;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    #sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
        order: 2;
    }
    
    #map {
        height: 60vh;
        order: 1;
    }
    
    .stats-panel {
        flex-direction: row;
    }
}
