/* ============ VARIABLES ============ */
:root {
  --bg: #fafafa;
  --text: #111;
  --text-muted: #777;
  --border: #eee;
  --accent: #6366f1;
  --accent-light: #eef2ff;
  --card-hover: #f8f8ff;
  --radius: 10px;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============ NAV ============ */
.nav {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.nav-inner {
  max-width: 960px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-weight: 700; font-size: 1.05rem;
}
.nav-links { display: flex; gap: 20px; }
.nav-links a {
  font-size: 0.82rem; color: var(--text-muted);
  font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ============ HERO ============ */
.hero {
  max-width: 960px; margin: 0 auto;
  padding: 48px 20px 32px; text-align: center;
}
.hero h1 {
  font-size: 2.4rem; font-weight: 700;
  letter-spacing: -0.8px; line-height: 1.2;
  margin-bottom: 10px;
}
.accent { color: var(--accent); }
.hero-sub {
  color: var(--text-muted); font-size: 1rem;
  margin-bottom: 28px;
}

/* ============ SEARCH ============ */
.search-bar {
  max-width: 480px; margin: 0 auto 20px;
  position: relative;
}
.search-bar input {
  width: 100%; padding: 14px 44px 14px 18px;
  border: 1.5px solid var(--border); border-radius: 50px;
  font-family: inherit; font-size: 0.92rem;
  background: #fff; transition: border-color 0.2s;
}
.search-bar input:focus {
  outline: none; border-color: var(--accent);
}
.search-icon {
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%); font-size: 1rem;
  pointer-events: none;
}

/* ============ TAGS ============ */
.tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-bottom: 8px;
}
.tag {
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--border); background: #fff;
  font-family: inherit; font-size: 0.78rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
  color: var(--text-muted);
}
.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag.active {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}

/* ============ STATS BAR ============ */
.stats-bar {
  max-width: 960px; margin: 0 auto;
  padding: 12px 20px;
  display: flex; gap: 24px; justify-content: center;
  border-bottom: 1px solid var(--border);
}
.stats-bar .stat {
  font-size: 0.78rem; color: var(--text-muted);
}
.stats-bar .stat span {
  font-weight: 700; color: var(--text);
}

/* ============ TABLE ============ */
.container {
  max-width: 960px; margin: 0 auto; padding: 0 20px 60px;
}
.table-header {
  display: grid;
  grid-template-columns: 40px 1fr 180px 120px 40px;
  padding: 12px 16px; gap: 8px;
  font-size: 0.72rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

/* ============ ROWS ============ */
.biz-row {
  display: grid;
  grid-template-columns: 40px 1fr 180px 120px 40px;
  padding: 14px 16px; gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  text-decoration: none; color: var(--text);
}
.biz-row:hover { background: var(--card-hover); }
.biz-rank {
  font-size: 0.82rem; font-weight: 600;
  color: var(--text-muted);
}
.biz-name {
  font-weight: 600; font-size: 0.92rem;
}
.biz-city {
  font-size: 0.75rem; color: var(--text-muted);
  font-weight: 400;
}
.biz-cat {
  font-size: 0.78rem; color: var(--accent);
  font-weight: 500;
}
.biz-dept {
  font-size: 0.75rem;
  padding: 3px 10px; border-radius: 20px;
  background: var(--accent-light); color: var(--accent);
  font-weight: 600; text-align: center;
  display: inline-block;
}
.biz-arrow {
  font-size: 0.9rem; color: var(--text-muted);
  transition: transform 0.2s;
}
.biz-row:hover .biz-arrow { transform: translateX(3px); color: var(--accent); }

/* Top 3 highlight */
.biz-row[data-rank="1"] .biz-rank::before { content: '🥇 '; }
.biz-row[data-rank="2"] .biz-rank::before { content: '🥈 '; }
.biz-row[data-rank="3"] .biz-rank::before { content: '🥉 '; }
.biz-row[data-rank="1"] .biz-rank,
.biz-row[data-rank="2"] .biz-rank,
.biz-row[data-rank="3"] .biz-rank { color: transparent; font-size: 0; }
.biz-row[data-rank="1"] .biz-rank::before,
.biz-row[data-rank="2"] .biz-rank::before,
.biz-row[data-rank="3"] .biz-rank::before { font-size: 1.1rem; }

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center; padding: 40px 0;
  color: var(--text-muted); font-size: 0.9rem;
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px; text-align: center;
}
.footer p { font-size: 0.82rem; color: var(--text-muted); }
.footer-copy { margin-top: 4px; font-size: 0.72rem; }
.footer a { color: var(--accent); }

/* ============ RESPONSIVE ============ */
@media (max-width: 700px) {
  .hero h1 { font-size: 1.7rem; }
  .table-header { display: none; }
  .biz-row {
    grid-template-columns: 32px 1fr auto;
    grid-template-rows: auto auto;
    padding: 12px;
  }
  .biz-cat { grid-column: 2; font-size: 0.72rem; }
  .biz-dept { display: none; }
  .biz-arrow { display: none; }
  .stats-bar { flex-wrap: wrap; gap: 12px; }
}

/* ============ FLOATING SIDE CARDS ============ */
.floating-cards {
  position: fixed; top: 120px;
  display: flex; flex-direction: column; gap: 16px;
  z-index: 0; pointer-events: none;
}
.floating-left { left: 16px; }
.floating-right { right: 16px; }

.float-card {
  width: 180px; padding: 14px 16px;
  border-radius: 12px; border: 1px solid var(--border);
  font-size: 0.75rem; line-height: 1.5;
  pointer-events: auto;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none; color: var(--text);
  display: block;
}
.float-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.float-card-name {
  font-weight: 700; font-size: 0.82rem;
  margin-bottom: 3px; display: flex; align-items: center; gap: 6px;
}
.float-card-cat { color: var(--text-muted); font-size: 0.7rem; }
.float-card-badge {
  display: inline-block; margin-top: 6px;
  font-size: 0.65rem; font-weight: 600;
  padding: 2px 8px; border-radius: 10px;
}

/* Pastel colors for cards */
.float-card.pastel-pink { background: #fdf2f8; border-color: #fbcfe8; }
.float-card.pastel-pink .float-card-badge { background: #fbcfe8; color: #be185d; }
.float-card.pastel-blue { background: #eff6ff; border-color: #bfdbfe; }
.float-card.pastel-blue .float-card-badge { background: #bfdbfe; color: #1d4ed8; }
.float-card.pastel-green { background: #f0fdf4; border-color: #bbf7d0; }
.float-card.pastel-green .float-card-badge { background: #bbf7d0; color: #15803d; }
.float-card.pastel-purple { background: #faf5ff; border-color: #e9d5ff; }
.float-card.pastel-purple .float-card-badge { background: #e9d5ff; color: #7e22ce; }
.float-card.pastel-amber { background: #fffbeb; border-color: #fde68a; }
.float-card.pastel-amber .float-card-badge { background: #fde68a; color: #b45309; }
.float-card.pastel-teal { background: #f0fdfa; border-color: #99f6e4; }
.float-card.pastel-teal .float-card-badge { background: #99f6e4; color: #0f766e; }

/* Hide on smaller screens where they'd overlap content */
@media (max-width: 1280px) {
  .floating-cards { display: none; }
}
