/* ========== 全局通用样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
:root {
    --primary: #4f46e5;
    --primary-light: #eeeffc;
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
    --border-color: #e5e7eb;
    --text-main: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --bg-card: #ffffff;
    --bg-page: #f5f7fa;
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.04);
    --shadow-md: 0 3px 10px rgba(0,0,0,0.06);
}
html, body {
    width: 100%;
    overflow-x: hidden;
    background: var(--bg-page);
    font-size: 14px;
    color: var(--text-main);
}
a {
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}
ul, li {
    list-style: none;
}
.container {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}
.card {
    background: var(--bg-card);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

/* ========== 头部导航 ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 999;
}
.logo-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
.logo {
    font-size: 18px;
    font-weight: 600;
}
.logo span {
    color: var(--primary);
}
.nav-menu {
    display: flex;
    gap: 16px;
}
.nav-menu a {
    font-size: 14px;
    color: var(--text-secondary);
}
.nav-menu a.active {
    color: var(--primary);
    font-weight: 500;
    position: relative;
}
.nav-menu a.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 1px;
}

/* ========== 主体内容 ========== */
.main-content {
    margin-top: 60px;
    padding-bottom: 60px;
}

/* ========== 底部 ========== */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 46px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ========== 首页 ========== */
.home-banner {
    background: var(--primary-gradient);
    color: #fff;
    padding: 20px 16px;
    border-radius: 14px;
    margin-bottom: 14px;
}
.home-banner h2 {
    font-size: 18px;
    margin-bottom: 6px;
}
.home-banner p {
    font-size: 13px;
    opacity: 0.9;
}
.cate-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.cate-item {
    width: calc(33.33% - 7px);
    background: var(--bg-card);
    border-radius: 10px;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
}
.cate-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    font-weight: 500;
}
.cate-name {
    font-size: 13px;
}
.home-article-list {
    padding: 18px;
}
.common-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.common-title::before {
    content: "";
    width: 4px;
    height: 18px;
    background: var(--primary-gradient);
    border-radius: 2px;
}
.article-item {
    padding: 11px 0;
    border-bottom: 1px dashed var(--border-color);
}
.article-item:last-child {
    border-bottom: none;
}
.article-item h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.article-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ========== 列表页 ========== */
.list-filter {
    background: var(--bg-card);
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-tag {
    padding: 6px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 13px;
}
.filter-tag.active {
    background: var(--primary-gradient);
    color: #fff;
}
.list-article-wrap {
    padding: 18px;
}
.list-article-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}
.list-article-item:last-child {
    border-bottom: none;
}
.list-article-title {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}
.list-article-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== 内容页（核心优化：无图标 + 相关文章边框极简美化） ========== */
.article-page .main-content {
    padding-bottom: 70px;
}
.article-page .article-detail {
    padding: 24px 18px;
}
.article-page .article-title {
    font-size: 24px;
    line-height: 1.35;
    margin-bottom: 18px;
    font-weight: 600;
}
.article-page .article-meta {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--primary-light);
}
.article-page .article-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-main);
}
.article-page .article-content p {
    margin-bottom: 18px;
    text-align: justify;
}

/* 🔥 相关文章 —— 极简边框优化版（无花哨、无emoji、高级干净） */
.article-page .related-articles {
    margin-top: 2px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    position: relative;
}
.article-page .related-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-page .related-title::before {
    content: "";
    width: 4px;
    height: 18px;
    background: var(--primary-gradient);
    border-radius: 2px;
}
.article-page .related-tag {
    color: var(--primary);
    font-weight: 600;
}
.article-page .related-list {
    display: grid;
    gap: 12px;
}
.article-page .related-list li {
    padding: 0;
}
/* 相关文章卡片：极简边框、柔和阴影、简洁侧边条 */
.article-page .related-list a {
    display: block;
    padding: 16px 14px 16px 18px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    position: relative;
    transition: all 0.2s;
}
.article-page .related-list a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 2px 0 0 2px;
}
.article-page .related-list a:hover {
    border-color: var(--primary);
    transform: translateX(2px);
}
.article-page .related-list a .rel-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 6px;
}
.article-page .related-list a .rel-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-page .related-list a .rel-meta {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 🔥 侧边栏标题：删除所有emoji，统一极简渐变样式 */
.article-page .content-right {
    margin-top: 10px;
}
.article-page .sidebar-module {
    padding: 18px;
}
.article-page .sidebar-title {
    font-size: 17px;
    font-weight: 600;
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-page .sidebar-title::before {
    content: "";
    width: 4px;
    height: 18px;
    background: var(--primary-gradient);
    border-radius: 2px;
}
.article-page .update-list li,
.article-page .rank-list li {
    padding: 9px 0;
    border-bottom: 1px dashed var(--border-color);
}
.article-page .update-list li:last-child,
.article-page .rank-list li:last-child {
    border-bottom: none;
}
.article-page .update-list a,
.article-page .rank-list a {
    font-size: 15px;
    display: block;
}
.article-page .update-list a:hover,
.article-page .rank-list a:hover {
    color: var(--primary);
    padding-left: 4px;
}

/* 阅读排行数字（极简圆角，无花哨） */
.article-page .rank-list a {
    padding-left: 30px;
    position: relative;
}
.article-page .rank-list li[data-rank] a::before {
    content: attr(data-rank);
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.article-page .rank-list li[data-rank="1"] a::before { background:var(--primary); color:#fff; }
.article-page .rank-list li[data-rank="2"] a::before { background:#f97316; color:#fff; }
.article-page .rank-list li[data-rank="3"] a::before { background:#10b981; color:#fff; }

/* 热门标签 */
.article-page .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.article-page .tags-list a {
    padding: 7px 14px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 13px;
}
.article-page .tags-list a:hover {
    background: var(--primary);
    color: #fff;
}

/* ========== Tags页 ========== */
.tags-page .tags-wrap {
    padding: 20px;
}
.tags-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tags-header h2::before {
    content: "";
    width: 4px;
    height: 18px;
    background: var(--primary-gradient);
    border-radius: 2px;
}
.tags-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.tag-item {
    padding: 7px 14px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 14px;
}
.tag-item.hot {
    background: var(--primary-gradient);
    color: #fff;
}
.tag-article-list h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tag-article-list h3::before {
    content: "";
    width: 4px;
    height: 18px;
    background: var(--primary-gradient);
    border-radius: 2px;
}
.tag-article-item {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}
.tag-article-item:last-child {
    border-bottom: none;
}
.tag-article-title {
    font-size: 15px;
}
.tag-article-title:hover {
    color: var(--primary);
}