/* Aircraft Tracker Styles */

/* Active nav link */
.nav-links a.active {
    color: var(--stone-50);
}

.nav-links a.active::after {
    width: 100%;
}

/* Main Container */
.tracker-container {
    padding-top: 80px;
    min-height: 100vh;
    background: var(--stone-950);
}

/* Header */
.tracker-header {
    padding: 40px 32px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(29, 78, 216, 0.05) 100%);
    border-bottom: 1px solid rgba(250, 250, 249, 0.08);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-text h1 {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 700;
    color: var(--stone-50);
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.header-text p {
    font-size: 16px;
    color: var(--stone-400);
    font-weight: 500;
}

.header-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--blue-500);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--stone-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Controls Panel */
.controls-panel {
    padding: 24px 32px;
    background: rgba(250, 250, 249, 0.02);
    border-bottom: 1px solid rgba(250, 250, 249, 0.05);
}

.controls-panel > div {
    max-width: 1200px;
    margin: 0 auto;
}

.search-section {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--stone-400);
    font-size: 14px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: rgba(250, 250, 249, 0.05);
    border: 1px solid rgba(250, 250, 249, 0.1);
    border-radius: 8px;
    color: var(--stone-100);
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--blue-500);
    background: rgba(250, 250, 249, 0.08);
}

.search-box input::placeholder {
    color: var(--stone-500);
}


/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
    gap: 32px;
    min-height: calc(100vh - 300px);
}

/* Map Section */
.map-section {
    background: linear-gradient(135deg, rgba(250, 250, 249, 0.03) 0%, rgba(250, 250, 249, 0.01) 100%);
    border: 1px solid rgba(250, 250, 249, 0.08);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(250, 250, 249, 0.05);
}

.map-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--stone-50);
    letter-spacing: -0.01em;
}

.map-controls {
    display: flex;
    gap: 8px;
}

.map-btn {
    width: 36px;
    height: 36px;
    background: rgba(250, 250, 249, 0.1);
    border: 1px solid rgba(250, 250, 249, 0.1);
    border-radius: 8px;
    color: var(--stone-300);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--blue-500);
    color: var(--blue-400);
}

/* World Map - ProtonVPN Style */
.world-map {
    height: 500px;
    position: relative;
    background: #1a1d23;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* Regional Map Background - Dark Minimal Style */
.regional-map {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 1;
    background: 
        /* Dark background like ProtonVPN */
        linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    opacity: 1;
}

/* State/Country outline style like ProtonVPN */
.regional-map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        /* Simple state/region outline */
        radial-gradient(ellipse 60% 80% at 50% 50%, transparent 30%, rgba(100, 116, 139, 0.3) 31%, rgba(100, 116, 139, 0.3) 32%, transparent 33%);
    opacity: 0.8;
}

/* Subtle geographic boundary lines */
.regional-map::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        /* State boundary lines */
        linear-gradient(to right, transparent 48%, rgba(100, 116, 139, 0.4) 49%, rgba(100, 116, 139, 0.4) 51%, transparent 52%),
        linear-gradient(to bottom, transparent 48%, rgba(100, 116, 139, 0.4) 49%, rgba(100, 116, 139, 0.4) 51%, transparent 52%);
    background-size: 200px 200px;
    opacity: 0.3;
}

/* User location marker */
.user-location-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 15;
    cursor: pointer;
}

.user-location-icon {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, var(--red-500) 0%, var(--red-600) 100%);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 
        0 0 0 3px rgba(239, 68, 68, 0.3),
        0 4px 12px rgba(239, 68, 68, 0.4);
    animation: user-pulse 2s infinite;
    position: relative;
}

.user-location-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid rgba(239, 68, 68, 0.6);
    border-radius: 50%;
    animation: user-ping 2s infinite;
}

@keyframes user-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes user-ping {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    75%, 100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.user-tooltip {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 20;
    font-weight: 600;
}

.user-location-marker:hover .user-tooltip {
    opacity: 1;
}

.user-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(239, 68, 68, 0.95);
}

/* Remove old continent styles */
.continents {
    display: none;
}

.map-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background-image: 
        /* Minimal grid like ProtonVPN map */
        linear-gradient(to right, rgba(100, 116, 139, 0.15) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(100, 116, 139, 0.15) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 2;
    opacity: 0.4;
}

.aircraft-markers {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.aircraft-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
    animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.aircraft-marker:hover {
    z-index: 15;
}

.aircraft-icon-marker {
    width: 24px;
    height: 24px;
    background: var(--blue-500);
    border: 2px solid var(--blue-400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    box-shadow: 
        0 4px 12px rgba(59, 130, 246, 0.4),
        0 0 0 4px rgba(59, 130, 246, 0.1);
    animation: radar-pulse 3s infinite;
}

.aircraft-marker:hover .aircraft-icon-marker {
    transform: scale(1.2);
    box-shadow: 
        0 6px 20px rgba(59, 130, 246, 0.6),
        0 0 0 8px rgba(59, 130, 246, 0.2);
}

@keyframes radar-pulse {
    0%, 100% {
        box-shadow: 
            0 4px 12px rgba(59, 130, 246, 0.4),
            0 0 0 4px rgba(59, 130, 246, 0.1);
    }
    50% {
        box-shadow: 
            0 4px 12px rgba(59, 130, 246, 0.6),
            0 0 0 8px rgba(59, 130, 246, 0.2);
    }
}

.aircraft-tooltip {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 20;
}

.aircraft-marker:hover .aircraft-tooltip {
    opacity: 1;
}

.aircraft-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Map Legend */
.map-legend {
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(250, 250, 249, 0.05);
    display: flex;
    gap: 24px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--stone-300);
}

.legend-icon.aircraft-icon {
    width: 16px;
    height: 16px;
    background: var(--blue-500);
    border-radius: 50%;
}

.legend-icon.route-line {
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--blue-500), transparent);
}


.data-source {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 8px;
    display: inline-block;
}

.data-source.real-data {
    background: rgba(34, 197, 94, 0.2);
    color: var(--green-500);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.data-source.mock-data {
    background: rgba(245, 158, 11, 0.2);
    color: var(--orange-500);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Info Panel */
.info-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.flight-details {
    background: linear-gradient(135deg, rgba(250, 250, 249, 0.03) 0%, rgba(250, 250, 249, 0.01) 100%);
    border: 1px solid rgba(250, 250, 249, 0.08);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(250, 250, 249, 0.05);
}

.details-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--stone-50);
}

.status-badge {
    padding: 4px 12px;
    background: rgba(34, 197, 94, 0.2);
    color: var(--stone-200);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.details-content {
    padding: 24px;
    min-height: 200px;
}

.no-selection {
    text-align: center;
    color: var(--stone-400);
    padding: 40px 20px;
}

.no-selection i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.flight-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    color: var(--stone-400);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 16px;
    color: var(--stone-100);
    font-weight: 600;
}

.route-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(250, 250, 249, 0.05);
    border-radius: 8px;
    margin-top: 16px;
}

.airport-code {
    font-size: 18px;
    font-weight: 700;
    color: var(--stone-50);
}

.route-arrow {
    color: var(--blue-500);
    font-size: 16px;
}

/* Flight List */
.flight-list {
    background: linear-gradient(135deg, rgba(250, 250, 249, 0.03) 0%, rgba(250, 250, 249, 0.01) 100%);
    border: 1px solid rgba(250, 250, 249, 0.08);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    flex: 1;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(250, 250, 249, 0.05);
}

.list-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--stone-50);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flight-count {
    font-size: 12px;
    color: var(--stone-400);
    font-weight: 600;
}

.flight-items {
    max-height: 400px;
    overflow-y: auto;
}

/* Custom scrollbar for flight items */
.flight-items::-webkit-scrollbar {
    width: 8px;
}

.flight-items::-webkit-scrollbar-track {
    background: rgba(250, 250, 249, 0.05);
    border-radius: 4px;
}

.flight-items::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.6) 0%, rgba(37, 99, 235, 0.8) 100%);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.flight-items::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(37, 99, 235, 1) 100%);
}

.flight-item {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(250, 250, 249, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.flight-item:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: translateX(4px);
    border-left: 2px solid var(--blue-500);
}

.flight-item:last-child {
    border-bottom: none;
}

.flight-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.flight-callsign {
    font-size: 14px;
    font-weight: 700;
    color: var(--stone-50);
}

.flight-altitude {
    font-size: 12px;
    color: var(--blue-400);
    font-weight: 600;
}

.flight-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flight-route {
    font-size: 12px;
    color: var(--stone-300);
}

.flight-aircraft {
    font-size: 11px;
    color: var(--stone-400);
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(59, 130, 246, 0.1),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Footer Message */
.footer-message {
    margin-top: 40px;
    padding: 32px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(29, 78, 216, 0.03) 100%);
    border-top: 1px solid rgba(250, 250, 249, 0.08);
    border-radius: 16px 16px 0 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: center;
    justify-content: center;
}

.footer-content i {
    color: var(--blue-400);
    font-size: 20px;
    opacity: 0.8;
}

.footer-content p {
    font-size: 14px;
    color: var(--stone-300);
    font-weight: 500;
    line-height: 1.6;
    font-style: italic;
    max-width: 600px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--stone-900);
    border: 1px solid rgba(250, 250, 249, 0.1);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(250, 250, 249, 0.1);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--stone-50);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: rgba(250, 250, 249, 0.1);
    border: none;
    border-radius: 8px;
    color: var(--stone-400);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--stone-50);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 24px;
    }
    
    .header-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .tracker-header {
        padding: 24px 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .controls-panel {
        padding: 20px;
    }
    
    .search-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    
    .dashboard-grid {
        padding: 20px;
        gap: 20px;
    }
    
    .world-map {
        height: 400px;
    }
}

@media (max-width: 640px) {
    .controls-panel,
    .tracker-header {
        padding: 16px;
    }
    
    .dashboard-grid {
        padding: 16px;
    }
}