/* 3D交互风格全局样式 */
:root {
    --primary: #8a2be2;
    --secondary: #00bfff;
    --dark: #0f0c29;
    --light: #e6f0ff;
    --accent: #ff00ff;
    --text: rgba(230, 240, 255, 0.9);
    --glass: rgba(15, 12, 41, 0.7);
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Rajdhani', 'Arial', sans-serif;
}

@font-face {
    font-family: 'Rajdhani';
    src: url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;600;700&display=swap');
}

body {
    background: linear-gradient(135deg, var(--dark), #1a1a2e);
    color: var(--text);
    min-height: 100vh;
    perspective: 1000px;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--secondary);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

a:hover {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 3D头部样式 */
header {
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
    transform-style: preserve-3d;
}

.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), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    text-transform: uppercase;
    transform: translateZ(20px);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    transform: translateZ(20px);
}

nav ul li a {
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.4), transparent);
    transition: 0.5s;
}

nav ul li a:hover::before {
    left: 100%;
}

/* 3D主要内容区域 */
.main-content {
    background: var(--glass);
    border-radius: 20px;
    padding: 40px;
    margin: 120px 0 60px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 191, 255, 0.2);
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.main-content:hover {
    transform: translateY(-5px) rotateX(1deg) rotateY(1deg);
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 191, 255, 0.3);
    position: relative;
    color: var(--light);
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateZ(30px);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 150px;
    height: 3px;
    background: linear-gradient(to right, var(--primary), transparent);
}

/* 3D卡片式文章列表 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    transform-style: preserve-3d;
}

.article-card {
    background: rgba(15, 12, 41, 0.6);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(138, 43, 226, 0.3);
    transform-style: preserve-3d;
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(0, 191, 255, 0.1) 50%, transparent 60%);
    background-size: 200% 200%;
    opacity: 0;
    transition: 0.5s;
}

.article-card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg) scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    border-color: var(--primary);
}

.article-card:hover::before {
    opacity: 1;
    background-position: 100% 100%;
}

.card-image-container {
    height: 200px;
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.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);
    transform: translateZ(20px);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--secondary);
    margin-top: 20px;
    transform: translateZ(20px);
}

/* 3D分类标签 */
.category-tag {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateZ(20px);
}

/* 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);
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateZ(30px);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: var(--secondary);
    margin-bottom: 30px;
    flex-wrap: wrap;
    transform: translateZ(30px);
}

.article-image-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 40px;
    position: relative;
    transform-style: preserve-3d;
    box-shadow: var(--shadow);
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.article-image-container:hover .article-image {
    transform: scale(1.05);
}

.article-content {
    line-height: 1.8;
    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: 10px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    transition: transform 0.5s;
    transform-style: preserve-3d;
}

.article-content img:hover {
    transform: scale(1.02) rotateY(5deg);
}

/* 3D分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
    transform-style: preserve-3d;
}

.pagination a {
    padding: 12px 25px;
    border-radius: 30px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.pagination a:hover {
    transform: translateY(-5px) rotateX(5deg);
    box-shadow: 0 10px 20px rgba(0, 191, 255, 0.6);
}

.pagination a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.pagination a:hover::before {
    left: 100%;
}

/* 3D友情链接 */
.friend-links {
    background: var(--glass);
    border-radius: 15px;
    padding: 30px;
    margin: 60px 0;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 191, 255, 0.2);
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
}

.friend-links h3 {
    margin-bottom: 25px;
    color: var(--light);
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 1px;
    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: linear-gradient(45deg, rgba(138, 43, 226, 0.3), rgba(0, 191, 255, 0.3));
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--primary);
    transition: all 0.3s;
    transform-style: preserve-3d;
}

.friend-links-container a:hover {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    transform: translateY(-3px) rotateX(3deg);
}

/* 3D页脚样式 */
footer {
    background: linear-gradient(to right, var(--dark), #1a1a2e);
    padding: 40px 0;
    text-align: center;
    margin-top: 80px;
    border-top: 1px solid rgba(138, 43, 226, 0.3);
    position: relative;
    transform-style: preserve-3d;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
}

.copyright {
    font-size: 14px;
    color: var(--secondary);
    letter-spacing: 1px;
    transform: translateZ(20px);
}

/* 3D背景元素 */
.background-element {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
}

.background-element span {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(0, 191, 255, 0.1);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.5),
                0 0 20px rgba(0, 191, 255, 0.3),
                0 0 30px rgba(0, 191, 255, 0.2);
    animation: float 15s linear infinite;
    opacity: 0;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

/* 响应式设计 */
@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-meta {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 30px 20px;
        margin: 100px 0 40px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .article-meta {
        gap: 15px;
    }
    
    .pagination {
        flex-direction: column;
        align-items: center;
    }
}