* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-hover: #764ba2;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    line-height: 1.7;
    color: #333;
    background: var(--gradient);
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
nav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
    font-weight: 500;
}

nav a:hover {
    color: var(--primary);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 主内容区 */
main {
    padding: 3rem 0;
}

/* 标题组 */
hgroup {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
}

hgroup h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

hgroup p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* 卡片/区块 */
section, article {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

section:hover, article:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* 标题 */
h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

h2 {
    font-size: 1.8rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

h3 {
    font-size: 1.3rem;
    color: var(--primary);
}

/* 段落 */
p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* 列表 */
ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* 链接 */
a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.grid article {
    margin-bottom: 0;
}

/* 代码块 */
pre {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

code {
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 0.9em;
    color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

pre code {
    background: none;
    padding: 0;
}

/* 文章元信息 */
.article-meta {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

/* 时间线 */
.timeline-item {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.timeline-item h3 {
    margin-top: 0;
}

/* 资源卡片 */
.resource-item {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 0.75rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s;
}

.resource-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    border-color: var(--primary);
}

.resource-item h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.resource-item p {
    color: #666;
    margin-bottom: 0.5rem;
}

.resource-item a {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* 页脚 */
footer {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    box-shadow: var(--shadow-md);
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

footer p {
    margin-bottom: 0.5rem;
    color: #666;
}

footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    hgroup h1 {
        font-size: 2rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    section, article {
        padding: 1.5rem;
    }
}
