/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 2;
    color: #2c3e50;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 50%, #f0f4ff 100%);
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* 导航栏 */
nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

nav:hover {
    box-shadow: 0 8px 40px rgba(102, 126, 234, 0.15);
}

nav .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 30px;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.logo:hover::after {
    transform: scaleX(1);
}

/* 文章容器 */
article {
    max-width: 750px;
    margin: 50px auto;
    padding: 60px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
}

article:hover {
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.12);
}

/* 标题 */
h1 {
    font-size: 2.4em;
    margin-bottom: 30px;
    color: #2c3e50;
    line-height: 1.4;
    position: relative;
    padding-bottom: 20px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    border-radius: 2px;
}

/* 元信息 */
.meta {
    color: #999;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* 二级标题 */
h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 50px 0 25px;
    font-size: 1.7em;
    padding-left: 20px;
    border-left: 4px solid #667eea;
    position: relative;
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #667eea, #764ba2, #f093fb);
    transition: height 0.3s ease;
}

article:hover h2::before {
    height: 100%;
}

/* 段落 */
p {
    margin-bottom: 25px;
    font-size: 1.05em;
    text-align: justify;
    color: #555;
}

/* 首段特殊样式 */
article > p:first-of-type {
    font-size: 1.2em;
    color: #444;
    line-height: 2.2;
    font-weight: 400;
}

/* 链接 */
a {
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 2px;
}

a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

a:hover {
    color: #764ba2;
}

a:hover::after {
    width: 100%;
}

/* 列表样式 */
ul, ol {
    margin: 25px 0;
    padding-left: 30px;
}

li {
    margin-bottom: 12px;
    color: #555;
}

/* 引用块样式 */
blockquote {
    margin: 30px 0;
    padding: 20px 25px;
    border-left: 4px solid #667eea;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05), transparent);
    font-style: italic;
    color: #666;
}

/* 响应式 */
@media (max-width: 768px) {
    article {
        margin: 20px;
        padding: 35px 25px;
    }

    h1 {
        font-size: 1.9em;
    }

    h2 {
        font-size: 1.45em;
        padding-left: 15px;
    }

    .meta {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    article {
        margin: 15px;
        padding: 30px 20px;
    }

    h1 {
        font-size: 1.6em;
    }

    h2 {
        font-size: 1.3em;
    }

    article > p:first-of-type {
        font-size: 1.1em;
    }
}
