:root {
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --green-600: #16a34a;
    --red-600: #dc2626;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: var(--gray-100);
    --text-primary: #0f172a;
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.08);

    --shadow-sm: 0 1px 2px 0 var(--shadow-color);
    --shadow: 0 1px 3px 0 var(--shadow-color);
    --shadow-md: 0 4px 6px -1px var(--shadow-color);
    --shadow-lg: 0 10px 15px -3px var(--shadow-color);

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: ui-monospace, 'Cascadia Code', Menlo, monospace;

    --radius: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

#app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#app-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 300;
    box-shadow: var(--shadow-sm);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon { font-size: 1.5rem; }

.brand-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.live-clock { text-align: right; }

.clock-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.clock-time {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
}

.icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 1rem;
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--blue-500);
    transform: scale(1.05);
}

.main-nav {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-btn.active {
    color: var(--blue-600);
    border-bottom-color: var(--blue-600);
    background: var(--bg-secondary);
}

body.dark-mode .nav-btn.active {
    color: var(--blue-400);
    border-bottom-color: var(--blue-400);
}

.nav-icon { font-size: 1.125rem; }

.content-section {
    display: none;
    flex: 1;
}

.content-section.active { display: block; }

.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
}

.board-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.airport-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.airport-selector label {
    font-weight: 600;
    color: var(--text-secondary);
}

.search-input,
.route-select {
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    outline: none;
    text-transform: uppercase;
}

.search-input:hover,
.route-select:hover {
    border-color: var(--blue-400);
}

.search-input:focus,
.route-select:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.hint-text {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.board-tabs {
    display: inline-flex;
    padding: 0.25rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.board-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.board-tab:hover { color: var(--text-primary); }

.board-tab.active {
    background: var(--bg-primary);
    color: var(--blue-600);
    box-shadow: var(--shadow-sm);
}

body.dark-mode .board-tab.active {
    color: var(--blue-400);
}

.refresh-btn,
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.5rem;
    padding: 0 1rem;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}

.refresh-btn:hover,
.primary-btn:hover {
    background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.primary-btn.large {
    height: 3rem;
    width: 100%;
    font-size: 1rem;
}

.flight-board {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.board-header {
    display: grid;
    grid-template-columns: 90px 110px 1fr 180px 70px 130px;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.board-content {
    max-height: 600px;
    overflow-y: auto;
}

.board-content::-webkit-scrollbar { width: 6px; }
.board-content::-webkit-scrollbar-track { background: var(--bg-secondary); }
.board-content::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}
body.dark-mode .board-content::-webkit-scrollbar-thumb { background: var(--gray-600); }

.flight-row {
    display: grid;
    grid-template-columns: 90px 110px 1fr 180px 70px 130px;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition);
}

.flight-row:hover {
    background: var(--bg-secondary);
    box-shadow: inset 3px 0 0 var(--blue-500);
}

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

.flight-time {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--blue-600);
}

body.dark-mode .flight-time { color: var(--blue-400); }

.flight-number {
    font-weight: 700;
    font-size: 0.9375rem;
}

.flight-destination > div:first-child { font-weight: 600; }
.flight-destination > div:last-child {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.flight-airline { color: var(--text-secondary); }

.flight-gate {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
}

.flight-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.75rem;
    padding: 0 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-on-time {
    background: rgba(34, 197, 94, 0.15);
    color: var(--green-600);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-boarding {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue-600);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-delayed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red-600);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-departed {
    background: rgba(107, 114, 128, 0.15);
    color: var(--gray-600);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.airport-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-box {
    padding: 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

.route-planner h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.route-form {
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.form-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group { flex: 1; }

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.route-select { width: 100%; }

.swap-icon {
    font-size: 1.25rem;
    color: var(--text-tertiary);
    cursor: pointer;
    padding-bottom: 0.625rem;
    transition: all var(--transition);
}

.swap-icon:hover {
    color: var(--blue-600);
    transform: scale(1.2);
}

.route-results h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.routes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.route-card {
    padding: 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.route-card:hover {
    border-color: var(--blue-500);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.route-type {
    display: inline-flex;
    align-items: center;
    height: 1.5rem;
    padding: 0 0.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 197, 253, 0.2));
    color: var(--blue-700);
    border-radius: var(--radius);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

body.dark-mode .route-type {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.route-path {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.route-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.25rem;
}

.route-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.route-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

.route-detail-value {
    font-size: 1rem;
    font-weight: 700;
}

.about-content { max-width: 900px; margin: 0 auto; }

.about-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.025em;
}

.about-card {
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.about-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.about-card p {
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.about-card p:last-child { margin-bottom: 0; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.feature-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-item p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

.tech-list {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.tech-list li {
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.about-footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.about-footer p {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.2;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.modal {
    width: 100%;
    max-width: 32rem;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.close-btn {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 1.25rem;
    transition: all var(--transition);
}

.close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body { padding: 1.5rem; }

.card-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child { border-bottom: none; }

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay p {
    margin-top: 1rem;
    color: white;
    font-weight: 500;
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    min-width: 20rem;
    padding: 1rem 1.25rem;
    background: var(--gray-900);
    color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    z-index: 50;
}

.toast.success { background: var(--green-600); }
.toast.error { background: var(--red-600); }

@media (max-width: 1024px) {
    .board-header,
    .flight-row {
        grid-template-columns: 80px 100px 1fr 140px 60px 110px;
        gap: 0.75rem;
    }

    .airport-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tracker-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.tracker-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.tracker-search {
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.search-group {
    margin-bottom: 1rem;
}

.search-group label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.tracker-input {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition);
    outline: none;
    text-transform: uppercase;
}

.tracker-input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.tracker-result {
    margin-bottom: 2rem;
}

.flight-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.flight-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.airline-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.airline-logo {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
    border-radius: var(--radius-lg);
    font-size: 2rem;
    box-shadow: var(--shadow);
}

.airline-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.airline-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.flight-status-badge {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flight-route {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.route-point {
    text-align: center;
}

.route-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.route-code {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    margin-bottom: 0.25rem;
}

.route-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.route-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.route-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -2rem;
    right: -2rem;
    height: 2px;
    background: linear-gradient(to right, var(--blue-500), var(--blue-400));
    transform: translateY(-50%);
}

.route-plane {
    font-size: 2rem;
    position: relative;
    z-index: 1;
    background: var(--bg-secondary);
    padding: 0 0.5rem;
}

.aircraft-info {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.aircraft-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 197, 253, 0.1));
    border: 2px solid var(--blue-500);
    border-radius: var(--radius-lg);
}

.aircraft-icon {
    font-size: 1.5rem;
}

.aircraft-type {
    font-size: 1rem;
    font-weight: 700;
    color: var(--blue-600);
}

body.dark-mode .aircraft-type {
    color: var(--blue-400);
}

.flight-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.detail-item:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.detail-icon {
    font-size: 1.5rem;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1.125rem;
    font-weight: 700;
}

/* MOBILE RESPONSIVE STYLES */
@media (max-width: 768px) {
    /* Better header on mobile */
    #app-header {
        padding: 0 1rem;
        height: 3.5rem;
    }

    .brand-title {
        font-size: 1rem;
    }

    .brand-subtitle {
        display: none;
    }

    .header-status {
        gap: 0.75rem;
    }

    /* Keep local time visible on mobile */
    .live-clock:first-of-type {
        display: none;
    }

    /* Better navigation on mobile */
    .main-nav {
        padding: 0 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-btn {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
        white-space: nowrap;
        min-width: fit-content;
    }

    .nav-icon {
        font-size: 1rem;
    }

    /* Hide less important columns on mobile */
    .board-header,
    .flight-row {
        grid-template-columns: 60px 80px 1fr 90px;
        gap: 0.5rem;
        font-size: 0.75rem;
    }

    /* Hide airline and gate columns */
    .col-airline,
    .col-gate,
    .flight-airline,
    .flight-gate {
        display: none;
    }

    /* Make time and flight number smaller */
    .flight-time {
        font-size: 0.875rem;
    }

    .flight-number {
        font-size: 0.8125rem;
    }

    /* Stack destination info */
    .flight-destination > div:first-child {
        font-size: 0.875rem;
    }

    .flight-destination > div:last-child {
        font-size: 0.6875rem;
    }

    /* Smaller status badges */
    .flight-status {
        height: 1.5rem;
        padding: 0 0.5rem;
        font-size: 0.625rem;
    }

    /* Better airport selector on mobile */
    .airport-selector {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .primary-btn {
        width: 100%;
    }

    /* Stack board controls vertically */
    .board-tabs {
        width: 100%;
        justify-content: stretch;
    }

    .board-tab {
        flex: 1;
    }

    /* Better stats grid on mobile */
    .airport-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-box {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-icon {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    /* Section container */
    .section-container {
        padding: 1rem;
    }

    /* Board controls */
    .board-controls {
        flex-direction: column;
        align-items: stretch;
    }

    /* Flight tracker improvements */
    .flight-card {
        padding: 1.25rem;
    }

    .flight-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .airline-logo {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }

    .airline-info h3 {
        font-size: 1.25rem;
    }

    .flight-route {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .route-code {
        font-size: 1.5rem;
    }

    .route-line {
        order: 2;
    }

    .route-line::before {
        display: none;
    }

    .route-plane {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }

    /* Route planner mobile */
    .form-row {
        flex-direction: column;
    }

    .swap-icon {
        order: 2;
        padding: 0.5rem 0;
        transform: rotate(90deg);
    }

    .route-details {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

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

/* Very small screens (< 380px) */
@media (max-width: 380px) {
    .board-header,
    .flight-row {
        grid-template-columns: 50px 70px 1fr 80px;
        padding: 0.75rem 0.5rem;
    }

    .section-container {
        padding: 0.75rem;
    }

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

    /* Keep local time visible */
    .live-clock:last-of-type {
        display: block;
    }
}
