/* 3D交互风格全局样式 */
:root {
    --neon-blue: #0ff0fc;
    --neon-purple: #6e0dd0;
    --dark-bg: #0a0a1a;
    --darker-bg: #050510;
    --card-bg: rgba(15, 15, 35, 0.8);
    --text-light: #e0e0ff;
    --text-accent: #ff00ff;
    --shadow-color: rgba(111, 0, 255, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Rajdhani', 'Arial Narrow', sans-serif;
}

@font-face {
    font-family: 'Rajdhani';
    src: url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;600;700&display=swap');
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
}

/* 3D视差背景层 */
.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 30%, var(--neon-purple) 0%, transparent 25%),
        radial-gradient(circle at 80% 70%, var(--neon-blue) 0%, transparent 25%);
    opacity: 0.15;
}

/* 动态光标效果 */
body:hover .cursor-follower {
    opacity: 1;
}

.cursor-follower {
    position: fixed;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--neon-blue) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.1s, opacity 0.3s;
    mix-blend-mode: screen;
}

/* 头部样式 - 悬浮3D效果 */
header {
    background-color: rgba(10, 10, 30, 0.9);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(111, 0, 255, 0.3);
    box-shadow: 0 5px 15px var(--shadow-color);
    transform-style: preserve-3d;
    transform: translateZ(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(to right, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(111, 0, 255, 0.5);
    letter-spacing: 2px;
    transition: all 0.5s;
}

.logo:hover {
    text-shadow: 0 0 20px rgba(111, 0, 255, 0.8);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li {
    position: relative;
}

nav ul li a {
    padding: 8px 15px;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    transition: all 0.3s;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--neon-blue), var(--neon-purple));
    transition: width 0.3s;
}

nav ul li a:hover {
    color: var(--neon-blue);
}

nav ul li a:hover::before {
    width: 100%;
}

/* 3D卡片容器 */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    perspective: 1200px;
}

/* 主要内容区域 - 3D变换 */
.main-content {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    transition: transform 0.5s, box-shadow 0.5s;
    border: 1px solid rgba(111, 0, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(111, 0, 255, 0.1) 50%,
        transparent 100%
    );
    transform: rotate(45deg);
    animation: shine 6s infinite linear;
    z-index: -1;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.main-content:hover {
    transform: translateY(-5px) rotateX(1deg) rotateY(1deg);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    background: linear-gradient(to right, var(--neon-blue), var(--text-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--neon-blue), transparent);
    border-radius: 3px;
}

/* 3D文章卡片网格 */
.article-grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    perspective: 1000px;
}

.article-card-3d {
    background: linear-gradient(145deg, var(--card-bg) 0%, rgba(20, 20, 50, 0.8) 100%);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    position: relative;
    border: 1px solid rgba(111, 0, 255, 0.3);
}

.article-card-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg) scale(1.03);
    box-shadow: 0 15px 30px var(--shadow-color);
    z-index: 10;
}

.article-card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--neon-blue), var(--neon-purple));
}

.card-image-3d {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s;
    transform-origin: center center;
}

.article-card-3d:hover .card-image-3d {
    transform: scale(1.05);
}

.card-body-3d {
    padding: 25px;
    position: relative;
}

.card-title-3d {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    z-index: 2;
}

.card-title-3d a {
    color: var(--text-light);
    text-decoration: none;
    background-image: linear-gradient(var(--neon-blue), var(--neon-blue));
    background-repeat: no-repeat;
    background-position: 0% 100%;
    background-size: 0% 2px;
    transition: background-size 0.3s, color 0.3s;
}

.card-title-3d a:hover {
    color: var(--neon-blue);
    background-size: 100% 2px;
}

.card-meta-3d {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--neon-blue);
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

/* 分类标签 - 3D按钮效果 */
.category-tag-3d {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(to right, var(--neon-purple), var(--neon-blue));
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.3s;
    transform: translateZ(10px);
}

.category-tag-3d:hover {
    transform: translateY(-3px) translateZ(15px);
    box-shadow: 0 7px 20px var(--shadow-color);
}

/* 文章详情页 - 3D深度效果 */
.article-detail-3d {
    max-width: 900px;
    margin: 0 auto;
    transform-style: preserve-3d;
}

.article-header-3d {
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

.article-title-3d {
    font-size: 42px;
    margin-bottom: 25px;
    line-height: 1.3;
    background: linear-gradient(to right, var(--neon-blue), var(--text-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(111, 0, 255, 0.3);
    position: relative;
    z-index: 2;
}

.article-meta-3d {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: var(--neon-blue);
    margin-bottom: 30px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.article-image-3d {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    transform: translateZ(20px);
    transition: transform 0.5s;
}

.article-image-3d:hover {
    transform: translateZ(30px) rotateX(5deg) rotateY(5deg);
}

.article-content-3d {
    line-height: 1.9;
    font-size: 18px;
    position: relative;
    z-index: 2;
}

.article-content-3d p {
    margin-bottom: 25px;
    position: relative;
}

.article-content-3d img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s;
}

.article-content-3d img:hover {
    transform: scale(1.02) translateZ(10px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

/* 分页导航 - 3D按钮 */
.pagination-3d {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
}

.pagination-3d a {
    padding: 12px 25px;
    border-radius: 30px;
    background: linear-gradient(145deg, var(--neon-purple), var(--neon-blue));
    color: white;
    font-weight: 600;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
    border: none;
}

.pagination-3d 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: all 0.5s;
}

.pagination-3d a:hover {
    transform: translateY(-5px) translateZ(10px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.pagination-3d a:hover::before {
    left: 100%;
}

/* 友情链接 - 3D浮动效果 */
.friend-links-3d {
    background: linear-gradient(145deg, var(--card-bg) 0%, rgba(20, 20, 50, 0.8) 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 50px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    transition: all 0.5s;
    border: 1px solid rgba(111, 0, 255, 0.3);
}

.friend-links-3d:hover {
    transform: translateY(-5px) rotateX(2deg) rotateY(2deg);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.friend-links-3d h3 {
    margin-bottom: 25px;
    font-size: 24px;
    background: linear-gradient(to right, var(--neon-blue), var(--text-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.friend-links-container-3d {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    perspective: 1000px;
}

.friend-links-container-3d a {
    padding: 10px 20px;
    background: rgba(20, 20, 50, 0.6);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    transform-style: preserve-3d;
    border: 1px solid rgba(111, 0, 255, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.friend-links-container-3d a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(111, 0, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.friend-links-container-3d a:hover {
    background: linear-gradient(145deg, var(--neon-purple), var(--neon-blue));
    color: white;
    transform: translateY(-5px) translateZ(10px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.friend-links-container-3d a:hover::before {
    transform: translateX(100%);
}

/* 页脚样式 - 3D边缘发光 */
footer {
    background-color: rgba(10, 10, 30, 0.9);
    padding: 40px 0;
    text-align: center;
    margin-top: 80px;
    position: relative;
    border-top: 1px solid rgba(111, 0, 255, 0.3);
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.3);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--neon-blue), var(--neon-purple));
    box-shadow: 0 0 20px var(--neon-blue);
}

.copyright {
    font-size: 14px;
    color: var(--neon-blue);
    letter-spacing: 1px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .article-grid-3d {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .article-title-3d {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .article-grid-3d {
        grid-template-columns: 1fr;
    }
    
    .article-title-3d {
        font-size: 30px;
    }
    
    .article-meta-3d {
        gap: 15px;
    }
    
    .main-content {
        padding: 30px;
    }
}

/* 3D动画效果 */
@keyframes float {
    0%, 100% { transform: translateY(0) rotateX(0) rotateY(0); }
    50% { transform: translateY(-10px) rotateX(5deg) rotateY(5deg); }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}