/* 全局重置 + 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

/* 核心变量定义 */
:root {
  /* 颜色变量 */
  --color-primary: #165DFF;
  --color-primary-dark: #0F4BDB;
  --color-secondary: #36CFC9;
  --color-neutral: #F5F7FA;
  --color-white: #FFFFFF;
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;
  
  /* 间距变量 */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* 圆角变量 */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* 阴影变量 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 通用工具类 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-row {
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-grow {
  flex-grow: 1;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.items-center {
  align-items: center;
}

.items-end {
  align-items: flex-end;
}

.gap-2 {
  gap: var(--spacing-sm);
}

.gap-3 {
  gap: var(--spacing-md);
}

.gap-6 {
  gap: var(--spacing-xl);
}

.gap-8 {
  gap: var(--spacing-2xl);
}

.flex-1 {
  flex: 1;
}

.w-full {
  width: 100%;
}

.max-w-md {
  max-width: 28rem;
}

.mb-2 {
  margin-bottom: var(--spacing-sm);
}

.mb-4 {
  margin-bottom: var(--spacing-md);
}

.mb-6 {
  margin-bottom: var(--spacing-xl);
}

.mt-8 {
  margin-top: var(--spacing-2xl);
}

.py-2 {
  padding-top: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
}

.py-3 {
  padding-top: var(--spacing-md);
  padding-bottom: var(--spacing-md);
}

.py-8 {
  padding-top: var(--spacing-2xl);
  padding-bottom: var(--spacing-2xl);
}

.px-3 {
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

.px-4 {
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

.px-6 {
  padding-left: var(--spacing-xl);
  padding-right: var(--spacing-xl);
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.rounded {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-xl {
  border-radius: var(--radius-xl);
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.transition-colors {
  transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.transition-all {
  transition: all 0.2s ease-in-out;
}

.opacity-90 {
  opacity: 0.9;
}

.overflow-x-auto {
  overflow-x: auto;
}

/* 页面核心样式 */
.site-body {
  background-color: var(--color-neutral);
  color: var(--color-gray-800);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 头部样式 - 修复移动端导航错位 */
.site-header {
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
  /* 防止导航下拉时溢出 */
  width: 100%;
}

.header-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-md);
  /* 关键：固定容器宽度，防止导航错位 */
  width: 100%;
  box-sizing: border-box;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  /* 防止logo被挤压 */
  flex-shrink: 0;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
}

.logo-text {
  white-space: nowrap;
}

/* 移动端导航修复 - 关键样式 */
#headerNav {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
  /* 确保导航占满宽度，无错位 */
  padding: var(--spacing-md) 0;
  border-top: 1px solid var(--color-gray-100);
}

/* PC端导航样式 */
@media (min-width: 768px) {
  #headerNav {
    display: flex;
    width: auto;
    flex-direction: row;
    margin-top: 0;
    border-top: none;
    padding: 0;
    /* 新增：下拉菜单需要相对定位 */
    position: relative;
  }
  
  /* PC端显示登录/注册按钮 */
  .header-login-btn,
  .header-register-btn {
    display: inline-block;
  }
}

/* 移动端隐藏登录/注册按钮（通过导航/登录页跳转） */
@media (max-width: 767px) {
  .header-login-btn,
  .header-register-btn {
    display: none;
  }
}

/* 新增：下拉菜单核心样式 */
.nav-dropdown {
  position: relative;
  /* PC端横向排列 */
  display: flex;
  align-items: center;
}

/* 移动端下拉菜单样式 */
@media (max-width: 767px) {
  .nav-dropdown {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 下拉触发按钮（带三角） */
.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  color: var(--color-gray-800);
  font-weight: 500;
  transition: color 0.2s ease;
  /* 移动端样式 */
  padding: var(--spacing-sm) 0;
}

.dropdown-toggle:hover {
  color: var(--color-primary);
}

/* 三角图标样式 */
.dropdown-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
}

/* 下拉菜单展开时三角旋转 */
.nav-dropdown.open .dropdown-icon {
  transform: rotate(180deg);
}

/* 下拉菜单容器 */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-white);
  min-width: 12rem;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) 0;
  z-index: 999;
  /* 默认隐藏 */
  display: none;
  /* 防止溢出 */
  overflow: hidden;
}

/* 移动端下拉菜单样式 */
@media (max-width: 767px) {
  .dropdown-menu {
    position: static;
    min-width: 100%;
    box-shadow: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-left: 2px solid var(--color-primary);
    margin-left: var(--spacing-md);
    margin-top: 0.25rem;
  }
}

/* 下拉菜单项 */
.dropdown-item {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--color-gray-800);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: 0.875rem;
}

.dropdown-item:hover {
  background-color: var(--color-gray-50);
  color: var(--color-primary);
}

/* 展开下拉菜单 */
.nav-dropdown.open .dropdown-menu {
  display: block;
}

/* 普通导航链接样式 */
.nav-link {
  color: var(--color-gray-800);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  /* 移动端导航项居中 */
  padding: var(--spacing-sm) 0;
}

.nav-link:hover {
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  /* 防止操作区被挤压 */
  flex-shrink: 0;
}

.menu-toggle {
  background: transparent;
  border: none;
  color: var(--color-gray-700);
  cursor: pointer;
  display: block;
  /* 按钮固定大小，防止错位 */
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.menu-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* 按钮样式 */
.btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--color-gray-200);
  color: var(--color-gray-700);
}

.btn-outline:hover {
  background-color: var(--color-gray-100);
}

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

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

.btn-banner {
  background-color: var(--color-white);
  color: var(--color-primary);
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
}

.btn-banner:hover {
  box-shadow: var(--shadow-lg);
}

.btn-block {
  width: 100%;
  display: block;
  padding: 0.5rem;
}

/* 横幅样式 */
.site-banner {
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  padding: 2rem 0;
}

@media (min-width: 768px) {
  .site-banner {
    padding: 3rem 0;
  }
}

.banner-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  align-items: center;
}

@media (min-width: 768px) {
  .banner-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.banner-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: var(--spacing-sm);
}

.banner-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 500;
  margin-bottom: var(--spacing-md);
}

.banner-desc {
  opacity: 0.9;
  margin-bottom: var(--spacing-xl);
}

.banner-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
  width: 100%;
}

@media (min-width: 768px) {
  .banner-gallery {
    width: auto;
  }
}

.gallery-img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
  height: auto;
}

/* 主内容样式 */
.site-main {
  flex-grow: 1;
  padding: 2rem 0;
}

.main-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2xl);
}

@media (min-width: 1024px) {
  .main-container {
    flex-direction: row;
  }
}

/* 登录面板 - 核心修复：移动端隐藏，PC端显示 */
#loginPanel {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  /* 默认隐藏（移动端） */
  display: none;
  width: 100%;
}

/* PC端（>=1024px）显示登录面板 */
@media (min-width: 1024px) {
  #loginPanel {
    display: block;
    width: 25%;
  }
}

.panel-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--color-gray-200);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group-captcha {
  flex-direction: row;
  gap: var(--spacing-sm);
}

.captcha-input {
  flex: 1;
}

.form-label {
  font-size: 0.875rem;
  color: var(--color-gray-600);
  margin-bottom: var(--spacing-xs);
}

.form-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.2);
}

.captcha-code {
  background-color: var(--color-gray-100);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
}

.form-actions {
  display: flex;
  gap: var(--spacing-sm);
}

/* 软件列表区域 */
.software-section {
  width: 100%;
}

@media (min-width: 1024px) {
  .software-section {
    width: 75%;
  }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.section-more {
  color: var(--color-primary);
  font-size: 0.875rem;
  text-decoration: none;
}

.section-more:hover {
  text-decoration: underline;
}

.table-wrapper {
  overflow-x: auto;
}

.software-table {
  width: 100%;
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-collapse: collapse;
}

.table-header {
  background-color: var(--color-gray-50);
  border-bottom: 1px solid var(--color-gray-200);
}

.table-col {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-600);
}

.table-col-right {
  text-align: right;
}

.table-row {
  border-bottom: 1px solid var(--color-gray-100);
  transition: background-color 0.2s ease;
}

.table-row:hover {
  background-color: var(--color-gray-50);
}

.table-cell {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.table-cell-right {
  text-align: right;
  color: var(--color-gray-600);
}

.software-link {
  color: var(--color-gray-800);
  text-decoration: none;
  transition: color 0.2s ease;
}

.software-link:hover {
  color: var(--color-primary);
}

/* 页脚样式 */
.site-footer {
  background-color: var(--color-gray-800);
  color: var(--color-white);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
  }
}

.brand-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.brand-desc {
  color: var(--color-gray-400);
  font-size: 0.875rem;
  max-width: 28rem;
}

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

@media (min-width: 768px) {
  .footer-links {
    grid-template-columns: repeat(3, 1fr);
  }
}

.group-title {
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.link-item {
  color: var(--color-gray-400);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.link-item:hover {
  color: var(--color-white);
}

.footer-bottom {
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--color-gray-700);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  color: var(--color-gray-400);
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.powered-link {
  color: var(--color-gray-400);
  text-decoration: none;
  transition: color 0.2s ease;
}

.powered-link:hover {
  color: var(--color-white);
}

/* ========== 内容页专属样式 ========== */
/* 面包屑导航 */
.breadcrumb-section {
  background-color: var(--color-white);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-gray-200);
}

.breadcrumb-nav {
  width: 100%;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  font-size: 0.875rem;
}

.breadcrumb-link {
  color: var(--color-gray-600);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: var(--color-primary);
}

.breadcrumb-separator {
  color: var(--color-gray-400);
  font-size: 0.75rem;
}

/* 左侧软件侧边栏 */
.software-sidebar {
  width: 100%;
}

@media (min-width: 1024px) {
  .software-sidebar {
    width: 25%;
  }
}

/* 软件封面 */
.software-cover {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.cover-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
}

.download-btn-wrap {
  text-align: center;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
}

.download-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
  margin-right: 0.5rem;
}

/* 软件基本信息 */
.software-info {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.info-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--color-gray-200);
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  border-bottom: 1px dashed var(--color-gray-100);
}

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

.info-label {
  color: var(--color-gray-600);
}

.info-value {
  color: var(--color-gray-800);
}

/* 软件标签 */
.software-tags {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-md);
}

.tags-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--color-gray-200);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.tag-item {
  background-color: var(--color-gray-100);
  color: var(--color-gray-700);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tag-item:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* 右侧软件详情 */
.software-detail {
  width: 100%;
}

@media (min-width: 1024px) {
  .software-detail {
    width: 75%;
  }
}

/* 详情头部 */
.detail-header {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.detail-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-gray-600);
  margin-bottom: var(--spacing-sm);
}

.meta-item {
  display: flex;
  align-items: center;
}

.meta-icon {
  margin-right: 0.25rem;
}

.detail-desc {
  color: var(--color-gray-700);
  line-height: 1.6;
}

/* 软件截图 */
.detail-screenshots {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .screenshots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .screenshots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.screenshot-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.screenshot-img:hover {
  box-shadow: var(--shadow-md);
}

/* 软件介绍 */
.detail-intro {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.intro-content {
  color: var(--color-gray-700);
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.intro-subtitle {
  font-size: 1.125rem;
  font-weight: 500;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--color-gray-800);
}

.intro-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* 相关软件推荐 */
.detail-related {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.related-item {
  display: flex;
  gap: 0.75rem;
  padding: var(--spacing-sm);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.2s ease;
}

.related-item:hover {
  border-color: var(--color-primary);
  background-color: var(--color-gray-50);
}

.related-img {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.related-content {
  display: flex;
  flex-direction: column;
}

.related-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--color-gray-800);
}

.related-desc {
  font-size: 0.875rem;
  color: var(--color-gray-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-meta {
  font-size: 0.75rem;
  color: var(--color-gray-500);
  margin-top: 0.25rem;
}

/* 文本截断工具类 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== 文章页专属样式 ========== */
/* 文章内容区 */
.article-content {
  width: 100%;
}

@media (min-width: 1024px) {
  .article-content {
    width: 75%;
  }
}

/* 文章主体 */
.article-main {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

/* 文章头部 */
.article-header {
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-gray-200);
}

.article-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  line-height: 1.3;
  color: var(--color-gray-900);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-gray-600);
}

.meta-icon {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  margin-right: 0.25rem;
}

/* 文章正文 */
.article-body {
  color: var(--color-gray-700);
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-gray-800);
}

.article-subsubtitle {
  font-size: 1.125rem;
  font-weight: 500;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--color-gray-800);
}

.article-list {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* 文章图片 */
.article-figure {
  margin: 1.5rem 0;
  text-align: center;
}

.article-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.5rem;
}

.article-caption {
  font-size: 0.875rem;
  color: var(--color-gray-600);
}

/* 文章表格 */
.article-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.table-cell {
  border: 1px solid var(--color-gray-200);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* 文章标签 */
.article-tags {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-gray-200);
}

.tags-title {
  font-weight: 500;
  margin-bottom: 0.75rem;
}

/* 相关文章 */
.article-related {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.related-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.2s ease;
}

.related-item:hover {
  border-color: var(--color-primary);
  background-color: var(--color-gray-50);
}

.related-img {
  width: 6rem;
  height: 4rem;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.related-content {
  display: flex;
  flex-direction: column;
}

.related-article-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--color-gray-800);
  line-height: 1.4;
}

/* 评论区 */
.article-comments {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
}

.comments-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.comments-placeholder {
  padding: 3rem 0;
  text-align: center;
  color: var(--color-gray-500);
}

.comments-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  color: var(--color-gray-300);
}

/* 文章侧边栏 */
.article-sidebar {
  width: 100%;
}

@media (min-width: 1024px) {
  .article-sidebar {
    width: 25%;
  }
}

/* 作者卡片 */
.author-card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.author-header {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.author-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  object-fit: cover;
}

.author-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.author-name {
  font-weight: 600;
}

.author-desc {
  font-size: 0.875rem;
  color: var(--color-gray-600);
}

.author-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--color-gray-600);
  margin-bottom: 0.75rem;
}

/* 热门文章 */
.hot-articles {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.hot-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.hot-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hot-item {
  list-style: none;
}

.hot-link {
  display: flex;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-gray-800);
  transition: color 0.2s ease;
}

.hot-link:hover {
  color: var(--color-primary);
}

.hot-rank {
  width: 1.5rem;
  height: 1.5rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.hot-text {
  font-size: 0.875rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* 文章分类 */
.article-categories {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.category-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--color-gray-800);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.category-link:hover {
  color: var(--color-primary);
}

.category-count {
  background-color: var(--color-gray-100);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--color-gray-700);
}

/* 文章归档 */
.article-archive {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-md);
}

.archive-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.archive-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.archive-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--color-gray-800);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.archive-link:hover {
  color: var(--color-primary);
}

.archive-count {
  background-color: var(--color-gray-100);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--color-gray-700);
}

/* 行高工具类 */
.leading-relaxed {
  line-height: 1.8;
}

/* ========== 分类页专属样式 ========== */
/* 分类头部 */
.category-header {
  background-color: #fff;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.breadcrumb-nav {
  margin-bottom: 1rem;
}

.breadcrumb-nav ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.breadcrumb-nav a {
  color: #4b5563;
  transition: color 0.2s ease;
}

.breadcrumb-nav a:hover {
  color: #2563eb;
}

/* 分类筛选 */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.filter-title h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

.filter-title p {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.filter-actions {
  display: flex;
  gap: 0.75rem;
}

.filter-select {
  padding: 0.375rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #1f2937;
  background-color: #fff;
  transition: all 0.2s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.filter-btn {
  padding: 0.375rem 0.75rem;
  background-color: #f3f4f6;
  color: #374151;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

.filter-btn:hover {
  background-color: #e5e7eb;
}

/* 二级分类导航 */
.category-subnav {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.subnav-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

.subnav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.subnav-item {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

/* 分类列表 */
.category-list {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.category-list table {
  width: 100%;
  border-collapse: collapse;
}

.category-list th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.category-list td {
  padding: 1rem;
  font-size: 0.875rem;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;
}

.category-list tr:hover {
  background-color: #f9fafb;
  transition: background-color 0.2s ease;
}

.category-list a {
  font-weight: 500;
  color: #1f2937;
  text-decoration: none;
  transition: color 0.2s ease;
}

.category-list a:hover {
  color: #2563eb;
}

/* 标签样式 */
.category-list .text-xs {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
}

/* 描述文本 */
.category-list .line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* 分页控件 */
.pagination {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.page-ellipsis {
  padding: 0 0.5rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* 分页按钮状态 */
.page-btn.bg-primary-600 {
  background-color: #2563eb;
  color: #fff;
}

.page-btn.bg-primary-600:hover {
  background-color: #1d4ed8;
}

.page-btn.bg-gray-100 {
  background-color: #f3f4f6;
  color: #374151;
}

.page-btn.bg-gray-100:hover {
  background-color: #e5e7eb;
}

.page-btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ========== 频道页专属样式 ========== */
/* 频道头部 */
.channel-header {
  background-color: #fff;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.channel-title h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .channel-title h2 {
    font-size: 1.75rem;
  }
}

.channel-title p {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.6;
  max-width: 720px;
}

/* 频道二级分类导航 */
.channel-subnav {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.subnav-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

/* 二级分类网格 */
.subnav-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .subnav-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .subnav-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 二级分类项 */
.subnav-item {
  display: block;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.subnav-item:hover {
  border-color: #2563eb;
  background-color: #eff6ff;
}

/* 分类项图标 */
.item-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: #eff6ff;
  color: #2563eb;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.subnav-item:hover .item-icon {
  background-color: #2563eb;
  color: #fff;
}

/* 分类项文字 */
.item-name {
  font-weight: 500;
  font-size: 1.125rem;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.item-count {
  font-size: 0.75rem;
  color: #6b7280;
}

.item-desc {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* 频道列表头部 */
.channel-list .list-header {
  padding: 0.75rem 1rem;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.channel-list .list-title {
  font-weight: 500;
  color: #1f2937;
}

.channel-list .list-header a {
  font-size: 0.75rem;
  color: #2563eb;
  text-decoration: none;
}

.channel-list .list-header a:hover {
  text-decoration: underline;
}

/* 复用分类页样式的兼容处理 */
.channel-list table {
  width: 100%;
  border-collapse: collapse;
}

.channel-list th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.channel-list td {
  padding: 1rem;
  font-size: 0.875rem;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;
}

.channel-list tr:hover {
  background-color: #f9fafb;
  transition: background-color 0.2s ease;
}

/* ========== 搜索结果页专属样式 ========== */
/* 搜索头部 */
.search-header {
  background-color: #fff;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

/* 搜索框组 */
.search-input-group {
  position: relative;
  width: 100%;
  max-width: 800px;
}

.search-input-group input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #1f2937;
  transition: all 0.2s ease;
}

.search-input-group input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.search-input-group button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.375rem 1rem;
  background-color: #2563eb;
  color: #fff;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

.search-input-group button:hover {
  background-color: #1d4ed8;
}

/* 搜索统计 */
.search-stats {
  font-size: 0.875rem;
  color: #6b7280;
  white-space: nowrap;
}

.search-stats span {
  color: #2563eb;
  font-weight: 500;
}

/* 搜索筛选标签 */
.search-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.filter-tag {
  font-size: 0.875rem;
  color: #6b7280;
}

.filter-tag-item {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

/* 搜索结果项 */
.result-item {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s ease;
}

.result-item:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.result-title {
  margin-bottom: 0.5rem;
}

.result-title a {
  font-size: 1.125rem;
  font-weight: 500;
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s ease;
}

.result-title a:hover {
  text-decoration: underline;
}

.result-desc {
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #6b7280;
}

/* 搜索提示 */
.search-tips {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 2rem;
  font-size: 0.875rem;
  color: #4b5563;
}

.search-tips h4 {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.search-tips ul {
  list-style-type: disc;
  list-style-position: inside;
  line-height: 1.6;
}

/* 侧边栏 */
.search-sidebar {
  width: 100%;
}

@media (min-width: 1024px) {
  .search-sidebar {
    width: 25%;
  }
}

.sidebar-widget {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

/* 热门搜索列表 */
.hot-search-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hot-search-list a {
  font-size: 0.875rem;
  color: #374151;
  text-decoration: none;
  transition: color 0.2s ease;
}

.hot-search-list a:hover {
  color: #2563eb;
}

/* 推荐软件列表 */
.recommend-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recommend-item a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
  text-decoration: none;
  transition: color 0.2s ease;
}

.recommend-item a:hover {
  color: #2563eb;
}

.recommend-item span:first-child {
  width: 1.5rem;
  height: 1.5rem;
  background-color: #eff6ff;
  color: #2563eb;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
}

.recommend-item:nth-child(n+4) span:first-child {
  background-color: #f3f4f6;
  color: #6b7280;
}