/* Dashboard Styles */
:root {
    --primary-color: #0056b3;
    --secondary-color: #003d82;
    --accent-color: #00a8e8;
    --light-color: #f5f9ff;
    --dark-color: #333;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 5px;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

/* Dashboard Layout */
.dashboard-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.dashboard-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform var(--transition-speed);
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.last-updated {
    font-size: 0.8rem;
    opacity: 0.8;
}

.card-content {
    padding: 20px;
}

/* Hero Section */
.hero {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 20px;
}

.hero h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.hero p {
    margin-top: 10px;
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Aircraft Tracker Module */
.aircraft-tracker .card-content {
    padding: 0;
}

#aircraft-map {
    height: 400px;
    width: 100%;
}

.aircraft-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--light-gray);
}

.aircraft-count {
    font-weight: 600;
}

.aircraft-count span {
    color: var(--primary-color);
}

.aircraft-filters select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Weather Module */
.weather-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.weather-card {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
}

.weather-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--primary-color);
}

.weather-icon {
    font-size: 2rem;
    margin: 10px 0;
}

.weather-data {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.weather-item {
    text-align: left;
}

.weather-label {
    font-size: 0.8rem;
    color: var(--gray-color);
    display: block;
}

.weather-value {
    font-weight: 600;
    font-size: 1rem;
}

.raw-metar {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 15px;
}

.raw-metar h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.metar-container {
    background-color: white;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    max-height: 100px;
    overflow-y: auto;
}

/* Air Quality Module */
.aqi-summary {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.aqi-level {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.aqi-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ccc;
}

.aqi-details {
    display: flex;
    gap: 20px;
}

.aqi-chart-container {
    flex: 1;
    height: 200px;
}

.aqi-legend {
    width: 200px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    margin-right: 8px;
}

.legend-text {
    font-size: 0.8rem;
}

/* Runway Usage Module */
.runway-display {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.runway-diagram {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.runway {
    width: 80%;
    height: 60px;
    background-color: #333;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.runway:before, .runway:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        white,
        white 20px,
        transparent 20px,
        transparent 40px
    );
}

.runway:before {
    top: 0;
}

.runway:after {
    bottom: 0;
}

.runway-direction {
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    z-index: 1;
}

.runway-info {
    flex: 1;
}

.info-item {
    margin-bottom: 10px;
}

.info-label {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.runway-note {
    background-color: var(--light-color);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .weather-cards {
        grid-template-columns: 1fr;
    }
    
    .aqi-details {
        flex-direction: column;
    }
    
    .runway-display {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .last-updated {
        margin-top: 5px;
    }
    
    .aircraft-controls {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Loading Animations */
.weather-loading, .loading {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.weather-loading:after, .loading:after {
    content: " ";
    display: block;
    border-radius: 50%;
    width: 0;
    height: 0;
    margin: 8px;
    box-sizing: border-box;
    border: 32px solid var(--primary-color);
    border-color: var(--primary-color) transparent var(--primary-color) transparent;
    animation: loading 1.2s infinite;
}

@keyframes loading {
    0% {
        transform: rotate(0);
        animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
    }
    50% {
        transform: rotate(180deg);
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }
    100% {
        transform: rotate(360deg);
    }
}
