.year-btn:hover {
    border-color: #2196F3;
    color: #2196F3;
}

.year-btn.active {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.header {
    background: linear-gradient(to right, #3498db, #8e44ad);
    padding: 5px 0;
    margin-bottom: 5px;
}

.header-title {
    text-align: center;
    font-size: 2em; /* Adjust size as needed */
    font-weight: bold;
    color: white; /* Change to match your design */
    margin: 20px 0; /* Adjust margin as needed */
}

#map {
    height: 600px;
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

/* Navigation Styles */
nav {
    background: linear-gradient(to right, #3498db, #8e44ad);
    padding: 5px 0; /* Add some padding */
    margin-bottom: -5px;
    position: relative; /* Ensure it stays below the gradient */
    z-index: 1; /* Ensure it appears above other elements */
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}

nav ul li {
    position: relative;
    margin: 0;
}

nav ul li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #34495e;
}

/* Submenu Styles */
nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #34495e;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex-direction: column;
}

nav ul li:hover > ul {
    display: flex;
}

nav ul li ul li {
    width: 100%;
}

nav ul li ul li a {
    padding: 12px 20px;
}

nav ul li ul li a:hover {
    background-color: #2c3e50;
}

/* Statistics Container Styles */
/* Stats Container */
.stats-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
    padding: 20px;
    border-right: 1px solid #e0e0e0;
}

.stat-item:last-child {
    border-right: none;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #2196F3;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Flight Info Styles */
.flight-info {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.flight-info h2 {
    margin-bottom: 25px;
    color: #333;
}

/* Details Grid Styles */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.detail-card h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-content {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flight-route {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.airport-code {
    font-size: 24px;
    font-weight: 700;
    color: #2196F3;
}

.arrow {
    font-size: 20px;
    color: #999;
}

.flight-distance, .route-count {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Aircraft Styles */
.aircraft-image {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-bottom: 10px;
}

.aircraft-image img {
    max-width: 150px;
    height: auto;
    border-radius: 4px;
}

.aircraft-name {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.aircraft-count {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Airlines Section Styles */
.airlines-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.airlines-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.airlines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.airline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    /* background: #f8f9fa; */
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.airline-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.airline-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
    background: white;
    padding: 5px;
    border-radius: 4px;
}

.airline-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    text-align: center;
}

.airline-count {
    font-size: 12px;
    color: #666;
}

/* Form Styles */
.form-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-container h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Roboto', Arial, sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196F3;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    background-color: #2196F3;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #1976D2;
}

.btn-secondary {
    background-color: #757575;
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: #616161;
}

.btn-danger {
    background-color: #f44336;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

thead {
    background-color: #2196F3;
    color: white;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

tbody tr:hover {
    background-color: #f5f5f5;
}

tbody tr:last-child td {
    border-bottom: none;
}

.datum-column {
    width: 150px;
}

.actions-column {
    width: 150px;
    text-align: center;
}

.action-btn {
    padding: 5px 10px;
    margin: 0 5px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: opacity 0.2s;
}

.action-btn:hover {
    opacity: 0.8;
}

.edit-btn {
    background-color: #4CAF50;
    color: white;
}

.delete-btn {
    background-color: #f44336;
    color: white;
}

/* Footer Styles */
.footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
    margin-top: 50px;
}

.footer p {
    margin: 0;
}

/* Alert Styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

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

    .details-grid {
        grid-template-columns: 1fr;
    }

    .airlines-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .year-filter {
        justify-content: flex-start;
    }

    .airport-code {
        font-size: 20px;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 20px;
    }

    .btn {
        width: 100%;
        margin: 5px 0;
    }

    .btn-secondary {
        margin-left: 0;
    }

    .airlines-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .airline-logo {
        width: 50px;
        height: 50px;
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.empty-state-text {
    font-size: 18px;
    margin-bottom: 20px;
}

/* Map Container Fix */
.map-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Map Container Styles */
.map-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.year-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 0 20px 0;
    background-color: white;
}

#map {
    height: 600px;
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    margin: 0;
}

/* Override MapLibre styles */
.maplibregl-map {
    border-radius: 0 0 8px 8px !important;
}

.maplibregl-canvas-container {
    border-radius: 0 0 8px 8px !important;
}

.maplibregl-canvas {
    border-radius: 0 0 8px 8px !important;
}

/* Ensure map container has proper styling */
.map-container #map {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    outline: none !important;
}

/* Country Flags Section */
.countries-section {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.countries-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 25px;
}

.countries-section h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.countries-flags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    min-height: 80px;
}

.flag-item {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
    margin-left: -20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.flag-item:first-child {
    margin-left: 0;
}

.flag-item:hover {
    transform: scale(1.15) translateY(-5px);
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.flag-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.routes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.route-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.route-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.route-rank {
    font-size: 24px;
    font-weight: 700;
    color: #2196F3;
    min-width: 50px;
    text-align: center;
}

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

.route-path {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
}

.route-path .airport-code {
    color: #333;
}

.route-path .arrow {
    color: #2196F3;
    font-size: 20px;
}

.route-count-text {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.top-routes-section {
    margin-top: 40px;
}

.top-routes-section h3 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.routes-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.routes-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.routes-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.routes-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.routes-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.routes-table tbody tr:hover {
    background-color: #f8f9fa;
}

.routes-table tbody tr:last-child {
    border-bottom: none;
}

.routes-table td {
    padding: 16px;
    vertical-align: middle;
}

.rank-cell {
    font-size: 20px;
    font-weight: 700;
    color: #2196F3;
    text-align: center;
    width: 80px;
}

.route-cell {
    font-size: 16px;
    font-weight: 600;
    width: 200px;
}

.route-cell .airport-code {
    color: #333;
}

.route-cell .arrow {
    color: #2196F3;
    margin: 0 8px;
}

.count-cell {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
    width: 100px;
}

.flights-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.flight-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .routes-table th,
    .routes-table td {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .rank-cell {
        font-size: 16px;
        width: 60px;
    }
    
    .route-cell {
        font-size: 14px;
    }
    
    .count-cell {
        font-size: 16px;
    }
    
    .flight-badge {
        padding: 4px 8px;
        font-size: 11px;
    }
}