/* ==========================================================================
   seolinkslist.in - Modern Design System & Stylesheet
   ========================================================================== */

:root {
  /* Color Palette - Clean White / Light Theme (Default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-input: #f1f5f9;
  --border-color: #e2e8f0;
  --border-hover: rgba(79, 70, 229, 0.45);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --accent-indigo: #4f46e5;
  --accent-purple: #7c3aed;
  --accent-cyan: #0891b2;
  --accent-emerald: #059669;
  --accent-rose: #e11d48;
  --accent-amber: #d97706;
  
  --gradient-brand: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #0891b2 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.12) 0%, rgba(8, 145, 178, 0.05) 50%, transparent 75%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 20px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 14px 32px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 24px rgba(79, 70, 229, 0.2);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.75);
  --bg-input: #1e293b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  
  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.22) 0%, rgba(139, 92, 246, 0.08) 45%, transparent 70%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.3);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glowing Top Background Canvas */
.bg-ambient-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 650px;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition);
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
  transition: var(--transition);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.025em;
  text-decoration: none;
  line-height: 1.2;
}

/* Hide only the brand icon inside .brand-logo, NOT nav link icons */
.brand-icon {
  display: none !important;
}

.brand-text {
  font-weight: 800;
  font-size: 1.38rem;
  letter-spacing: -0.025em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.brand-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-indigo);
}

/* ==========================================================================
   Navigation Dropdown & Mega-Menu (Unified for all pages)
   ========================================================================== */
.main-nav, .nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-item, .nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.4rem 0.25rem;
}

.nav-item:hover, .nav-link:hover,
.nav-item.active, .nav-link.active {
  color: var(--accent-indigo);
}

.nav-dropdown-item, .nav-dropdown-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  list-style: none;
}

.nav-dropdown-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  padding: 0.4rem 0.25rem;
  transition: var(--transition);
}

.nav-dropdown-btn:hover, 
.nav-dropdown-item:hover .nav-dropdown-btn,
.nav-dropdown-wrap:hover .nav-dropdown-btn {
  color: var(--accent-indigo);
}

.nav-dropdown-arrow {
  font-size: 0.72rem;
  transition: transform 0.25s ease;
}

.nav-dropdown-item:hover .nav-dropdown-arrow,
.nav-dropdown-wrap:hover .nav-dropdown-arrow {
  transform: rotate(180deg);
}

/* Floating Mega Menu Panels */
.nav-dropdown-menu, .mega-menu-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  width: 780px;
  max-width: 92vw;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 250;
}

.nav-dropdown-menu::before, .mega-menu-panel::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 0;
  right: 0;
  height: 20px;
}

.nav-dropdown-item:hover .nav-dropdown-menu,
.nav-dropdown-wrap:hover .mega-menu-panel,
.nav-dropdown-menu.active,
.mega-menu-panel.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(8px);
}

/* 2-Column Grid (Index Dropdown) */
.dropdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.dropdown-link-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.dropdown-link-card:hover {
  background: var(--bg-input);
  border-color: var(--border-hover);
  transform: translateX(2px);
}

.dropdown-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(79, 70, 229, 0.12);
  color: var(--accent-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.dropdown-link-card:hover .dropdown-icon {
  background: var(--accent-indigo);
  color: #ffffff;
}

.dropdown-text {
  display: flex;
  flex-direction: column;
}

.dropdown-text strong {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.2rem;
}

.dropdown-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* 3-Column Mega Menu (Category & Country Pages) */
.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.mega-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mega-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.mega-link {
  font-size: 0.86rem;
  color: var(--text-secondary);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: var(--transition);
}

.mega-link i {
  color: var(--accent-indigo);
  font-size: 0.8rem;
  width: 16px;
  text-align: center;
}

.mega-link:hover {
  background: var(--bg-input);
  color: var(--accent-indigo);
  transform: translateX(3px);
}

.mobile-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.theme-toggle-btn:hover {
  color: var(--accent-indigo);
  border-color: var(--border-hover);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--gradient-brand);
  color: #ffffff;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  color: var(--accent-indigo);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-pill-badge .dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  max-width: 950px;
  margin: 0 auto 1.25rem;
  letter-spacing: -0.03em;
}

.hero-title .gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto 2.25rem;
}

/* Hero Live Search Box */
.hero-search-wrapper {
  max-width: 780px;
  margin: 0 auto 2rem;
  position: relative;
}

.search-box-glow {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.5rem 0.75rem 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  backdrop-filter: blur(12px);
}

.search-box-glow:focus-within {
  border-color: var(--accent-indigo);
  box-shadow: var(--shadow-glow);
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
}

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

.search-clear-btn {
  color: var(--text-muted);
  font-size: 1.25rem;
  padding: 0.25rem 0.5rem;
  display: none;
}

.search-clear-btn.visible {
  display: block;
}

.search-shortcut-badge {
  font-size: 0.75rem;
  background: var(--bg-input);
  color: var(--text-muted);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* Quick Filter Suggestion Chips */
.quick-tags-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.quick-tag-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.quick-chip {
  padding: 0.35rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.quick-chip:hover, .quick-chip.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

/* Live Stats Bar */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 980px;
  margin: 0 auto;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-val {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-val.gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-lbl {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* ==========================================================================
   Category Tab Navigation
   ========================================================================== */
.category-nav-section {
  padding: 1rem 0 1.5rem;
  position: sticky;
  top: 65px;
  z-index: 90;
  background: var(--bg-primary);
  transition: var(--transition);
}

.category-scroll-container {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.category-scroll-container::-webkit-scrollbar {
  height: 5px;
}

.category-scroll-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.cat-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.cat-tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.cat-tab-btn.active {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.cat-tab-btn .cat-count {
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  font-weight: 700;
}

.cat-tab-btn:not(.active) .cat-count {
  background: var(--bg-input);
  color: var(--text-muted);
}

/* ==========================================================================
   Toolbar Controls (Filters, Sorting, View Switcher)
   ========================================================================== */
.toolbar-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.filter-select:hover, .filter-select:focus {
  border-color: var(--border-hover);
}

.filter-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* High Blue Instant Only Toggle Button */
.toggle-switch-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  background: rgba(37, 99, 235, 0.08);
  border: 1.5px solid rgba(37, 99, 235, 0.4);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  transition: all 0.25s ease;
}

.toggle-switch-wrapper:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: #2563eb;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.35);
}

.toggle-switch-wrapper input {
  display: none;
}

.toggle-slider {
  width: 34px;
  height: 18px;
  background-color: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(37, 99, 235, 0.45);
  border-radius: var(--radius-full);
  position: relative;
  transition: all 0.25s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 2px;
  width: 14px;
  height: 14px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
}

.toggle-switch-wrapper input:checked + .toggle-slider {
  background: #1d4ed8;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-color: #1d4ed8;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.65);
}

.toggle-switch-wrapper input:checked + .toggle-slider::before {
  transform: translateX(16px);
  background-color: #ffffff;
}

.toggle-switch-wrapper:has(input:checked) {
  background: rgba(37, 99, 235, 0.18);
  border-color: #2563eb;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.toggle-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.01em;
}

[data-theme="dark"] .toggle-label {
  color: #60a5fa;
}

[data-theme="dark"] .toggle-switch-wrapper {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(59, 130, 246, 0.45);
}

[data-theme="dark"] .toggle-switch-wrapper:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: #60a5fa;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.5);
}

.toggle-label .fa-bolt {
  color: #2563eb !important;
  filter: drop-shadow(0 0 5px rgba(37, 99, 235, 0.65));
}

[data-theme="dark"] .toggle-label .fa-bolt {
  color: #60a5fa !important;
  filter: drop-shadow(0 0 7px rgba(96, 165, 250, 0.85));
}

.view-toggle-group {
  display: inline-flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3px;
}

.view-btn {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn.active {
  background: var(--accent-indigo);
  color: #ffffff;
}

.results-count-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.results-count-text strong {
  color: var(--text-primary);
}

/* ==========================================================================
   Card Grid View
   ========================================================================== */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.link-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.link-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.site-icon-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  overflow: hidden;
}

.site-icon-avatar img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.site-name-wrap {
  display: flex;
  flex-direction: column;
}

.site-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-domain-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-actions-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.check-task-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.check-task-btn.completed {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.check-task-btn:hover {
  border-color: var(--accent-emerald);
}

/* Metric Badges */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  padding: 0.75rem;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.metric-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.1;
}

.metric-num.da-high { color: var(--accent-emerald); }
.metric-num.da-mid { color: var(--accent-indigo); }
.metric-num.da-regular { color: var(--accent-cyan); }

.metric-num.ss-good { color: var(--accent-emerald); }
.metric-num.ss-mid { color: var(--accent-amber); }
.metric-num.ss-high { color: var(--accent-rose); }

.metric-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

/* Badges Row */
.card-badges-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-dofollow {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-nofollow {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-category {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-instant {
  background: rgba(37, 99, 235, 0.15);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.4);
}

[data-theme="dark"] .badge-instant {
  background: rgba(37, 99, 235, 0.25);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.45);
}

.card-tips-box {
  background: var(--bg-input);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.card-tips-box strong {
  color: var(--text-primary);
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

/* Card Bottom Buttons */
.card-bottom-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: auto;
}

.btn-card-action {
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: var(--transition);
}

.btn-copy-link {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-copy-link:hover {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-submit-link {
  background: var(--gradient-brand);
  color: #ffffff;
}

.btn-submit-link:hover {
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ==========================================================================
   SEO Table View & Custom Scrollbars
   ========================================================================== */
.table-container {
  width: 100%;
  max-height: 75vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.table-container::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.table-container::-webkit-scrollbar-track {
  background: var(--bg-input);
  border-radius: var(--radius-full);
}

.table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-full);
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent-indigo);
}

[data-theme="dark"] .table-container::-webkit-scrollbar-thumb {
  background: #334155;
}

.seo-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.9rem;
}

.seo-table th {
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.9rem 1.15rem;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-color);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
}

.seo-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.seo-table th.sortable:hover {
  color: var(--accent-indigo);
}

.seo-table td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
  transition: background-color 0.15s ease;
}

.seo-table tbody tr:hover td {
  background: rgba(79, 70, 229, 0.04);
}

.table-site-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.table-site-cell img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  padding: 2px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  object-fit: contain;
}

.table-action-btns {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* ==========================================================================
   Load More Button & Progressive Pagination
   ========================================================================== */
#loadMoreContainer {
  text-align: center;
  margin: 2.5rem 0 3.5rem;
}

#btnLoadMore {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 2.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(79, 70, 229, 0.35);
  transition: var(--transition);
}

#btnLoadMore:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

#btnLoadMore:active {
  transform: translateY(0);
}

#btnLoadMore i {
  transition: transform 0.25s ease;
}

#btnLoadMore:hover i {
  transform: translateY(3px);
}

/* ==========================================================================
   Guide Page Components (site/{slug}.html)
   ========================================================================== */
.guide-step-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.guide-step-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
  background: var(--bg-card-hover);
}

.guide-step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3);
}

.guide-step-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 5rem 1.5rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   SEO Strategy & Guide Section
   ========================================================================== */
.seo-guide-section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.section-head {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.section-head h2 {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.guide-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.guide-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.guide-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* FAQ Accordion */
.faq-wrap {
  max-width: 850px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 0.85rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.25rem 1.5rem;
  font-size: 1.02rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
}

.faq-question:hover {
  color: var(--accent-indigo);
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-icon {
  transition: transform 0.25s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* ==========================================================================
   Modals & Drawers
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.25rem;
}

.modal-close-btn {
  font-size: 1.5rem;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input, .form-textarea, .form-select-full {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.95rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select-full:focus {
  border-color: var(--accent-indigo);
}

.form-textarea {
  min-height: 90px;
  resize: vertical;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--accent-indigo);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
  animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
  background: var(--bg-primary);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  max-width: 380px;
}

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

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  font-size: 0.82rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .directory-grid {
    grid-template-columns: 1fr;
  }
  .mobile-nav-toggle {
    display: flex;
  }

  .nav-links, .main-nav {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    display: none;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 65px);
    overflow-y: auto;
    z-index: 99;
  }

  .nav-links.mobile-open, .main-nav.mobile-open {
    display: flex;
  }

  /* Nav items: compact rows */
  .nav-links > li, .main-nav > li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }
  .nav-links > li:last-child, .main-nav > li:last-child {
    border-bottom: none;
  }
  .nav-links .nav-link, .main-nav .nav-link {
    width: 100%;
    padding: 0.7rem 0.5rem;
    font-size: 0.95rem;
  }

  .nav-dropdown-item, .nav-dropdown-wrap {
    width: 100%;
  }

  /* Categories dropdown: HIDDEN by default on mobile, show only when .mobile-expanded */
  .nav-dropdown-menu, .mega-menu-panel {
    position: static;
    transform: none !important;
    width: 100% !important;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    box-shadow: none;
    padding: 0;
    border: none;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
    transition: max-height 0.3s ease, opacity 0.2s ease;
  }

  .nav-dropdown-menu.mobile-expanded, .mega-menu-panel.mobile-expanded {
    opacity: 1;
    visibility: visible;
    max-height: 400px;
    overflow-y: auto;
    pointer-events: auto;
    padding: 0.5rem 0;
  }

  /* Dropdown button: full width with arrow */
  .nav-dropdown-btn {
    width: 100%;
    justify-content: space-between;
    padding: 0.7rem 0.5rem;
    font-size: 0.95rem;
  }

  /* Dropdown link cards: compact on mobile */
  .dropdown-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .dropdown-link-card {
    padding: 0.6rem 0.75rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border-color);
    gap: 0.65rem;
  }
  .dropdown-link-card:last-child {
    border-bottom: none;
  }
  .dropdown-icon {
    width: 30px;
    height: 30px;
    font-size: 0.82rem;
    flex-shrink: 0;
  }
  .dropdown-text strong {
    font-size: 0.84rem;
  }
  .dropdown-text span {
    font-size: 0.72rem;
  }

  .mega-menu-grid {
    grid-template-columns: 1fr;
  }
  .toolbar-section {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar-left, .toolbar-right {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .hero-title {
    font-size: 2rem;
  }

  /* Stats banner: 2x2 grid on tablet */
  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
  }

  /* Table: horizontal scroll on tablet */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Section heading */
  .section-head h2 {
    font-size: 1.75rem;
  }

  /* Guide grid: 1 col on tablet */
  .guide-grid {
    grid-template-columns: 1fr;
  }

  /* Tracker: stack header on small tablets */
  .tracker-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .tracker-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  /* ── Container: tighter horizontal padding ── */
  .container {
    padding: 0 1rem;
  }

  /* ── Hero ── */
  .hero-section {
    padding: 2rem 0 1.5rem;
  }
  .hero-pill-badge {
    font-size: 0.78rem;
    padding: 0.3rem 0.75rem;
    text-align: center;
    max-width: 90%;
    white-space: normal;
    text-align: center;
  }
  .hero-title {
    font-size: 1.55rem;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
  }
  .hero-subtitle {
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 1.25rem;
  }

  /* ── Search bar ── */
  .hero-search-wrapper {
    margin-bottom: 1.25rem;
  }
  .search-shortcut-badge {
    display: none;
  }
  .search-box-glow {
    padding: 0.4rem 0.45rem 0.4rem 0.85rem;
    gap: 0.45rem;
    border-radius: var(--radius-md);
  }
  .search-input {
    font-size: 0.9rem;
  }

  /* ── Quick chips: horizontal scroll ── */
  .quick-tags-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    margin-bottom: 1.25rem;
    gap: 0.45rem;
  }
  .quick-tag-label {
    flex-shrink: 0;
    font-size: 0.8rem;
  }
  .quick-chip {
    flex-shrink: 0;
    font-size: 0.78rem;
    padding: 0.28rem 0.7rem;
  }

  /* ── Stats: 2×2 compact ── */
  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    padding: 0.85rem 0.75rem;
    border-radius: var(--radius-md);
  }
  .stat-val {
    font-size: 1.35rem;
  }
  .stat-lbl {
    font-size: 0.68rem;
    letter-spacing: 0.02em;
  }

  /* ── Category tabs ── */
  .category-nav-section {
    padding: 0.6rem 0 0.9rem;
    top: 60px;
  }
  .cat-tab-btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    gap: 0.35rem;
  }
  .cat-tab-btn .cat-count {
    font-size: 0.68rem;
    padding: 0.08rem 0.35rem;
  }

  /* ── Toolbar ── */
  .toolbar-section {
    padding: 0.85rem 0;
    margin-bottom: 1rem;
    gap: 0.75rem;
  }
  .toolbar-left, .toolbar-right {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .filter-select {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.5rem 0.85rem;
  }
  .toggle-switch-wrapper {
    justify-content: center;
    width: 100%;
  }
  .view-toggle-group {
    align-self: flex-end;
  }
  .results-count-text {
    font-size: 0.82rem;
  }

  /* ── Cards ── */
  .link-card {
    padding: 1rem 0.9rem;
    border-radius: var(--radius-md);
  }
  .site-title {
    font-size: 1rem;
  }
  .site-domain-sub {
    font-size: 0.75rem;
  }
  .site-icon-avatar {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .metric-num {
    font-size: 1rem;
  }
  .metric-tag {
    font-size: 0.62rem;
  }
  /* Hide tips box on mobile to save vertical space */
  .card-tips-box {
    display: none;
  }
  .btn-card-action {
    font-size: 0.8rem;
    padding: 0.5rem 0.5rem;
  }

  /* ── Tracker ── */
  .tracker-banner {
    padding: 1rem 0.9rem;
    margin: 1rem 0;
    border-radius: var(--radius-md);
  }
  .tracker-title {
    font-size: 1rem;
  }
  .tracker-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .tracker-action-btn {
    font-size: 0.74rem;
    padding: 0.38rem 0.6rem;
  }
  .tracker-metrics-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .tracker-metric-col {
    padding: 0.5rem 0.45rem;
  }
  .tracker-metric-val {
    font-size: 1.1rem;
  }
  .tracker-metric-label {
    font-size: 0.65rem;
  }

  /* ── Table view ── */
  /* Hide Category & PA columns */
  .seo-table th:nth-child(3),
  .seo-table td:nth-child(3),
  .seo-table th:nth-child(5),
  .seo-table td:nth-child(5) {
    display: none;
  }
  .seo-table {
    font-size: 0.8rem;
  }
  .seo-table th,
  .seo-table td {
    padding: 0.6rem 0.5rem;
  }
  .table-site-cell {
    gap: 0.45rem;
  }
  .table-site-cell img {
    width: 20px;
    height: 20px;
  }

  /* ── Header nav actions: icon-only ── */
  .nav-actions {
    gap: 0.4rem;
  }
  .theme-toggle-btn {
    width: 36px;
    height: 36px;
  }
  .mobile-nav-toggle {
    width: 36px;
    height: 36px;
  }
  .btn-primary {
    padding: 0.5rem 0.75rem;
    font-size: 0.84rem;
  }
  .btn-primary > span {
    display: none;
  }

  /* ── SEO Guide Section ── */
  .seo-guide-section {
    padding: 2.5rem 0;
  }
  .section-head {
    margin-bottom: 1.75rem;
  }
  .section-head h2 {
    font-size: 1.45rem;
  }
  .section-head p {
    font-size: 0.9rem;
  }
  .guide-card {
    padding: 1.25rem;
  }
  .guide-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  .guide-card h3 {
    font-size: 1rem;
  }

  /* ── FAQ ── */
  .faq-question {
    font-size: 0.92rem;
    padding: 1rem 1.1rem;
  }
  .faq-answer {
    padding: 0 1.1rem 1rem;
    font-size: 0.88rem;
  }

  /* ── Footer ── */
  .site-footer {
    padding: 2rem 0 1.5rem;
    font-size: 0.86rem;
  }
  .footer-top {
    gap: 1.5rem;
  }
  .footer-col h4 {
    font-size: 0.88rem;
    margin-bottom: 0.65rem;
  }
  .footer-col ul {
    gap: 0.35rem;
  }
  .footer-bottom {
    font-size: 0.78rem;
    gap: 0.6rem;
  }

  /* ── Modal: slide up from bottom ── */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal-card {
    max-height: 96vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100%;
  }
  .modal-header {
    padding: 1rem 1.1rem;
  }
  .modal-body {
    padding: 1rem 1.1rem;
  }

  /* ── Toast: full-width ── */
  .toast-container {
    bottom: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
  }
  .toast {
    font-size: 0.82rem;
    padding: 0.65rem 1rem;
  }
}

/* Extra small phones ≤ 360px */
@media (max-width: 360px) {
  .container {
    padding: 0 0.75rem;
  }
  .hero-title {
    font-size: 1.35rem;
  }
  .brand-text {
    font-size: 1.1rem;
  }
  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.7rem;
  }
  .stat-val {
    font-size: 1.2rem;
  }
  .cat-tab-btn {
    padding: 0.38rem 0.65rem;
    font-size: 0.75rem;
  }
  .btn-primary {
    padding: 0.45rem 0.6rem;
  }
}

/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb-nav a {
  color: var(--accent-indigo);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumb-nav a:hover {
  text-decoration: underline;
}

.breadcrumb-nav span {
  color: var(--text-secondary);
}

.breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.6;
}

/* ==========================================================================
   Country Switcher Pills & Tabs
   ========================================================================== */
.country-pills-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.country-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.15rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.country-pill-btn:hover {
  color: var(--accent-indigo);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.country-pill-btn.active {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.country-pill-btn .pill-count {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-muted);
  font-weight: 700;
}

.country-pill-btn.active .pill-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* ==========================================================================
   Platform Meta Specifications (Guide Pages)
   ========================================================================== */
.platform-meta-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.meta-spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.meta-spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  color: var(--text-muted);
  font-weight: 500;
}

.spec-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Safety Tip Box */
.safety-tip-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(8, 145, 178, 0.08);
  border: 1px solid rgba(8, 145, 178, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.safety-tip-icon {
  font-size: 1.35rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.safety-tip-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.safety-tip-text strong {
  color: var(--text-primary);
}

/* ==========================================================================
   Modern AEO / GEO / AI Overview Architecture
   ========================================================================== */
.ai-overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-indigo);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.12));
  color: var(--accent-indigo);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.85rem;
}

.ai-overview-heading {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.ai-overview-text {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.ai-overview-text strong {
  color: var(--text-primary);
}

/* AEO Metrics Grid */
.aeo-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.aeo-metric-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.aeo-metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 0.25rem;
}

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

/* Numbered Steps List for AI Overviews */
.aeo-steps-list {
  list-style: none;
  counter-reset: aeo-step;
  padding: 0;
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aeo-step-item {
  counter-increment: aeo-step;
  position: relative;
  padding-left: 3.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-right: 1.25rem;
}

.aeo-step-item::before {
  content: counter(aeo-step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--gradient-brand);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
}

.aeo-step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.aeo-step-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Category FAQ Accordion */
.cat-faq-section {
  margin: 3.5rem 0;
}

.cat-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: var(--transition);
}

.cat-faq-item.active {
  border-color: var(--accent-indigo);
}

.cat-faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.35rem;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}

.cat-faq-question i {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.cat-faq-item.active .cat-faq-question i {
  transform: rotate(180deg);
  color: var(--accent-indigo);
}

.cat-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.35rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.cat-faq-item.active .cat-faq-answer {
  max-height: 500px;
  padding: 0 1.35rem 1.25rem;
}

/* ==========================================================================
   Interactive Submission Progress Tracker Styles
   ========================================================================== */
.tracker-banner {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 1.75rem auto 2.25rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.tracker-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #059669);
}

.tracker-banner:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.4);
}

.tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.tracker-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tracker-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  display: inline-block;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.tracker-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.tracker-title i {
  color: #2563eb;
}

.tracker-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tracker-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tracker-action-btn:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: #2563eb;
  color: #2563eb;
  transform: translateY(-1px);
}

.tracker-action-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.tracker-action-btn.btn-tracker-reset:hover {
  border-color: var(--accent-rose);
  color: var(--accent-rose);
  background: rgba(225, 29, 72, 0.08);
}

.tracker-progress-wrap {
  margin-bottom: 1.25rem;
}

.tracker-progress-bar-bg {
  width: 100%;
  height: 12px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}

.tracker-progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 50%, #10b981 100%);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tracker-progress-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.tracker-stat-pill {
  color: var(--text-secondary);
  font-weight: 500;
}

.tracker-stat-pill strong {
  color: var(--text-primary);
  font-weight: 700;
}

.tracker-percent-badge {
  font-weight: 800;
  font-size: 0.82rem;
  color: #059669;
  background: rgba(5, 150, 105, 0.12);
  border: 1px solid rgba(5, 150, 105, 0.3);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

[data-theme="dark"] .tracker-percent-badge {
  color: #34d399;
  background: rgba(5, 150, 105, 0.25);
  border-color: rgba(52, 211, 153, 0.4);
}

.tracker-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.tracker-metric-col {
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  text-align: center;
  transition: var(--transition);
}

.tracker-metric-col:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.tracker-metric-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.tracker-metric-val {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Card & Table Completed State */
.link-card.completed {
  border-color: rgba(16, 185, 129, 0.5) !important;
  background: rgba(16, 185, 129, 0.03) !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.15) !important;
}

.link-card.completed .card-identity::after {
  content: "SUBMITTED";
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  color: #059669;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  margin-left: 0.5rem;
  vertical-align: middle;
}

tr.task-completed {
  background: rgba(16, 185, 129, 0.05) !important;
}

tr.task-completed td:first-child {
  border-left: 3px solid #10b981;
}

.check-task-btn.completed i {
  color: #059669;
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.5));
}



