/* ================================================
   FUTUREPEDIA CLONE - SHARED STYLES
   Dark theme, electric blue accent, Inter font
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --border: #e5e5e5;
  --text: #111111;
  --muted: rgba(0,0,0,0.5);
  --accent: #2563EB;
  --accent-hover: #1d4ed8;
  --accent-dim: rgba(37,99,235,0.08);
  --accent-glow: rgba(37,99,235,0.15);

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w: 1280px;
  --max-w-lg: 1440px;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: var(--font);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f5f5f5;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ---- Utility ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: #111;
  border: 1px solid rgba(0,0,0,0.25);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: #ffffff;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--muted);
}

.badge-accent {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.badge-free {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.badge-paid {
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.3);
  color: #fb923c;
}

.badge-freemium {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.3);
  color: #a78bfa;
}

/* ---- Navbar ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  flex-shrink: 0;
}

.navbar-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: #444444;
  transition: var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--text);
  background: #ffffff;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: #444444;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  color: var(--text);
  background: #ffffff;
}

@media (max-width: 768px) {
  .navbar-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .navbar-actions .btn {
    display: none;
  }
}

/* ---- Footer ---- */
.footer {
  background: #f5f5f5;
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: #444444;
  font-size: 14px;
  line-height: 1.7;
  max-width: 280px;
  margin-top: 12px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111111;
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  font-size: 14px;
  color: #444444;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent-hover);
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444444;
  transition: var(--transition);
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  color: #666666;
  font-size: 13px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ---- Card ---- */
.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 32px rgba(37,99,235,0.12);
  transform: translateY(-2px);
}

/* ---- Section Headers ---- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 600px;
}

/* ---- Stars ---- */
.stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.star {
  width: 14px;
  height: 14px;
  color: #fbbf24;
}

/* ---- Tool Card ---- */
.tool-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
  cursor: pointer;
}

.tool-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 32px rgba(37,99,235,0.12);
  transform: translateY(-2px);
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #f5f5f5;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.tool-card-info {
  flex: 1;
  min-width: 0;
}

.tool-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-card-tagline {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-tag {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  background: #f5f5f5;
  border: 1px solid var(--border);
  color: var(--muted);
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.tool-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

/* ---- Category Card ---- */
.cat-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
  cursor: pointer;
}

.cat-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 24px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}

.cat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.cat-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.cat-count {
  font-size: 13px;
  color: var(--muted);
}

.cat-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---- Form Elements ---- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: #f5f5f5;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b80' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select option {
  background: #ffffff;
  color: var(--text);
}

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* ---- Gradient text ---- */
.gradient-text {
  background: linear-gradient(135deg, #60a5fa, #2563EB, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  padding: 64px 0 48px;
  text-align: center;
}

.page-hero .section-title {
  font-size: clamp(32px, 5vw, 52px);
}

.page-hero .section-desc {
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Load More ---- */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

/* ---- Filter Bar ---- */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-bar .form-input {
  flex: 1;
  min-width: 200px;
}

.filter-bar .form-select {
  min-width: 160px;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-in {
  animation: fadeInUp 0.6s var(--transition) forwards;
}

.animate-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-in-delay-4 { animation-delay: 0.4s; opacity: 0; }
.animate-in-delay-5 { animation-delay: 0.5s; opacity: 0; }
.animate-in-delay-6 { animation-delay: 0.6s; opacity: 0; }

/* ---- Trusted logos ---- */
.trusted-logos {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.trusted-logo {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: -0.02em;
  opacity: 0.5;
  transition: var(--transition);
}

.trusted-logo:hover {
  opacity: 0.8;
}

/* ---- Stats ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-block {
  text-align: center;
  padding: 32px 24px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stat-number {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
}

/* ---- Info card (tool-detail) ---- */
.info-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.info-card h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 16px;
}

.info-card p,
.info-card li {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
}

.info-card ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-card ul li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.info-card ul li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
  flex-shrink: 0;
}

/* ---- Feature list (about) ---- */
.feature-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.feature-item h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.feature-item p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---- Sidebar layout ---- */
.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 900px) {
  .layout-sidebar {
    grid-template-columns: 1fr;
  }
}

/* ---- Guidelines sidebar ---- */
.guidelines {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 80px;
}

.guidelines h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.guidelines ol {
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: guidelines;
}

.guidelines ol li {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  counter-increment: guidelines;
}

.guidelines ol li::before {
  content: counter(guidelines);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---- Related tools ---- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Section spacing ---- */
/* ---- Gradient Mesh Hero ---- */
.gradient-mesh {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #050510;
}

.gradient-mesh-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: orbFloat 20s ease-in-out infinite;
}

.mesh-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #1a3a8f 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.mesh-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation-delay: -5s;
  animation-duration: 25s;
}

.mesh-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #0369a1 0%, transparent 70%);
  bottom: -100px;
  left: 30%;
  animation-delay: -10s;
  animation-duration: 18s;
}

.mesh-orb-4 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #2563eb 0%, transparent 70%);
  bottom: -50px;
  right: 10%;
  animation-delay: -7s;
  animation-duration: 22s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(40px, 30px) scale(1.02); }
}

.gradient-mesh-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* ---- Sections ---- */
/* ---- Hero Section ---- */
.hero-section {
  position: relative;
  min-height: 80dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #050510;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 100px;
  padding-bottom: 80px;
}

.hero-text {
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: #fff;
  margin-bottom: 24px;
}

.hero-title em {
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Stats Bar ---- */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  padding: 32px 0;
}

.stats-row {
  display: flex;
  gap: 0;
  justify-content: center;
}

.stats-row .stat-block {
  flex: 1;
  text-align: center;
  border-right: 1px solid var(--border);
  padding: 0 24px;
}

.stats-row .stat-block:last-child {
  border-right: none;
}

/* ---- Section Headers ---- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
}

/* ---- Category Grid ---- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.cat-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.cat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.cat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { flex-direction: column; gap: 16px; }
  .stats-row .stat-block { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 16px; }
}


.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

/* ---- Tool detail hero ---- */
.tool-detail-hero {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 48px 0;
}

.tool-detail-icon {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.tool-detail-info {
  flex: 1;
}

.tool-detail-info h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 8px;
}

.tool-detail-info .tagline {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 20px;
}

.tool-detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.share-buttons {
  display: flex;
  gap: 8px;
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444444;
  transition: var(--transition);
}

.share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 640px) {
  .tool-detail-hero {
    flex-direction: column;
    text-align: center;
  }
  .tool-detail-actions {
    justify-content: center;
  }
}

/* ---- Grid layouts ---- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- Horizontal scroll row ---- */
.scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
}

.scroll-row > * {
  flex-shrink: 0;
}

/* ---- CTA Section ---- */
.cta-section {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 80px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.cta-section h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.15;
}

.cta-section p {
  font-size: 16px;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Two column section ---- */
.two-col-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

@media (max-width: 768px) {
  .two-col-section {
    grid-template-columns: 1fr;
  }
}

.yt-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.yt-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

.yt-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.yt-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.yt-thumb-placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--accent);
}

.yt-thumb-placeholder span {
  font-size: 12px;
  color: var(--muted);
}

.yt-info {
  padding: 16px;
  flex: 1;
}

.yt-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.yt-info p {
  font-size: 13px;
  color: var(--muted);
}

/* ---- Mobile nav overlay ---- */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  z-index: 99;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: #111111;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover {
  color: var(--accent);
}

.mobile-nav .btn {
  width: 100%;
  margin-top: 12px;
}

/* ---- Search highlight ---- */
mark {
  background: var(--accent-dim);
  color: var(--accent-hover);
  border-radius: 2px;
  padding: 0 2px;
}
