/* =====================================================
   AIToolsHub — Components CSS
   ===================================================== */

/* ── Navigation ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
  transition: all var(--transition-base);
}

[data-theme="light"] .navbar {
  background: rgba(255,255,255,0.85);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo {
  width: 36px;
  height: 36px;
  background: var(--grad-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-size: 1.1rem;
  font-family: var(--font-display);
}

.navbar-brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  background: rgba(124,58,237,0.1);
  color: var(--primary-light);
}

.navbar-search {
  flex: 1;
  max-width: 320px;
  position: relative;
}

.navbar-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
}

.navbar-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.navbar-search .search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Mobile menu toggle */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: 65px;
  background: var(--bg-surface);
  z-index: calc(var(--z-nav) - 1);
  padding: var(--space-lg);
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}

.mobile-nav.open { display: block; }

.mobile-nav .nav-link {
  display: block;
  padding: var(--space-md);
  font-size: 1.1rem;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
}

/* Search autocomplete */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: var(--z-dropdown);
  max-height: 350px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0.75rem var(--space-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
  color: var(--text-primary);
}

.search-result-item:hover { background: var(--bg-card-hover); }

.search-result-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.search-result-name { font-weight: 600; font-size: 0.9rem; }
.search-result-cat { font-size: 0.75rem; color: var(--text-muted); }

/* ── Hero Section ── */
.hero {
  position: relative;
  padding: var(--space-4xl) 0 var(--space-3xl);
  overflow: hidden;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: var(--radius-full);
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.5s ease both;
}

.hero-title {
  max-width: 800px;
  margin: 0 auto var(--space-xl);
  animation: fadeInUp 0.5s ease 0.1s both;
}

.hero-subtitle {
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  font-size: 1.125rem;
  animation: fadeInUp 0.5s ease 0.2s both;
}

.hero-search {
  max-width: 640px;
  margin: 0 auto var(--space-2xl);
  animation: fadeInUp 0.5s ease 0.3s both;
}

.hero-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border-glow);
  border-radius: var(--radius-full);
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  box-shadow: var(--shadow-glow);
  gap: var(--space-sm);
}

.hero-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1rem;
  padding: 0.25rem 0;
}

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

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
  animation: fadeInUp 0.5s ease 0.4s both;
}

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.hero-stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Category Cards ── */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-base);
  text-align: center;
  gap: var(--space-md);
}

.category-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.category-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  transition: transform var(--transition-base);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.category-card:hover .category-icon {
  transform: scale(1.1) rotate(5deg);
}

.category-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.category-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── Tool Cards ── */
.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-card);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.tool-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.tool-card:hover::before { opacity: 1; }

.tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.tool-fav-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tool-fav-btn:hover, .tool-fav-btn.active {
  background: rgba(239,68,68,0.1);
  border-color: var(--danger);
  color: var(--danger);
}

.tool-card-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.tool-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

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

.tool-card-uses {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tool-launch-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-light);
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.tool-card:hover .tool-launch-btn {
  background: var(--primary);
  color: white;
  border-color: transparent;
}

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  gap: var(--space-lg);
}

.section-title { margin-bottom: var(--space-xs); }
.section-subtitle { color: var(--text-muted); font-size: 0.9375rem; }

/* ── Tool of the Day ── */
.tool-of-day {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2xl);
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

.tool-of-day::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.tod-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--grad-primary);
  color: white;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.tod-title {
  font-size: 1.875rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.tod-desc {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-size: 1rem;
}

.tod-visual {
  width: 120px;
  height: 120px;
  background: var(--grad-primary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  animation: pulse-glow 3s ease-in-out infinite;
  flex-shrink: 0;
}

/* ── Trending ── */
.trending-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.trending-item:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.trending-rank {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 28px;
}

.trending-rank.top { color: var(--accent); }

/* ── Horizontal scroll ── */
.scroll-row {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding-bottom: var(--space-md);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar { display: none; }

.scroll-row > * {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 260px;
}

/* ── Footer ── */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-4xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: var(--space-md) 0 var(--space-lg);
  line-height: 1.7;
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-btn:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(124,58,237,0.1);
}

.footer-heading {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--primary-light); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-copyright { font-size: 0.875rem; color: var(--text-muted); }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb-sep { color: var(--border-strong); }
.breadcrumb-current { color: var(--text-secondary); }

/* ── Tool Page Layout ── */
.tool-page-header {
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.tool-page-title {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.tool-page-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease;
}

.tool-page-icon:hover {
  transform: scale(1.05);
}

.tool-page-meta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.tool-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-2xl);
  align-items: start;
  padding: var(--space-2xl) 0;
}

.tool-sidebar { display: flex; flex-direction: column; gap: var(--space-lg); }

/* ── FAQ Accordion ── */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.open { border-color: var(--border-glow); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  background: var(--bg-card);
  font-weight: 600;
  font-size: 0.9375rem;
  text-align: left;
  cursor: pointer;
  border: none;
  color: var(--text-primary);
  gap: var(--space-md);
  transition: background var(--transition-fast);
}

.faq-question:hover { background: var(--bg-card-hover); }

.faq-icon {
  color: var(--primary-light);
  font-size: 1.25rem;
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

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

.faq-answer {
  display: none;
  padding: 0 var(--space-lg) var(--space-lg);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.75;
}

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

/* ── How to Use Steps ── */
.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.step {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  font-family: var(--font-display);
}

.step-content h4 { margin-bottom: var(--space-xs); }
.step-content p { font-size: 0.9rem; color: var(--text-muted); }

/* ── Share Buttons ── */
.share-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.share-whatsapp { background: #25D366; color: white; }
.share-telegram { background: #0088cc; color: white; }
.share-twitter { background: #1DA1F2; color: white; }
.share-copy { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border); }
.share-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Ad Slots ── */
.ad-slot {
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-align: center;
  overflow: hidden;
}

.ad-slot-banner { min-height: 90px; }
.ad-slot-rect { min-height: 250px; }
.ad-slot-large { min-height: 300px; }

/* ── Newsletter ── */
.newsletter-card {
  background: var(--grad-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.newsletter-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.newsletter-title { color: white; margin-bottom: var(--space-sm); }
.newsletter-subtitle { color: rgba(255,255,255,0.8); margin-bottom: var(--space-xl); }

.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  border: none;
  outline: none;
  font-size: 0.9375rem;
  background: rgba(255,255,255,0.95);
  color: #0f172a;
}

.newsletter-btn {
  background: rgba(0,0,0,0.3);
  color: white;
  border: 2px solid rgba(255,255,255,0.4);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.newsletter-btn:hover {
  background: rgba(0,0,0,0.5);
  border-color: white;
}

/* ── Blog Cards ── */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

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

.blog-card-img {
  height: 200px;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.blog-card-body { padding: var(--space-lg); flex: 1; display: flex; flex-direction: column; }
.blog-card-title { font-weight: 700; font-size: 1.0625rem; margin-bottom: var(--space-sm); color: var(--text-primary); }
.blog-card-excerpt { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; flex: 1; }
.blog-card-footer { margin-top: var(--space-md); display: flex; align-items: center; justify-content: space-between; font-size: 0.8125rem; color: var(--text-muted); }

/* ── Admin ── */
.admin-sidebar {
  width: 260px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  min-height: 100vh;
  padding: var(--space-xl) 0;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 10;
}

.admin-content {
  margin-left: 260px;
  padding: var(--space-2xl);
  min-height: 100vh;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0.75rem var(--space-xl);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
  font-size: 0.9375rem;
}

.admin-nav-item:hover, .admin-nav-item.active {
  background: rgba(124,58,237,0.1);
  color: var(--primary-light);
  border-right: 3px solid var(--primary);
}

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

.stat-card-value {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-display);
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card-label { font-size: 0.9rem; color: var(--text-muted); margin-top: var(--space-xs); }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeInUp 0.3s ease;
}

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

.modal-close {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover { background: var(--danger); color: white; }

/* ── Cookie Banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: var(--space-lg) var(--space-2xl);
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
  animation: fadeInUp 0.4s ease;
  box-shadow: var(--shadow-lg);
}

.cookie-banner.hidden { display: none; }

/* ── PWA Install Banner ── */
.pwa-banner {
  background: var(--grad-primary);
  padding: var(--space-md) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  animation: fadeInUp 0.4s ease;
}

.pwa-banner.hidden { display: none; }

/* ── Theme toggle ── */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

/* ── User dropdown ── */
.user-dropdown {
  position: relative;
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 0.875rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition-fast);
}

.user-avatar:hover { border-color: var(--primary-light); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  overflow: hidden;
  z-index: var(--z-dropdown);
  animation: fadeInUp 0.2s ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0.75rem var(--space-lg);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }

/* ── Progress/Loader ── */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Tables ── */
.table-wrapper { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th {
  background: var(--bg-surface);
  padding: 0.875rem var(--space-md);
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 0.875rem var(--space-md);
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

tr:hover td { background: var(--bg-card-hover); }

/* ── Range slider ── */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border-strong);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
  transition: box-shadow var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px rgba(124,58,237,0.3);
}

/* ── Checkbox / Radio ── */
input[type="checkbox"], input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ── Color input ── */
input[type="color"] {
  width: 48px; height: 36px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  cursor: pointer;
  padding: 2px;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  padding: 4px;
  width: fit-content;
}

.tab {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-muted);
  border: none;
  background: none;
}

.tab.active {
  background: var(--bg-card);
  color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

/* ── Tags ── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag:hover, .tag.active {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(124,58,237,0.08);
}

/* ── Copy result box ── */
.result-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  position: relative;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 80px;
  color: var(--text-primary);
}

.result-box-copy {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: 4px 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.result-box-copy:hover { background: var(--primary-dark); }

/* ── Related Tools ── */
.related-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}

.related-tool-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.related-tool-item:hover {
  border-color: var(--border-glow);
  transform: translateX(3px);
}

.related-tool-item span:first-child { font-size: 1.25rem; }
.related-tool-item span:last-child { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }

/* Responsive adjustments */
@media (max-width: 1024px) {
  .tool-main { grid-template-columns: 1fr; }
  .tool-sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-sidebar { width: 200px; }
  .admin-content { margin-left: 200px; }
}

@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .navbar-search { display: none; }
  .hamburger { display: flex; }
  .tool-of-day { grid-template-columns: 1fr; }
  .tod-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .newsletter-form { flex-direction: column; }
  .newsletter-input { width: 100%; }
  .admin-sidebar { display: none; }
  .admin-content { margin-left: 0; padding: var(--space-lg); }
  .hero-stats { gap: var(--space-xl); }
}

@media (max-width: 480px) {
  .tool-page-title { flex-direction: column; align-items: flex-start; }
  .share-buttons { flex-direction: column; }
  .share-btn { width: 100%; justify-content: center; }
}

/* ── Interactive Skip Ad Overlay Interstitial ── */
.skip-ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 1;
  transition: opacity 0.4s ease;
}

[data-theme="light"] .skip-ad-overlay {
  background: rgba(248, 250, 252, 0.85);
}

.skip-ad-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(124, 58, 237, 0.2);
  position: relative;
  overflow: hidden;
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.skip-ad-badge {
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.skip-ad-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  animation: pulse 2s infinite;
}

.skip-ad-modal h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.skip-ad-modal p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.skip-ad-progress-container {
  background: rgba(255, 255, 255, 0.08);
  height: 6px;
  border-radius: 9999px;
  width: 100%;
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
}

.skip-ad-progress-bar {
  background: var(--grad-primary);
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  transform-origin: left;
  animation: fillProgress 5s linear forwards;
}

@keyframes fillProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.skip-ad-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  transition: all var(--transition-base);
  text-align: center;
}

.skip-ad-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.skip-ad-btn.ready {
  background: var(--primary);
  color: white;
  border-color: var(--primary-light);
  box-shadow: var(--shadow-glow);
}

.skip-ad-btn.ready:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}
