:root {
  /* Apple Pro Hardware Palette: Refined Space Gray & Anodized Aluminum */
  --bg-base: #14161a;
  --bg-panel: #1e2127;
  --bg-panel-hover: #252830;
  --bg-panel-elevated: #292d36;
  --bg-inset: #101215;
  
  /* Hairline Bevels & Borders */
  --border-hairline: rgba(255, 255, 255, 0.09);
  --border-active: rgba(245, 158, 11, 0.4);
  --bevel-top: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --bevel-chip: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  
  /* Instrument Amber & Signal Ice */
  --amber-primary: #f59e0b;
  --amber-bright: #fbbf24;
  --amber-dim: rgba(245, 158, 11, 0.12);
  --amber-border: rgba(245, 158, 11, 0.25);
  --amber-glow: rgba(245, 158, 11, 0.2);

  /* Typography */
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-subtle: #52525b;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", -system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

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

html {
  scrollbar-gutter: stable;
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Navigation Bar - Precision Frosted Glass */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 22, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-hairline);
  height: 60px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.logo-wrapper:hover {
  opacity: 0.9;
}

.logo-badge {
  background: var(--bg-panel);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--bevel-top);
  border-radius: 8px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-svg {
  width: 22px;
  height: 22px;
  color: var(--amber-primary);
}

.brand-text {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  color: var(--text-primary);
}

/* Main Content */
main {
  flex: 1;
  padding: 2.5rem 0 3.5rem;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-feature-settings: "tnum";
}

#update-banner {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--amber-bright);
  background: var(--amber-dim);
  border: 1px solid var(--amber-border);
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

/* Filters Bar (Background-free, Vertically Stacked) */
.filters-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2.2rem;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  min-width: 5.5rem;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.22rem 0.58rem;
  border-radius: 6px;
  background: var(--bg-inset);
  color: var(--text-secondary);
  border: 1px solid var(--border-hairline);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.22);
}

.filter-btn.active {
  color: var(--amber-bright);
  background: var(--amber-dim);
  border-color: var(--amber-border);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.22);
}

.btn-reset {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  background: var(--amber-dim);
  color: var(--amber-bright);
  border: 1px solid var(--amber-border);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset:hover {
  background: rgba(245, 158, 11, 0.25);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

/* Station Grid */
.sdr-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .sdr-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .sdr-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Precision Instrument Card */
.sdr-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--bevel-top), 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sdr-card:hover {
  background: var(--bg-panel-hover);
  border-color: rgba(245, 158, 11, 0.65);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(251, 191, 36, 0.5), 0 12px 32px -4px rgba(0, 0, 0, 0.65), 0 0 20px rgba(245, 158, 11, 0.18);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  transition: color 0.15s ease;
}

.sdr-card:hover .card-title {
  color: var(--amber-bright);
}

/* Redesigned Locator Tag (Precision Glassmorphism Monospace HUD) */
.locator-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sdr-card:hover .locator-tag {
  color: var(--amber-bright);
  background: var(--amber-dim);
  border-color: var(--amber-border);
}

/* Card Footer: Bands on left, Software Type on right */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.bands-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Software Platform Tag */
.type-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.16rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  transition: all 0.2s ease;
}

.sdr-card:hover .type-tag {
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Modern Band Indicator Chips (Bottom Spectrum Color Strip) */
.band-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.52rem 0.24rem;
  border-radius: 5px;
  background: var(--bg-inset);
  border: 1px solid var(--border-hairline);
  border-bottom-width: 2px;
  color: #e4e4e7;
  cursor: pointer;
  transition: all 0.15s ease;
}

.band-tag:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

/* Spectrum Frequency Indicator Bottom Bars */
.band-hf      { border-bottom-color: #10b981; }
.band-vhf     { border-bottom-color: #f59e0b; }
.band-uhf     { border-bottom-color: #f97316; }
.band-shf     { border-bottom-color: #f43f5e; }
.band-vlf     { border-bottom-color: #a855f7; }
.band-lf      { border-bottom-color: #6366f1; }
.band-mf      { border-bottom-color: #38bdf8; }
.band-default { border-bottom-color: #71717a; }

/* Spinner & State */
.loading-state {
  display: flex;
  justify-content: center;
  padding: 4rem 0;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border-hairline);
  border-top-color: var(--amber-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.empty-state {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-muted);
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Footer - Minimalist Glass */
footer {
  border-top: 1px solid var(--border-hairline);
  background: rgba(20, 22, 26, 0.6);
  padding: 2.2rem 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-source {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer-source a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-subtle);
  transition: all 0.15s ease;
}

.footer-source a:hover {
  color: var(--amber-bright);
  border-bottom-color: var(--amber-bright);
}

.footer-authors {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.footer-dot {
  color: var(--text-subtle);
  font-size: 0.65rem;
}

.footer-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-subtle);
}
