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

/* 全局字体与颜色 */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0D47A1, #4A148C);
    color: #FFFFFF;
    line-height: 1.6;
    padding: 20px;
    background-attachment: fixed;
    background-size: cover;
    animation: backgroundMove 15s linear infinite;
}

@keyframes backgroundMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    font-family: 'Neue Machina', sans-serif;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #FF8A65;
}

/* 主标题样式 */
.header-title {
    text-align: center;
    font-family: 'Neue Machina', sans-serif;
    font-size: 3em;
    margin-bottom: 20px;
    color: #FFCCBC;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

/* 文章内容样式 */
.article {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.article h2, .article h3 {
    font-family: 'Neue Machina', sans-serif;
    color: #FFAB91;
    margin-bottom: 15px;
}

.article p {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.article pre {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.article code {
    font-family: 'Courier New', Courier, monospace;
    color: #FFD740;
}

/* 示例展示区域 */
.example-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.example-section h2 {
    color: #80CBC4;
    margin-bottom: 15px;
}

.example-section ul {
    list-style: none;
}

.example-section li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.example-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #FFD54F;
}

/* 卡片设计 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
}

.card h3 {
    color: #FF5722;
    margin-bottom: 10px;
    font-family: 'Neue Machina', sans-serif;
}

.card p {
    color: #B2EBF2;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.card a {
    color: #FFCCBC;
    text-decoration: none;
    font-weight: bold;
}

.card a:hover {
    text-decoration: underline;
}

/* 图像样式 */
img.decorative {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    margin: 10px;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

img.decorative:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(45deg, #FF8A65, #FFCCBC);
    border: none;
    border-radius: 25px;
    color: #FFFFFF;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    text-decoration: none;
}

.button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #FF7043, #FFAB91);
}

/* 代码块样式 */
.code-block {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-block code {
    color: #81C784;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
}

/* 视觉冲击力的粒子动画 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: transparent;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: moveParticles 20s linear infinite;
}

@keyframes moveParticles {
    from {
        transform: translateY(0) translateX(0);
        opacity: 1;
    }
    to {
        transform: translateY(100vh) translateX(100vw);
        opacity: 0;
    }
}

/* 自适应布局 */
@media (max-width: 1440px) {
    .card {
        width: 280px;
    }
}

@media (max-width: 1200px) {
    .article, .example-section {
        padding: 25px;
    }

    .header-title {
        font-size: 2.5em;
    }
}

@media (max-width: 1024px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar a {
        margin: 10px 0;
    }

    .card-container {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .header-title {
        font-size: 2em;
    }

    .card {
        width: 100%;
    }

    img.decorative {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .navbar {
        padding: 10px 20px;
    }

    .header-title {
        font-size: 1.5em;
    }

    .article, .example-section {
        padding: 15px;
    }

    .button {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

@media (max-width: 320px) {
    .header-title {
        font-size: 1.2em;
    }

    .card {
        padding: 15px;
    }

    .article h2, .article h3 {
        font-size: 1.5em;
    }
}

/* 提示文本样式 */
.reference-note {
    text-align: center;
    font-size: 1em;
    color: #B3E5FC;
    margin-top: 20px;
}

