/* ===== CSS Variables ===== */
:root {
  --accent-color: #00bcd4;
  --accent-dark: #0097a7;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --bg-dark: #2c3e50;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
  --radius: 8px;
  --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

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

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

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

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

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

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

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

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

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
}

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

/* ===== Split Screen Layout ===== */
.split-screen {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-height: 500px;
}

.split-panel {
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.split-panel.left {
  background: var(--bg-secondary);
}

.split-panel.right {
  background: var(--bg-primary);
}

.split-panel h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.split-panel p {
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.8;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: var(--radius);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--accent-color);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

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

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

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

/* ===== Article Grid ===== */
.article-section {
  padding: 60px 0;
  background: var(--bg-secondary);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.article-list {
  background: var(--bg-primary);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.article-list h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.article-list ul {
  list-style: none;
}

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

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

.article-list a {
  color: var(--text-secondary);
  display: block;
}

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

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 20px 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb ol {
  display: flex;
  list-style: none;
  gap: 10px;
  flex-wrap: wrap;
}

.breadcrumb li:not(:last-child)::after {
  content: ">";
  margin-left: 10px;
  color: var(--text-muted);
}

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

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

.breadcrumb li:last-child {
  color: var(--text-muted);
}

/* ===== Category Grid ===== */
.category-section {
  padding: 60px 0;
}

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

.category-block {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 30px;
  transition: var(--transition);
}

.category-block:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-color);
}

.category-block h3 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--text-primary);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
}

.category-items {
  list-style: none;
  margin-bottom: 20px;
}

.category-items li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
}

.category-items li:last-child {
  border-bottom: none;
}

.category-items a {
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

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

/* ===== Related Articles ===== */
.related-section {
  padding: 40px 0;
  background: var(--bg-secondary);
}

.related-list {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  list-style: none;
}

.related-list li {
  background: var(--bg-primary);
  padding: 10px 20px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

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

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

/* ===== Article Content ===== */
.article-content {
  padding: 60px 0;
}

.article-header {
  text-align: center;
  margin-bottom: 40px;
}

.article-header h1 {
  font-size: 36px;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.article-meta {
  color: var(--text-muted);
  font-size: 14px;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
}

.article-body h2 {
  font-size: 24px;
  margin: 40px 0 20px;
  color: var(--text-primary);
}

.article-body h3 {
  font-size: 20px;
  margin: 30px 0 15px;
  color: var(--text-secondary);
}

.article-body p {
  margin-bottom: 20px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-body ul,
.article-body ol {
  margin-bottom: 20px;
  padding-left: 25px;
}

.article-body li {
  margin-bottom: 10px;
  color: var(--text-secondary);
}

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

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

.error-content h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

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

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: #fff;
  padding: 40px 0;
  text-align: center;
}

.footer p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
}

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

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
  .split-screen {
    grid-template-columns: 1fr;
  }

  .split-panel {
    padding: 40px;
    min-height: 300px;
  }

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

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

@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 15px;
  }

  .nav {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .split-panel {
    padding: 30px 20px;
  }

  .split-panel h2 {
    font-size: 24px;
  }

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

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

  .section-title {
    font-size: 20px;
  }
}

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

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .article-list {
    padding: 20px;
  }

  .category-block {
    padding: 20px;
  }
}
