/* RF Signal Encyclopedia - Main Stylesheet */
:root {
  --bg-primary: #0f1419;
  --bg-secondary: #1a2332;
  --bg-tertiary: #243447;
  --text-primary: #e8edf2;
  --text-secondary: #8899aa;
  --text-muted: #5a6b7d;
  --accent-blue: #3498db;
  --accent-green: #2ecc71;
  --accent-orange: #e67e22;
  --accent-red: #e74c3c;
  --accent-purple: #9b59b6;
  --accent-teal: #1abc9c;
  --border-color: #2d3f54;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --radius: 8px;
  --radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.logo svg {
  color: var(--accent-blue);
}

.main-nav {
  display: flex;
  gap: 32px;
}

.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: var(--accent-blue);
}

/* Hero */
.hero {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 48px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 64px;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Sections */
section {
  padding: 80px 0;
}

section:nth-child(even) {
  background: var(--bg-secondary);
}

h2 {
  font-size: 2rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-intro {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 700px;
}

/* Controls */
.controls {
  margin-bottom: 32px;
}

.search-box {
  margin-bottom: 20px;
}

.search-box input {
  width: 100%;
  max-width: 500px;
  padding: 14px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  padding: 10px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

/* Spectrum Chart */
.spectrum-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.spectrum-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.spectrum-bar:hover {
  transform: translateX(8px);
  border-color: var(--accent-blue);
}

.spectrum-bar.active {
  border-color: var(--accent-blue);
  background: rgba(52, 152, 219, 0.1);
}

.band-fill {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  flex-shrink: 0;
}

.band-label {
  font-weight: 600;
  min-width: 180px;
}

.band-freq {
  color: var(--text-secondary);
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.95rem;
}

/* Band Details */
.band-details {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 32px;
  min-height: 200px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted);
  gap: 16px;
}

.empty-state svg {
  opacity: 0.5;
}

.detail-card h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-card .freq-range {
  font-family: 'SF Mono', Monaco, monospace;
  color: var(--accent-blue);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.detail-section {
  margin-bottom: 24px;
}

.detail-section h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.detail-section p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.detail-section ul {
  list-style: none;
  padding: 0;
}

.detail-section li {
  padding: 6px 0;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
}

.detail-section li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent-blue);
}

.sound-desc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-top: 8px;
}

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

.legal-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 8px;
}

.legal-badge.legal {
  background: rgba(46, 204, 113, 0.2);
  color: var(--accent-green);
}

.legal-badge.caution {
  background: rgba(230, 126, 34, 0.2);
  color: var(--accent-orange);
}

.legal-badge.illegal {
  background: rgba(231, 76, 60, 0.2);
  color: var(--accent-red);
}

/* Equipment Section */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.equipment-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-color);
  transition: transform 0.2s, border-color 0.2s;
}

.equipment-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-blue);
}

.eq-budget {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 12px;
}

.equipment-card h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.equipment-card ul {
  list-style: none;
  margin-bottom: 16px;
}

.equipment-card li {
  padding: 6px 0;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
}

.equipment-card li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--accent-green);
}

.eq-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.antenna-tips {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 32px;
  border-left: 4px solid var(--accent-teal);
}

.antenna-tips h3 {
  margin-bottom: 12px;
  color: var(--accent-teal);
}

.antenna-tips p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Legal Section */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.legal-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-color);
}

.legal-card h3 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.legal-ok h3 {
  color: var(--accent-green);
}

.legal-caution h3 {
  color: var(--accent-orange);
}

.legal-no h3 {
  color: var(--accent-red);
}

.legal-card ul {
  list-style: none;
}

.legal-card li {
  padding: 8px 0;
  color: var(--text-secondary);
  padding-left: 24px;
  position: relative;
}

.legal-ok li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-green);
}

.legal-caution li::before {
  content: '!';
  position: absolute;
  left: 0;
  color: var(--accent-orange);
}

.legal-no li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: var(--accent-red);
}

.legal-note {
  background: rgba(52, 152, 219, 0.1);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.legal-note p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* About Section */
.about-content {
  max-width: 800px;
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
}

.common-mistakes {
  margin-top: 48px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.common-mistakes h3 {
  color: var(--accent-orange);
  margin-bottom: 20px;
}

.common-mistakes ul {
  list-style: none;
}

.common-mistakes li {
  padding: 12px 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  line-height: 1.6;
}

.common-mistakes li:last-child {
  border-bottom: none;
}

.common-mistakes strong {
  color: var(--text-primary);
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-col p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--accent-blue);
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--accent-blue);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }
  
  .main-nav {
    display: none;
  }
  
  .spectrum-bar {
    flex-wrap: wrap;
  }
  
  .band-label {
    min-width: auto;
    width: calc(100% - 40px);
  }
  
  .band-freq {
    margin-left: 40px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .filter-group {
    gap: 8px;
  }
  
  .filter-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  section {
    padding: 48px 0;
  }
  
  .hero {
    padding: 48px 0;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .equipment-grid,
  .legal-grid {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.detail-card {
  animation: fadeIn 0.3s ease;
}

/* Focus styles for accessibility */
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .controls {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .spectrum-bar {
    break-inside: avoid;
  }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
