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

/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #1a1a40, #3c3c6e);
    color: #ffffff;
    line-height: 1.6;
}

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

/* 标题样式 */
h1, h2, h3, h4 {
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
}

h2 {
    font-size: 2em;
    margin-top: 20px;
    margin-bottom: 10px;
}

h3 {
    font-size: 1.5em;
    margin-top: 15px;
    margin-bottom: 8px;
}

h4 {
    font-size: 1.2em;
    margin-top: 12px;
    margin-bottom: 6px;
}

/* 段落样式 */
p {
    font-size: 1em;
    margin-bottom: 15px;
}

/* 代码块样式 */
pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

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

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

th, td {
    border: 1px solid #ffffff;
    padding: 10px;
    text-align: left;
}

th {
    background: rgba(255, 255, 255, 0.2);
}

tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.1);
}

/* 按钮样式 */
.button-primary {
    background-color: #3ebd5d;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.button-primary:hover {
    background-color: #3399ff;
    transform: scale(1.05);
}

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

.card:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

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

/* 表示这是一个网页样式设计参考 */
.reference-note {
    text-align: center;
    font-size: 1.2em;
    margin: 30px 0;
    color: #ffcc00;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { color: #ffcc00; }
    50% { color: #ff9900; }
    100% { color: #ffcc00; }
}

/* 动态粒子背景 */
.background-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 87, 34, 0.2), transparent);
    animation: aurora-move 15s linear infinite;
    z-index: -1;
}

@keyframes aurora-move {
    0% { transform: translate(0, 0); }
    50% { transform: translate(50px, 50px); }
    100% { transform: translate(0, 0); }
}

/* 代码示例预览 */
.code-preview {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-preview code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .article-container {
        padding: 15px;
    }
}

@media (max-width: 1200px) {
    .article-container {
        padding: 10px;
    }
}

@media (max-width: 1024px) {
    h2 {
        font-size: 1.8em;
    }
    h3 {
        font-size: 1.4em;
    }
}

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

@media (max-width: 480px) {
    h2 {
        font-size: 1.6em;
    }
    h3 {
        font-size: 1.2em;
    }
    .button-primary {
        padding: 8px 16px;
        font-size: 14px;
    }
}

@media (max-width: 320px) {
    body {
        padding: 10px;
    }
    h2 {
        font-size: 1.4em;
    }
    h3 {
        font-size: 1em;
    }
    p, li {
        font-size: 0.9em;
    }
}

