@charset "UTF-8";

/* ===== Article Page Layout ===== */
.article-page {
  padding: 40px 0 60px;
}

.article-header {
  background: #fff;
  padding: 30px 40px;
  border-radius: 4px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.article-header h1 {
  font-size: 24px;
  line-height: 1.4;
  margin-bottom: 15px;
}

.article-meta {
  font-size: 13px;
  color: #999;
}

.article-meta span {
  margin-right: 20px;
}

.article-meta .category a {
  color: var(--secondary);
}

.article-body {
  background: #fff;
  padding: 35px 40px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  line-height: 1.9;
  font-size: 15px;
}

.article-body h2 {
  font-size: 20px;
  margin: 30px 0 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
}

.article-body h3 {
  font-size: 17px;
  margin: 25px 0 12px;
  color: var(--primary);
}

.article-body p {
  margin-bottom: 18px;
  text-indent: 2em;
  text-align: justify;
}

.article-body ul,
.article-body ol {
  margin: 15px 0 20px;
  padding-left: 30px;
}

.article-body ul li {
  list-style: disc;
  margin-bottom: 8px;
  line-height: 1.7;
}

.article-body ol li {
  list-style: decimal;
  margin-bottom: 8px;
  line-height: 1.7;
}

.article-body table {
  margin: 20px 0;
  border: 1px solid var(--border);
  font-size: 14px;
}

.article-body th,
.article-body td {
  padding: 12px 15px;
  border: 1px solid var(--border);
}

.article-body th {
  background: var(--primary);
  color: #fff;
  font-weight: 500;
}

.article-body tr:nth-child(even) td {
  background: #F8FAFC;
}

.article-body code {
  background: #F0F2F5;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 13px;
  color: #c0392b;
}

.article-body pre {
  background: #F8FAFC;
  padding: 20px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 15px 0;
  border: 1px solid var(--border);
}

.article-body pre code {
  background: none;
  padding: 0;
  color: #333;
}

.article-body blockquote {
  border-left: 3px solid var(--secondary);
  padding: 15px 20px;
  background: #F8FAFC;
  margin: 20px 0;
  font-style: italic;
  color: var(--text-light);
}

.article-body blockquote p {
  text-indent: 0;
  margin-bottom: 0;
}

.article-body strong {
  color: var(--primary);
  font-weight: 600;
}

.article-body a {
  color: var(--secondary);
  text-decoration: underline;
}

.article-body a:hover {
  color: var(--primary);
}

/* ===== Article Tags ===== */
.article-tags {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.article-tags .tag-label {
  font-size: 13px;
  color: #999;
  margin-right: 10px;
}

.article-tags a {
  display: inline-block;
  padding: 5px 14px;
  background: #F0F2F5;
  border-radius: 3px;
  font-size: 13px;
  margin-right: 8px;
  margin-bottom: 8px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
}

.article-tags a:hover {
  background: var(--primary);
  color: #fff;
}

/* ===== Related Articles ===== */
.related-articles {
  margin-top: 30px;
  background: #fff;
  padding: 25px 30px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.related-articles h3 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary);
}

.related-articles ul {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.related-articles li {
  width: 50%;
  margin-bottom: 10px;
  padding-right: 15px;
}

.related-articles li a {
  font-size: 14px;
  line-height: 1.5;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-articles li a::before {
  content: "\2022";
  color: var(--secondary);
  margin-right: 8px;
}

/* ===== Prev/Next Navigation ===== */
.article-nav {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  -ms-flex-pack: justify;
  justify-content: space-between;
  margin-top: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.article-nav a {
  font-size: 14px;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-nav .prev::before {
  content: "\2190 ";
  color: var(--secondary);
}

.article-nav .next::after {
  content: " \2192";
  color: var(--secondary);
}

/* ===== Responsive Article ===== */
@media screen and (max-width: 768px) {
  .article-header {
    padding: 20px;
  }
  .article-header h1 {
    font-size: 20px;
  }
  .article-body {
    padding: 25px 20px;
    font-size: 14px;
  }
  .article-body h2 {
    font-size: 18px;
  }
  .article-body h3 {
    font-size: 15px;
  }
  .related-articles li {
    width: 100%;
  }
  .article-nav {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
  }
  .article-nav a {
    max-width: 100%;
    margin-bottom: 10px;
  }
}
