
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Pacifico&display=swap');

/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #2e8b57, #87cefa);
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Pacifico', cursive;
    color: #ffffff;
}

p {
    line-height: 1.6;
    margin-bottom: 1em;
}

a {
    color: #ff69b4;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffa500;
}

/* 容器 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
header {
    text-align: center;
    padding: 50px 0;
    background: rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid #fff;
}

/* 文章部分 */
.article-section {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.article-section h2 {
    margin-top: 0;
}

.article-section pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

.article-section code {
    font-family: 'Roboto Mono', monospace;
    color: #d63384;
}

/* 示例展示 */
.sample-display {
    margin-top: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #f0e68c, #fa8072);
    border-radius: 10px;
    position: relative;
}

.sample-display::before {
    content: '示例展示';
    position: absolute;
    top: -10px;
    left: 20px;
    background: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}

/* 功能部分 */
.features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
}

.feature-item {
    flex: 1 1 calc(33.333% - 20px);
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: scale(1.05);
}

.feature-item h4 {
    margin-top: 0;
    color: #2e8b57;
}

@media (max-width: 1024px) {
    .feature-item {
        flex: 1 1 calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .feature-item {
        flex: 1 1 100%;
    }
}

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

/* 页脚 */
footer {
    text-align: center;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.2);
    border-top: 2px solid #fff;
    color: #fff;
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: #ff69b4;
    color: #fff;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.button:hover {
    background: #ffa500;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

table th {
    background-color: #2e8b57;
    color: #fff;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 粒子效果 */
.particle-effect {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: linear-gradient(135deg, #2e8b57, #87cefa);
}

.particle-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particle-move 3s infinite;
}

@keyframes particle-move {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -150%) scale(2); opacity: 0; }
}

/* 代码块增强 */
pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Roboto Mono', monospace;
}

/* 响应式设计 */
@media (max-width: 480px) {
    header {
        padding: 30px 0;
    }
    .container {
        padding: 10px;
    }
    .feature-item {
        flex: 1 1 100%;
    }
}

