body {
  background-color: var(--muted);
}
/* Page Header */
.page-header {
  background: var(--background);
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-header p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 600px;
}

/* Search and Filter Section */
.search-filter-section {
  background: var(--background);
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 72px;
  z-index: 50;
}

.search-filter-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
  min-width: 200px;
}

.search-box input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  transition: all 0.2s;
  font-family: inherit;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-box svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--muted-foreground);
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 100px;
  background: var(--muted);
  color: var(--muted-foreground);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.filter-tab:hover {
  background: var(--border);
  color: var(--foreground);
}

.filter-tab.active {
  background: var(--foreground);
  color: var(--background);
}

/* Ad Banner */
.pp-ad-banner {
  background: var(--background);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin: 24px 0;
}

.ad-leaderboard {
  height: 90px;
  max-width: 728px;
  margin-left: auto;
  margin-right: auto;
}

/* Main Content */
.main-content {
  padding: 32px 0 80px;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
}

/* Tools Grid */
.tt-tools-section {
  margin-bottom: 48px;
}

.tt-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-icon svg {
  width: 24px;
  height: 24px;
}

.section-icon.text {
  background: var(--bg-blue);
  color: var(--text-blue);
}

.section-icon.calculator {
  background: var(--bg-green);
  color: var(--text-green);
}

.section-icon.converter {
  background: var(--bg-purple);
  color: var(--text-purple);
}

.section-icon.generator {
  background: var(--bg-orange);
  color: var(--text-orange);
}

.tt-section-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.section-count {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-weight: 400;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-icon svg {
  width: 22px;
  height: 22px;
}

.tool-icon.text {
  background: var(--bg-blue);
  color: var(--text-blue);
}

.tool-icon.calculator {
  background: var(--bg-green);
  color: var(--text-green);
}

.tool-icon.converter {
  background: var(--bg-purple);
  color: var(--text-purple);
}

.tool-icon.generator {
  background: var(--bg-orange);
  color: var(--text-orange);
}

.tool-badge {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  background: var(--muted);
  color: var(--muted-foreground);
}

.tool-badge.popular {
  background: #fef3c7;
  color: #92400e;
}

.tool-badge.new {
  background: var(--bg-green);
  color: var(--text-green);
}

.tool-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--foreground);
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  line-height: 1.5;
  flex-grow: 1;
}

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

.tool-uses {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  gap: 4px;
}

.tool-uses svg {
  width: 14px;
  height: 14px;
}

.tool-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.tool-arrow svg {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
  transition: all 0.2s;
}

.tool-card:hover .tool-arrow {
  background: var(--primary);
}

.tool-card:hover .tool-arrow svg {
  color: white;
  transform: translateX(2px);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-ad {
  width: 300px;
  height: 250px;
}

.sidebar-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.sidebar-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-card h3 svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.popular-tools-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.popular-tool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--muted);
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.popular-tool-item:hover {
  background: var(--border);
}

.popular-tool-rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--foreground);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popular-tool-item:nth-child(1) .popular-tool-rank {
  background: #f59e0b;
}

.popular-tool-item:nth-child(2) .popular-tool-rank {
  background: #94a3b8;
}

.popular-tool-item:nth-child(3) .popular-tool-rank {
  background: #cd7c32;
}

.popular-tool-name {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Stats Summary */
.stats-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-item {
  text-align: center;
  padding: 16px 12px;
  background: var(--muted);
  border-radius: 8px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 4px;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 80px 24px;
  background: var(--background);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.no-results svg {
  width: 64px;
  height: 64px;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}

.no-results h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.no-results p {
  color: var(--muted-foreground);
}

/* Responsive */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .sidebar-ad {
    width: 100%;
    height: 200px;
  }
}

@media (max-width: 768px) {
  .page-header {
    padding: 32px 0;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .search-filter-section {
    top: 72px;
  }

  .search-filter-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: 100%;
  }

  .filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .filter-tab {
    flex-shrink: 0;
  }

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

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

  .ad-leaderboard {
    height: 60px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .tool-card {
    padding: 20px;
  }

  .tt-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}