/* 3D视差柠檬黄主题 */
:root {
    --primary-color: #FFD700;
    --secondary-color: #FFA500;
    --dark-color: #1a1a1a;
    --light-color: #fff;
    --text-color: #333;
    --accent-color: #FF6347;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    --parallax-perspective: 1000px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f8f8f8;
    color: var(--text-color);
    line-height: 1.7;
    perspective: var(--parallax-perspective);
    overflow-x: hidden;
}

/* 3D视差层 */
.parallax-layer {
    position: relative;
    transform-style: preserve-3d;
}

/* 头部样式 - 3D浮动效果 */
header {
    background-color: var(--light-color);
    padding: 25px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    transform: translateZ(0);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark-color);
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.logo:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    padding: 8px 15px;
    border-radius: 30px;
    font-weight: 600;
    color: var(--dark-color);
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    transition: all 0.6s ease;
}

nav ul li a:hover::before {
    left: 100%;
}

nav ul li a:hover {
    color: var(--dark-color);
    background-color: rgba(255, 215, 0, 0.2);
}

/* 主要内容区域 - 3D卡片效果 */
.main-content {
    background-color: var(--light-color);
    border-radius: 15px;
    padding: 40px;
    margin: 40px auto;
    max-width: 1200px;
    box-shadow: var(--shadow);
    transform: translateZ(20px);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    color: var(--dark-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* 3D卡片式文章列表 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    perspective: 1000px;
}

.article-card {
    background-color: var(--light-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.5s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    position: relative;
}

.article-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.card-image-container {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .card-image {
    transform: scale(1.1);
}

.card-body {
    padding: 20px;
    position: relative;
    z-index: 1;
    background-color: var(--light-color);
}

.card-title {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--dark-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-excerpt {
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #777;
    margin-top: 15px;
}

/* 分类标签 - 3D按钮效果 */
.category-tag {
    display: inline-block;
    padding: 5px 15px;
    background-color: var(--primary-color);
    color: var(--dark-color);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    transform: translateZ(0);
}

.category-tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 10px rgba(255, 215, 0, 0.3);
}

/* 文章详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    transform: translateZ(30px);
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.article-title {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
}

.article-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: #777;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.article-image-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: var(--shadow);
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-image-container:hover .article-image {
    transform: scale(1.05);
}

.article-content {
    line-height: 1.8;
    font-size: 18px;
}

.article-content p {
    margin-bottom: 25px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.article-content img:hover {
    transform: scale(1.02);
}

/* 分页导航 - 3D按钮 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 50px;
}

.pagination a {
    padding: 12px 25px;
    border-radius: 30px;
    background-color: var(--light-color);
    color: var(--dark-color);
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
}

.pagination a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 215, 0, 0.5), transparent);
    transition: all 0.6s ease;
}

.pagination a:hover::before {
    left: 100%;
}

.pagination a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background-color: var(--primary-color);
}

/* 友情链接 - 3D浮动效果 */
.friend-links {
    background-color: var(--light-color);
    border-radius: 12px;
    padding: 30px;
    margin: 40px auto;
    max-width: 1200px;
    box-shadow: var(--shadow);
    transform: translateZ(10px);
}

.friend-links h3 {
    margin-bottom: 25px;
    color: var(--dark-color);
    font-size: 24px;
    position: relative;
    display: inline-block;
}

.friend-links h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.friend-links-container a {
    padding: 10px 20px;
    background-color: var(--light-color);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.friend-links-container a:hover {
    transform: translateY(-5px) rotate(2deg);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    background-color: var(--primary-color);
    border-color: transparent;
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    padding: 40px 0;
    text-align: center;
    margin-top: 60px;
    position: relative;
    transform: translateZ(0);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* 3D视差背景元素 */
.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.parallax-bg span {
    position: absolute;
    display: block;
    background-color: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    transform-style: preserve-3d;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .article-meta {
        gap: 15px;
    }
    
    .main-content {
        padding: 30px 20px;
        margin: 30px 15px;
    }
    
    .friend-links {
        padding: 20px;
        margin: 30px 15px;
    }
}

/* 3D视差动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}