/* ==================== CSS Reset & Base ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base: #f5f7fa;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8faff;
  --bg-glass: rgba(255,255,255,0.8);
  --bg-section: #f0f4ff;

  --border: #e2e8f4;
  --border-light: #eef2f9;
  --border-active: rgba(59,130,246,0.4);

  --text-primary: #0a0f1e;
  --text-secondary: #4a5578;
  --text-muted: #94a3b8;

  --accent-blue: #2563eb;
  --accent-cyan: #0ea5e9;
  --accent-indigo: #4f46e5;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #7c3aed;
  --accent-pink: #ec4899;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.05), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-card: 0 4px 24px rgba(0,20,80,0.07), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 12px 40px rgba(37,99,235,0.12), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-base: #0f172a;
    --bg-white: #1e293b;
    --bg-card: #1e293b;
    --bg-card-hover: #2d3a52;
    --bg-glass: rgba(30,41,59,0.8);
    --bg-section: #1a2537;

    --border: #334155;
    --border-light: #2d3a52;
    --border-active: rgba(96,165,250,0.4);

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;

    --accent-blue: #3b82f6;
    --accent-cyan: #22d3ee;
    --accent-green: #34d399;
    --accent-yellow: #fbbf24;
    --accent-red: #f87171;
    --accent-purple: #a78bfa;
    --accent-pink: #f472b6;

    --shadow-sm: 0 1px 4px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,0,0,0.2);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.2);
    --shadow-card-hover: 0 12px 40px rgba(59,130,246,0.25), 0 2px 8px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 0 3px rgba(59,130,246,0.2);
  }
}

:root[data-theme="dark"] {
  --bg-base: #0f172a;
  --bg-white: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #2d3a52;
  --bg-glass: rgba(30,41,59,0.8);
  --bg-section: #1a2537;

  --border: #334155;
  --border-light: #2d3a52;
  --border-active: rgba(96,165,250,0.4);

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --accent-blue: #3b82f6;
  --accent-cyan: #22d3ee;
  --accent-green: #34d399;
  --accent-yellow: #fbbf24;
  --accent-red: #f87171;
  --accent-purple: #a78bfa;
  --accent-pink: #f472b6;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,0,0,0.2);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.2);
  --shadow-card-hover: 0 12px 40px rgba(59,130,246,0.25), 0 2px 8px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 0 3px rgba(59,130,246,0.2);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ==================== Grid Background ==================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(37,99,235,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Top glow */
body::after {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(37,99,235,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Scan-line animation */
@keyframes scanLine {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}
.scan-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.scan-overlay::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.15), transparent);
  animation: scanLine 6s linear infinite;
}

/* ==================== Header ==================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-icon { width: 36px; height: 36px; flex-shrink: 0; }
.logo-icon svg { width: 100%; height: 100%; }
.logo-title {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-blue);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.logo-sub {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Dot decorations */
.logo-dots {
  display: flex;
  gap: 4px;
  margin-left: 4px;
}
.logo-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  animation: dotBlink 1.6s ease-in-out infinite;
}
.logo-dot:nth-child(1) { background: var(--accent-blue); animation-delay: 0s; }
.logo-dot:nth-child(2) { background: var(--accent-cyan); animation-delay: 0.2s; }
.logo-dot:nth-child(3) { background: var(--accent-indigo); animation-delay: 0.4s; }
@keyframes dotBlink {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.6); }
}

/* ---- Main Nav ---- */
.main-nav {
  display: flex;
  gap: 8px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.02);
  overflow-x: auto;
  flex: 1;
  min-width: 0;
}
.main-nav::-webkit-scrollbar { display: none; }
.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.nav-tab svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}
.nav-tab:hover {
  color: var(--accent-blue);
  background: rgba(37,99,235,0.04);
}
.nav-tab.active {
  background: #fff;
  color: var(--accent-blue);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border-color: var(--border);
}
.nav-tab.active svg {
  opacity: 1;
}

.header-actions { display: none; }
.last-update {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted);
  padding: 6px 12px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.update-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.btn-refresh {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 20px;
  background: var(--accent-blue);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 2px 12px rgba(37,99,235,0.3);
  letter-spacing: -0.01em;
}
.btn-refresh:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}
.btn-refresh:active { transform: translateY(0); }
.btn-icon { width: 15px; height: 15px; }
.btn-bookmark {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.btn-bookmark:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(37,99,235,0.05);
}
.btn-bookmark:active { transform: scale(0.97); }
.btn-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
}
.btn-theme-toggle:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(37,99,235,0.05);
}
.btn-theme-toggle:active { transform: scale(0.92); }
#bookmark-tip kbd {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.btn-refresh.spinning .btn-icon { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== Global Alert ==================== */
.global-alert {
  max-width: 1200px;
  margin: 20px auto 0;
  padding: 14px 20px;
  background: linear-gradient(to right, #fffbeb, #fef3c7);
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.alert-icon {
  font-size: 20px;
  line-height: 1;
  margin-top: 2px;
}
.alert-content {
  font-size: 14px;
  color: #92400e;
  line-height: 1.6;
}
.alert-content strong {
  color: #b45309;
}
@media (max-width: 768px) {
  .global-alert {
    margin: 16px 16px 0;
  }
}

/* ==================== Stats Bar ==================== */
.stats-bar {
  position: relative;
  z-index: 1;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}
.stats-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 16px;
  background: var(--bg-section);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  position: relative;
  transition: all 0.2s;
}
.stat-item:hover {
  background: #fff;
  border-color: var(--accent-blue);
  box-shadow: 0 4px 12px rgba(37,99,235,0.08);
  transform: translateY(-2px);
}
.stat-item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  background: transparent;
  transition: none;
}
.stat-item:hover::after { width: 0; }

.stat-value {
  font-size: 26px;
  font-weight: 900;
  color: var(--accent-blue);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}
.stat-label { font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em; font-weight: 600; }
.stat-divider { display: none; }

/* ==================== Filter Bar ==================== */
.filter-bar {
  position: relative;
  z-index: 1;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 0;
}
.filter-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.filter-tabs { display: flex; gap: 4px; }
.filter-tab {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}
.filter-tab:hover { border-color: var(--accent-blue); color: var(--accent-blue); background: rgba(37,99,235,0.04); }
.filter-tab.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.search-wrap {
  flex: 1; min-width: 180px; max-width: 280px;
  position: relative;
}
.search-icon {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--text-muted);
}
.search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--accent-blue);
  background: #fff;
  box-shadow: var(--shadow-glow);
}
.sort-wrap { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sort-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; font-weight: 500; }
.sort-select {
  padding: 7px 12px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s;
}
.sort-select:focus { border-color: var(--accent-blue); }

/* ==================== Progress Banner ==================== */
.progress-banner {
  position: relative; z-index: 1;
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border-bottom: 1px solid rgba(37,99,235,0.15);
}
.progress-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 11px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--accent-blue);
  font-weight: 500;
}
.progress-spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(37,99,235,0.2);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.progress-track {
  flex: 1; height: 4px;
  background: rgba(37,99,235,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}
#progressPct { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-muted); }

/* ==================== Main Content ==================== */
.main-content {
  position: relative; z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px;
}
.ranking-list { display: flex; flex-direction: column; gap: 10px; }

/* ==================== Rank Cards ==================== */
.rank-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 18px;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
/* Left accent line */
.rank-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--border);
  transition: background 0.2s;
}
.rank-card:hover {
  border-color: rgba(37,99,235,0.2);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.rank-card:hover::before { background: var(--accent-blue); }
.rank-card.rank-1::before { background: linear-gradient(180deg, #f59e0b, #fbbf24); }
.rank-card.rank-2::before { background: linear-gradient(180deg, #94a3b8, #cbd5e1); }
.rank-card.rank-3::before { background: linear-gradient(180deg, #b45309, #d97706); }

.rank-card.rank-1 { border-color: rgba(245,158,11,0.2); background: linear-gradient(135deg, #fffbeb 0%, #ffffff 60%); }
.rank-card.rank-2 { border-color: rgba(148,163,184,0.2); background: linear-gradient(135deg, #f8fafc 0%, #ffffff 60%); }
.rank-card.rank-3 { border-color: rgba(180,83,9,0.15); background: linear-gradient(135deg, #fff7ed 0%, #ffffff 60%); }

/* Rank badge */
.rank-badge {
  width: 50px; height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}
.rank-badge.gold {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid rgba(245,158,11,0.35);
  color: #b45309;
  box-shadow: 0 2px 12px rgba(245,158,11,0.2);
}
.rank-badge.silver {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  border: 1px solid rgba(148,163,184,0.4);
  color: #64748b;
}
.rank-badge.bronze {
  background: linear-gradient(135deg, #fff7ed, #fed7aa);
  border: 1px solid rgba(194,120,60,0.3);
  color: #9a3412;
}
.rank-badge.normal {
  background: var(--bg-section);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

/* Card body */
.card-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.airport-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.airport-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag {
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tag-fast { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.tag-stable { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.tag-value { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.tag-newbie { background: #fdf4ff; color: #7c3aed; border: 1px solid #e9d5ff; }
.tag-pro { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }

/* Speed bar */
.speed-row { display: flex; align-items: center; gap: 12px; }
.speed-track {
  flex: 1; height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.speed-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
}
.speed-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  min-width: 90px;
  text-align: right;
  white-space: nowrap;
}

/* Card meta */
.card-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.meta-item { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.meta-icon { width: 12px; height: 12px; opacity: 0.6; }
.meta-value { font-weight: 600; color: var(--text-secondary); }

/* Card right */
.card-right {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 8px;
  flex-shrink: 0;
}
.latency-badge {
  padding: 4px 11px;
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.latency-low { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.latency-mid { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.latency-high { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

.uptime-dots { display: flex; gap: 2px; }
.uptime-dot { width: 5px; height: 13px; border-radius: 2px; }

.view-btn {
  padding: 6px 14px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent-blue);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.view-btn:hover {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

.card-testing .speed-fill { animation: testingPulse 0.9s ease-in-out infinite; }
@keyframes testingPulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ==================== Modal ==================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  width: 100%; max-width: 860px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,20,80,0.15);
  animation: modalIn 0.25s cubic-bezier(0.4,0,0.2,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 24px 28px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #f8faff, #ffffff);
}
.modal-title-wrap { display: flex; align-items: center; gap: 14px; }
.modal-airport-badge {
  width: 50px; height: 50px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.modal-title { font-size: 20px; font-weight: 800; margin-bottom: 2px; letter-spacing: -0.02em; }
.modal-subtitle { font-size: 13px; color: var(--text-secondary); }
.modal-close {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-section);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.modal-close svg { width: 15px; height: 15px; }
.modal-close:hover { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

.modal-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border-bottom: 1px solid var(--border);
}
.modal-stat {
  padding: 18px 20px;
  background: var(--bg-white);
  display: flex; flex-direction: column; gap: 3px;
}
.modal-stat-value { font-size: 19px; font-weight: 700; font-family: 'JetBrains Mono', monospace; letter-spacing: -0.02em; }
.modal-stat-label { font-size: 11px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.03em; }

.modal-section { padding: 22px 28px; border-bottom: 1px solid var(--border-light); }
.modal-section:last-child { border-bottom: none; }
.modal-section-title { font-size: 11px; font-weight: 700; margin-bottom: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.node-filters { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.node-filter-btn {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px; cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}
.node-filter-btn.active { background: var(--accent-blue); border-color: var(--accent-blue); color: #fff; }
.node-filter-btn:not(.active):hover { border-color: var(--accent-blue); color: var(--accent-blue); }

.node-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.node-card {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px;
  transition: all 0.15s;
}
.node-card:hover { background: #fff; border-color: rgba(37,99,235,0.25); box-shadow: 0 4px 16px rgba(37,99,235,0.08); }
.node-card.node-offline { opacity: 0.45; }
.node-header { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.node-flag { font-size: 18px; line-height: 1; }
.node-name { font-size: 12px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.node-status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.status-online { background: #10b981; box-shadow: 0 0 5px rgba(16,185,129,0.5); }
.status-offline { background: #cbd5e1; }

.node-info { display: flex; flex-direction: column; gap: 4px; }
.node-info-row { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.node-info-key { color: var(--text-muted); font-weight: 500; }
.node-info-val { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; }
.node-latency-bar { height: 3px; background: #f1f5f9; border-radius: 2px; margin-top: 8px; overflow: hidden; }
.node-latency-fill { height: 100%; border-radius: 2px; }

/* Region chart */
.region-chart { display: flex; flex-direction: column; gap: 9px; }
.region-row { display: flex; align-items: center; gap: 12px; }
.region-flag { font-size: 16px; width: 22px; text-align: center; }
.region-name { font-size: 12px; color: var(--text-secondary); width: 80px; flex-shrink: 0; font-weight: 500; }
.region-bar-track { flex: 1; height: 7px; background: #f1f5f9; border-radius: 4px; overflow: hidden; border: 1px solid #e2e8f0; }
.region-bar-fill { height: 100%; border-radius: 4px; }
.region-count { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-muted); width: 32px; text-align: right; font-weight: 600; }

/* ==================== Empty state ==================== */
.empty-state { text-align: center; padding: 80px 24px; color: var(--text-muted); }
.empty-state svg { width: 56px; height: 56px; margin-bottom: 14px; opacity: 0.25; }
.empty-state p { font-size: 14px; font-weight: 500; }

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* ==================== Tutorial Page ==================== */
.platform-tabs {
  display: flex; gap: 12px; margin-bottom: 30px;
  overflow-x: auto; padding-bottom: 4px;
}
.platform-tabs::-webkit-scrollbar { display: none; }
.platform-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-md);
  background: var(--bg-section); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.platform-tab svg { width: 20px; height: 20px; opacity: 0.7; }
.platform-tab:hover { background: #fff; border-color: rgba(37,99,235,0.3); color: var(--accent-blue); }
.platform-tab.active { background: var(--text-primary); color: #fff; border-color: var(--text-primary); }
.platform-tab.active svg { opacity: 1; }

.software-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.software-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: all 0.2s;
}
.software-card:hover {
  transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,20,80,0.08); border-color: rgba(37,99,235,0.2);
}
.soft-img-wrap {
  width: 100%; height: 180px; background: #f8fbff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.soft-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.9; mix-blend-mode: multiply;
}
.soft-body {
  padding: 24px; flex: 1; display: flex; flex-direction: column;
}
.soft-title {
  font-size: 20px; font-weight: 800; margin: 0 0 8px; color: var(--text-primary);
}
.soft-desc {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0 0 20px; flex: 1;
}
.soft-actions {
  display: flex; gap: 12px;
}
.soft-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex: 1; padding: 10px 0; border-radius: var(--radius-md); font-size: 14px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: none; font-family: inherit; transition: all 0.2s;
}
.soft-btn-primary {
  background: var(--accent-blue); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}
.soft-btn-primary:hover {
  background: #1d4ed8; box-shadow: 0 6px 16px rgba(37,99,235,0.3);
}
.soft-btn-secondary {
  background: #f1f5f9; color: var(--text-primary);
}
.soft-btn-secondary:hover {
  background: #e2e8f0;
}
.soft-icon {
  width: 18px; height: 18px;
}

/* ==================== Article Page ==================== */
.page-hero {
  display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: center;
  background: linear-gradient(135deg, #f8fbff, #ffffff 54%, #eef6ff);
  border: 1px solid #dbe4f0; border-radius: var(--radius-xl); padding: 40px;
  margin-bottom: 30px;
}
.page-hero-label { font-size: 13px; font-weight: 800; color: var(--accent-blue); letter-spacing: 0.1em; margin-bottom: 12px; }
.page-hero-title { font-size: clamp(32px, 5vw, 44px); font-weight: 900; line-height: 1.1; margin: 0 0 16px; color: var(--text-primary); letter-spacing: -0.02em; }
.page-hero-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.8; margin: 0; }
.page-hero-img img { width: 100%; border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(0,20,80,0.08); border: 1px solid var(--border); }

.article-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 40px; }
.article-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: all 0.2s;
  display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,20,80,0.08); border-color: rgba(37,99,235,0.2); }
.article-card--featured { grid-column: span 2; display: grid; grid-template-columns: 45% 1fr; }
.article-img-wrap { position: relative; width: 100%; height: 220px; }
.article-card--featured .article-img-wrap { height: 100%; }
.article-img-wrap--short { height: 180px; }
.article-img { width: 100%; height: 100%; object-fit: cover; }
.article-img-overlay { position: absolute; top: 16px; left: 16px; }
.article-category { background: rgba(0,0,0,0.65); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; backdrop-filter: blur(8px); }
.article-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.article-meta-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.article-tag { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.atag-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.atag-green { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.atag-purple { background: #f3e8ff; color: #7e22ce; border: 1px solid #d8b4fe; }
.article-read-time { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-left: auto; }
.article-title { font-size: 22px; font-weight: 800; margin: 0 0 12px; color: var(--text-primary); line-height: 1.3; }
.article-excerpt { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin: 0 0 20px; flex: 1; }
.article-section { margin-top: 24px; }
.article-section-title { font-size: 16px; font-weight: 800; color: var(--text-primary); margin: 0 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* How it works */
.how-it-works { display: flex; flex-direction: column; gap: 12px; }
.how-step { display: flex; align-items: flex-start; gap: 12px; background: var(--bg-section); padding: 14px; border-radius: var(--radius-md); border: 1px solid var(--border); }
.how-step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; flex-shrink: 0; }
.how-step-text { display: flex; flex-direction: column; gap: 4px; }
.how-step-text strong { font-size: 14px; color: var(--text-primary); }
.how-step-text span { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.how-arrow { text-align: center; color: var(--text-muted); font-weight: 900; transform: rotate(90deg); margin: -4px 0; }

/* Protocol table */
.proto-table { display: flex; flex-direction: column; gap: 8px; }
.proto-row { display: grid; grid-template-columns: 80px 1fr 1fr 1fr 60px; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 700; background: var(--bg-section); border: 1px solid var(--border); }
.proto-header { background: transparent; border-color: transparent; color: var(--text-muted); padding-bottom: 4px; }
.proto-bar-wrap { height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; width: 100%; }
.proto-bar { height: 100%; border-radius: 999px; }
.proto-stars { letter-spacing: -1px; text-align: right; }

/* Info cards */
.info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-card { display: flex; align-items: flex-start; gap: 12px; background: var(--bg-section); padding: 14px; border-radius: var(--radius-md); border: 1px solid var(--border); }
.info-card-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.info-card strong { font-size: 13px; display: block; margin-bottom: 4px; color: var(--text-primary); }
.info-card p { font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* Choose grid */
.choose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choose-item { background: var(--bg-section); padding: 16px; border-radius: var(--radius-md); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.choose-icon { font-size: 24px; }
.choose-content h4 { font-size: 14px; margin: 0 0 6px; color: var(--text-primary); }
.choose-content p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin: 0 0 10px; }
.choose-tip { font-size: 11px; font-weight: 700; color: #059669; background: #ecfdf5; padding: 6px 10px; border-radius: 6px; border: 1px solid #a7f3d0; }

/* Callout */
.article-callout { display: flex; gap: 12px; padding: 16px; border-radius: var(--radius-md); margin-top: 24px; font-size: 13px; line-height: 1.6; }
.callout-blue { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.callout-green { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.callout-icon { font-size: 18px; }

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 16px; position: relative; padding-left: 12px; }
.timeline::before { content: ''; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: #e2e8f0; }
.timeline-item { display: flex; align-items: flex-start; gap: 16px; position: relative; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 4px #fff; position: relative; z-index: 1; margin-top: 5px; }
.timeline-content { font-size: 13px; color: var(--text-secondary); line-height: 1.6; background: var(--bg-section); padding: 12px; border-radius: var(--radius-md); border: 1px solid var(--border); flex: 1; }
.timeline-content strong { color: var(--text-primary); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.faq-item { background: var(--bg-section); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 16px; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--text-primary); transition: background 0.2s; }
.faq-q:hover { background: rgba(37,99,235,0.03); }
.faq-arrow { width: 16px; height: 16px; color: var(--text-muted); transition: transform 0.2s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-a { padding-bottom: 16px; }
.faq-item.open .faq-q { padding-bottom: 12px; }
.faq-item .faq-a { padding: 0 16px; font-size: 13px; color: var(--text-secondary); line-height: 1.8; }

/* ==================== Responsive ==================== */
/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
.sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

/* Test Button in Sidebar */
.btn-test-all {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}
.btn-test-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37,99,235,0.3);
}
.btn-test-all svg {
  animation: spin 2s linear infinite paused;
}
.btn-test-all:hover svg {
  animation-play-state: running;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.test-status {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Ad Cards */
.ad-card {
  border-left: 3px solid var(--accent-blue);
}
.ad-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.ad-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  padding: 8px;
  margin: -8px;
  border-radius: 8px;
}
.ad-link:hover {
  background: var(--bg-section);
}
.ad-emoji {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}
.ad-content {
  flex: 1;
  min-width: 0;
}
.ad-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.ad-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.ad-badge {
  flex-shrink: 0;
  padding: 3px 10px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--accent-blue);
  font-size: 11px;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
}

/* Toolbox Card */
.toolbox-card {
  border-left: 3px solid #059669;
}
.toolbox-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.toolbox-icon {
  font-size: 18px;
  line-height: 1;
}
.toolbox-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}
.toolbox-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tool-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--text-primary);
  border-radius: 8px;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 600;
}
.tool-link:hover {
  background: var(--bg-section);
  color: var(--accent-blue);
}
.tool-emoji {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}
.tool-name {
  flex: 1;
}
.tool-link svg {
  flex-shrink: 0;
  opacity: 0.4;
  transition: all 0.15s;
}
.tool-link:hover svg {
  opacity: 1;
  transform: translateX(2px);
}
.tool-link-more {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  color: var(--accent-blue);
  font-weight: 700;
}
.tool-link-more .tool-name {
  text-align: center;
}

@media (max-width: 768px) {
  .rank-card { grid-template-columns: 50px 1fr; }
  .card-right { display: none; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px 28px; }
  .stat-item { padding: 14px; }
  .modal-stats { grid-template-columns: repeat(2, 1fr); }
  .filter-inner { flex-direction: column; align-items: flex-start; }
  .sort-wrap { margin-left: 0; }
  .software-grid { grid-template-columns: 1fr; }
  .main-content { grid-template-columns: 1fr !important; }
  .sidebar { position: static; order: -1; }
}
@media (max-width: 480px) {
  .header-inner, .main-content, .filter-inner, .stats-inner, .progress-banner-inner { padding-left: 16px; padding-right: 16px; }
  .rank-card { padding: 14px 16px; }
}

/* ================== FOOTER ================== */
.footer {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 60px 0 0;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand {
  max-width: 360px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.footer-logo .logo-icon {
  width: 32px;
  height: 32px;
}
.footer-logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}
.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.footer-stats {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.footer-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-stat-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-blue);
  font-family: 'JetBrains Mono', monospace;
}
.footer-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.footer-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
  display: inline-block;
}
.footer-links a:hover {
  color: var(--accent-blue);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copyright {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.footer-links-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.footer-links-inline a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links-inline a:hover {
  color: var(--accent-blue);
}
.footer-sep {
  color: var(--border);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-brand {
    max-width: 100%;
  }
}
@media (max-width: 640px) {
  .footer {
    margin-top: 60px;
    padding: 40px 0 0;
  }
  .footer-inner {
    padding: 0 16px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
  }
  .footer-stats {
    flex-wrap: wrap;
  }
}
