
/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&family=Roboto:wght@400;700&display=swap');

/* 通用样式 */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
    color: #ffffff;
    line-height: 1.6;
    padding: 20px;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    margin-bottom: 20px;
}

h1 {
    font-size: 3em;
    font-weight: 700;
    text-align: center;
    margin-top: 20px;
    background: -webkit-linear-gradient(#ff9a9e, #fad0c4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2em;
    font-weight: 600;
    border-bottom: 2px solid #ffffff;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.5em;
    font-weight: 600;
    margin-top: 30px;
}

p {
    font-size: 1em;
    margin-bottom: 15px;
    color: #f0f0f0;
}

code {
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 4px;
    border-radius: 4px;
    color: #ffbe76;
    font-family: 'Roboto', monospace;
}

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

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: #ff7eb3;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.5s ease, box-shadow 0.3s ease;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.button:hover {
    background: #ffbe76;
    box-shadow: 0 4px 15px rgba(255, 190, 118, 0.6);
}

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

/* 示例展示样式 */
.article-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-top: 40px;
}

.article-section h2 {
    border-color: #ff9a9e;
}

.pre-code {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

pre code {
    color: #ffbe76;
}

/* 交互动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 2s ease-in-out;
}

/* 响应式字体调整 */
@media (max-width: 480px) {
    h1 {
        font-size: 2em;
    }
    h2 {
        font-size: 1.5em;
    }
    h3 {
        font-size: 1.2em;
    }
    p, code {
        font-size: 0.9em;
    }
}

@media (min-width: 1440px) {
    body {
        padding: 40px;
    }
    .container {
        max-width: 1400px;
    }
}

