* { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

.glass-card {
    background: rgba(26, 26, 36, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.tab-btn {
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    font-weight: 500;
}

.aqi-display {
    font-size: 120px;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-card {
    background: rgba(26, 26, 36, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
}

.metric-value {
    font-size: 28px;
    font-weight: 600;
}

.metric-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
}

.data-table tr:hover td {
    background: rgba(59, 130, 246, 0.05);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-good { background: var(--accent-green); }
.status-moderate { background: var(--accent-yellow); }
.status-unhealthy { background: var(--accent-red); }

.pipeline-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(26, 26, 36, 0.4);
    margin-bottom: 12px;
}

.pipeline-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.chart-container {
    width: 100%;
    height: 300px;
}

.feature-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin: 4px;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.methodology-section {
    margin-bottom: 32px;
}

.methodology-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent-blue);
}

.methodology-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 14px;
}

.limitation-card {
    padding: 16px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-bottom: 12px;
}

.limitation-card h4 {
    font-weight: 600;
    margin-bottom: 8px;
    color: #f87171;
}

.limitation-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Tab content visibility */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}
.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.empty-state .message {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.empty-state .hint {
    font-size: 13px;
}

/* ========== Mobile ========== */
@media (max-width: 768px) {
    header {
        padding: 12px 16px !important;
    }
    header h1 {
        font-size: 1.25rem !important;
    }
    nav.fixed {
        top: 60px !important;
        padding: 8px 12px !important;
    }
    .tab-btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    main {
        padding-top: 120px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .aqi-display {
        font-size: 72px !important;
    }
    .glass-card {
        padding: 16px !important;
    }
    .glass-card.p-6, .glass-card.p-8 {
        padding: 16px !important;
    }
    .metric-card {
        padding: 12px !important;
    }
    .metric-value {
        font-size: 20px !important;
    }
    .metric-label {
        font-size: 11px !important;
    }
    .chart-container {
        height: 250px !important;
        min-height: 250px !important;
    }
    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .data-table th, .data-table td {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    .section-title {
        font-size: 16px !important;
    }
    h2 {
        font-size: 1.25rem !important;
    }
    h3 {
        font-size: 1rem !important;
    }
    .feature-tag {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }
    code {
        font-size: 11px !important;
    }
    .gap-6 {
        gap: 12px !important;
    }
    .gap-4 {
        gap: 8px !important;
    }
    .methodology-section p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
    .limitation-card {
        padding: 12px !important;
    }
    .limitation-card h4 {
        font-size: 14px !important;
    }
    .limitation-card p {
        font-size: 12px !important;
    }
}

/* Extra small screens (< 480px) */
@media (max-width: 480px) {
    .aqi-display {
        font-size: 56px !important;
    }
    .tab-btn {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
    .metric-value {
        font-size: 18px !important;
    }
    .chart-container {
        height: 200px !important;
        min-height: 200px !important;
    }
}
