/* ============================================
   TRUST MY TOOL — Modern Tools Directory
   ============================================ */

/* ── CSS Variables ── */
:root {
  /* Light theme */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --accent: #65a30d;
  --accent-hover: #4d7c0f;
  --accent-light: #f7fee7;
  --accent-gradient: linear-gradient(135deg, #65a30d 0%, #84cc16 50%, #a3e635 100%);
  --gradient-text: linear-gradient(135deg, #65a30d, #a3e635);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 25px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 50px -12px rgb(0 0 0 / 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 200ms ease;
  --transition-slow: 350ms ease;
  --hero-blob: #65a30d;
  --card-tag-bg: #f1f5f9;
  --card-tag-color: #475569;
  --star-color: #f59e0b;
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --border: #334155;
  --border-light: #1e293b;
  --accent: #a3e635;
  --accent-hover: #84cc16;
  --accent-light: #1a2e05;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 25px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 50px -12px rgb(0 0 0 / 0.5);
  --hero-blob: #4d7c0f;
  --card-tag-bg: #334155;
  --card-tag-color: #cbd5e1;
}

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

[x-cloak] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select { font-family: inherit; }

/* ── Typography ── */
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; font-weight: 600; }
h4 { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); }

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

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.938rem;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-sm { padding: 8px 18px; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; border-radius: var(--radius-md); }

.btn-primary {
  background: var(--accent-gradient);
  color: #1a2e05;
  box-shadow: 0 4px 14px 0 rgb(101 163 13 / 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgb(101 163 13 / 0.5);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-primary:disabled {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  box-shadow: none;
}
.btn-primary:disabled:hover {
  transform: none;
  box-shadow: none;
}

.btn-outline {
  border: 2px solid var(--border);
  color: var(--text-primary);
  background: transparent;
}
.btn-outline:hover {
  border-color: transparent;
  background: var(--accent-gradient);
  color: #1a2e05;
  box-shadow: 0 4px 14px 0 rgb(101 163 13 / 0.25);
}

.btn-danger {
  background: #dc2626;
  color: #fff;
  border: 1px solid #dc2626;
}
.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

[data-theme="dark"] .btn-danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}
[data-theme="dark"] .btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

.btn-login {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.btn-login:hover { color: var(--accent); background: var(--accent-light); }

/* Notification bell badge in the public header */
.nav-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* "Edited" marker on reviews modified after posting */
.edited-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.edited-badge i {
  font-size: 0.7rem;
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-slow), border var(--transition-slow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header.scrolled {
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.2rem;
}
.logo-icon {
  font-size: 1.4rem;
  color: var(--accent);
}
.logo-img {
  height: 44px;
  width: auto;
  border-radius: 8px;
}

.nav { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.header-actions { display: flex; align-items: center; gap: 8px; }

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.theme-toggle:hover { background: var(--bg-tertiary); color: var(--text-primary); }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── User Menu (avatar dropdown) ── */
[x-cloak] { display: none !important; }

.user-menu { position: relative; }

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 5px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition);
}
.user-menu-trigger:hover { background: var(--bg-tertiary); }

.user-menu-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #1a2e05;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-menu-name {
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-chevron {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  transition: transform var(--transition);
}
.user-menu-chevron.rotated { transform: rotate(180deg); }

.user-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 250px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 120;
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.user-menu-avatar-lg {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #1a2e05;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.user-menu-header-meta { display: flex; flex-direction: column; min-width: 0; }
.user-menu-header-name { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); }
.user-menu-header-email { font-size: 0.78rem; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-menu-links { padding: 6px; }

.user-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.user-menu-link i { width: 18px; text-align: center; color: var(--text-tertiary); transition: color var(--transition); }
.user-menu-link:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.user-menu-link:hover i { color: var(--accent); }
.user-menu-link.active { color: var(--accent); }
.user-menu-link.active i { color: var(--accent); }

.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.user-menu-logout { color: #ef4444; }
.user-menu-logout i { color: #ef4444; }
.user-menu-logout:hover { background: rgb(239 68 68 / 0.1); color: #ef4444; }
.user-menu-logout:hover i { color: #ef4444; }

/* ── Hero ── */
.hero {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero-blob {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle at 50% 50%, var(--hero-blob) 0%, transparent 70%);
  opacity: 0.07;
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 { margin-bottom: 16px; max-width: 700px; margin-inline: auto; }

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* Search */
.search-box {
  position: relative;
  max-width: 560px;
  margin: 0 auto 60px;
}

.search-box .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 16px 100px 16px 50px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all var(--transition);
  outline: none;
}
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgb(101 163 13 / 0.1);
}
.search-box input::placeholder { color: var(--text-tertiary); }

.search-shortcut {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-family: inherit;
  pointer-events: none;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ── Categories ── */
.categories { padding: 40px 0 20px; }

.section-header {
  text-align: center;
  margin-bottom: 32px;
}
.section-header p { color: var(--text-secondary); margin-top: 8px; }

.category-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 2px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}
.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.pill.active {
  background: #3f6212;
  color: #ecfccb;
  border-color: #3f6212;
  font-weight: 600;
  box-shadow: 0 0 0 4px rgb(101 163 13 / 0.15), 0 2px 8px rgb(101 163 13 / 0.25);
  transform: scale(1.04);
}
.pill.active:hover {
  background: #3f6212;
  color: #ecfccb;
  border-color: #3f6212;
}
.pill.active i {
  color: #bef264;
}

/* ── Subcategory Pills ── */
.subcategory-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  animation: fadeInDown 0.3s ease;
}

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

.subpill {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.subpill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.subpill.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

/* ── Tools Section ── */
.tools { padding: 60px 0 80px; }

.tools-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.tools-header p { color: var(--text-secondary); margin-top: 4px; font-size: 0.9rem; }

.sort-select {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.sort-select select {
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
  transition: border var(--transition);
}
.sort-select select:focus { border-color: var(--accent); }

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* Home "Featured Tools" See More link */
.see-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* Ad Slots (Site Settings → Ads) */
.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 728px;
  margin: 24px auto;
  padding: 12px 16px;
}
.ad-slot-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.ad-slot-content {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}
.ad-slot-content img {
  max-width: 100%;
  height: auto;
  display: block;
}
.ad-slot-content iframe,
.ad-slot-content ins {
  max-width: 100%;
}

/* Tool Card */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.featured-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: var(--star-color);
  color: #1a2e05;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.12);
}
.featured-badge i {
  font-size: 0.65rem;
}

/* Bid-suggestion line on every card (featured + non-featured) */
.featured-climb {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 0.74rem;
  font-weight: 600;
  color: #b45309;
  line-height: 1.5;
}
.featured-climb i {
  margin-right: 4px;
  color: #f59e0b;
}
[data-theme="dark"] .featured-climb {
  color: #fcd34d;
}

/* Featured strip (a few rows) above the All Tools grid */
.featured-strip {
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgb(254 243 199 / 0.35), transparent);
}
[data-theme="dark"] .featured-strip {
  border-color: #78350f;
  background: linear-gradient(180deg, rgb(69 26 3 / 0.35), transparent);
}
.featured-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.featured-strip-head h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #b45309;
}
[data-theme="dark"] .featured-strip-head h3 { color: #fcd34d; }
.featured-strip .tools-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}
.tool-card:hover::before { transform: scaleX(1); }
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  background: var(--accent-light);
  color: var(--accent);
  transition: all var(--transition);
}
.tool-card:hover .tool-icon {
  transform: scale(1.08);
}

/* ── Logo fallback (first capital letter, like the widget) ── */
.tool-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 700;
  background: var(--accent-light);
  color: var(--accent);
}

/* Tool card logo / first-letter fallback (home + tools pages, JS-rendered) */
.tool-card-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.tool-card-initial {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.tool-card-header h3 { font-size: 1.05rem; line-height: 1.3; }
.tool-card-header .tool-domain {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.tool-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tag {
  padding: 4px 12px;
  background: var(--card-tag-bg);
  color: var(--card-tag-color);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.tool-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}
.stars {
  color: var(--star-color);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--accent-gradient);
  color: #1a2e05;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}
.tool-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.pricing-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}
.pricing-badge.free { background: #dcfce7; color: #16a34a; }
.pricing-badge.paid { background: #fef3c7; color: #d97706; }
.pricing-badge.freemium { background: #dbeafe; color: #2563eb; }
[data-theme="dark"] .pricing-badge.free { background: #14532d; color: #86efac; }
[data-theme="dark"] .pricing-badge.paid { background: #78350f; color: #fcd34d; }
[data-theme="dark"] .pricing-badge.freemium { background: #1e3a5f; color: #93c5fd; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  grid-column: 1 / -1;
}
.empty-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 16px;
  color: var(--text-tertiary);
}
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); margin-bottom: 24px; }

/* ── Get Started CTA ── */
.get-started { padding: 80px 0; }

.cta-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0.03;
  pointer-events: none;
}
.cta-card h2 { margin-bottom: 12px; }
.cta-card > p {
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 540px;
  margin-inline: auto;
  font-size: 1.05rem;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.cta-note {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* ── Footer ── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 280px;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links h4 { margin-bottom: 8px; color: var(--text-primary); }
.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-bottom p { font-size: 0.85rem; color: var(--text-tertiary); }

/* ── Turbo Progress Bar ── */
.turbo-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent-gradient, linear-gradient(135deg, #65a30d, #a3e635));
  z-index: 99999;
  border-radius: 0 2px 2px 0;
  transition: width 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.turbo-progress-bar.active {
  opacity: 1;
  animation: turbo-progress 1.5s ease-in-out infinite;
}

@keyframes turbo-progress {
  0%   { width: 0%; }
  50%  { width: 70%; }
  100% { width: 100%; }
}

/* ── Confirmation Modal ── */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.confirm-modal-dialog {
  position: relative;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-xl, 0 20px 50px -12px rgba(0,0,0,0.15));
  padding: 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  white-space: normal;
  animation: cm-scale-in 0.2s ease;
}

@keyframes cm-scale-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.confirm-modal-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  line-height: 1;
}

.confirm-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin-bottom: 8px;
}

.confirm-modal-message {
  font-size: 0.9rem;
  color: var(--text-secondary, #475569);
  margin-bottom: 24px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.confirm-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.confirm-modal-actions .btn {
  min-width: 100px;
}

.report-reason-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-sm, 8px);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-primary, #0f172a);
  background: var(--bg-secondary, #f8fafc);
  resize: vertical;
  margin-bottom: 20px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.report-reason-input:focus {
  outline: none;
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.report-reason-input::placeholder {
  color: var(--text-tertiary, #94a3b8);
}

/* Alpine.js transition helpers */
.cm-enter { transition: all 0.2s ease; }
.cm-enter-start { opacity: 0; }
.cm-enter-end { opacity: 1; }
.cm-leave { transition: all 0.15s ease; }
.cm-leave-start { opacity: 1; }
.cm-leave-end { opacity: 0; }

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 400px;
}

.toast {
  padding: 14px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg, 0 10px 40px rgba(0,0,0,0.15));
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  animation: toastInRight 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.toast.toast-leaving {
  animation: toastOutRight 0.3s ease forwards;
}

.toast-success i { color: #059669; }
.toast-error i { color: #dc2626; }
.toast-info i { color: #2563eb; }
.toast a { font-weight: 700; text-decoration: underline; }

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

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

/* Mobile: center bottom */
@media (max-width: 640px) {
  .toast-container {
    bottom: 16px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: 90vw;
    width: 100%;
  }

  .toast {
    animation-name: toastInUp;
    text-align: center;
    justify-content: center;
  }

  .toast.toast-leaving {
    animation-name: toastOutDown;
  }

  @keyframes toastInUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  @keyframes toastOutDown {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(30px); opacity: 0; }
  }
}

/* ── Card entrance animation ── */
.tool-card {
  animation: cardIn 0.5s ease backwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Nav collapses to a hamburger dropdown at tablet width (769–900) so the inline
   nav + header actions never overflow horizontally. */
@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    /* Fully off-screen above the viewport when closed (-100% of its own height,
       which can exceed the 72px header, plus the 72px fixed offset). */
    transform: translateY(calc(-100% - 72px));
    transition: transform var(--transition-slow);
    z-index: 99;
    pointer-events: none; /* closed: don't block header actions underneath */
  }
  .nav.open {
    transform: translateY(0);
    pointer-events: auto;
  }

  .hamburger { display: flex; }

  /* Compact header for small screens: avatar-only menu + icon-only Submit CTA */
  .user-menu-name,
  .user-menu-chevron { display: none; }
  .user-menu-trigger { padding: 4px; }

  .header-cta { width: 40px; height: 40px; padding: 0; }
  .header-cta .cta-label { display: none; }
}

@media (max-width: 768px) {
  .hero { padding: 60px 0 50px; }
  .hero-stats { gap: 30px; }

  .tools-grid { grid-template-columns: 1fr; }

  .cta-card { padding: 40px 24px; }
  .cta-actions { flex-direction: column; align-items: center; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .search-shortcut { display: none; }

  .tools-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-stats { flex-direction: column; gap: 20px; }

  /* Very small screens: trim the logo to its mark and tighten action spacing */
  .logo-text { display: none; }
  .logo { gap: 0; }
  .header-actions { gap: 4px; }
  .btn-login { padding: 8px 10px; }
}

/* ============================================
   LEGAL PAGES (Terms & Privacy) — Styles
   ============================================ */
.legal-page {
  padding: 56px 0 80px;
  min-height: calc(100vh - 72px - 300px);
}
.legal-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}
.legal-header h1 {
  font-size: 2rem;
  margin: 14px 0 8px;
}
.legal-header .legal-updated {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}
.legal-card {
  max-width: 860px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 48px;
  box-shadow: var(--shadow-lg);
}
.legal-content h2 {
  font-size: 1.15rem;
  margin: 30px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p,
.legal-content li {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.legal-content ul {
  padding-left: 22px;
  margin-bottom: 12px;
}
.legal-content li { margin-bottom: 8px; }
.legal-content a:not(.btn) { color: var(--accent); }
.legal-content strong { color: var(--text-primary); }

@media (max-width: 640px) {
  .legal-card { padding: 28px 20px; border-radius: 16px; }
  .legal-header h1 { font-size: 1.6rem; }
}

/* ============================================
   ABOUT PAGE — Styles
   ============================================ */
.about-page {
  padding: 56px 0 80px;
  min-height: calc(100vh - 72px - 300px);
}
.about-card {
  max-width: 860px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px;
  box-shadow: var(--shadow-lg);
}
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}
.about-photo-wrap {
  text-align: center;
}
.about-photo {
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 24px;
  border: 3px solid var(--accent);
  box-shadow: var(--shadow-lg);
}
.about-socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}
.about-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1.05rem;
  transition: all var(--transition);
}
.about-social:hover {
  border-color: transparent;
  background: var(--accent-gradient);
  color: #1a2e05;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px 0 rgb(101 163 13 / 0.35);
}
.about-content h1 {
  font-size: 1.9rem;
  margin-bottom: 6px;
}
.about-title {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.about-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.about-role-tag {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent-hover);
  font-size: 0.78rem;
  font-weight: 600;
}
.about-bio p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.about-bio strong { color: var(--text-primary); }

@media (max-width: 720px) {
  .about-card { padding: 28px 20px; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-photo { width: 200px; height: 200px; }
}

.about-company {
  margin-bottom: 36px;
}
.about-section-title {
  text-align: center;
  margin: 48px 0 24px;
}
.about-section-title h2 {
  font-size: 1.7rem;
  margin-top: 10px;
}

/* ============================================
   FOOTER SOCIAL ICONS (below company description)
   ============================================ */
.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition);
}
.footer-social:hover {
  color: #1a2e05;
  background: var(--accent-gradient);
  border-color: transparent;
  transform: translateY(-2px);
}
