/* 3D交互风格全局变量 */
:root {
    --primary-3d: #ff4d6d;
    --secondary-3d: #6930c3;
    --dark-3d: #1a1a2e;
    --light-3d: #f8f9fa;
    --accent-3d: #00f5d4;
    --shadow-3d: 0 10px 20px rgba(0, 0, 0, 0.3);
    --perspective: 1000px;
}

/* 基础3D样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--dark-3d);
    color: var(--light-3d);
    perspective: var(--perspective);
    overflow-x: hidden;
    line-height: 1.7;
}

/* 3D头部样式 */
header {
    background: linear-gradient(135deg, var(--dark-3d), #16213e);
    padding: 25px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-3d);
    transform-style: preserve-3d;
    transition: all 0.5s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-3d {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-3d), var(--accent-3d));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(255, 77, 109, 0.3);
    transform: translateZ(30px);
}

/* 3D导航菜单 */
.nav-3d ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-3d li {
    position: relative;
    transform-style: preserve-3d;
}

.nav-3d a {
    color: var(--light-3d);
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    transform: translateZ(20px);
}

.nav-3d a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-3d);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-3d a:hover {
    color: var(--accent-3d);
}

.nav-3d a:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* 3D主体内容 */
.main-container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 0 20px;
    transform-style: preserve-3d;
}

/* 3D卡片样式 */
.card-3d {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-3d);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.card-image-3d {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transform: translateZ(20px);
    transition: transform 0.5s ease;
}

.card-3d:hover .card-image-3d {
    transform: translateZ(30px) scale(1.05);
}

.card-body-3d {
    padding: 25px;
    transform: translateZ(15px);
}

.card-title-3d {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--light-3d);
    position: relative;
    display: inline-block;
}

.card-title-3d::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-3d);
    transition: width 0.3s ease;
}

.card-3d:hover .card-title-3d::after {
    width: 100%;
}

.card-meta-3d {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 14px;
    color: var(--accent-3d);
}

/* 3D网格布局 */
.grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    perspective: var(--perspective);
}

/* 3D标题样式 */
.section-title-3d {
    font-size: 28px;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    transform: translateZ(25px);
}

.section-title-3d::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-3d), var(--secondary-3d));
    border-radius: 4px;
    transform: scaleX(0.8);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.section-title-3d:hover::before {
    transform: scaleX(1);
}

/* 3D文章详情页 */
.article-detail-3d {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-3d);
    transform-style: preserve-3d;
    margin-bottom: 50px;
}

.article-header-3d {
    text-align: center;
    margin-bottom: 40px;
    transform: translateZ(30px);
}

.article-title-3d {
    font-size: 36px;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary-3d), var(--accent-3d));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.article-meta-3d {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
    color: var(--accent-3d);
    flex-wrap: wrap;
}

.article-image-3d {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-3d);
    transform: translateZ(40px);
    transition: transform 0.5s ease;
}

.article-image-3d:hover {
    transform: translateZ(50px) rotateY(5deg);
}

.article-content-3d {
    line-height: 1.8;
    font-size: 18px;
    transform: translateZ(20px);
}

.article-content-3d p {
    margin-bottom: 25px;
}

/* 3D分页导航 */
.pagination-3d {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 50px;
}

.pagination-3d a {
    padding: 12px 25px;
    border-radius: 50px;
    background: linear-gradient(145deg, var(--secondary-3d), var(--primary-3d));
    color: white;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(105, 48, 195, 0.4);
    transition: all 0.3s ease;
    transform: translateZ(20px);
}

.pagination-3d a:hover {
    transform: translateZ(30px) translateY(-5px);
    box-shadow: 0 8px 20px rgba(105, 48, 195, 0.6);
}

/* 3D友情链接 */
.friend-links-3d {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    padding: 30px;
    margin: 50px 0;
    box-shadow: var(--shadow-3d);
}

.friend-links-title-3d {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--light-3d);
    transform: translateZ(20px);
}

.friend-links-container-3d {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.friend-links-container-3d a {
    padding: 10px 20px;
    background: linear-gradient(145deg, var(--dark-3d), #16213e);
    border-radius: 50px;
    color: var(--accent-3d);
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    transform: translateZ(15px);
}

.friend-links-container-3d a:hover {
    transform: translateZ(25px) translateY(-3px);
    background: linear-gradient(145deg, var(--primary-3d), var(--secondary-3d));
    color: white;
    box-shadow: 0 5px 15px rgba(255, 77, 109, 0.4);
}

/* 3D页脚 */
.footer-3d {
    background: linear-gradient(135deg, var(--dark-3d), #16213e);
    padding: 30px 0;
    text-align: center;
    margin-top: 80px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.copyright-3d {
    font-size: 14px;
    color: var(--accent-3d);
}

/* 3D动画效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0) translateZ(20px);
    }
    50% {
        transform: translateY(-10px) translateZ(30px);
    }
}

.float-animation {
    animation: float 4s ease-in-out infinite;
}

/* 视差滚动效果 */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii4wNSIgbnVtT2N0YXZlcz0iNSIgc3RpdGNoVGlsZXM9InN0aXRjaCIvPjwvZmlsdGVyPjxwYXRoIGZpbGw9IiMxYTFhMmUiIGZpbHRlcj0idXJsKCNhKSIgZD0iTTAgMGg2MDB2NjAwSDB6Ii8+PC9zdmc+') center/cover;
    transform: translateZ(-50px) scale(1.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-3d ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .grid-3d {
        grid-template-columns: 1fr;
    }
    
    .article-title-3d {
        font-size: 28px;
    }
    
    .pagination-3d {
        flex-direction: column;
        align-items: center;
    }
}

/* 3D按钮样式 */
.btn-3d {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(145deg, var(--primary-3d), var(--secondary-3d));
    color: white;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(255, 77, 109, 0.4);
    transition: all 0.3s ease;
    transform: translateZ(20px);
    border: none;
    cursor: pointer;
}

.btn-3d:hover {
    transform: translateZ(30px) translateY(-5px);
    box-shadow: 0 8px 20px rgba(105, 48, 195, 0.6);
}