/* 全局重置与字体 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    padding: 0 20px;
    transition: background 0.3s, color 0.3s;
}

/* 暗色模式支持（默认已是暗色，但保留变量） */
:root {
    --bg-primary: #1a1a2e;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(255, 255, 255, 0.12);
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --accent: #6c63ff;
    --accent-hover: #5a52d5;
    --border: rgba(255, 255, 255, 0.15);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* 滚动动画基础 */
section, article, aside, header, footer {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 延迟动画 */
section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }
article { animation-delay: 0.2s; }

/* 头部导航 - 毛玻璃效果 */
header {
    background: var(--bg-glass);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 20px;
    padding: 12px 24px;
    margin: 20px auto;
    max-width: 1200px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

header:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(108, 99, 255, 0.3);
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    list-style: none;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s;
    transform: translateX(-50%);
}

nav ul li a:hover {
    color: #fff;
    background: rgba(108, 99, 255, 0.2);
    transform: scale(1.05);
}

nav ul li a:hover::before {
    width: 60%;
}

/* 主区域 */
main {
    max-width: 1200px;
    margin: 0 auto;
}

/* 各section卡片 - 圆角卡片 + 毛玻璃 */
section {
    background: var(--bg-card);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border-radius: 28px;
    padding: 40px 32px;
    margin: 30px 0;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.4s, box-shadow 0.4s, background 0.3s;
}

section:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 48px rgba(108, 99, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

/* 首页特殊 - 渐变Banner */
#home {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
    text-align: center;
    padding: 80px 32px;
    border: none;
    position: relative;
    overflow: hidden;
}

#home::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(108, 99, 255, 0.15), transparent 60%);
    animation: glowBanner 6s infinite alternate;
    pointer-events: none;
}

@keyframes glowBanner {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10%, 10%); }
}

#home h1 {
    font-size: 3.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

#home p {
    font-size: 1.5rem;
    color: #ccc;
    letter-spacing: 4px;
    position: relative;
    z-index: 1;
}

/* 标题样式 */
h2 {
    font-size: 2rem;
    color: #f0f0f0;
    margin-bottom: 20px;
    border-left: 6px solid var(--accent);
    padding-left: 18px;
    position: relative;
}

h3 {
    font-size: 1.4rem;
    color: #ddd;
    margin-bottom: 10px;
}

p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

a:hover {
    color: #a29bfe;
    text-shadow: 0 0 8px rgba(108, 99, 255, 0.5);
}

/* 新闻文章卡片 */
article {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s ease;
    backdrop-filter: blur(8px);
}

article:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(8px) scale(1.01);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(108, 99, 255, 0.15);
}

article p {
    font-size: 0.95rem;
    color: #aaa;
}

article a {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 30px;
    background: rgba(108, 99, 255, 0.15);
    transition: all 0.3s;
}

article a:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.05);
}

/* 侧边栏 */
aside {
    max-width: 1200px;
    margin: 30px auto;
    background: var(--bg-glass);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border-radius: 28px;
    padding: 30px 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    transition: transform 0.3s;
}

aside:hover {
    transform: translateY(-4px);
}

aside h2 {
    font-size: 1.6rem;
    border-left: 4px solid #f7971e;
    margin-bottom: 16px;
    width: 100%;
}

aside ul {
    list-style: none;
    flex: 1;
    min-width: 200px;
}

aside ul li {
    margin: 10px 0;
}

aside ul li a {
    display: block;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.3s;
}

aside ul li a:hover {
    background: rgba(108, 99, 255, 0.15);
    padding-left: 20px;
}

/* 底部 */
footer {
    max-width: 1200px;
    margin: 30px auto;
    text-align: center;
    padding: 24px 20px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border);
    color: #999;
    font-size: 0.9rem;
}

footer p {
    margin: 6px 0;
    color: #999;
}

footer a {
    color: #bbb;
    margin: 0 10px;
}

footer a:hover {
    color: #fff;
}

/* 响应式布局 */
@media (max-width: 768px) {
    body {
        padding: 0 12px;
    }
    
    header {
        padding: 10px 16px;
        border-radius: 16px;
    }
    
    nav ul {
        gap: 6px 12px;
    }
    
    nav ul li a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    #home {
        padding: 50px 20px;
    }
    
    #home h1 {
        font-size: 2.2rem;
    }
    
    #home p {
        font-size: 1.1rem;
    }
    
    section {
        padding: 28px 18px;
        border-radius: 20px;
        margin: 20px 0;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    article {
        padding: 18px;
    }
    
    aside {
        flex-direction: column;
        padding: 24px 18px;
        gap: 20px;
    }
    
    footer {
        padding: 18px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    #home h1 {
        font-size: 1.8rem;
    }
    
    #home p {
        font-size: 1rem;
    }
    
    nav ul {
        justify-content: center;
    }
    
    nav ul li a {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a52d5;
}