/* ===== CSS Variables ===== */
:root {
  --accent-color: #4a7c59;
  --accent-light: #6b9b7a;
  --accent-dark: #3a6347;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f8f9fa;
  --bg-accent: #f0f7f2;
  --border-color: #e5e5e5;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --radius: 8px;
  --max-width: 1200px;
  --gap: 24px;
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
}

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ===== Header ===== */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-color);
}

.logo span {
  color: var(--text-primary);
}

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

.nav a {
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.search-box {
  display: flex;
  gap: 8px;
}

.search-box input {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  width: 200px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent-color);
}

.search-box button {
  padding: 8px 16px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.search-box button:hover {
  background: var(--accent-dark);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--bg-accent) 0%, var(--bg-secondary) 100%);
  padding: 60px 0;
  text-align: center;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Section Title ===== */
.section-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

/* ===== Featured Review ===== */
.featured-section {
  padding: 48px 0;
}

.featured-card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.featured-image {
  background: var(--bg-secondary);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.featured-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-label {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 16px;
  width: fit-content;
}

.featured-content h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.featured-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ===== Rating ===== */
.rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.stars {
  color: #ffc107;
  font-size: 18px;
}

.rating-score {
  font-weight: 600;
  color: var(--accent-color);
}

/* ===== Categories ===== */
.categories-section {
  padding: 48px 0;
  background: var(--bg-secondary);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

.category-card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.category-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-accent);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.category-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

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

/* ===== Review List ===== */
.reviews-section {
  padding: 48px 0;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.review-card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
}

.review-image {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

.review-content h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.review-content p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.6;
}

.review-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== Sidebar Layout ===== */
.sidebar-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--gap);
  padding: 48px 0;
}

.main-content {
  min-width: 0;
}

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

/* ===== Widget ===== */
.widget {
  background: var(--bg-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.widget-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.widget-list {
  list-style: none;
}

.widget-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.widget-list li:last-child {
  border-bottom: none;
}

.widget-list a {
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.widget-list a:hover {
  color: var(--accent-color);
}

.widget-list .num {
  color: var(--text-muted);
  font-size: 12px;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 16px 0;
  background: var(--bg-secondary);
  font-size: 14px;
}

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

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

.breadcrumb span {
  color: var(--text-muted);
  margin: 0 8px;
}

.breadcrumb strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ===== Page Header ===== */
.page-header {
  padding: 40px 0;
  background: var(--bg-accent);
  text-align: center;
}

.page-header h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
}

/* ===== Sort Bar ===== */
.sort-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.sort-options {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.sort-options a {
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 4px;
}

.sort-options a.active,
.sort-options a:hover {
  background: var(--bg-accent);
  color: var(--accent-color);
}

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

.pagination a,
.pagination span {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
}

.pagination a {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.pagination a:hover {
  background: var(--accent-color);
  color: white;
}

.pagination .current {
  background: var(--accent-color);
  color: white;
}

/* ===== Article Page ===== */
.article-header {
  padding: 40px 0 24px;
}

.article-header h1 {
  font-size: 32px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.article-image {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.article-content {
  font-size: 16px;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 24px;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
  font-size: 20px;
  margin: 24px 0 12px;
}

.article-content p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

/* ===== Pros & Cons ===== */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin: 32px 0;
}

.pros,
.cons {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 24px;
}

.pros h4 {
  color: var(--accent-color);
  margin-bottom: 16px;
  font-size: 16px;
}

.cons h4 {
  color: #c0392b;
  margin-bottom: 16px;
  font-size: 16px;
}

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

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

.pros li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

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

/* ===== Rating Breakdown ===== */
.rating-breakdown {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}

.rating-breakdown h4 {
  margin-bottom: 16px;
}

.rating-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.rating-item:last-child {
  border-bottom: none;
}

.rating-bar {
  flex: 1;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  margin: 0 16px;
  overflow: hidden;
}

.rating-bar-fill {
  height: 100%;
  background: var(--accent-color);
  border-radius: 4px;
}

/* ===== Verdict Box ===== */
.verdict-box {
  background: var(--bg-accent);
  border-left: 4px solid var(--accent-color);
  padding: 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 32px 0;
}

.verdict-box h4 {
  margin-bottom: 12px;
  color: var(--accent-color);
}

.verdict-box p {
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent-color);
  color: white;
  border-radius: var(--radius);
  font-weight: 500;
  margin-right: 12px;
}

.btn:hover {
  background: var(--accent-dark);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
}

.btn-outline:hover {
  background: var(--accent-color);
  color: white;
}

/* ===== 404 Page ===== */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 0;
}

.error-content h1 {
  font-size: 120px;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 16px;
}

.error-content h2 {
  font-size: 28px;
  margin-bottom: 16px;
}

.error-content p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ===== Footer ===== */
.footer {
  background: var(--text-primary);
  color: var(--bg-secondary);
  padding: 48px 0 24px;
  margin-top: 48px;
}

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

.footer-brand .logo {
  color: var(--accent-light);
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 16px;
  margin-bottom: 16px;
  color: white;
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

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

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

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 12px;
  }

  .search-box {
    display: none;
  }

  .hero h1 {
    font-size: 28px;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .review-card {
    grid-template-columns: 1fr;
  }

  .review-image {
    min-height: 200px;
  }

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

  .pros-cons {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .error-content h1 {
    font-size: 80px;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }

  .article-header h1 {
    font-size: 24px;
  }
}
