/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #4cc9f0;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --light-text: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

html, body {
    height: 100%;
}

/* 页面包装器，用于固定页脚 */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 分类信息框架 */
.sort-header {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 15px 20px;
    font-size: 0.9rem;
    color: var(--light-text);
    border-bottom: 1px solid var(--border-color);
    background: #f8f9fa;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--dark-text);
    font-weight: 500;
}

/* 分类描述 */
.sort-description {
    padding: 20px;
}

.sort-description p {
    margin: 0;
    color: var(--dark-text);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    position: relative;
    padding-left: 20px;
}

.sort-description p:before {
    content: '\f02d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    opacity: 0.7;
}

/* 标签页面的特殊样式 */
.tag-page .sort-description p:before {
    content: '\f02b'; /* 标签图标 */
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: #f5f6f7;
}

/* 全局链接样式 */
a {
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    background: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo h1 a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
}

/* 默认logo文字样式 */
.logo-text {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.logo-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo h1 a {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: var(--transition);
}

.logo h1 a:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.logo-text:hover .logo-icon {
    transform: rotate(10deg);
}

.logo-img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

.logo p {
    display: none;
}

.nav {
    display: flex;
    align-items: center;
}

.nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav ul li {
    margin-left: 1.5rem;
    position: relative;
}

.nav ul li a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 0.95rem;
    display: block;
}

.nav ul li a:hover,
.nav ul li.current a {
    color: var(--primary-color);
    background: rgba(67, 97, 238, 0.08);
}

/* 主导航子菜单 */
.nav .sub-nav {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

/* 有子菜单的导航项显示下拉箭头 */
.nav ul li.has-submenu > a::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 5px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav ul li.has-submenu:hover > a::after {
    transform: rotate(180deg);
}

.nav ul li:hover > .sub-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav .sub-nav li {
    margin: 0;
    padding: 0 16px;
}

.nav .sub-nav li a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    display: block;
    border-radius: 4px;
    font-size: 0.9rem;
}

.nav .sub-nav li a:hover {
    color: var(--primary-color);
    background: rgba(67, 97, 238, 0.08);
}

/* 搜索按钮 */
.search-nav-item {
    margin-left: 1.5rem;
}

.search-nav-item a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.search-nav-item a:hover {
    color: var(--primary-color);
    background: rgba(67, 97, 238, 0.08);
}

/* 移动端搜索按钮 */
.search-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark-text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark-text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
}

/* 搜索弹窗 */
.search-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 500px;
    overflow: hidden;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.search-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-text);
}

.search-close {
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.search-close:hover {
    color: var(--dark-text);
    background: var(--light-bg);
}

.search-form {
    padding: 20px;
}

.search-input-group {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.15);
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--secondary-color);
}

/* 网站统计下拉菜单 */
.stats-nav-item {
    position: relative;
    margin-left: 1.5rem;
}
.stats-nav-item > a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.stats-nav-item > a:hover {
    color: var(--primary-color);
    background: rgba(67, 97, 238, 0.08);
}

.stats-nav-item > a i {
    margin-left: 0.3rem;
    font-size: 0.8rem;
}

.stats-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 15px;
    min-width: 200px;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.stats-nav-item:hover .stats-dropdown {
    display: block;
}

.stats-dropdown ul {
    display: block;
}

.stats-dropdown ul li {
    margin: 0 0 8px 0;
    padding: 0;
    display: block;
}

.stats-dropdown ul li:last-child {
    margin-bottom: 0;
}

.stats-dropdown ul li span {
    display: block;
    text-align: left;
    font-size: 0.85rem;
    color: var(--light-text);
    padding: 5px 0;
}

/* 侧边栏菜单样式 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
}

.sidebar-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 1002;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-menu.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    background: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav ul li {
    margin: 0;
}

.sidebar-nav ul li a {
    display: block;
    padding: 12px 20px;
    color: var(--dark-text);
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.sidebar-nav ul li a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.sidebar-nav ul li.current a {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

/* 子菜单 - 移动端默认隐藏 */
.sidebar-nav .sub-nav {
    background: var(--light-bg);
    padding-left: 0;
    display: none;
}

.sidebar-nav .sub-nav li a {
    padding: 10px 20px 10px 30px;
    font-size: 0.9rem;
    border-bottom: none;
    display: block;
}

/* 移动端有子菜单的导航项 */
.sidebar-nav li.has-submenu {
    border-bottom: 1px solid var(--border-color);
}

/* 移动端导航项包装器 */
.sidebar-nav .nav-item-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.sidebar-nav .nav-item-wrapper:hover {
    background: rgba(67, 97, 238, 0.05);
}

.sidebar-nav .nav-item-wrapper > span {
    flex: 1;
    font-size: 1rem;
    color: var(--dark-text);
}

/* 移动端子菜单展开图标 */
.toggle-icon {
    color: var(--light-text);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.toggle-icon.fa-chevron-up {
    transform: rotate(180deg);
    color: var(--primary-color);
}

/* 移动端统计菜单样式 */
.sidebar-nav .sub-nav li:last-child {
    border-bottom: 1px solid var(--border-color);
}
/* 轮播图样式 */
.banner-swiper {
    width: 100%;
    max-width: 1200px;
    height: 400px;
    margin: 20px auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-pagination {
    bottom: 10px;
    left: 0;
    width: 100%;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    margin: 0 5px;
}

.swiper-pagination-bullet-active {
    background: #fff;
    transform: scale(1.2);
}

/* 隐藏导航按钮 */
.swiper-button-prev,
.swiper-button-next {
    display: none;
}

/* 主体内容 */
.main {
    padding: 20px 0;
    flex: 1; /* 占据剩余空间 */
    width: 100%;
    max-width: 100%;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* 首页文章列表 - 四列网格布局 */
.articles {
    width: 100%;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* 纯文字卡片 */
.article-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.article-thumbnail-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.article-thumbnail-link:hover {
    opacity: 0.9;
}

.article-thumbnail {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.article-thumbnail-link:hover .article-thumbnail {
    transform: scale(1.05);
}

.no-thumbnail {
    width: 100%;
    height: 140px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    transition: transform 0.3s ease;
}

.article-thumbnail-link:hover .no-thumbnail {
    transform: scale(1.05);
}

.no-thumbnail i {
    font-size: 2rem;
}

.article-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    margin-bottom: 10px;
    flex: 1;
}

.article-title a {
    color: var(--dark-text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    transition: var(--transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.article-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.75rem;
    color: var(--light-text);
}

.article-meta span {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.article-meta span i {
    margin-right: 3px;
    font-size: 0.7rem;
}

.article-summary {
    color: var(--light-text);
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.article-tags a {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.7rem;
    transition: var(--transition);
}

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

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.8rem;
}

.read-more:hover {
    color: var(--secondary-color);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--dark-text);
    border-radius: 6px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.pagination a:hover,
.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 友情链接区域 */
.friend-links-section {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.friend-links-section .card {
    border: none;
    background: transparent;
    margin: 0;
    box-shadow: none;
}

.friend-links-section .card-header {
    background: var(--light-bg);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.friend-links-section .card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-text);
}

.friend-links-section .apply-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.9rem;
    background: rgba(67, 97, 238, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

.friend-links-section .apply-link:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.friend-links-section #blogsort {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    list-style: none;
    margin: 0;
}

.friend-links-section .friend-link-item {
    margin: 0;
    flex: 1 1 auto;
    min-width: 120px;
}

.friend-links-section .friend-link-item a {
    display: block;
    padding: 12px 15px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.friend-links-section .friend-link-item a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    border-radius: 8px;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.friend-links-section .friend-link-item a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(67, 97, 238, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.friend-links-section .friend-link-item a:hover::before {
    opacity: 0.1;
}

.friend-links-section .friend-link-item a i {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* 文章详情页 */
.article-detail {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    margin: 0 auto 20px;
}

.article-detail-header {
    padding: 25px 25px 15px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.article-detail-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
    color: var(--dark-text);
    text-align: center;
}

.article-detail-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--light-text);
}

.article-detail-meta span {
    display: flex;
    align-items: center;
}

.article-detail-meta span a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.article-detail-meta span a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.article-detail-meta span i {
    margin-right: 5px;
}

.article-detail-thumbnail {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.article-detail-content {
    padding: 25px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--dark-text);
}

.article-detail-content h1 {
    font-size: 2.2rem;
    margin: 40px 0 30px;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.3;
    position: relative;
    padding: 25px 30px;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    text-align: center;
}

.article-detail-content h1:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4cc9f0, #ffffff, #4cc9f0);
    border-radius: 15px 15px 0 0;
}

.article-detail-content h1:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4cc9f0, #ffffff, #4cc9f0);
    border-radius: 0 0 15px 15px;
}

.article-detail-content h1:hover {
    box-shadow: 0 15px 30px rgba(58, 12, 163, 0.4);
    transform: translateY(-8px) scale(1.03);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(67, 97, 238, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0);
    }
}

/* H4 标题样式 */
.article-detail-content h4 {
    font-size: 1.3rem;
    margin: 25px 0 15px;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.5;
    position: relative;
    padding: 12px 20px;
    background: linear-gradient(120deg, #4cc9f0, #7209b7);
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(76, 201, 240, 0.3);
    transition: all 0.3s ease;
}

.article-detail-content h4:before {
    content: '\f0a4';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.article-detail-content h4:after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1));
    border-radius: 0 8px 8px 0;
    transition: width 0.4s ease;
}

.article-detail-content h4:hover {
    background: linear-gradient(120deg, #3a0ca3, #4cc9f0);
    box-shadow: 0 3px 8px rgba(58, 12, 163, 0.4);
    transform: translateX(5px);
}

.article-detail-content h4:hover:before {
    transform: translateY(-50%) translateX(3px);
    color: #f8f9fa;
}

.article-detail-content h4:hover:after {
    width: 20px;
}

.article-detail-content h2 {
    font-size: 1.8rem;
    margin: 35px 0 25px;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.4;
    position: relative;
    padding: 20px 25px;
    background: linear-gradient(120deg, #4cc9f0, #4361ee);
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.25);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.article-detail-content h2:before {
    content: '\f101';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 1.2rem;
    transition: all 0.4s ease;
}

.article-detail-content h2:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #ffffff, #4cc9f0);
    border-radius: 12px 0 0 12px;
    transition: all 0.4s ease;
}

.article-detail-content h2:hover {
    background: linear-gradient(120deg, #3a0ca3, #4361ee);
    box-shadow: 0 8px 20px rgba(58, 12, 163, 0.35);
    transform: translateX(8px);
}

.article-detail-content h2:hover:before {
    transform: translateY(-50%) translateX(5px) scale(1.3);
    color: #f8f9fa;
}

.article-detail-content h2:hover:after {
    width: 6px;
    background: linear-gradient(to bottom, #ffffff, #3a0ca3);
}

.article-detail-content h3 {
    font-size: 1.5rem;
    margin: 30px 0 20px;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.5;
    position: relative;
    padding: 15px 25px;
    background: linear-gradient(120deg, #7209b7, #4361ee);
    border: none;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(114, 9, 183, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

.article-detail-content h3:before {
    content: '\f061';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.article-detail-content h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4cc9f0, #ffffff, #4cc9f0);
    border-radius: 0 0 10px 10px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.article-detail-content h3:hover {
    background: linear-gradient(120deg, #560bad, #3a0ca3);
    box-shadow: 0 5px 15px rgba(86, 11, 173, 0.4);
    transform: translateY(-3px);
}

.article-detail-content h3:hover:before {
    transform: translateY(-50%) scale(1.2);
    color: #f8f9fa;
}

.article-detail-content h3:hover:after {
    transform: scaleX(1);
}

.article-detail-content p {
    margin-bottom: 15px;
    color: var(--dark-text);
}

.article-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 15px auto;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-detail-content blockquote {
    border-left: 3px solid var(--primary-color);
    padding: 15px 20px;
    margin: 15px 0;
    background: var(--light-bg);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: var(--light-text);
}

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

.article-detail-content li {
    margin-bottom: 8px;
}

.article-detail-content code {
    background: var(--light-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e06c75;
    border: 1px solid rgba(67, 97, 238, 0.1);
    transition: all 0.3s ease;
}

.article-detail-content code:hover {
    background: rgba(67, 97, 238, 0.1);
    border-color: rgba(67, 97, 238, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.article-detail-content pre {
    background: #2b303b;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 0.9rem;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #5a6a8a;
    transition: all 0.3s ease;
}

.article-detail-content pre:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.article-detail-content pre code {
    background: none;
    padding: 0;
    border: none;
    color: inherit;
}

/* 代码块标题栏 */
.article-detail-content pre::before {
    content: 'CODE';
    position: absolute;
    top: 0;
    left: 0;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 8px 0 0 0;
    z-index: 1;
}

/* 代码块行号 */
.article-detail-content pre {
    counter-reset: line-number;
}

.article-detail-content pre code {
    display: block;
}

.article-detail-content pre code span {
    display: block;
    padding-left: 30px;
    position: relative;
}

.article-detail-content pre code span::before {
    content: counter(line-number);
    counter-increment: line-number;
    position: absolute;
    left: 0;
    top: 0;
    width: 25px;
    text-align: right;
    padding-right: 5px;
    color: #666;
    font-size: 0.8rem;
    user-select: none;
}

/* 代码高亮主题 */
.article-detail-content pre .comment {
    color: #6c757d; /* 柔和灰色 */
}

.article-detail-content pre .keyword {
    color: #c678dd; /* 紫色 */
}

.article-detail-content pre .string {
    color: #98c379; /* 清新绿色 */
}

.article-detail-content pre .number {
    color: #d19a66; /* 温暖橙色 */
}

.article-detail-content pre .function {
    color: #61afef; /* 明亮蓝色 */
}

.article-detail-content pre .operator {
    color: #56b6c2; /* 青色 */
}

.article-detail-content pre .variable {
    color: #e06c75; /* 粉色 */
}

.article-detail-content pre .property {
    color: #d19a66; /* 温暖橙色 */
}

.article-detail-content pre .constant {
    color: #d19a66; /* 温暖橙色 */
}

.article-detail-content pre .class-name {
    color: #e5c07b; /* 金黄色 */
}

.article-detail-content pre .builtin {
    color: #56b6c2; /* 青色 */
}

.article-detail-content pre .regex {
    color: #98c379; /* 清新绿色 */
}

.article-detail-content pre .important {
    color: #e06c75; /* 粉色 */
    font-weight: bold;
}

.article-detail-content pre .atrule {
    color: #c678dd; /* 紫色 */
}

.article-detail-content pre .selector {
    color: #e5c07b; /* 金黄色 */
}

.article-detail-content pre .attr-name {
    color: #d19a66; /* 温暖橙色 */
}

.article-detail-content pre .attr-value {
    color: #98c379; /* 清新绿色 */
}

/* 新增代码元素高亮 */
.article-detail-content pre .boolean {
    color: #d19a66; /* 温暖橙色 */
}

.article-detail-content pre .tag {
    color: #e06c75; /* 粉色 */
}

.article-detail-content pre .punctuation {
    color: #abb2bf; /* 浅灰色 */
}

.article-detail-content pre .namespace {
    color: #61afef; /* 明亮蓝色 */
}

.article-detail-content pre .doctype {
    color: #56b6c2; /* 青色 */
}

.article-detail-content pre .entity {
    color: #61afef; /* 明亮蓝色 */
    font-style: italic;
}

.article-detail-content pre .url {
    color: #98c379; /* 清新绿色 */
    text-decoration: underline;
}

.article-detail-content pre .symbol {
    color: #61afef; /* 明亮蓝色 */
}

.article-detail-content pre .deleted {
    color: #e06c75; /* 粉色 */
    background-color: rgba(224, 108, 117, 0.1);
}

.article-detail-content pre .inserted {
    color: #98c379; /* 清新绿色 */
    background-color: rgba(152, 195, 121, 0.1);
}

/* 特定语言代码高亮优化 */

/* JavaScript 特定样式 */
.article-detail-content pre .language-javascript .function {
    color: #61afef; /* 明亮蓝色 */
}

.article-detail-content pre .language-javascript .keyword {
    color: #c678dd; /* 紫色 */
}

.article-detail-content pre .language-javascript .string {
    color: #98c379; /* 清新绿色 */
}

/* Python 特定样式 */
.article-detail-content pre .language-python .function {
    color: #61afef; /* 明亮蓝色 */
}

.article-detail-content pre .language-python .keyword {
    color: #c678dd; /* 紫色 */
}

.article-detail-content pre .language-python .string {
    color: #98c379; /* 清新绿色 */
}

/* HTML 特定样式 */
.article-detail-content pre .language-html .tag {
    color: #e06c75; /* 粉色 */
}

.article-detail-content pre .language-html .attr-name {
    color: #d19a66; /* 温暖橙色 */
}

.article-detail-content pre .language-html .attr-value {
    color: #98c379; /* 清新绿色 */
}

/* CSS 特定样式 */
.article-detail-content pre .language-css .selector {
    color: #e5c07b; /* 金黄色 */
}

.article-detail-content pre .language-css .property {
    color: #d19a66; /* 温暖橙色 */
}

.article-detail-content pre .language-css .function {
    color: #61afef; /* 明亮蓝色 */
}

/* Java 特定样式 */
.article-detail-content pre .language-java .class-name {
    color: #e5c07b; /* 金黄色 */
}

.article-detail-content pre .language-java .keyword {
    color: #c678dd; /* 紫色 */
}

.article-detail-content pre .language-java .string {
    color: #98c379; /* 清新绿色 */
}

/* PHP 特定样式 */
.article-detail-content pre .language-php .variable {
    color: #e06c75; /* 粉色 */
}

.article-detail-content pre .language-php .function {
    color: #61afef; /* 明亮蓝色 */
}

.article-detail-content pre .language-php .keyword {
    color: #c678dd; /* 紫色 */
}

/* SQL 特定样式 */
.article-detail-content pre .language-sql .keyword {
    color: #c678dd; /* 紫色 */
    font-weight: bold;
}

.article-detail-content pre .language-sql .string {
    color: #98c379; /* 清新绿色 */
}

/* 代码复制按钮 */
.copy-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    color: #fff;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    z-index: 10;
}

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

.copy-button:focus {
    outline: none;
}

.article-detail-tags {
    padding: 0 25px 25px;
}

.article-detail-tags a {
    color: var(--primary-color);
    background: rgba(67, 97, 238, 0.1);
    padding: 4px 12px;
    border-radius: 16px;
    text-decoration: none;
    margin-right: 8px;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 8px;
    transition: var(--transition);
}

.article-detail-tags a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 相关文章 */
.related-articles {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    
    margin: 0 auto 20px;
}

.related-articles-header {
    background: var(--light-bg);
    padding: 15px 20px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-text);
    border-bottom: 1px solid var(--border-color);
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.related-article-card {
    border-radius: 6px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.related-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-article-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.related-article-content {
    padding: 15px;
}

.related-article-content h3 {
    margin-bottom: 10px;
}

.related-article-content h3 a {
    color: var(--dark-text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    line-height: 1.4;
}

.related-article-content h3 a:hover {
    color: var(--primary-color);
}

.related-article-meta {
    font-size: 0.8rem;
    color: var(--light-text);
    display: flex;
    gap: 10px;
}

/* 评论区域 */
.comments-section {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    
    margin: 0 auto 20px;
    padding: 20px;
}

.comments-header {
    background: var(--light-bg);
    padding: 15px 20px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-text);
    border-bottom: 1px solid var(--border-color);
}

.comment-list {
    padding: 20px;
}

.comment {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

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

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--dark-text);
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--light-text);
    margin-bottom: 10px;
}

.comment-text {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--dark-text);
    font-size: 0.9rem;
    background: var(--light-bg);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.comment-reply-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.comment-reply-link:hover {
    color: var(--secondary-color);
}

/* 评论表单 */
.comment-form {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.comment-form-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-text);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark-text);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.15);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.cancel-reply {
    text-align: right;
    margin-bottom: 10px;
}

.cancel-reply-link {
    color: var(--light-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

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

/* 评论子级 */
.comment-children {
    margin-left: 30px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

@media (max-width: 768px) {
    .comment-children {
        margin-left: 20px;
    }
    
       .article-summary {
        display: none !important; /* !important 确保覆盖模板默认样式 */
        visibility: hidden !important; /* 兜底：防止仍有占位 */
    }
    .article-footer{
    display: none !important; /* !important 确保覆盖模板默认样式 */
        visibility: hidden !important; /* 兜底：防止仍有占位 */
    }
}

@media (max-width: 576px) {
    .comment-children {
        margin-left: 15px;
    }
}

/* 页脚 */
.footer {
    background: #fff;
    color: var(--light-text);
    padding: 30px 0 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
    flex-shrink: 0; /* 防止页脚被压缩 */
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
    justify-content: space-between;
}

.footer-section {
    flex: 1;
    min-width: 150px;
}

.footer-section h3 {
    color: var(--dark-text);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--light-text);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--light-text);
}

.footer-bottom a {
    color: var(--light-text);
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

/* 错误页面 */
.error-page {
    background: #fff;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
   
    margin: 0 auto 20px;
    width: 100%;
}

.error-content h1 {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1;
}

.error-content h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-text);
    font-weight: 600;
}

.error-content p {
    font-size: 1rem;
    margin-bottom: 25px;
    color: var(--light-text);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

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

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

/* 响应式设计 */
@media (max-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 0.01rem 0.01rem;
    }
    
    .friend-links-section #blogsort {
        gap: 12px;
        padding: 15px;
    }
    
    .friend-links-section .friend-link-item {
        min-width: 100px;
    }
    
    .banner-swiper {
        height: 350px;
    }
}

@media (max-width: 992px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0.01rem 0.01rem;
    }
    
    .friend-links-section #blogsort {
        gap: 10px;
        padding: 15px;
    }
    
    .friend-links-section .friend-link-item {
        min-width: 90px;
    }
    
    .container {
        max-width: 900px;
    }
    
    .article-detail-title {
        font-size: 1.5rem;
    }
    
    .related-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .banner-swiper {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .header .container {
        height: 50px;
        padding: 0 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .container {
        width: 100%;
        padding: 0 10px;
    }
    
    .article-thumbnail-link {
        display: block;
        position: relative;
        overflow: hidden;
    }
    
    .article-thumbnail-link:hover {
        opacity: 0.9;
    }
    
    .article-thumbnail {
        width: 100%;
        height: 120px;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }
    
    .article-thumbnail-link:hover .article-thumbnail {
        transform: scale(1.05);
    }
    
    .no-thumbnail {
        width: 100%;
        height: 140px;
        background: var(--light-bg);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--light-text);
        transition: transform 0.3s ease;
    }
    
    .article-thumbnail-link:hover .no-thumbnail {
        transform: scale(1.05);
    }
    
    .no-thumbnail i {
        font-size: 2rem;
    }
    
    /* 手机端侧边栏框架样式 */
    .sidebar-frame {
        width: 100%!important;
        position: static;
        order: 2;
        margin-top: 30px;
    }
    
    /* 手机端隐藏侧边栏框架 */
    .sidebar-frame.mobile-hidden {
        display: none !important;
    }
    
    /* 移动端热门文章封面图片优化 */
    .side-cover-image {
        height: 100px;
    }
    
    .side-title-container {
        padding: 12px;
    }
    
    .side-title-container a {
        font-size: 0.9rem;
    }
    
    .logo {
        flex: 0 0 auto;
        margin: 0;
        padding: 0;
        order: 1;
    }
    
    .logo-text {
        gap: 8px;
    }
    
    .logo-icon {
        font-size: 1.4rem;
    }
    
    .logo h1 {
        margin: 0;
        padding: 0;
    }
    
    .logo h1 a {
        font-size: 1.2rem;
        text-decoration: none;
        display: block;
    }
    
    .logo-img {
        max-height: 30px;
    }
    
    .nav {
        display: none;
    }
    
    /* 移动端按钮容器 */
    .header .container > button {
        order: 2;
        margin-left: auto;
    }
    
    /* 移动端菜单按钮 */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--dark-text);
        font-size: 1.2rem;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1002;
        margin: 0 0 0 10px;
        width: auto;
        height: auto;
    }
    
    /* 移动端搜索按钮 */
    .search-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--dark-text);
        font-size: 1.2rem;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1002;
        margin: 0;
        width: auto;
        height: auto;
    }
    
    /* 重置按钮默认样式 */
    .menu-toggle,
    .search-toggle {
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        outline: none;
    }
    
    /* 修复：只针对主容器应用column布局，不影响头部 */
    .main .container {
        flex-direction: column;
    }
    
    .friend-links-section #blogsort {
        gap: 10px;
        padding: 15px;
    }
    
    .friend-links-section .list-li {
        min-width: 80px;
    }
    
    .friend-links-section .list-li a {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .article-wrapper {
        order: 1;
    }
    
    .sidebar-frame {
        width: 100%;
        position: static;
        order: 2;
        margin-top: 30px;
    }
    
    .sidebar-frame .sidebar {
        width: 100%;
        position: static;
    }
    
    .sidebar-box-title {
        padding: 15px;
    }
    
    .sidebar-box-title h2 {
        font-size: 1.05rem;
    }
    
    /* 移动端分类信息框架 */
    .sort-header {
        margin-bottom: 15px;
    }
    
    /* 移动端代码块样式 */
    .article-detail-content pre {
        padding: 15px;
        margin: 15px 0;
        font-size: 0.8rem;
        background: #2b303b;
        border: 1px solid #5a6a8a;
    }
    
    .article-detail-content pre::before {
        font-size: 0.6rem;
        padding: 1px 6px;
    }
    
    .copy-button {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
    
    /* 移动端面包屑导航 */
    .breadcrumb {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
    
    /* 移动端分类描述 */
    .sort-description {
        padding: 15px;
    }
    
    .sort-description p {
        font-size: 0.9rem;
    }
    
    /* 移动端分享按钮优化 */
    .article-actions {
        margin: 15px 0;
    }
    
    .share-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .share-dropdown {
        min-width: 120px;
    }
    
    .share-dropdown a {
        padding: 10px 16px;
        font-size: 0.9rem;
        margin: 0 8px;
    }
    
    /* 移动端相邻文章优化 */
    .neighbor-posts {
           display: flex;
    gap: 20px;
    flex-wrap: wrap;

    }
    
    .neighbor-post {
        min-width: auto;
        padding: 15px;
    }
    
    .neighbor-post-title {
        font-size: 0.95rem;
    }
    
    .widget-content,
    .sidebar-search,
    .sidebar-srarch-tag,
    .sidebar-tags,
    .sidebar-toplist,
    .sidebar-links,
    .sidebar-newlog,
    .sidebar-archive,
    .sidebar-sort,
    .sidebar-custom,
    .sidebar-comment,
    .sidebar-newcomm,
    .sidebar-calendar,
    .about-card {
        padding: 18px;
    }
    
    .about-card-bg {
        height: 80px;
        margin: -18px -18px 18px -18px;
    }
    
    .about-card-tx {
        width: 70px;
        height: 70px;
        margin: -50px auto 15px;
        font-size: 2rem;
    }
    
    .about-card-name h2 {
        font-size: 1.2rem;
    }
    
    .about-card-carrier ul {
        gap: 12px;
        margin: 20px 0;
    }
    
    .about-icon-qq,
    .about-icon-weixin,
    .about-icon-bili,
    .about-icon-douyin,
    .about-icon-kuaishou {
        width: 36px;
        height: 36px;
    }
    
    .sidebar-search input {
        padding: 12px 40px 12px 16px;
        font-size: 0.9rem;
    }
    
    .sidebar-search button {
        width: 32px;
        height: 32px;
        right: 10px;
    }
    
    .sidebar-srarch-tag a,
    .sidebar-tags a {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .sidebar-toplist li,
    .sidebar-links li,
    .sidebar-newlog li,
    .sidebar-archive li,
    .sidebar-sort li,
    .sidebar-newcomm .item {
        padding: 10px 15px; /* 调整移动端内边距 */
        margin-bottom: 6px; /* 调整移动端边距 */
    }

    /* 移动端最新评论样式 */
    .newcomm-item {
        padding: 8px 10px;
        gap: 8px;
    }

    .newcomm-avatar {
        width: 28px;
        height: 28px;
    }

    .newcomm-avatar i {
        font-size: 0.8rem;
    }

    .newcomm-author {
        font-size: 0.8rem;
    }

    .newcomm-text {
        font-size: 0.8rem;
    }
    
    .sidebar-toplist li:hover,
    .sidebar-links li:hover,
    .sidebar-newlog li:hover,
    .sidebar-archive li:hover,
    .sidebar-sort li:hover {
        padding: 10px 15px; /* 移动端悬停时保持一致的内边距 */
    }
    
    .sidebar-toplist a,
    .sidebar-links a,
    .sidebar-newlog a,
    .sidebar-archive a,
    .sidebar-sort a,
    .sidebar-newcomm .data h4 {
        font-size: 0.85rem;
    }
    
    .sidebar-comment .tx,
    .sidebar-newcomm .tx {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
    
    .sidebar-comment .data h4,
    .sidebar-newcomm .data h4 {
        font-size: 0.9rem;
    }
    
    .sidebar-comment .cont p,
    .sidebar-newcomm .cont p {
        padding: 10px;
        font-size: 0.8rem;
    }
    
    .calendar-header {
        font-size: 1.05rem;
    }
    
    .calendar-days span {
        font-size: 0.75rem;
    }
    
    .calendar-date {
        height: 28px;
        font-size: 0.85rem;
    }
    
    .card-footer td {
        padding: 6px;
    }
    
    .card-footer b {
        font-size: 1.1rem;
    }
    
    /* 移动端评论表单优化 */
    .comment-form {
        padding: 15px;
    }
    
    .comment-form-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }
    
    .form-control {
        font-size: 0.9rem;
        padding: 8px 10px;
    }
    
    textarea.form-control {
        min-height: 100px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .cancel-reply {
        margin-bottom: 8px;
    }
    
    .cancel-reply-link {
        font-size: 0.85rem;
    }
    
    /* 超小屏幕相邻文章优化 */
    .neighbor-post {
        padding: 12px;
    }
    
    .neighbor-post-icon {
        font-size: 1.2rem;
        margin: 0 10px;
    }
    
    .neighbor-post-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
        width: 100%;
    }
    
    .logo-img {
        max-height: 25px;
    }
    
    .article-thumbnail-link {
        display: block;
        position: relative;
        overflow: hidden;
    }
    
    .article-thumbnail-link:hover {
        opacity: 0.9;
    }
    
    .article-thumbnail {
        width: 100%;
        height: 120px;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }
    
    .article-thumbnail-link:hover .article-thumbnail {
        transform: scale(1.05);
    }
    
    .no-thumbnail {
        width: 100%;
        height: 120px;
        background: var(--light-bg);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--light-text);
        transition: transform 0.3s ease;
    }
    
    .article-thumbnail-link:hover .no-thumbnail {
        transform: scale(1.05);
    }
    
    .no-thumbnail i {
        font-size: 2rem;
    }
    
    /* 超小屏幕热门文章封面图片优化 */
    .side-cover-image {
        height: 80px;
    }
    
    .side-title-container {
        padding: 10px;
    }
    
    .side-title-container a {
        font-size: 0.85rem;
    }
    
    .main {
        padding: 15px 0;
        width: 100%;
        max-width: 100%;
    }
    
    .article-card {
        margin-bottom: 15px;
    }
    
    .article-content {
        padding: 12px;
    }
    
    
    .article-meta {
        gap: 5px;
        font-size: 0.7rem;
    }
    
    .article-summary {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    
    .article-tags a {
        padding: 2px 6px;
        font-size: 0.65rem;
    }
    
    /* 移动端文章标签样式 */
    .article-tag {
        padding: 3px 10px;
        font-size: 0.8rem;
        margin-right: 6px;
        margin-bottom: 6px;
        border-radius: 12px;
    }
    
    .pagination {
        gap: 4px;
        margin-top: 20px;
    }
    
    .pagination a,
    .pagination span {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .article-detail-header {
        padding: 15px 15px 12px;
        text-align: center;
    }
    
    .article-detail-title {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .article-detail-meta {
        justify-content: center;
    }
    
    .article-detail-content {
        padding: 15px;
    }
    
    .article-detail-content pre {
        padding: 12px;
        margin: 12px 0;
        font-size: 0.75rem;
        background: #2b303b;
        border: 1px solid #5a6a8a;
    }
    
    .article-detail-content pre::before {
        font-size: 0.5rem;
        padding: 1px 5px;
    }
    
    .copy-button {
        padding: 2px 5px;
        font-size: 0.65rem;
    }
    
    .article-detail-content h1 {
        font-size: 1.4rem;
        margin: 22px 0 14px;
        padding: 10px 12px;
        border-left-width: 3px;
    }
    
    .article-detail-content h1:before {
        font-size: 0.5rem;
        padding: 1px 3px;
        left: -3px;
    }
    
    .article-detail-content h2 {
        font-size: 1.25rem;
        margin: 20px 0 12px;
        padding: 8px 10px;
    }
    
    .article-detail-content h2:after {
        width: 30px;
        height: 1px;
    }
    
    .article-detail-content h3 {
        font-size: 1.1rem;
        margin: 16px 0 10px;
        padding: 6px 10px;
        border-left-width: 2px;
    }
    
    .article-detail-content h3:before {
        width: 14px;
        height: 14px;
        font-size: 0.5rem;
        left: -8px;
    }
    
    .article-detail-thumbnail {
        height: 200px;
    }
    
    .comment {
        flex-direction: column;
    }
    
    .comment-avatar {
        align-self: flex-start;
    }
    
    .comment-text {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .form-control {
        font-size: 0.85rem;
        padding: 8px 10px;
    }
    
    textarea.form-control {
        min-height: 100px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .cancel-reply-link {
        font-size: 0.85rem;
    }
    
    .error-content h1 {
        font-size: 3rem;
    }
    
    .error-content h2 {
        font-size: 1.3rem;
    }
    
    .error-page {
        padding: 30px 15px;
        margin: 0 auto 15px;
        width: 100%;
    }
    
    .error-content h1 {
        font-size: 2.5rem;
    }
    
    .error-content h2 {
        font-size: 1.1rem;
    }
    
    .error-content p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .error-actions {
        gap: 10px;
    }
    
    /* 超小屏幕分享按钮优化 */
    .share-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .share-dropdown {
        min-width: 100px;
    }
    
    .share-dropdown a {
        padding: 8px 12px;
        font-size: 0.85rem;
        margin: 0 6px;
    }
    
    .footer-content {
        gap: 15px;
    }
    
    .footer-section h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .banner-swiper {
        height: 200px;
        margin: 10px auto;
    }
    
    .friend-links-section #blogsort {
        gap: 8px;
        padding: 12px;
    }
    
    .friend-links-section .friend-link-item {
        min-width: 100%;
    }
    
    .friend-links-section .list-li a {
        padding: 10px 12px;
    }
}

/* 侧边栏样式 */
.container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* 默认情况下侧边栏框架始终显示（电脑端） */
.sidebar-frame {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    align-self: flex-start;
    order: 2;
}

.article-wrapper {
    flex: 1;
    order: 1;
}

.sidebar-frame .sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 25px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.sidebar-frame .sidebar:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* 侧边栏标题美化 */
.sidebar-frame .widget-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-text);
    padding: 15px 20px;
    margin: -20px -20px 20px -20px;
    border-bottom: 2px solid var(--primary-color);
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    position: relative;
}

.sidebar-frame .widget-title::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

/* 侧边栏内容区域 */
.sidebar-frame .widget-content {
    padding: 0 10px;
}

/* 侧边栏小工具样式 */
.sidebar-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 25px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.sidebar-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.sidebar-box-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-text);
    padding: 18px 20px;
    margin: 0;
    border-bottom: none; /* 去掉下划线 */
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    display: flex;
    align-items: center;
    position: relative;
    border-left: 4px solid var(--primary-color);
}

.sidebar-box-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.sidebar-box-title h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-text);
}

.sidebar-box-title i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* 标签小工具 */
.sidebar-tags {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sidebar-tags a {
    display: inline-block;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: var(--dark-text);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar-tags a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.2);
}

/* 归档小工具 */
.sidebar-archive {
    padding: 20px;
}

.sidebar-archive ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-archive li {
    margin: 0;
    padding: 12px 0;
    border-bottom: none; /* 去掉下划线 */
    transition: all 0.3s ease;
    border-radius: 6px; /* 添加圆角 */
    margin-bottom: 8px; /* 添加底部边距 */
}

.sidebar-archive li:last-child {
    border-bottom: none;
    margin-bottom: 0; /* 最后一项去掉边距 */
}

.sidebar-archive li:hover {
    background: rgba(67, 097, 238, 0.05); /* 更明显的悬停效果 */
    padding: 12px 15px; /* 调整内边距 */
}

.sidebar-archive a {
    color: var(--dark-text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
}

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

/* 分类小工具 */
.sidebar-sort {
    padding: 20px;
}

.sidebar-sort ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-sort li {
    margin: 0;
    padding: 12px 0;
    border-bottom: none; /* 去掉下划线 */
    transition: all 0.3s ease;
    border-radius: 6px; /* 添加圆角 */
    margin-bottom: 8px; /* 添加底部边距 */
}

.sidebar-sort li:last-child {
    border-bottom: none;
    margin-bottom: 0; /* 最后一项去掉边距 */
}

.sidebar-sort li:hover {
    background: rgba(67, 97, 238, 0.05); /* 更明显的悬停效果 */
    padding: 12px 15px; /* 调整内边距 */
}

.sidebar-sort a {
    color: var(--dark-text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
}

.sidebar-sort a:hover {
    color: var(--primary-color);
}

/* 自定义文本小工具 */
.sidebar-custom {
    padding: 20px;
    line-height: 1.6;
    color: var(--dark-text);
}

/* 搜索小工具 */
.sidebar-search {
    padding: 20px;
}

.sidebar-search form {
    position: relative;
}

.sidebar-search input {
    width: 100%;
    padding: 14px 45px 14px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background: #fff;
}

.sidebar-search button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-search button:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.05);
}

/* 标签云小工具 */
.sidebar-srarch-tag {
    padding: 20px;
}

.sidebar-srarch-tag ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-srarch-tag li {
    margin: 0;
}

.sidebar-srarch-tag a {
    display: inline-block;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: var(--dark-text);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar-srarch-tag a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.2);
}

/* 最新文章小工具 */
.sidebar-newlog {
    padding: 20px;
}

.sidebar-newlog ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-newlog li {
    margin: 0;
    padding: 12px 0;
    border-bottom: none; /* 去掉下划线 */
    transition: all 0.3s ease;
    border-radius: 6px; /* 添加圆角 */
    margin-bottom: 8px; /* 添加底部边距 */
    display: flex;
    align-items: center;
}

.sidebar-newlog li:last-child {
    border-bottom: none;
    margin-bottom: 0; /* 最后一项去掉边距 */
}

.sidebar-newlog li:hover {
    background: rgba(67, 97, 238, 0.05); /* 更明显的悬停效果 */
    padding: 12px 15px; /* 调整内边距 */
}

.sidebar-newlog a {
    color: var(--dark-text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.4;
    flex: 1;
}

.sidebar-newlog a:hover {
    color: var(--primary-color);
}

/* 最新文章排序标识 */
.newlog-rank {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), #3a56d6);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(67, 97, 238, 0.3);
}

/* 最新文章/热门文章小工具 */
.sidebar-toplist {
    padding: 20px;
}

.sidebar-toplist ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-toplist li {
    margin: 0;
    padding: 12px 0;
    border-bottom: none; /* 去掉下划线 */
    transition: all 0.3s ease;
    border-radius: 8px; /* 添加圆角 */
    margin-bottom: 12px; /* 添加底部边距 */
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar-toplist li:last-child {
    border-bottom: none;
    margin-bottom: 0; /* 最后一项去掉边距 */
}

.sidebar-toplist li:hover {
    background: #fff;
    padding: 12px 15px; /* 调整内边距 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.sidebar-toplist a {
    color: var(--dark-text);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 6px;
}

.sidebar-toplist a:hover {
    color: var(--primary-color);
    background: rgba(67, 97, 238, 0.05);
}

.sidebar-toplist span {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--light-text);
    border: 1px solid #e9ecef;
}

/* 热门文章封面图片样式 */
.side-cover-image {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.side-cover-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.side-cover-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 60%);
}

.side-title-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    z-index: 1;
}

.side-title-container a {
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: block;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.side-title-container a:hover {
    color: var(--accent-color);
}

/* 链接小工具 */
.sidebar-links {
    padding: 20px;
}

.sidebar-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-links li {
    margin: 0;
    padding: 12px 0;
    border-bottom: none; /* 去掉下划线 */
    transition: all 0.3s ease;
    border-radius: 6px; /* 添加圆角 */
    margin-bottom: 8px; /* 添加底部边距 */
}

.sidebar-links li:last-child {
    border-bottom: none;
    margin-bottom: 0; /* 最后一项去掉边距 */
}

.sidebar-links li:hover {
    background: rgba(67, 97, 238, 0.05); /* 更明显的悬停效果 */
    padding: 12px 15px; /* 调整内边距 */
}

.sidebar-links a {
    color: var(--dark-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.4;
}

.sidebar-links a:hover {
    color: var(--primary-color);
}

.sidebar-links img {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border-radius: 50%;
    border: 1px solid #e9ecef;
}

/* 评论小工具 */
.sidebar-comment {
    padding: 20px;
}

.sidebar-comment-list .item {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px dashed #e9ecef;
}

.sidebar-comment-list .item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-comment .head {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.sidebar-comment .tx {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid #e9ecef;
}

.sidebar-comment .tx img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-comment .data h4 {
    margin: 0 0 3px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-text);
}

.sidebar-comment .data em {
    font-size: 0.8rem;
    color: var(--light-text);
    font-style: normal;
}

.sidebar-comment .data span {
    font-size: 0.8rem;
    color: var(--light-text);
}

.sidebar-comment .cont p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--dark-text);
    line-height: 1.5;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

/* 最新评论小工具 (sidebar-newcomm) */
.sidebar-newcomm {
    padding: 20px;
}

/* 单列布局 */
.sidebar-newcomm ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 新版评论项样式（widget_newcomm使用） */
.newcomm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(67, 97, 238, 0.1);
    transition: all 0.3s ease;
}

.newcomm-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.15);
    background: linear-gradient(135deg, #ffffff, #f0f4ff);
    border-color: var(--primary-color);
}

.newcomm-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(67, 97, 238, 0.2);
    flex-shrink: 0;
}

.newcomm-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.newcomm-avatar i {
    font-size: 0.9rem;
    color: white;
}

.newcomm-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.newcomm-author {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.newcomm-text {
    color: var(--light-text);
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 旧版样式保留（兼容性） */
.sidebar-newcomm-item {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(67, 97, 238, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}


.sidebar-newcomm-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(67, 97, 238, 0.15);
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

.sidebar-newcomm-item:last-child {
    margin-bottom: 0;
}

.sidebar-newcomm-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.sidebar-newcomm-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(67, 97, 238, 0.3);
}

.sidebar-newcomm-info {
    flex: 1;
}

.sidebar-newcomm-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.sidebar-newcomm-date {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.sidebar-newcomm-content {
    margin-bottom: 12px;
}

/* 登录用户信息显示 */
.logged-in-user-info {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #4361ee;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.logged-in-user-info p {
    margin: 5px 0;
    color: #34495e;
    font-size: 0.95rem;
}

.logged-in-user-info strong {
    color: #4361ee;
}


.sidebar-newcomm-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #34495e;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-newcomm-content p:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(3px);
}

.sidebar-newcomm-post a {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: #4361ee;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-newcomm-post a:hover {
    color: #3a0ca3;
    transform: translateX(3px);
}

.sidebar-newcomm-post a i {
    margin-right: 5px;
}

/* 无评论提示样式 */
.sidebar-newcomm .no-comments {
    text-align: center;
    padding: 40px 20px;
    color: var(--light-text);
}

.sidebar-newcomm .no-comments i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--light-text);
    opacity: 0.5;
}

.sidebar-newcomm .no-comments p {
    font-size: 0.9rem;
    margin: 0;
}

/* 最新评论：评论文本样式 */
.sidebar-newcomm-text {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

/* 最新评论：查看文章链接 */
.sidebar-newcomm-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(67, 97, 238, 0.05));
    padding: 8px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.sidebar-newcomm-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.sidebar-newcomm-link i {
    transition: transform 0.3s ease;
}

.sidebar-newcomm-link:hover i {
    transform: translateX(3px);
}

/* 优化：当无头像时显示图标 */
.sidebar-newcomm-avatar i.fas {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 日历小工具 */
.sidebar-calendar {
    padding: 20px;
}

.calendar-widget {
    text-align: center;
}

.calendar-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-text);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-days span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--light-text);
}

.calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-date {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: var(--transition);
}

.calendar-date:hover {
    background: var(--light-bg);
    cursor: pointer;
}

.calendar-date.today {
    background: var(--primary-color);
    color: white;
}

.calendar-date.empty {
    background: transparent;
    cursor: default;
}

/* 个人资料小工具 */
.about-card {
    text-align: center;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.about-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.about-card-bg {
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px 12px 0 0;
    margin: -25px -25px 25px -25px;
    position: relative;
    overflow: hidden;
}

.about-card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-card-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

.about-card-tx {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #fff;
    margin: -65px auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    overflow: hidden;
}

.about-card-tx:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.about-card-tx img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.about-card-name h2 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
    color: var(--dark-text);
    font-weight: 600;
}

.about-card-name p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--light-text);
    line-height: 1.6;
}

.card-footer {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.card-footer table {
    width: 100%;
}

.card-footer td {
    text-align: center;
    
}

.card-footer .text-black-50 {
    color: var(--light-text);
    font-size: 0.85rem;
}

.card-footer b {
    display: block;
    color: var(--dark-text);
    margin-top: 5px;
    font-weight: 600;
}

/* 文章操作区域 */
.article-actions {
display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto 20px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* 点赞功能 */


/* 分享功能 */
.article-actions {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    margin: 0 auto 20px;
    background: #fff;
    border-radius: 8px;
}

.article-share {
    position: relative;
    display: inline-block;
}

.share-btn {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.share-btn:hover::before {
    left: 100%;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.share-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    padding: 12px 0;
    min-width: 140px;
    z-index: 100;
    display: none;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease;
}

.share-dropdown a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--dark-text);
    text-decoration: none;
    font-size: 0.95rem;
    gap: 10px;
    transition: var(--transition);
    border-radius: 8px;
    margin: 0 12px;
}

.share-dropdown a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

/* 微博分享样式 */
.share-dropdown a:nth-child(1):hover {
    background: rgba(255, 0, 0, 0.1);
    color: #e91e63;
}

/* QQ分享样式 */
.share-dropdown a:nth-child(2):hover {
    background: rgba(0, 170, 238, 0.1);
    color: #00aaee;
}

/* 复制链接样式 */
.share-dropdown a:nth-child(3):hover {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

.share-dropdown.show {
    display: block;
    animation: slideDown 0.3s ease;
}

/* 动画关键帧 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 相邻文章卡片样式 */
.neighbor-posts {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
    margin: 0 auto 20px;
}

.neighbor-post {
    flex: 1;
    min-width: 250px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.neighbor-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.neighbor-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.neighbor-post:hover::before {
    transform: translateX(100%);
}

.neighbor-prev {
    justify-content: flex-start;
}

.neighbor-next {
    justify-content: flex-end;
}

.neighbor-post-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.neighbor-post-content {
    flex: 1;
    text-align: center;
}

.neighbor-post-label {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-bottom: 5px;
}

.neighbor-post-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.neighbor-empty {
    background: #f8f9fa;
    cursor: default;
}

.neighbor-empty .neighbor-post-title {
    color: var(--light-text);
    font-weight: normal;
}

/* 文章标签样式 */
.article-tag {
    display: inline-block;
    color: var(--primary-color);
    background: rgba(67, 97, 238, 0.1);
    padding: 4px 12px;
    border-radius: 15px;
    text-decoration: none;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.article-tag:hover {
    background: rgba(67, 97, 238, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.15);
}

.article-tag.empty-tag {
    color: var(--light-text);
    background: #f1f3f5;
    cursor: default;
}

.article-tag.empty-tag:hover {
    background: #f1f3f5;
    transform: none;
    box-shadow: none;
}

/* 加载更多按钮样式 */
.load-more-container {
    text-align: center;
    margin: 30px 0;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.2);
}

.load-more-btn:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.load-more-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.load-more-btn i {
    font-size: 1rem;
}
