/* 石板灰主题 - 鼠标悬停特效版 */
:root {
    --stone-dark: #3a3a3a;
    --stone-medium: #5a5a5a;
    --stone-light: #7a7a7a;
    --stone-extra-light: #eaeaea;
    --accent-color: #8c7ae6;
    --text-color: #f0f0f0;
    --hover-time: 0.4s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--stone-dark);
    color: var(--text-color);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: var(--stone-extra-light);
    position: relative;
    transition: all var(--hover-time) ease;
}

a:not(.no-hover):hover {
    color: var(--accent-color);
}

/* 链接下划线动画 */
a:not(.no-hover)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-color);
    transition: width var(--hover-time) ease;
}

a:not(.no-hover):hover::after {
    width: 100%;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 3D悬浮头部 */
header {
    background-color: var(--stone-medium);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transform: translateZ(0);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(to right, var(--stone-extra-light), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all var(--hover-time) ease;
}

.logo:hover {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    padding: 8px 15px;
    font-weight: 500;
}

/* 主要内容区 - 石板纹理背景 */
.main-content {
    background: linear-gradient(135deg, var(--stone-medium) 0%, var(--stone-dark) 100%);
    padding: 30px;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.section-title {
    font-size: 26px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    transition: width var(--hover-time) ease;
}

.section-title:hover::after {
    width: 120px;
}

/* 网格布局 - 卡片悬停3D效果 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background: var(--stone-medium);
    border-radius: 8px;
    overflow: hidden;
    transition: all var(--hover-time) ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative;
    transform-style: preserve-3d;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--hover-time) ease;
}

.article-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.article-card:hover::before {
    transform: scaleX(1);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform var(--hover-time) ease;
}

.article-card:hover .card-image {
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-origin: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--stone-extra-light);
    margin-top: 15px;
}

/* 分类标签 - 气泡效果 */
.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--stone-light);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 15px;
    transition: all var(--hover-time) ease;
}

.article-card:hover .category-tag {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

/* 文章详情页特效 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.article-title {
    font-size: 32px;
    margin-bottom: 20px;
    line-height: 1.3;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: var(--stone-extra-light);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: transform var(--hover-time) ease;
}

.article-image:hover {
    transform: scale(1.02) rotate(1deg);
}

.article-content {
    line-height: 1.8;
    font-size: 17px;
}

.article-content p {
    margin-bottom: 20px;
    transition: all var(--hover-time) ease;
    padding: 5px;
    border-radius: 4px;
}

.article-content p:hover {
    background: rgba(255,255,255,0.05);
    transform: translateX(5px);
}

/* 分页导航 - 按钮悬停效果 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 25px;
    border-radius: 30px;
    background-color: var(--stone-light);
    transition: all var(--hover-time) ease;
}

.pagination a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(140, 122, 230, 0.4);
}

/* 友情链接 - 波浪悬停效果 */
.friend-links {
    background: var(--stone-medium);
    border-radius: 8px;
    padding: 30px;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.friend-links::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    opacity: 0.3;
    transition: all 0.6s ease;
}

.friend-links:hover::before {
    height: 100%;
    opacity: 0.1;
}

.friend-links h3 {
    margin-bottom: 20px;
    font-size: 22px;
    position: relative;
    display: inline-block;
}

.friend-links h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform var(--hover-time) ease;
}

.friend-links:hover h3::after {
    transform: scaleX(1);
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 20px;
    background-color: var(--stone-light);
    border-radius: 30px;
    font-size: 14px;
    transition: all var(--hover-time) ease;
}

.friend-links-container a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

/* 页脚 - 动态年份 */
footer {
    background-color: var(--stone-medium);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.copyright {
    font-size: 14px;
    color: var(--stone-extra-light);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .pagination {
        flex-direction: column;
        align-items: center;
    }
}