@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0f172a;
  --secondary: #2563eb;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #f9fafb;
  line-height: 1.6;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #1d4ed8;
}

button {
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--secondary);
  color: white;
  font-weight: 500;
  transition: all 0.2s;
}

button:hover {
  background: #1d4ed8;
  box-shadow: var(--shadow-lg);
}

button:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

input {
  font-family: 'Inter', sans-serif;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Accessibility */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--secondary);
  color: white;
  padding: 8px;
  z-index: 100;
  border-radius: 0 0 6px 0;
}

.skip-to-content:focus {
  top: 0;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  color: var(--primary);
}

.logo-icon {
  font-size: 24px;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--secondary);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1e293b 100%);
  color: white;
  padding: 80px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 12px;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 18px;
  margin-bottom: 32px;
  opacity: 0.9;
}

.search-box {
  display: flex;
  gap: 8px;
  max-width: 500px;
  margin: 0 auto;
}

.search-box input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
}

.search-box button {
  padding: 12px 24px;
  background: var(--secondary);
}

/* Sections */
section {
  padding: 60px 20px;
}

section h2 {
  font-size: 32px;
  margin-bottom: 32px;
  color: var(--primary);
}

/* Grid */
.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Category Card */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s;
  color: var(--text);
}

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

.category-icon {
  font-size: 40px;
}

.category-card h3 {
  font-size: 18px;
  font-weight: 600;
}

.category-card p {
  font-size: 14px;
  color: var(--text-light);
}

/* Software Card */
.software-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.3s;
  color: var(--text);
}

.software-card:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.software-logo {
  width: 64px;
  height: 64px;
  background: #f3f4f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 12px;
}

.software-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.tagline {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 12px;
  flex-grow: 1;
}

.rating {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-light);
}

.stars {
  color: var(--secondary);
  font-weight: 600;
}

/* Guide Card */
.guide-card {
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.3s;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.guide-card:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.guide-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.guide-card p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 12px;
  flex-grow: 1;
}

.guide-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-light);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 32px;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--secondary);
}

/* Detail Page Styles */
.detail-hero {
  background: var(--bg);
  padding: 40px 20px;
  border-bottom: 1px solid var(--border);
}

.detail-header {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.detail-logo {
  width: 120px;
  height: 120px;
  background: #f3f4f6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  flex-shrink: 0;
}

.detail-info h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.detail-tagline {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.detail-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 14px;
}

.detail-meta span {
  display: flex;
  gap: 4px;
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-actions button {
  padding: 12px 24px;
  font-size: 14px;
}

.btn-visit {
  background: var(--secondary);
}

.btn-compare {
  background: #f3f4f6;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-compare:hover {
  background: #e5e7eb;
}

.btn-compare.active {
  background: var(--secondary);
  color: white;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  color: var(--text-light);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.tab-btn.active {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Features List */
.features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.feature-item {
  padding: 12px;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 14px;
}

/* Pros/Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.pros, .cons {
  padding: 20px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.pros h3 {
  color: #059669;
  margin-bottom: 16px;
}

.cons h3 {
  color: #dc2626;
  margin-bottom: 16px;
}

.pros ul, .cons ul {
  list-style: none;
  padding-left: 0;
}

.pros li, .cons li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  font-size: 14px;
}

.pros li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #059669;
  font-weight: bold;
}

.cons li:before {
  content: '✗';
  position: absolute;
  left: 0;
  color: #dc2626;
  font-weight: bold;
}

@media (max-width: 640px) {
  .pros-cons {
    grid-template-columns: 1fr;
  }
  
  .detail-header {
    flex-direction: column;
    gap: 20px;
  }
  
  .detail-logo {
    width: 100px;
    height: 100px;
    font-size: 48px;
  }
}

/* FAQs */
.faq-item {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  padding: 16px;
  background: #f9fafb;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.faq-question:hover {
  background: #f3f4f6;
}

.faq-answer {
  padding: 16px;
  display: none;
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

.faq-answer.active {
  display: block;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
  background: var(--bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.comparison-table th,
.comparison-table td {
  padding: 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  background: #f9fafb;
  font-weight: 600;
  color: var(--primary);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table .logo-cell {
  text-align: center;
  font-size: 32px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination button,
.pagination .page-current {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  transition: all 0.2s;
}

.pagination button:hover {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
  box-shadow: none;
}

.pagination .page-current {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
  font-weight: 600;
}

/* Footer */
.footer {
  background: var(--primary);
  color: #e5e7eb;
  padding: 40px 20px 20px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 32px;
}

.footer-col h4 {
  color: white;
  margin-bottom: 16px;
}

.footer-col a {
  color: #d1d5db;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: white;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #9ca3af;
}

/* Empty State */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 32px;
  }

  section h2 {
    font-size: 24px;
  }

  .nav {
    gap: 12px;
    font-size: 13px;
  }

  .header .container {
    flex-direction: column;
    gap: 12px;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box input,
  .search-box button {
    width: 100%;
  }
}
