/* K4电竞 - 文章页样式 */

/* 文章页背景图 - 与全站bg-stack系统配合 */
body {
  --page-bg-url: url('/assets/img/bg/sanjiaozhou-bg-1920.webp');
  --bg-position: center;
  --bg-scale: cover;
  --bg-image-brightness: 0.95;
  --bg-image-brightness-mobile: 0.85;
  --bg-image-brightness-small: 0.8;
}

main {
  position: relative;
  z-index: 1;
}

.entry-content {
  max-width: 48rem;
  margin: 0 auto;
}

.entry-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(245, 248, 255, 0.95);
  font-family: 'Orbitron', system-ui, sans-serif;
}

.entry-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(245, 248, 255, 0.9);
}

.entry-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(245, 248, 255, 0.85);
}

.entry-content p {
  margin-bottom: 1.25rem;
  color: rgba(209, 213, 219, 0.95);
  line-height: 1.8;
  font-size: 0.95rem;
}

.entry-content a {
  text-decoration: none;
  color: var(--accent, #d8c38f);
  background: linear-gradient(to right, rgba(216, 195, 143, 0.55), rgba(216, 195, 143, 0.35));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .25s ease;
}

.entry-content a:hover {
  background-size: 100% 2px;
}

.entry-content img {
  border-radius: 1rem;
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
}

.entry-content blockquote {
  border-left: 3px solid var(--accent, #d8c38f);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 0.75rem 0.75rem 0;
  color: rgba(209, 213, 219, 0.85);
  font-style: italic;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
  color: rgba(209, 213, 219, 0.9);
  line-height: 1.7;
}

.entry-content ul li::marker {
  color: var(--accent, #d8c38f);
}

.entry-content ol li::marker {
  color: var(--accent, #d8c38f);
  font-weight: 600;
}

.entry-content code {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.45rem;
  border-radius: 0.3rem;
  font-size: 0.875rem;
  color: rgba(245, 248, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.entry-content pre {
  background: rgba(5, 7, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0.75rem;
  overflow: hidden;
}

.entry-content th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 600;
  color: rgba(245, 248, 255, 0.95);
  background: rgba(255, 255, 255, 0.04);
}

.entry-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(209, 213, 219, 0.9);
}

.entry-content hr {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 2rem 0;
}

/* 标签样式 */
.entry-content + div .tag-cloud-link,
a[rel="tag"] {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  margin: 0.2rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(216, 195, 143, 0.08);
  border: 1px solid rgba(216, 195, 143, 0.15);
  color: rgba(216, 195, 143, 0.85);
  text-decoration: none;
  transition: all 0.2s ease;
}

a[rel="tag"]:hover {
  border-color: rgba(216, 195, 143, 0.35);
  background: rgba(216, 195, 143, 0.12);
}

/* 分页样式 */
.k4-pagination .nav-links {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.k4-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: rgba(209, 213, 219, 0.8);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: all 0.2s ease;
}

.k4-pagination .page-numbers:hover {
  border-color: rgba(216, 195, 143, 0.3);
  color: rgba(245, 248, 255, 0.95);
}

.k4-pagination .page-numbers.current {
  background: rgba(216, 195, 143, 0.12);
  border-color: rgba(216, 195, 143, 0.4);
  color: var(--accent, #d8c38f);
  font-weight: 600;
}

/* === Post Content 文章正文样式（升级版） === */
.post-content {
  color: var(--text, #e5e7eb);
  line-height: 1.8;
  font-size: 16px;
}

.post-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text, #e5e7eb);
  border-bottom: 1px solid var(--line, rgba(255,255,255,.09));
  padding-bottom: 0.5rem;
}

.post-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text, #e5e7eb);
}

.post-content p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  color: rgba(229, 231, 235, 0.9);
}

.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.post-content ul { list-style-type: disc; }
.post-content ol { list-style-type: decimal; }

.post-content li {
  margin-bottom: 0.75rem;
  line-height: 1.8;
  padding-left: 0.5rem;
}

.post-content li::marker { color: var(--cyan, #22d3ee); }

.post-content blockquote {
  border-left: 4px solid var(--cyan, #22d3ee);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(34,211,238,0.05);
  border-radius: 0 0.5rem 0.5rem 0;
  color: rgba(229, 231, 235, 0.85);
  font-style: italic;
}
.post-content blockquote p { margin-bottom: 0.5rem; }
.post-content blockquote p:last-child { margin-bottom: 0; }

.post-content hr {
  border: none;
  border-top: 1px solid var(--line, rgba(255,255,255,.09));
  margin: 2.5rem 0;
}

.post-content figure {
  margin: 2.5rem 0;
  text-align: center;
}

.post-content figcaption {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted, #9ca3af);
  text-align: center;
  line-height: 1.6;
}

.post-content img {
  border-radius: 0.5rem;
  max-width: 100%;
  height: auto;
}

.post-content video {
  border-radius: 0.5rem;
  max-width: 100%;
  height: auto;
}

.post-content code {
  background: rgba(0,0,0,0.3);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  color: var(--cyan, #22d3ee);
}

.post-content a {
  color: var(--cyan, #22d3ee);
  text-decoration: underline;
  text-decoration-color: rgba(34,211,238,0.3);
  transition: text-decoration-color 0.2s;
}

.post-content a:hover {
  text-decoration-color: var(--cyan, #22d3ee);
}

/* 摘要框 */
.article-summary {
  border: 1px solid rgba(34, 211, 238, 0.2);
  background: linear-gradient(to right, rgba(34, 211, 238, 0.05), transparent);
}

/* 适用人群框 */
.article-audience {
  border: 1px solid rgba(251, 113, 133, 0.2);
  background: linear-gradient(to right, rgba(251, 113, 133, 0.05), transparent);
}


/* Target code copy interaction */
.k4-copy-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0.15rem;
}

.post-content code.k4-copy-target {
  cursor: pointer;
  user-select: all;
}

.k4-copy-btn {
  border: 1px solid rgba(34, 211, 238, 0.38);
  background: rgba(34, 211, 238, 0.10);
  color: rgba(226, 232, 240, 0.95);
  border-radius: 0.45rem;
  padding: 0.14rem 0.5rem;
  font-size: 0.74rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.k4-copy-btn:hover {
  border-color: rgba(34, 211, 238, 0.7);
  background: rgba(34, 211, 238, 0.22);
}

.k4-copy-btn.k4-copy-ok {
  border-color: rgba(16, 185, 129, 0.7);
  background: rgba(16, 185, 129, 0.22);
  color: #d1fae5;
}

@media (max-width: 768px) {
  .k4-copy-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.2rem;
  }
}
