/* 3D交互风格全局样式 */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #f72585;
    --dark-color: #1a1a2e;
    --light-color: #e2eafc;
    --text-color: #e2eafc;
    --card-bg: rgba(26, 26, 46, 0.8);
    --neon-glow: 0 0 10px rgba(67, 97, 238, 0.7);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--dark-color);
    color: var(--text-color);
    line-height: 1.7;
    perspective: 1000px;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--light-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
    text-shadow: var(--neon-glow);
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 3D浮动头部样式 */
header {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(58, 12, 163, 0.8));
    padding: 25px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    border-bottom: 1px solid var(--primary-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform-style: preserve-3d;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(67, 97, 238, 0.5);
    letter-spacing: 1px;
    transform: translateZ(20px);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    transform: translateZ(20px);
}

nav ul li a {
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 500;
    background: rgba(67, 97, 238, 0.2);
    border: 1px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

nav ul li a:hover {
    background: var(--primary-color);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

/* 3D卡片主要内容区域 */
.main-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    transition: var(--transition);
    border: 1px solid rgba(67, 97, 238, 0.3);
}

.main-content:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    position: relative;
    color: var(--light-color);
    transform: translateZ(30px);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 150px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

/* 3D悬浮文章网格 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    transform-style: preserve-3d;
}

.article-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(67, 97, 238, 0.3);
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(67, 97, 238, 0.1), transparent);
    transform: translateZ(30px);
    z-index: -1;
}

.article-card:hover {
    transform: translateY(-15px) rotateX(5deg) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.card-image-container {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .card-image {
    transform: scale(1.1);
}

.card-body {
    padding: 25px;
    transform-style: preserve-3d;
}

.card-title {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--light-color);
    transform: translateZ(20px);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--primary-color);
    margin-top: 20px;
    transform: translateZ(20px);
}

/* 3D分类标签 */
.category-tag {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50px;
    font-size: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
    transform: translateZ(20px);
    transition: var(--transition);
}

.category-tag:hover {
    transform: translateY(-3px) translateZ(20px);
    box-shadow: 0 7px 20px rgba(67, 97, 238, 0.6);
}

/* 3D文章详情页样式 */
.article-detail {
    max-width: 900px;
    margin: 0 auto;
    transform-style: preserve-3d;
}

.article-header {
    margin-bottom: 50px;
    text-align: center;
    transform-style: preserve-3d;
}

.article-title {
    font-size: 36px;
    margin-bottom: 25px;
    line-height: 1.3;
    color: var(--light-color);
    text-shadow: 0 0 10px rgba(67, 97, 238, 0.5);
    transform: translateZ(40px);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: var(--primary-color);
    margin-bottom: 30px;
    flex-wrap: wrap;
    transform: translateZ(30px);
}

.article-image-container {
    height: 450px;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    position: relative;
    transform-style: preserve-3d;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-image-container:hover .article-image {
    transform: scale(1.05);
}

.article-content {
    line-height: 1.9;
    font-size: 18px;
    transform-style: preserve-3d;
}

.article-content p {
    margin-bottom: 25px;
    transform: translateZ(20px);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    transform-style: preserve-3d;
}

.article-content img:hover {
    transform: scale(1.02) rotateZ(1deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

/* 3D分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
    transform-style: preserve-3d;
}

.pagination a {
    padding: 12px 25px;
    border-radius: 50px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 5px 20px rgba(67, 97, 238, 0.4);
    transition: var(--transition);
    transform: translateZ(30px);
}

.pagination a:hover {
    background: linear-gradient(45deg, var(--accent-color), #b5179e);
    transform: translateY(-5px) translateZ(30px);
    box-shadow: 0 10px 30px rgba(247, 37, 133, 0.5);
}

/* 3D友情链接 */
.friend-links {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(58, 12, 163, 0.6));
    border-radius: 20px;
    padding: 30px;
    margin: 50px 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    border: 1px solid var(--primary-color);
}

.friend-links h3 {
    margin-bottom: 25px;
    color: var(--light-color);
    font-size: 24px;
    transform: translateZ(30px);
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    transform-style: preserve-3d;
}

.friend-links-container a {
    padding: 10px 20px;
    background: rgba(67, 97, 238, 0.2);
    border-radius: 50px;
    font-size: 14px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    transform: translateZ(20px);
}

.friend-links-container a:hover {
    background: var(--primary-color);
    transform: translateY(-5px) translateZ(20px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.5);
}

/* 3D页脚样式 */
footer {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(58, 12, 163, 0.8));
    padding: 40px 0;
    text-align: center;
    margin-top: 70px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    border-top: 1px solid var(--primary-color);
}

.copyright {
    font-size: 16px;
    color: var(--light-color);
    transform: translateZ(30px);
}

/* 3D动画效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0) translateZ(20px);
    }
    50% {
        transform: translateY(-10px) translateZ(20px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        gap: 25px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .article-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .article-title {
        font-size: 30px;
    }
    
    .article-image-container {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 30px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .article-meta {
        gap: 15px;
    }
    
    .article-image-container {
        height: 250px;
    }
    
    .pagination {
        flex-direction: column;
        align-items: center;
    }
}