/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #3b82f6;
  --secondary-color: #1e40af;
  --text-color: #374151;
  --text-light: #6b7280;
  --bg-color: #f9fafb;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --rounded: 0.5rem;
  --rounded-lg: 0.75rem;
  --rounded-xl: 1rem;
  --transition: all 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2.5rem;
  background: linear-gradient(90deg, var(--primary-color), #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  text-align: center;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.125rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* Header */
.site-header {
  background-color: var(--white);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  background: var(--gray-100);
  border: none;
  border-radius: var(--rounded);
  padding: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.dark-mode-toggle:hover {
  background: var(--gray-200);
}

.sun-icon {
  display: none;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--rounded);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--text-color);
  border-color: var(--gray-300);
}

.btn-secondary:hover {
  background-color: var(--gray-50);
  transform: translateY(-2px);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 4rem 0;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--rounded-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  text-align: center;
}

.stat-number {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Categories Section */
.categories-section {
  margin: 5rem 0;
}

.section-title {
  margin-bottom: 2rem;
}

.category-group {
  margin-bottom: 3rem;
}

.category-group-title {
  color: var(--primary-color);
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.category-icon {
  background-color: rgba(59, 130, 246, 0.1);
  padding: 0.5rem;
  border-radius: var(--rounded);
  margin-right: 0.75rem;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Category Cards */
.category-card {
  display: block;
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--rounded-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.category-card h4 {
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.category-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* Popular Tools */
.popular-tools {
  margin: 5rem 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(2, 2fr);
  }
}

@media (min-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tool-card {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--rounded-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.tool-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.tool-card h4 {
  color: var(--gray-900);
}

.tool-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* Features Section */
.features {
  margin: 5rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  text-align: center;
  padding: 1.5rem;
}

.feature-icon {
  background-color: rgba(59, 130, 246, 0.1);
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.feature-card h3 {
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-light);
}

/* Footer */
.site-footer {
  background-color: var(--white);
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid var(--gray-200);
}

.footer-content {
  text-align: center;
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.footer-subtitle {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.footer-copyright,
.footer-note {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-20 {
  margin-bottom: 5rem;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}