/* 主内容区布局 */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

/* 文章列表样式 */
.articles-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.articles-container a {
    text-decoration: none;
}

/* 文章卡片样式修复和增强 */
.article-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-card:nth-child(even) {
    flex-direction: row-reverse;
}

.article-cover {
    flex: 0 0 300px;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-cover img {
    transform: scale(1.08);
}

.article-info {
    flex: 1;
}

.article-title {
    font-size: 1.25rem;
    margin: 0 0 1rem;
    color: white;
    position: relative;
    display: inline-block;
}

.article-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    transition: width 0.3s ease;
}

.article-title:hover::after {
    width: 100%;
}

.article-meta {
    display: flex;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-excerpt {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* 侧边栏样式 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-card,
.sidebar-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.8s ease;
}

.profile-avatar:hover {
    transform: rotate(360deg);
}

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

.profile-name {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
    color: white;
}

.profile-bio {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0 0 1rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    transition: transform 0.3s ease, color 0.3s ease;
}

.stat-item:hover .stat-value {
    transform: scale(1.1);
    color: #fff;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* 网站资讯卡片 */
/* 网站资讯卡片样式增强与粘性定位 */
.site-info-card {
    /* 🌟 核心修复：恢复卡片基础样式 */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem; /* 确保内容有内边距 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);

    /* 保持基础动画，但粘性定位时不会发生 transform 变形 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* 🌟 粘性定位 */
    position: sticky;
    -webkit-position: sticky; /* 兼容性写法 */

    /* 确保避开导航栏 */
    top: 6rem;
}

.site-info-card:hover {
    /* 悬浮动画保留在 hover 状态 */
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

.site-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

.card-title {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: white;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.site-stats {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-stats li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.site-stats i {
    color: white;
}

/* 在 blog.css 文件中找到或添加 */

/* 确保 ul 本身是块级元素 */
.site-info-card .site-stats {
    list-style: none;
    padding: 0;
    margin: 0;
    /* 确认这个 ul 容器的 display 属性，虽然默认是 block，但加上更保险 */
    display: block;
}

/* 确保每个 li 元素独占一行 */
.site-stats li {
    /* 保持原样，flex 是为了让内容（图标和文字）水平对齐，但 li 默认是独占一行的块级元素！ */
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    /* 确认 block，虽然默认是 block，但如果被其他地方修改了会出问题 */
    /* display: block;  <- 如果上面的 flex 导致问题，可以换成 block 试试，但这样图标和文字就不能水平对齐了的说 */
}

/* 网站资讯图标动画 */
.site-stats li i {
    transition: transform 0.3s ease;
}

.site-stats li:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .article-card,
    .article-card:nth-child(even) {
        flex-direction: column;
        gap: 1rem;
    }

    .article-cover {
        flex: none;
        width: 100%;
        height: 200px;
    }

    .profile-card {
        order: -1;
    }
}

/* Follow Me 按钮样式 */
.social-links {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.github-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.github-btn i {
    font-size: 1.2rem;
}

.github-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.github-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* 公告栏卡片样式 */
.announcement-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin-top: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.announcement-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

.announcement-title {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: white;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.announcement-content {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 公告内容hover效果 */
.announcement-content p {
    transition: transform 0.3s ease, padding-left 0.3s ease;
    padding-left: 0;
}

.announcement-content p:hover {
    transform: translateX(5px);
    padding-left: 5px;
    color: #fff;
}

/* 卡片悬浮效果,怕样式混乱先注释 */
/*
.profile-card,
.announcement-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover,
.announcement-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}
*/

/* 头像旋转效果 */
.profile-avatar:hover {
    transform: rotate(360deg);
}

/* 文章卡片图片放大效果 */
.article-cover {
    overflow: hidden;
    border-radius: 10px;
}

.article-cover img {
    transition: transform 0.5s ease;
}

.article-card:hover .article-cover img {
    transform: scale(1.08);
}

/* 统计数字动画效果 */
.stat-value {
    transition: transform 0.3s ease, color 0.3s ease;
}

.stat-item:hover .stat-value {
    transform: scale(1.1);
    color: #fff;
}

/* 文章标题悬浮效果 */
.article-title:hover::after {
    width: 100%;
}

/* 增加交互效果 */
/* 头像旋转效果 */
.profile-avatar {
    transition: transform 0.8s ease;
}

.profile-avatar:hover {
    transform: rotate(360deg);
}

/* 文章卡片图片放大效果 */
.article-cover {
    overflow: hidden;
    border-radius: 10px;
}

.article-cover img {
    transition: transform 0.5s ease;
}

.article-card:hover .article-cover img {
    transform: scale(1.08);
}

/* GitHub按钮悬浮效果增强 */
.github-btn {
    position: relative;
    overflow: hidden;
}

.github-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.github-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* 卡片悬浮效果 */
.profile-card,
.announcement-card,
.site-info-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover,
.announcement-card:hover,
.site-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

/* 统计数字动画效果 */
.stat-value {
    transition: transform 0.3s ease, color 0.3s ease;
}

.stat-item:hover .stat-value {
    transform: scale(1.1);
    color: #fff;
}

/* 公告内容hover效果 */
.announcement-content p {
    transition: transform 0.3s ease, padding-left 0.3s ease;
    padding-left: 0;
}

.announcement-content p:hover {
    transform: translateX(5px);
    padding-left: 5px;
    color: #fff;
}

/* 网站资讯图标动画 */
.site-stats li i {
    transition: transform 0.3s ease;
}

.site-stats li:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* 文章标题悬浮效果 */
.article-title {
    position: relative;
    display: inline-block;
}

.article-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    transition: width 0.3s ease;
}

.article-title:hover::after {
    width: 100%;
}

/* --- 文章翻页（分页）样式 --- */
.pagination-container {
    display: flex;
    justify-content: center; /* 翻页按钮居中 */
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem 0;
    /* 让它有点半透明的背景，和文章卡片风格一致 */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border-radius: 10px;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px; /* 按钮的最小宽度 */
    height: 40px; /* 按钮的高度 */
    padding: 0 1rem;
    border-radius: 8px; /* 圆角 */
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 悬浮和非活动状态的样式 */
.pagination-item:hover:not(.active):not(.disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* 分页·当前活动页码的样式 */
.pagination-item.active {
    background: #4a90e2; /* 使用导航栏的蓝色 */
    color: white;
    border-color: #4a90e2;
    cursor: default; /* 当前页不可点击 */
    font-weight: bold;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

/* 禁用状态（例如“上一页”在第一页时） */
.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    .pagination-container {
        gap: 0.3rem;
    }
    .pagination-item {
        min-width: 35px;
        height: 35px;
        padding: 0 0.5rem;
        font-size: 0.9rem;
    }
}