/* =========================
   COMPONENTS
   ========================= */

/* ======================
   HEADER (moved from header.jte)
   ====================== */

html:not(.js-loaded) header {
  transition: none !important;
}

html:not(.js-loaded) footer.bottom-nav {
  transition: none !important;
}

/* Header Styles */
header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  z-index: var(--z-sticky);
  transition: transform var(--transition-slow);
  box-sizing: border-box;
}

.logo {
  font-size: var(--font-size-3xl);
  font-weight: bold;
}

.header-actions {
  display: flex;
  gap: var(--space-6);
  font-size: var(--font-size-base);
}

.pc-header .container,
.pc-header .nav-content,
.pc-header .nav-content ul {
  position: static !important;
}

/* Navigation 中与 pc-header 相关的那部分 */
.pc-header .nav-content ul {
  padding: 0 var(--space-8);
}

.pc-header .nav-content li {
  padding: var(--space-4) 0;
  font-size: var(--font-size-xl);
  border-bottom: 0.0625rem solid var(--color-border);
}

.pc-header .nav-content a {
  display: block;
  padding: var(--space-2) 0;
}

/* 桌面端导航栏样式 */
.pc-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  will-change: transform;
}

.pc-header img.icon {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}

.pc-header .container {
  display: flex;
  align-items: center;
  max-width: 90%;
}

.pc-header .nav-content {
  flex: 1;
  order: 1;
}

.pc-header .nav-content ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--space-2);
  align-items: center;
}

.pc-header .nav-content li {
  border: none;
  padding: 0;
}

.pc-header .nav-content li a {
  padding: var(--space-2) var(--space-4);
  white-space: nowrap;
  border-radius: var(--radius-base);
  transition: background-color var(--transition-fast);
  border: 0;
  outline: none;
}

.pc-header .nav-content li.nav-item {
  position: relative;
  margin: 0;
}

.pc-header .nav-content li .normal-category {
  font-weight: 500;
}

.pc-header .nav-content li.nav-item.active > .normal-category,
.pc-header .nav-content li .normal-category.active {
  color: var(--color-secondary);
  text-shadow: 0 0 0 currentColor, 0.4px 0 0 currentColor;
}

.pc-header .nav-content li .normal-category::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 1.2em;
  height: 2px;
  background: transparent;
  transform: translateX(-50%) scaleX(0);
  transition:
    transform 180ms ease,
    background 180ms ease;
  border-radius: 2px;
}

.pc-header .nav-content li .normal-category.active::after,
.pc-header .nav-content li.nav-item.active > .normal-category::after {
  background: var(--color-secondary);
  transform: translateX(-50%) scaleX(1);
}

.pc-header .nav-content li .normal-category:hover::after {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(-50%) scaleX(1);
}

.pc-header .nav-content li .normal-category:focus {
  outline: none;
}
.pc-header .nav-content li .normal-category:focus-visible {
  outline: 2px solid rgba(47, 192, 141, 0.18);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.mobile-header .header-actions {
  display: flex;
  align-items: center;
}

.mobile-header .header-actions .action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-header .header-actions .action-item .icon {
  width: 2rem;
  height: 2rem;
  display: block;
}

/* pc header 下的 header-actions */
.pc-header .header-actions {
  order: 2;
  display: flex;
  align-items: center;
}

.pc-header .header-actions .action-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  background: var(--color-header-action-bg);
  cursor: pointer;
}

.pc-header .header-actions .search-shell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  height: 2.5rem;
  width: 2.5rem;
  background: var(--color-header-action-bg);
  border-radius: 999px;
  overflow: hidden;
  transition: width 0.35s ease;
  padding: 0;
}

.pc-header .header-actions .search-shell.open {
  width: 8rem;
}

.pc-header .header-actions .search-shell .icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
  cursor: pointer;
}

.pc-header .header-actions .search-shell .search-form {
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 0;
}

.pc-header .header-actions .search-shell .search-input {
  max-width: 0;
  opacity: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--color-text);
  padding: 0;
  transition:
    max-width 0.35s ease,
    opacity 0.25s ease;
  font: inherit;
  min-width: 0;
}

.pc-header .header-actions .search-shell.open .search-input {
  max-width: 8rem;
  opacity: 1;
  padding: 0 0.25rem 0 0;
}

.pc-header .header-actions .action-item .icon {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}

/* 推荐 nav-recommend popover */
.pc-header .nav-content .nav-recommend::after {
  display: inline-block;
  margin-left: 0.255rem;
  vertical-align: 0.255rem;
  content: "";
  border-top: 0.3rem solid;
  border-right: 0.3rem solid transparent;
  border-bottom: 0;
  border-left: 0.3rem solid transparent;
}

.pc-header .nav-content .nav-recommend-item {
  position: relative;
  overflow: visible !important;
}

.pc-header .nav-content .recommend-popover {
  position: fixed;
  width: 9rem;
  max-height: 70vh;
  overflow-y: auto;
  background: #343232;
  border-radius: 6px;
  padding: 0.625rem 0;
  z-index: 999;
  display: none;
}

.pc-header .nav-content .recommend-popover ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pc-header .nav-content .recommend-popover li {
  width: 100%;
  padding: 0.5rem 0;
  align-items: center !important;
  text-align: center;
}

.pc-header .nav-content .recommend-popover li a {
  text-decoration: none;
  color: #fff;
  font-size: 0.875rem;
}

.pc-header .nav-content .recommend-popover li:hover {
  background: rgba(255, 255, 255, 0.1);
}

.pc-header .nav-content .recommend-popover.open {
  display: block;
}

/* ============== 媒体查询内 header 相关样式 ============== */

/* 减少动画模式支持里的 header 部分 */
@media (prefers-reduced-motion: reduce) {
  header {
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Nav (mobile) ---------- */
/* 导航菜单基础样式 */
.mobile-nav-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width-mobile);
  height: 100%;
  background: linear-gradient(
    to bottom,
    var(--color-accent),
    var(--color-secondary)
  );
  box-shadow: var(--shadow-xl);
  z-index: var(--z-nav);
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-top: var(--space-16);
}

.mobile-nav-menu.active {
  transform: translateX(0);
}

.mobile-nav-menu .scroller {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 6.25rem;
}

.mobile-nav-menu .nav-title {
  text-align: center;
  font-size: var(--font-size-4xl);
  margin: var(--space-8) 0 var(--space-4);
  font-weight: bold;
}

.mobile-nav-menu .nav-search {
  display: flex;
  justify-content: center;
  margin: var(--space-4) 0;
}

/* 包裹 input 和按钮 */
.mobile-nav-menu .search-wrapper {
  position: relative;
}

/* 输入框样式 */
.mobile-nav-menu .search-wrapper input {
  width: 100%;
  padding: var(--space-2) var(--space-10) var(--space-2) var(--space-2);
  border: none;
  border-radius: var(--radius-2xl);
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  font-size: var(--font-size-base);
}

.mobile-nav-menu .search-wrapper input::placeholder {
  color: var(--color-text-secondary);
}

.search-wrapper input:focus {
  outline: 0.125rem solid rgba(255, 255, 255, 0.3);
  outline-offset: 0.125rem;
}

/* 搜索按钮（图标）样式 */
.mobile-nav-menu .search-wrapper button {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 var(--space-2);
}

.mobile-nav-menu .search-wrapper button:hover {
  color: rgba(255, 255, 255, 0.8);
}

.mobile-nav-menu .nav-content {
  margin-top: 1rem;
}

.mobile-nav-menu .nav-content .menu {
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.mobile-nav-menu .nav-content li {
  list-style: none;
  padding: 0;
}

.mobile-nav-menu .nav-content li a {
  padding: 0.5rem 1.75rem;
  position: relative;
  display: block;
  font-size: var(--font-size-2xl);
  text-align: center;
  font-weight: 300;
  -webkit-transition: color 0.2s linear;
  -moz-transition: color 0.2s linear;
  -ms-transition: color 0.2s linear;
  -o-transition: color 0.2s linear;
  transition: color 0.2s linear;
}

.mobile-nav-menu .side-toolbar {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: #131313;
  padding-top: 1rem;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-menu .side-toolbar .side-toolbar-list {
  text-align: center;
}

.mobile-nav-menu .side-toolbar .side-toolbar-list li {
  display: inline-block;
  margin: 0 0.25rem 0.25rem;
}

.mobile-nav-menu .side-toolbar .side-toolbar-list li a {
  display: inline-block;
  align-items: center;
  padding: var(--space-4);
  border-radius: 100%;
  width: 50px;
  height: 50px;
  background: #2c2a2a;
  color: #ccc;
}

.mobile-nav-menu .side-toolbar .side-toolbar-list li a .icon {
  width: 1.5rem;
}

/* ---------- Filter Bar ---------- */
/* 筛选栏整体容器 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;

  margin: 12px 10px 0;
  padding: 8px 12px;

  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

/* 单个筛选项 */
.filter-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 3px 16px;
  min-width: 56px;

  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* 激活状态 */
.filter-item.active {
  background-color: var(--color-secondary);
  color: #ffffff;
}

/* ---------- Page Navigator ---------- */
.page-navigator {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0;
  margin: 2.875rem 1rem 1.25rem 1rem;
  height: 2.625rem;
}
.page-navigator > .prev,
.page-navigator > .next {
  border: 1px solid var(--color-border-primary) !important;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  display: inline-block;
}
.page-navigator .page-size {
  color: var(--color-text-secondary);
}
.page-navigator .page-input-li.jump-to-page-li {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}
.page-navigator .jump-to-label {
  color: var(--color-text);
  white-space: nowrap;
  margin-right: 0.75rem;
}
.page-navigator .page-jumper-input {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--color-text-secondary);
  background-color: transparent;
  border-radius: 0.5rem;
  font-size: 1.5rem;
  color: var(--color-text);
  text-align: center;
}

/* ---------- Article Card/List ---------- */
.content-list {
  display: flex;
  flex-direction: column;
  margin: 0 10px;
}

.article {
  display: flex;
  margin: 0.5rem 0;
  cursor: pointer;
  width: 100%;
  background: #383737;
  border-radius: 6px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;

  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.article:hover {
  background: #303030;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  transform: translateY(-1px);
}

.article .sub-flag {
  --flag-size: 66px;
  position: absolute;
  top: 0;
  left: 0;
  width: var(--flag-size);
  height: var(--flag-size);
  z-index: 5;
  pointer-events: none;

  clip-path: polygon(0 0, 100% 0, 0 100%);
  display: block;
}

/* 颜色 */
.article .sub-flag.hot {
  background: #f43f5ecc;
}
.article .sub-flag.recommend {
  background: #1abc9ccc;
}

.article .sub-flag > span {
  position: absolute;
  top: 50%;
  left: 50%;

  transform: translate(-80%, -90%) rotate(-45deg);
  transform-origin: center;

  /* 文字样式 */
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;

  padding: 2px 8px;
}

@media (max-width: 600px) {
  .article .sub-flag {
    --flag-size: 4rem;
  }
  .article .sub-flag > span {
    font-size: 13px;
    padding: 2px 6px;
  }
}

.article .post-card-mask {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* background: rgba(0, 0, 0, 0.2); */
  z-index: 1;
}
.article .post-card-mask .post-card-container {
  padding: 20px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  min-height: 92px;
}

.article .post-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 400 !important;
}

.article .article-info {
  padding: 6px 6px 12px;
  display: flex;
  flex-direction: column;
}

.article .article-info .article-title {
  font-size: 1.25rem;
  margin-bottom: 6px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 400 !important;
}

.article .article-info .tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 6px;
}

.article .article-info .tag-list .tag-item {
  margin-right: 10px;
  color: var(--color-secondary);
}

.article .article-info .ext-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.article .article-info .ext-wrap .time-box {
  display: flex;
  align-items: center;
}

.article .article-info .ext-wrap .icon {
  width: 16px;
  display: block;
  margin-right: 5px;
}

.article .article-info .ext-wrap span {
  font-size: var(--font-size-sm);
  color: #aaa;
}

.article .article-info .ext-wrap .view-comment-box {
  display: flex;
  align-items: center;
}

.article .article-info .ext-wrap .view-count {
  display: flex;
  align-items: center;
  margin-right: 12px;
}

.article .article-info .ext-wrap .comment-count {
  display: flex;
  align-items: center;
}

/* ---------- Banner image ---------- */
.banner-insert {
  width: 100%;
}

.banner-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* .banner-media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #222;
  border-radius: 6px;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease;
} */

.banner-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 6px;
}

.banner-link:hover .banner-media {
  transform: translateY(-1px);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.banner-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

/* ---------- Content Detail ---------- */
.content-detail .article-detail-html-container {
  padding: 0 0.75rem 0 0.75rem;
}

.article-detail-title-wrap {
  margin: 0 0.75rem;
}

.article-detail-title-wrap h1 {
  font-weight: 400;
  text-align: center;
  margin: 1rem 0;
}
.article-detail-title-wrap .post-meta {
  color: #aaa;
  text-align: center;
  font-size: 0.875rem;
}
.article-detail-title-wrap .post-meta li {
  display: inline-block;
  margin-bottom: 0.9375rem;
  white-space: nowrap;
}
.content-detail .post-content {
  word-wrap: break-word;
  line-height: 1.8;
  letter-spacing: 0.013rem;
}
.content-detail .post-content p {
  margin-bottom: 1.25rem;
}
.content-detail .post-content p img {
  max-width: 100%;
  display: block;
  margin: 1.25rem auto;
}

/* 外层：左标签 / 右时间 */
.content-detail .tags {
  margin-top: 0.9375rem;
  padding: 0.625rem 0.75rem 0 0.75rem;
  min-height: 2rem;
  font-size: 1rem;
  color: #777;

  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.5rem;
}

.content-detail .tags .keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.content-detail .tags .keywords > a {
  margin: 0;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.875rem;
  line-height: 1.2;
  background: #343232;
  color: #bcbcbc;
  font-weight: 400;
  text-decoration: none;
}

.content-detail .tags .keywords > a:hover {
  filter: brightness(1.1);
}

.content-detail .tags .modify-time {
  margin: 0;
  color: #bcbcbc;
  white-space: nowrap;
  justify-self: end;
  font-size: 0.875rem;
}

/** 另种展示样式的tags */
.tags-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0.75rem;
}

.tags-bar .modify-time {
  margin-right: 10px;
}

.tags-bar .tag-item {
  margin-right: 10px;
  color: var(--color-secondary);
}

/** article detail bottom */
.article-detail-bottom {
  margin: 0.75rem;
}

.article-detail-bottom .like-view-wrap {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.article-detail-bottom .like-view-wrap .like-count {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.article-detail-bottom .like-view-wrap .view-count {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.article-detail-bottom .like-view-wrap .icon {
  width: 30px;
  height: 30px;
  display: block;
}

.article-detail-bottom .like-view-wrap span {
  text-align: center;
  margin-top: 6px;
}

/** copy action */
.copy-action {
  margin: 2rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.copy-action .copy-text {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  color: #fff6a9;
  text-shadow:
    0 0 5px orange,
    0 0 15px orange,
    0 0 20px orange,
    0 0 40px orange,
    0 0 60px red,
    0 0 10px #ff8d00,
    0 0 98px red;
}

.copy-action.copied .copy-text {
  color: #fff;
  text-shadow:
    0 0 10px #fff,
    0 0 20px #fff,
    0 0 30px #e60073,
    0 0 40px #e60073,
    0 0 50px #e60073,
    0 0 60px #e60073,
    0 0 70px #e60073;
}

/* ---------- Footer ---------- */
.bottom-nav {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0 8px 4px;
  transition: transform var(--transition-slow);
}

.footer-menu-bar {
  display: flex;
  justify-content: space-between;
  padding: 2rem 0 1rem;
  border-top: 1px solid #ffffff1a;
}

.footer-menu-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-menu-bar a .icon {
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 2.2rem;
  display: block;
  object-fit: contain;
  aspect-ratio: 1 / 1;
}

.footer-menu-bar a .icon-item-label {
  margin-top: 6px;
}

.footer-section {
  padding: 2rem 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}
.footer-section p {
  text-align: left;
}
.footer-section .footer-title {
  color: var(--color-text);
  margin-left: 0.5rem;
  font-weight: 600;
}
.footer-section .footer-content {
  padding: 1rem 0;
  margin-left: 0.5rem;
}
.footer-section .permanent-domain {
  margin-left: 0.5rem;
}
.footer-section .permanent-domain a {
  color: var(--color-secondary);
}
.footer-section .category-list {
  display: flex;
  flex-wrap: wrap;
  color: var(--color-secondary);
}
.footer-section .category-item {
  padding: 0.25rem 0.5rem;
}
.footer-section .footer-content-label {
  text-align: left;
  margin-top: 0.25rem;
  margin-left: 0.5rem;
}
.footer-section .often-action {
  display: flex;
  flex-wrap: wrap;
  color: var(--color-secondary);
}
.footer-section .often-action-item {
  padding: 0.25rem 0.5rem;
}

/* =========================
   Comment Component
   ========================= */
/*
/* ===============================
   评论样式
   =============================== */
.comment-section {
  margin-top: 2.5rem;
  border-top: 0.0625rem solid #ffffff1a;
  padding: 1.875rem var(--space-3) 0 var(--space-3);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.comment-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ccc;
  margin: 0;
}

.comment-count {
  color: #8590a6;
  font-size: 0.875rem;
}

.comment-form-container {
  margin-bottom: 1.875rem;
}

.comment-form {
  border-radius: 0.5rem;
  padding: 1rem;
}

.comment-textarea {
  width: 100%;
  border: 0.0625rem solid #e8e8e8;
  border-radius: 0.25rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  resize: vertical;
  background: #2c2a2a;
  font-family: inherit;
  box-sizing: border-box;
  color: #fff;
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 0.125rem rgba(24, 144, 255, 0.1);
}

.comment-actions {
  margin-top: 0.75rem;
  text-align: right;
}

.submit-comment {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  background: var(--color-secondary);
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-comment:hover {
  background: #40a9ff;
}

.submit-comment:disabled {
  background: #d9d9d9;
  cursor: not-allowed;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-item {
  border-bottom: 0.0625rem solid #ffffff1a;
  padding-bottom: 1.25rem;
}

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

.comment-content {
  display: flex;
  gap: 0.75rem;
}

.reply-comment {
  margin-left: 3rem;
}

.comment-avatar {
  flex-shrink: 0;
}

.comment-avatar img,
.default-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}

.default-avatar {
  background: var(--color-secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.comment-author {
  font-weight: 500;
  color: #999;
  font-size: 0.875rem;
}

.comment-time {
  color: #8590a6;
  font-size: 0.75rem;
}

.reply-to {
  font-size: 0.75rem;
  color: #8590a6;
  margin-bottom: 0.25rem;
}

.reply-user {
  color: var(--color-secondary);
  font-weight: 500;
}

.comment-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #999;
  margin-bottom: 0.5rem;
  word-wrap: break-word;
}

.comment-actions-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-like,
.btn-reply {
  background: none;
  border: none;
  color: #8590a6;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.btn-like:hover,
.btn-reply:hover {
  background: #f5f5f5;
  color: #1a1a1a;
}

.btn-like.liked {
  color: var(--color-secondary);
}

.btn-like.liked:hover {
  background: #f0f8ff;
}

.reply-form-container {
  margin-top: 0.75rem;
}

.reply-form {
  border-radius: 0.25rem;
  padding: 0.75rem;
}

.reply-textarea {
  width: 100%;
  border: 0.0625rem solid #e8e8e8;
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  resize: vertical;
  background: #2c2a2a;
  font-family: inherit;
  box-sizing: border-box;
  color: #fff;
}

.reply-textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 0.125rem rgba(24, 144, 255, 0.1);
}

.reply-actions {
  margin-top: 0.5rem;
  text-align: right;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.reply-actions .btn {
  padding: 0.375rem 0.75rem;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.reply-actions .btn-primary {
  background: var(--color-secondary);
  color: white;
}

.reply-actions .btn-primary:hover {
  background: #40a9ff;
}

.reply-actions .btn-primary:disabled {
  background: #d9d9d9;
  cursor: not-allowed;
}

.reply-actions .btn-secondary {
  background: #f5f5f5;
  color: #595959;
}

.reply-actions .btn-secondary:hover {
  background: #e8e8e8;
}

.reply-actions .btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.child-comments {
  margin-top: 1rem;
  border-left: 0.125rem solid #ffffff1a;
  padding-left: 1rem;
}

.show-more-replies,
.collapsed-replies {
  margin-top: 0.5rem;
}

.btn-show-more,
.btn-show-collapsed {
  background: none;
  border: none;
  color: #8590a6;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  transition: all 0.2s ease;
  border-radius: 0.25rem;
}

.btn-show-more:hover,
.btn-show-collapsed:hover {
  color: var(--color-secondary);
  background: #f5f5f5;
}

.btn-show-more .icon {
  font-size: 0.625rem;
  transition: transform 0.2s ease;
}

.btn-show-more .icon {
  transform: rotate(0deg);
}

.btn-show-more.expanded .icon {
  transform: rotate(180deg);
}

.no-comments {
  text-align: center;
  padding: 2.5rem 0;
  color: #8590a6;
  font-size: 0.875rem;
}

.comment-loading {
  text-align: center;
  padding: 1.5rem;
  color: #8590a6;
  font-size: 0.875rem;
}

.comment-error {
  text-align: center;
  padding: 1.5rem;
  color: #ff4d4f;
  background: #fff2f0;
  border-radius: 0.25rem;
  margin: 1rem 0;
  font-size: 0.875rem;
  border: 0.0625rem solid #ffccc7;
}

.comment-message {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  color: white;
  z-index: 10000;
  max-width: 20rem;
  word-wrap: break-word;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

.comment-message-success {
  background: #52c41a;
}
.comment-message-error {
  background: #ff4d4f;
}
.comment-message-warning {
  background: #faad14;
}
.comment-message-info {
  background: var(--color-secondary);
}

.comment-item {
  animation: fadeIn 0.3s ease;
}
.reply-form-container {
  animation: fadeIn 0.2s ease;
}

.comment-textarea::-webkit-scrollbar,
.reply-textarea::-webkit-scrollbar {
  width: 0.375rem;
}
.comment-textarea::-webkit-scrollbar-track,
.reply-textarea::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0.25rem;
}
.comment-textarea::-webkit-scrollbar-thumb,
.reply-textarea::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 0.25rem;
}
.comment-textarea::-webkit-scrollbar-thumb:hover,
.reply-textarea::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* =========================
   Video Player Component
   ========================= */
/*
/* 视频播放器样式 - 使用rem单位 */
.video-player-section {
  margin: 2rem var(--space-3);
  padding: 1rem 0;
  border-top: 1px solid #ffffff1a;
}

.video-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
  text-align: center;
}

.video-player-container {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  background: #000;
  position: relative;
}

/* 视频封面样式 */
.video-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.video-cover.hidden {
  opacity: 0;
  pointer-events: none;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.video-cover:hover .cover-overlay {
  background: rgba(0, 0, 0, 0.5);
}

.play-button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(0.5rem);
}

.play-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.video-loading-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 18.75rem;
  background: #1a1a1a;
  color: #fff;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 5;
}

.loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 0.25rem solid #333;
  border-top: 0.25rem solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.video-error-state {
  text-align: center;
  padding: 2rem;
  background: #2a2a2a;
  color: #ff6b6b;
  height: 18.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.retry-button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}

.retry-button:hover {
  background: #2980b9;
}

/* 无封面图时的播放器样式 */
.video-player-container.no-cover .plyr--video {
  background: #000;
}

/** tile banner wrap **/
.tile-banner {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0.65rem;
}

.tile-banner .banner-item {
  width: 50%;
  height: 64px;
  padding: 0.1rem;
  box-sizing: border-box;
}

.tile-banner .banner-item img {
  width: 100%;
  height: 100%;
  display: block;
}

/** only banner title wrap **/
.banner-only-title-grid {
  display: grid;
  gap: 1rem;
  padding: 10px 0;
  margin: 0 0.75rem;
}

.banner-only-title-item {
  display: flex;
  align-items: center;
  justify-content: center;

  height: 44px;
  padding: 0 8px;

  font-size: var(--font-size-base);
  color: #e5e5e5;
  text-decoration: none;

  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 10px;

  background: transparent;
  box-sizing: border-box;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/** seg title bar */
.seg-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0.75rem;
}

.seg-video-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 0.75rem;
}

.seg-bar {
  width: 4px;
  height: 1.2rem;
  border-radius: 2px;
  background: var(--color-secondary);
}

.seg-text {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

/** grid banner wrap  */
.recommend-grid-banner-wrap {
  margin-top: 12px;
}

.recommend-grid-banner {
  display: grid;
  width: 100%;
  gap: 12px;
  margin: 0 0.75rem;
}

.recommend-grid-banner .grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  min-width: 0;
}

.recommend-grid-banner .grid-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.recommend-grid-banner .grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recommend-grid-banner .grid-name {
  margin-top: 6px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;

  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 响应式设计 */
@media (max-width: 48rem) {
  .video-player-section {
    margin: 1.5rem var(--space-3);
  }

  .video-title {
    font-size: 1.25rem;
  }

  .video-loading-state,
  .video-error-state {
    height: 15rem;
  }

  .play-button {
    width: 4rem;
    height: 4rem;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 确保 Plyr 播放器正确显示 */
.plyr {
  border-radius: 0.5rem;
}

.plyr__video-wrapper {
  background: #000;
}

/* 隐藏原生视频控件直到Plyr初始化完成 */
#article-video-player {
  opacity: 0;
  transition: opacity 0.3s ease;
}

#article-video-player.plyr-ready {
  opacity: 1;
}

/* ---------- Responsive: component-level ---------- */
@media (max-width: 768px) {
  body.menu-open header {
    transform: translateX(var(--nav-width-mobile)) !important;
  }

  .pc-header {
    display: none;
  }

  .mobile-header {
    display: flex;
  }

  .banner-only-title-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .content-detail .post-content p,
  .content-detail .post-content p span {
    font-size: 1.125rem !important;
  }

  .content-detail .tags {
    grid-template-columns: 1fr;
  }
  .content-detail .tags .modify-time {
    justify-self: start;
    white-space: normal;
  }

  .page-navigator {
    margin-top: 2rem;
  }
  .page-navigator .page-input-li.jump-to-page-li {
    font-size: 1.25rem;
  }
  .page-navigator .page-jumper-input {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }

  .footer-section .footer-title,
  .footer-section .permanent-domain,
  .footer-section .footer-content,
  .footer-section .category-list,
  .footer-section .footer-content-label,
  .footer-section .often-action .often-action-item {
    font-size: 1rem;
  }

  .article {
    flex-direction: column;
    align-items: flex-start;
    margin: 0.75rem 0;
  }

  .banner-insert {
    margin: 0.75rem 0;
  }

  .recommend-grid-banner {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 769px) {
  .main-content .inner .blog-title {
    font-weight: 400;
    font-size: 1.5rem;
    padding-top: var(--space-3);
  }

  .page-navigator > .prev,
  .page-navigator > .next {
    padding: 0.5rem 1.5rem;
  }

  .page-navigator .page-size {
    font-size: 1.125rem;
  }

  .footer-section .footer-title,
  .footer-section .permanent-domain,
  .footer-section .footer-content,
  .footer-section .category-list,
  .footer-section .footer-content-label,
  .footer-section .often-action .often-action-item {
    font-size: 1.25rem;
  }

  .article {
    flex-direction: column;
    margin: 1rem 0;
  }

  .banner-insert {
    margin: 1rem 0;
  }

  .hamburger {
    display: none;
  }

  .mobile-header {
    display: none;
  }

  .pc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(52, 50, 50, 0.7);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }

  .pc-header .header-actions {
    order: 2;
    display: flex;
    align-items: center;
  }

  .pc-header .nav-content {
    flex: 1;
    order: 1;
    margin-left: var(--space-8);
  }

  .pc-header .nav-content ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0 var(--space-8);
  }

  .pc-header .nav-content li {
    border: none;
    padding: 0;
  }

  .pc-header .nav-content a {
    padding: var(--space-1) var(--space-3);
    white-space: nowrap;
    border-radius: var(--radius-base);
    transition: background-color var(--transition-fast);
    cursor: pointer;
  }

  .banner-only-title-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .recommend-grid-banner {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

@media (min-width: 1025px) {
  .article h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 48rem) {
  .comment-content {
    gap: 0.5rem;
  }
  .reply-comment {
    margin-left: 1.5rem;
  }
  .child-comments {
    margin-left: 0;
    padding-left: 0.75rem;
    border-left-width: 0.1rem;
  }
  .comment-actions-row {
    gap: 0.75rem;
  }
  .comment-message {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* article prev/next */
.article-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0.75rem 10px;
}
.article-prev-next .pn-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px;
  text-decoration: none;
}
.article-prev-next .pn-item .label {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 4px;
}
.article-prev-next .pn-item .title {
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}
.article-prev-next .pn-item.disabled {
  visibility: hidden;
}

@media (max-width: 768px) {
  .article-prev-next {
    grid-template-columns: 1fr;
    margin-left: 0.65rem;
    margin-right: 0.65rem;
  }
}
