/* ═══════════════════════════════════════════════════════════════════════════
   ChatGPT Ads Library — Design System (Vanilla CSS)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Custom Properties (Light Mode Default) ────────────────────────────── */
:root {
  /* Brand (Emerald) */
  --brand-50: #ecfdf5;
  --brand-100: #d1fae5;
  --brand-200: #a7f3d0;
  --brand-300: #6ee7b7;
  --brand-400: #34d399;
  --brand-500: #10b981;
  --brand-600: #059669;
  --brand-700: #047857;
  --brand-800: #065f46;
  --brand-900: #064e3b;

  /* Zinc Palette */
  --zinc-50: #f8fafc;
  --zinc-100: #f1f5f9;
  --zinc-200: #e2e8f0;
  --zinc-300: #cbd5e1;
  --zinc-400: #94a3b8;
  --zinc-500: #64748b;
  --zinc-600: #475569;
  --zinc-700: #334155;
  --zinc-800: #1e293b;
  --zinc-900: #0f172a;
  --zinc-950: #020617;

  /* Semantic tokens — Light */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-hover: #f1f5f9;
  --bg-muted: #f1f5f9;
  --bg-badge: #f1f5f9;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);

  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-default: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-subtle: #f1f5f9;
  --border-accent: rgba(16, 185, 129, 0.3);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  --header-bg: rgba(255, 255, 255, 0.88);
  --header-border: #e2e8f0;

  --footer-bg: #f8fafc;
  --footer-border: #e2e8f0;

  --selection-bg: rgba(16, 185, 129, 0.25);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Typography */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-6xl: 3.75rem;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 30px -5px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 200ms;
}

/* ── Dark Mode Properties ──────────────────────────────────────────────── */
.dark {
  /* Zinc Palette Override */
  --zinc-50: #09090b;
  --zinc-100: #121216;
  --zinc-200: #1c1c22;
  --zinc-300: #27272f;
  --zinc-400: #3f3f4a;
  --zinc-500: #71717a;
  --zinc-600: #a1a1aa;
  --zinc-700: #d4d4d8;
  --zinc-800: #18181c;
  --zinc-900: #121216;
  --zinc-950: #09090b;

  /* Semantic tokens — Dark */
  --bg-page: #09090b;
  --bg-surface: #111115;
  --bg-surface-elevated: #18181e;
  --bg-surface-hover: #1c1c24;
  --bg-muted: #18181e;
  --bg-badge: #18181e;
  --bg-card: #111115;
  --bg-input: #0e0e12;
  --bg-glass: rgba(9, 9, 11, 0.85);

  --border: #27272f;
  --border-light: #1f1f26;
  --border-default: #27272f;
  --border-hover: #3f3f4a;
  --border-subtle: #1c1c24;
  --border-accent: rgba(16, 185, 129, 0.25);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #09090b;

  --header-bg: rgba(9, 9, 11, 0.85);
  --header-border: #22222a;

  --footer-bg: #0c0c10;
  --footer-border: #1f1f26;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 35px -5px rgba(0, 0, 0, 0.8);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  transition: background-color var(--duration-normal) var(--ease-default),
              color var(--duration-normal) var(--ease-default);
}

::selection {
  background-color: var(--selection-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

.font-mono {
  font-family: var(--font-mono);
}

/* ── Layout ────────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
}

.container {
  max-width: 80rem;
  margin: 0 auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 640px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM SITE HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--header-border);
  transition: background var(--duration-normal), border-color var(--duration-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.25rem;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.brand-logo:hover .logo-badge {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.logo-icon-svg {
  width: 1.35rem;
  height: 1.35rem;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.brand-title {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-title-accent {
  color: var(--brand-500);
}

.brand-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

/* Pulse Dot */
.pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Nav Menu (Desktop) */
.nav-menu {
  display: none;
  align-items: center;
  gap: 0.375rem;
  background: var(--bg-muted);
  padding: 0.25rem 0.375rem;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(125, 125, 125, 0.08);
}

.nav-item.active {
  color: #ffffff;
  background: var(--brand-500);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

.nav-icon {
  width: 1rem;
  height: 1rem;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.quick-search-btn {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.875rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

@media (min-width: 640px) {
  .quick-search-btn {
    display: inline-flex;
  }
}

.quick-search-btn:hover {
  border-color: var(--brand-500);
  color: var(--text-primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12);
}

.header-action-icon {
  width: 0.95rem;
  height: 0.95rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--brand-500);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.theme-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Theme Icons Toggle Rules */
.theme-icon-sun {
  display: none;
  width: 1.2rem;
  height: 1.2rem;
  color: #fbbf24;
}

.theme-icon-moon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  color: #6366f1;
}

.dark .theme-icon-sun {
  display: block;
}

.dark .theme-icon-moon {
  display: none;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (min-width: 768px) {
  .mobile-menu-toggle-btn {
    display: none;
  }
}

.mobile-menu-toggle-btn:hover {
  border-color: var(--brand-500);
  color: var(--text-primary);
}

.mobile-menu-toggle-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.menu-close-icon {
  display: none;
}

.mobile-menu-toggle-btn[aria-expanded="true"] .menu-open-icon {
  display: none;
}

.mobile-menu-toggle-btn[aria-expanded="true"] .menu-close-icon {
  display: block;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 1rem 0;
  box-shadow: var(--shadow-md);
}

.mobile-drawer.open {
  display: block;
  animation: mobileSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mobileSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 768px) {
  .mobile-drawer {
    display: none !important;
  }
}

.mobile-nav-items {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--bg-muted);
  color: var(--brand-500);
}


/* ── Hero Section ──────────────────────────────────────────────────────── */
.hero {
  margin-bottom: var(--space-8);
  padding-top: var(--space-8);
}

.hero-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .hero-title {
    font-size: var(--text-4xl);
  }
}

.hero-description {
  margin-top: var(--space-2);
  max-width: 42rem;
  color: var(--text-tertiary);
}

.stats-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
  font-size: var(--text-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem var(--space-3);
  border-radius: var(--radius-full);
  background: var(--bg-badge);
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── Filter Bar ────────────────────────────────────────────────────────── */
.filter-bar {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .filter-grid {
    grid-template-columns: 2fr 2fr 1fr 1fr;
  }
}

.filter-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.filter-input,
.filter-select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--duration-fast),
              box-shadow var(--duration-fast);
  appearance: none;
  -webkit-appearance: none;
}

.filter-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2371717a' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.25rem;
  padding-right: 2rem;
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.filter-dates {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
  margin-top: var(--space-4);
}

@media (min-width: 640px) {
  .filter-dates {
    flex-direction: row;
    align-items: flex-end;
  }
}

.filter-dates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  flex: 1;
}

.btn-clear {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: transparent;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color var(--duration-fast),
              color var(--duration-fast);
  white-space: nowrap;
}

.btn-clear:hover {
  background: var(--bg-muted);
}

/* ── Advertiser Select Dropdown ────────────────────────────────────────── */
.adv-select {
  position: relative;
}

.adv-select-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background-color var(--duration-fast);
}

.adv-select-btn:hover {
  background: var(--bg-surface-hover);
}

.adv-select-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adv-select-btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--text-muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--duration-fast);
}

.adv-select-btn.open svg {
  transform: rotate(180deg);
}

.adv-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: var(--space-2);
  max-height: 18rem;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  box-shadow: var(--shadow-lg);
}

.adv-dropdown-search {
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-2);
}

.adv-dropdown-search input {
  width: 100%;
  padding: 0.375rem var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: var(--text-sm);
  outline: none;
}

.adv-dropdown-search input:focus {
  border-color: var(--brand-500);
}

.adv-dropdown-list {
  max-height: 14rem;
  overflow-y: auto;
  padding: var(--space-1);
  scrollbar-width: thin;
  scrollbar-color: rgba(63, 63, 70, 0.6) transparent;
}

.adv-dropdown-list::-webkit-scrollbar {
  width: 6px;
}

.adv-dropdown-list::-webkit-scrollbar-thumb {
  border-radius: 9999px;
  background: rgba(63, 63, 70, 0.6);
}

.adv-dropdown-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: background-color var(--duration-fast);
}

.adv-dropdown-item:hover {
  background: var(--bg-muted);
}

.adv-dropdown-item .count {
  flex-shrink: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.adv-dropdown-empty {
  padding: var(--space-4) var(--space-3);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ── Results Bar ───────────────────────────────────────────────────────── */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-6);
}

.results-text {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.results-text strong {
  font-weight: 500;
  color: var(--text-primary);
}

/* ── Ad Grid ───────────────────────────────────────────────────────────── */
.ad-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

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

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

@media (min-width: 1280px) {
  .ad-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── Ad Card ───────────────────────────────────────────────────────────── */
.ad-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-normal) var(--ease-default),
              border-color var(--duration-normal) var(--ease-default),
              box-shadow var(--duration-normal) var(--ease-default);
}

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

.ad-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-muted);
}

.ad-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 300ms var(--ease-default);
}

.ad-card:hover .ad-card-image img {
  transform: scale(1.03);
}

.ad-card-image .no-image {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.impression-badge {
  position: absolute;
  right: var(--space-2);
  top: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  font-size: var(--text-xs);
  font-weight: 500;
  color: white;
}

.ad-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.625rem;
  padding: var(--space-4);
}

.ad-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ad-card-meta .adv-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.ad-card-meta .domain {
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.ad-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: var(--leading-snug);
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-card-desc {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-card-date {
  margin-top: auto;
  padding-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Advertiser Logo (shared) ──────────────────────────────────────────── */
.adv-logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  font-weight: 600;
  color: var(--text-tertiary);
}

.adv-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.adv-logo.sm {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 10px;
}

.adv-logo.md {
  width: 2.5rem;
  height: 2.5rem;
  font-size: var(--text-sm);
}

.adv-logo.lg {
  width: 4rem;
  height: 4rem;
  font-size: var(--text-xl);
}

/* ── Pagination ────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border-top: 1px solid var(--border-default);
  padding-top: var(--space-6);
  margin-top: var(--space-8);
}

@media (min-width: 640px) {
  .pagination {
    flex-direction: row;
  }
}

.pagination-info {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.pagination-info strong {
  font-weight: 500;
  color: var(--text-primary);
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: transparent;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color var(--duration-fast),
              color var(--duration-fast);
  text-decoration: none;
}

.page-btn:hover:not(.disabled):not(.active) {
  background: var(--bg-muted);
}

.page-btn.active {
  background: var(--brand-500);
  color: white;
  border-color: var(--brand-500);
  pointer-events: none;
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.page-ellipsis {
  padding: 0 var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ── Empty State ───────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-20) 0;
  text-align: center;
}

.empty-state svg {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--border-hover);
}

.empty-state h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.empty-state p {
  max-width: 24rem;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ── Ad Detail Page ────────────────────────────────────────────────────── */
.detail-page {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: var(--space-6);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.breadcrumb a {
  transition: color var(--duration-fast);
}

.breadcrumb a:hover {
  color: var(--text-primary);
}

.breadcrumb .current {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.detail-image {
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  background: var(--bg-surface);
}

.detail-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.detail-image .no-image {
  display: flex;
  aspect-ratio: 16 / 9;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.detail-advertiser {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
}

.detail-advertiser .info {
  flex: 1;
  min-width: 0;
}

.detail-advertiser .name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.detail-advertiser .domain {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.detail-advertiser .view-link {
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--brand-500);
  transition: color var(--duration-fast);
}

.detail-advertiser .view-link:hover {
  color: var(--brand-600);
}

.detail-copy {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

.detail-description {
  margin-top: var(--space-3);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

.detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .detail-stats {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.stat-card {
  padding: var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
}

.stat-card dt {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.stat-card dd {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.stat-card dd a {
  transition: color var(--duration-fast);
}

.stat-card dd a:hover {
  color: var(--brand-500);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.625rem var(--space-5);
  border: none;
  border-radius: var(--radius-lg);
  background: var(--brand-500);
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: background-color var(--duration-fast);
  text-decoration: none;
  width: fit-content;
}

.btn-primary:hover {
  background: var(--brand-600);
}

.btn-primary svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Related Ads Section */
.related-section {
  margin-top: var(--space-16);
  border-top: 1px solid var(--border-default);
  padding-top: var(--space-10);
}

.related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.related-header h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.related-header p {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.related-header .view-all {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--brand-500);
  white-space: nowrap;
  transition: color var(--duration-fast);
}

.related-header .view-all:hover {
  color: var(--brand-600);
}

.related-header .view-all svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Advertiser Detail Page ────────────────────────────────────────────── */
.advertiser-profile {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-6);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  background: var(--bg-surface);
  margin-top: var(--space-6);
}

@media (min-width: 640px) {
  .advertiser-profile {
    flex-direction: row;
    align-items: center;
  }
}

.advertiser-profile .profile-info {
  flex: 1;
  min-width: 0;
}

.advertiser-profile .profile-info h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.advertiser-profile .profile-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--brand-500);
  transition: color var(--duration-fast);
}

.advertiser-profile .profile-link:hover {
  color: var(--brand-600);
}

.advertiser-profile .profile-link svg {
  width: 0.875rem;
  height: 0.875rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  font-size: var(--text-sm);
}

.profile-stats dt {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.profile-stats dd {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.ads-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-8);
}

.ads-header h2 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Advertisers Grid ──────────────────────────────────────────────────── */
.advertisers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

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

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

@media (min-width: 1280px) {
  .advertisers-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.advertiser-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-normal) var(--ease-default),
              border-color var(--duration-normal) var(--ease-default),
              box-shadow var(--duration-normal) var(--ease-default);
}

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

.advertiser-card .card-info {
  flex: 1;
  min-width: 0;
}

.advertiser-card h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.advertiser-card .card-domain {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.advertiser-card .card-stats {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Advertisers page controls */
.advertisers-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .advertisers-controls {
    flex-direction: row;
    align-items: center;
  }
}

.advertisers-controls .search-form {
  width: 100%;
}

@media (min-width: 640px) {
  .advertisers-controls .search-form {
    width: 16rem;
  }
}

/* ── About Page ────────────────────────────────────────────────────────── */
.about-page {
  max-width: 48rem;
  margin: 0 auto;
  padding: var(--space-12) var(--space-4);
}

@media (min-width: 640px) {
  .about-page {
    padding: var(--space-12) var(--space-6);
  }
}

.about-page h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.about-intro {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  color: var(--text-secondary);
}

.about-page h2 {
  margin-top: var(--space-10);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.how-to-list {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  color: var(--text-secondary);
}

.how-to-step {
  display: flex;
  gap: var(--space-3);
}

.step-number {
  display: flex;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--brand-500);
  font-size: var(--text-xs);
  font-weight: 700;
  color: white;
}

.step-name {
  font-weight: 500;
  color: var(--text-primary);
}

.about-cta {
  margin-top: var(--space-6);
  color: var(--text-secondary);
}

.about-cta a {
  font-weight: 500;
  color: var(--brand-500);
  transition: color var(--duration-fast);
}

.about-cta a:hover {
  color: var(--brand-600);
}

.faq-list {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.faq-item {
  padding: var(--space-5);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
}

.faq-item h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

.faq-item p {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

.disclaimer-box {
  margin-top: var(--space-10);
  padding: var(--space-5);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.disclaimer-box strong {
  color: var(--text-secondary);
}

/* ── 404 Page ──────────────────────────────────────────────────────────── */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 36rem;
  margin: 0 auto;
  padding: var(--space-24) var(--space-4);
  text-align: center;
}

.not-found .code {
  font-size: var(--text-6xl);
  font-weight: 800;
  color: var(--brand-500);
}

.not-found h1 {
  margin-top: var(--space-4);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
}

.not-found p {
  margin-top: var(--space-2);
  color: var(--text-tertiary);
}

.not-found .btn-primary {
  margin-top: var(--space-6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM SITE FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  padding: 4.5rem 0 2rem;
  margin-top: auto;
  overflow: hidden;
}

.footer-top-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--brand-500) 50%, transparent 100%);
  opacity: 0.8;
}

.footer-content {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

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

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
    gap: 3rem;
  }
}

/* Col 1: Brand & Mission */
.footer-brand-col {
  display: flex;
  flex-direction: column;
}

.footer-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.125rem;
  text-decoration: none;
}

.logo-badge-sm {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
}

.footer-brand-name {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.footer-mission-text {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  max-width: 24rem;
}

.footer-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-500);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.35rem 0.875rem;
  border-radius: 9999px;
  width: fit-content;
}

/* Col 2 & 3: Nav Columns */
.footer-nav-col {
  display: flex;
  flex-direction: column;
}

.footer-col-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links-list a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-block;
}

.footer-links-list a:hover {
  color: var(--brand-500);
  transform: translateX(3px);
}

/* Col 4: Metrics Card */
.footer-stats-col {
  display: flex;
  flex-direction: column;
}

.footer-metrics-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.375rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
}

.metric-label {
  color: var(--text-tertiary);
  font-weight: 500;
}

.metric-value {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.metric-status-row {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

.metric-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--brand-500);
}

.status-indicator {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

/* Footer Bottom Bar */
.footer-bottom-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-bottom-bar {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.footer-bottom-legal {
  max-width: 48rem;
}

.footer-disclaimer-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

.footer-disclaimer-text strong {
  color: var(--text-secondary);
}

.footer-copyright-text {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.footer-bottom-actions {
  display: flex;
  align-items: center;
}

.back-to-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.back-to-top-btn:hover {
  border-color: var(--brand-500);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.back-to-top-btn svg {
  width: 0.95rem;
  height: 0.95rem;
}

/* ── Loading Spinner ───────────────────────────────────────────────────── */
.spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-20) 0;
}

.spinner::after {
  content: '';
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border-default);
  border-top-color: var(--brand-500);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ── Fade In Animation ─────────────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.35s ease-out;
}

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: rgba(63, 63, 70, 0.6) transparent;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  border-radius: 9999px;
  background-color: rgba(63, 63, 70, 0.6);
}

/* ── Screen Reader Only ────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Global Layout & Typography ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (min-width: 768px) {
  .container { padding-left: 2rem; padding-right: 2rem; }
}

/* ── Utilities left over from Tailwind ───────────────────────────────────── */
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.max-w-lg { max-width: 32rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.text-emerald { color: var(--brand-500); }
.font-bold { font-weight: 700; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-muted { color: var(--text-muted) !important; }
.bg-surface { background-color: var(--bg-page); }
.text-main { color: var(--text-primary); }
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── Form Elements ──────────────────────────────────────────────────────── */
.form-select {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border-radius: var(--radius-lg);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2371717a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
.filter-select-sm {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.875rem;
}

/* ── SVG Icons ──────────────────────────────────────────────────────────── */
svg.icon { width: 1.25rem; height: 1.25rem; }
svg.icon-sm { width: 1rem; height: 1rem; }
.badge-icon { width: 0.875rem; height: 0.875rem; margin-right: 0.375rem; }

/* ── Avatars & Hero Images ──────────────────────────────────────────────── */
.advertiser-avatar img, .adv-hero-left img {
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--bg-muted);
}

/* ── Grids ──────────────────────────────────────────────────────────────── */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ── Breadcrumbs ────────────────────────────────────────────────────────── */
.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 2.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
}
.breadcrumb-bar a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.breadcrumb-bar a:hover {
  color: var(--brand-500);
}
.breadcrumb-sep {
  color: var(--text-muted);
}
.breadcrumb-current {
  color: var(--brand-500);
  font-weight: 600;
}

/* ── Ad Detail Page ─────────────────────────────────────────────────────── */
.ad-detail-layout {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .ad-detail-layout {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: flex-start;
  }
}
.ad-detail-media-card, .ad-detail-no-media {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.ad-detail-no-media {
  padding: 6rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border-default);
}
.detail-full-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  background: var(--bg-page);
  max-height: 75vh;
}
.media-card-actions {
  padding: 1.25rem;
  border-top: 1px solid var(--border-default);
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: flex-end;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ad-detail-media-card:hover .media-card-actions {
  opacity: 1;
}

.ad-detail-info-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.ad-detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}
.detail-advertiser-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}
.detail-advertiser-profile {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s;
}
.detail-advertiser-profile:hover {
  transform: translateX(4px);
  opacity: 0.9;
}
.detail-advertiser-name {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}
.detail-advertiser-domain {
  color: var(--brand-500);
  font-size: 0.9375rem;
  margin-top: 0.375rem;
  display: block;
}
.detail-section {
  margin-bottom: 2.5rem;
}
.detail-section-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-weight: 700;
}
.detail-copy-box {
  background: var(--bg-page);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--brand-500);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.04);
}
.detail-copy-content {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0;
  white-space: pre-wrap;
  font-weight: 500;
}
.detail-desc-box {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border-subtle);
}
.detail-desc-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.75rem;
}
.detail-desc-content {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}
.meta-data-table {
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  padding: 0 1.5rem;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.meta-row:last-child {
  border-bottom: none;
}
.meta-key {
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.meta-val {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--brand-500);
  text-decoration: none;
  transition: color 0.2s;
}
.external-link:hover {
  color: var(--brand-600);
}
.detail-actions-bar {
  margin-top: 3rem;
  display: flex;
  gap: 1rem;
}
.related-heading {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* ── Advertiser Detail Page ─────────────────────────────────────────────── */
.advertiser-hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  padding: 3rem;
  margin-bottom: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.advertiser-hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-500), transparent);
  opacity: 0.8;
}
@media (min-width: 1024px) {
  .advertiser-hero-card {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding: 4rem;
  }
}
.adv-hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .adv-hero-left {
    flex-direction: row;
  }
}
.adv-hero-titles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.adv-hero-name {
  font-size: 3rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.adv-hero-domain {
  font-size: 1.25rem;
  color: var(--brand-500);
  font-weight: 500;
}
.adv-hero-stats {
  display: flex;
  gap: 3rem;
  background: var(--bg-muted);
  padding: 2rem 3rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
}
.hero-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brand-500);
  line-height: 1.1;
}
.hero-stat-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 600;
}
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.section-title {
  font-size: 1.875rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-2xl);
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MISSING CLASSES: Tailwind utility replacements
   ═══════════════════════════════════════════════════════════════════════════ */
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.w-full { width: 100%; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-semibold { font-weight: 600; }
.animate-fade-in {
  animation: fadeIn 0.4s ease-out both;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MISSING CLASSES: Buttons
   ═══════════════════════════════════════════════════════════════════════════ */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-md);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  cursor: pointer;
}
.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MISSING CLASSES: Icons
   ═══════════════════════════════════════════════════════════════════════════ */
.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MISSING CLASSES: Hero Section (Homepage)
   ═══════════════════════════════════════════════════════════════════════════ */
.hero-section {
  background: linear-gradient(160deg, var(--bg-page), var(--bg-surface) 50%, var(--bg-page));
  border-bottom: 1px solid var(--border-default);
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse, rgba(16, 185, 129, 0.12), transparent 70%);
  pointer-events: none;
}
.hero-container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--brand-500);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}
.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 36rem;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}
.hero-description {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 auto;
  line-height: 1.5;
}
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 40rem;
  margin: 3rem auto 0;
}
.hero-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s;
}
.hero-stat-card:hover {
  border-color: var(--brand-500);
  transform: translateY(-2px);
}
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-500);
  line-height: 1.2;
  display: block;
}
.stat-title {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.375rem;
  display: block;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MISSING CLASSES: Search & Filter Bar
   ═══════════════════════════════════════════════════════════════════════════ */
.search-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) {
  .search-filter-bar {
    flex-direction: row;
    align-items: center;
  }
}
.search-box-wrapper {
  position: relative;
  flex: 1;
}
.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--bg-page);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input::placeholder {
  color: var(--text-muted);
}
.search-input:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.125rem;
  height: 1.125rem;
  color: var(--text-muted);
  pointer-events: none;
}
.filter-controls-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.filter-select {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border-radius: var(--radius-lg);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2371717a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* ── Results Header ─────────────────────────────────────────────────────── */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.results-count {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MISSING CLASSES: Pagination
   ═══════════════════════════════════════════════════════════════════════════ */
.pagination-root {
  display: flex;
  justify-content: center;
}
.pagination-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.pagination-btn:hover:not(:disabled) {
  background: var(--bg-muted);
  border-color: var(--brand-500);
  transform: translateY(-1px);
}
.pagination-btn:disabled, .pagination-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}
.pagination-pages {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.pagination-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s;
}
.pagination-page-btn:hover {
  color: var(--text-primary);
  background: var(--bg-muted);
  border-color: var(--brand-500);
}
.pagination-page-btn.active,
.pagination-page-btn[aria-current="page"] {
  color: white;
  background: var(--brand-500);
  border-color: var(--brand-500);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}
.pagination-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  color: var(--text-muted);
  font-size: 1rem;
  user-select: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MISSING CLASSES: Page Title & Subtitle (global)
   ═══════════════════════════════════════════════════════════════════════════ */
.page-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}
.page-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}
.page-hero-section {
  text-align: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 3rem;
}
.not-found-code {
  color: var(--brand-500);
  text-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MISSING CLASSES: Sort Form
   ═══════════════════════════════════════════════════════════════════════════ */
.sort-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MISSING CLASSES: Advertiser Cards (Directory Grid)
   ═══════════════════════════════════════════════════════════════════════════ */
.advertisers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.advertiser-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.advertiser-card:hover {
  border-color: var(--brand-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.adv-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.5rem 0;
}
.adv-card-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.adv-card-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adv-card-domain {
  font-size: 0.8125rem;
  color: var(--brand-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adv-card-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
.adv-stats-row {
  display: flex;
  gap: 0.75rem;
}
.adv-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.875rem;
}
.adv-stat-val {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.adv-stat-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 0.125rem;
}
.adv-activity {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.adv-link-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-500);
}
.badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--brand-500);
  display: inline-block;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MISSING CLASSES: About Page
   ═══════════════════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, transform 0.25s;
}
.card:hover {
  border-color: var(--brand-500);
  transform: translateY(-2px);
}
.card-icon-box {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  color: var(--brand-500);
}
.card-icon-box svg {
  width: 1.5rem;
  height: 1.5rem;
}
.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}
.card-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* FAQ */
.faq-section {
  margin-top: 4rem;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
}
.faq-item:hover {
  border-color: var(--brand-500);
}
.faq-item h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}
.faq-item p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Disclaimer */
.disclaimer-callout {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-top: 3rem;
}
.disclaimer-callout h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-500);
  margin: 0 0 0.75rem;
}
.disclaimer-callout p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Browse Section */
.browse-section {
  margin-top: 4rem;
  text-align: center;
}
.browse-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.browse-section p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Empty state details */
.empty-state-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}
.empty-state-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

/* Pagination direction classes */
.pagination-prev svg,
.pagination-next svg {
  width: 1rem;
  height: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SSR AD CARD COMPONENTS
   These classes are used by the Cloudflare Pages Functions SSR templates.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Advertiser Avatar System ───────────────────────────────────────────── */
.advertiser-avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--bg-muted);
  border: 2px solid var(--border-default);
}
.advertiser-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-sm {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.6875rem;
}
.avatar-md {
  width: 3rem;
  height: 3rem;
  font-size: 0.875rem;
}
.avatar-lg {
  width: 4.5rem;
  height: 4.5rem;
  font-size: 1.25rem;
}
.avatar-xl {
  width: 6rem;
  height: 6rem;
  font-size: 1.75rem;
}
.avatar-fallback {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  border-color: var(--brand-600);
}
.avatar-initials {
  font-weight: 700;
  color: white;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}

/* ── Ad Card: Container & Header ────────────────────────────────────────── */
.ad-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.ad-card:hover {
  border-color: var(--brand-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.ad-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}
.ad-advertiser-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
  flex: 1;
  transition: opacity 0.2s;
}
.ad-advertiser-link:hover {
  opacity: 0.85;
}
.ad-advertiser-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.ad-advertiser-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-domain {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-date-badge {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-muted);
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  border: 1px solid var(--border-light);
  white-space: nowrap;
}

/* ── Ad Card: Media ─────────────────────────────────────────────────────── */
.ad-media-wrapper {
  position: relative;
  overflow: hidden;
  background: var(--bg-page);
}
.ad-media-link {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.ad-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ad-card:hover .ad-media-img {
  transform: scale(1.04);
}

/* ── Ad Card: Body ──────────────────────────────────────────────────────── */
.ad-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ad-copy-text {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ad-copy-text a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}
.ad-copy-text a:hover {
  color: var(--brand-500);
}
.ad-description-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Ad Card: Footer ────────────────────────────────────────────────────── */
.ad-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}
.ad-impressions-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.ad-impressions-badge .badge-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  color: var(--brand-500);
}
.ad-actions {
  display: flex;
  gap: 0.5rem;
}


/* ── Categories Index & Detail Pages ───────────────────────────────────── */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-4);
  padding: var(--space-4) 0;
}
@media (min-width: 640px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
}
@media (min-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
}

.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  transition: all var(--duration-normal) var(--ease-default);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  z-index: 1;
}
.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand-500) 0%, transparent 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--duration-normal) var(--ease-default);
}
.category-card:hover {
  border-color: var(--brand-400);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), 0 0 20px -5px var(--border-accent);
}
.category-card:hover::before {
  opacity: 0.05;
}
.dark .category-card:hover::before {
  opacity: 0.1;
}

.category-card-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background-color: var(--bg-muted);
  color: var(--brand-500);
  margin-bottom: var(--space-4);
  transition: background-color var(--duration-normal) var(--ease-default),
              color var(--duration-normal) var(--ease-default);
}
.category-card:hover .category-card-icon-wrap {
  background-color: var(--brand-500);
  color: #fff;
}
.category-card-icon {
  width: 24px;
  height: 24px;
}

.category-card-content {
  flex: 1;
}
.category-card-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.category-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-card-stats {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-light);
}
.category-stat {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}
.category-stat strong {
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-mono);
}
.category-stat-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--border-default);
}

.category-card-arrow {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-10px);
  transition: all var(--duration-normal) var(--ease-default);
}
.category-card:hover .category-card-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--brand-500);
}

/* Category Detail Hero */
.category-hero-section {
  position: relative;
  padding: var(--space-12) 0 var(--space-8);
  border-bottom: 1px solid var(--border-default);
  background-color: var(--bg-surface);
  overflow: hidden;
}
.category-hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(16,185,129,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.dark .category-hero-section::after {
  background: radial-gradient(circle at top right, rgba(16,185,129,0.15) 0%, transparent 60%);
}
.category-hero-content {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.category-hero-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  line-height: var(--leading-tight);
}
@media (min-width: 640px) {
  .category-hero-title { font-size: var(--text-6xl); }
}
.category-hero-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
}
.category-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

/* Category Top Advertisers Row */
.category-advertisers-section {
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-10);
  border-bottom: 1px solid var(--border-light);
}
.category-advertisers-row {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding: var(--space-2) 0 var(--space-4);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.category-advertisers-row::-webkit-scrollbar {
  height: 6px;
}
.category-advertisers-row::-webkit-scrollbar-track {
  background: var(--bg-muted);
  border-radius: var(--radius-full);
}
.category-advertisers-row::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: var(--radius-full);
}
.category-adv-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  text-decoration: none;
  scroll-snap-align: start;
  transition: all var(--duration-fast) var(--ease-default);
  box-shadow: var(--shadow-sm);
}
.category-adv-chip:hover {
  border-color: var(--brand-400);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background-color: var(--bg-surface-hover);
}
.category-adv-chip-info {
  display: flex;
  flex-direction: column;
}
.category-adv-chip-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}
.category-adv-chip-meta {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Breadcrumbs overrides */
.breadcrumbs-bar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-3) 0;
}
.breadcrumbs-list {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.breadcrumbs-list li {
  display: flex;
  align-items: center;
}
.breadcrumbs-list li:not(:last-child)::after {
  content: '/';
  margin-left: var(--space-2);
  color: var(--border-hover);
}
.breadcrumbs-list a {
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-default);
}
.breadcrumbs-list a:hover {
  color: var(--brand-500);
}
.breadcrumbs-list [aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}
