
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #8bc34a, #9c27b0); /* 从森林绿到科技紫的渐变 */
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* 容器样式 */
.container {
    width: 90%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    position: relative;
}

/* 标题样式 */
h1, h2, h3, h4 {
    font-family: 'Roboto', sans-serif;
    color: #4a4a4a;
    margin-bottom: 20px;
    position: relative;
}

h1 {
    font-size: 2.5em;
    text-align: center;
    margin-top: 20px;
}

h2 {
    font-size: 2em;
    border-bottom: 2px solid #9c27b0;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.75em;
    margin-top: 30px;
}

h4 {
    font-size: 1.5em;
    margin-top: 20px;
}

/* 段落样式 */
p {
    font-family: 'Pacifico', cursive;
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

/* 代码块样式 */
pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 20px;
}

code {
    background: #3c3c3c;
    color: #f8f8f2;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.95em;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}

/* 链接样式 */
a {
    color: #9c27b0;
    text-decoration: none;
    position: relative;
}

a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #9c27b0;
    transition: width 0.3s;
}

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

a[rel="nofollow"] {
    /* 无特殊样式，仅添加属性 */
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 12px 25px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background 0.3s;
    text-decoration: none;
    font-size: 1em;
}

.button:hover {
    background: #388e3c;
}

.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.button:hover::before {
    width: 200px;
    height: 200px;
}

/* 动画粒子效果 */
@keyframes particleMove {
    from { transform: translateY(0); }
    to { transform: translateY(-100vh); }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top:0;
    left:0;
    pointer-events: none;
    z-index: -1;
}

.particles div {
    position: absolute;
    bottom: 0;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: particleMove 5s linear infinite;
}

/* 代码示例预览样式 */
.code-preview {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-preview code {
    color: #00ff00;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
}

/* 示例展示样式 */
.sample-article {
    border: 2px dashed #ff9800;
    padding: 20px;
    border-radius: 10px;
    background: rgba(255, 152, 0, 0.1);
    margin-top: 40px;
}

/* 提示样式 */
.reference-note {
    font-size: 1em;
    color: #e91e63;
    text-align: center;
    margin: 30px 0;
}

/* 响应式设计 */
@media (max-width: 320px) {
    .container {
        padding: 15px;
    }
    h1 {
        font-size: 1.8em;
    }
    h2 {
        font-size: 1.5em;
    }
    h3 {
        font-size: 1.3em;
    }
    h4 {
        font-size: 1.1em;
    }
    p {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    h1 {
        font-size: 2em;
    }
    h2 {
        font-size: 1.7em;
    }
    h3 {
        font-size: 1.5em;
    }
    h4 {
        font-size: 1.3em;
    }
    p {
        font-size: 1.05em;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }
    h1 {
        font-size: 2.3em;
    }
    h2 {
        font-size: 1.8em;
    }
    h3 {
        font-size: 1.6em;
    }
    h4 {
        font-size: 1.4em;
    }
    p {
        font-size: 1.1em;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 30px;
    }
    h1 {
        font-size: 2.5em;
    }
    h2 {
        font-size: 1.9em;
    }
    h3 {
        font-size: 1.7em;
    }
    h4 {
        font-size: 1.5em;
    }
    p {
        font-size: 1.15em;
    }
}

@media (min-width: 1440px) {
    .container {
        padding: 40px;
    }
    h1 {
        font-size: 3em;
    }
    h2 {
        font-size: 2.2em;
    }
    h3 {
        font-size: 1.9em;
    }
    h4 {
        font-size: 1.6em;
    }
    p {
        font-size: 1.2em;
    }
}

