
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto Mono', monospace;
    background: radial-gradient(circle at top right, #0f0c29, #302b63, #24243e);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}
/* 头部样式 */
header {
    background: linear-gradient(135deg, #ff6f61, #5af78e);
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
header h1 {
    margin: 0;
    font-size: 2.5em;
    color: #ffffff;
    text-shadow: 0px 0px 10px #ff6f61, 0px 0px 20px #ff6f61;
}
nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}
nav ul li {
    display: inline;
}
nav ul li a {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s, transform 0.3s;
}
nav ul li a:hover {
    background: #5af78e;
    transform: scale(1.05);
}
.main-content {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
}
.sidebar, .content, .extra {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.article-section {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
}
.article-section h2 {
    color: #ff6f61;
    text-shadow: 0px 0px 5px #ff6f61;
}
.article-section pre {
    background: #1e1e1e;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}
.article-section code {
    color: #5af78e;
}
/* 示例展示样式 */
.samples {
    margin-top: 40px;
    padding: 20px;
    background: rgba(50, 50, 50, 0.8);
    border-radius: 10px;
}
.samples h2 {
    color: #5af78e;
    text-align: center;
}
.samples p {
    margin-bottom: 15px;
}
.samples img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 5px;
}
.code-preview {
    background: #2a5298;
    padding: 15px;
    border-radius: 5px;
    color: #ffffff;
    font-family: 'Roboto Mono', monospace;
    overflow-x: auto;
}
.button {
    background: #1e3c72;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.button:hover {
    background: #ff6f61;
    transform: scale(1.1);
}
.chart {
    width: 100%;
    height: 200px;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    border-radius: 5px;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.icon {
    width: 50px;
    height: 50px;
    animation: spin 2s infinite linear;
}
@media (max-width: 1440px) {
    .main-content {
        grid-template-columns: 1fr 2fr;
    }
}
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    nav ul {
        flex-direction: column;
    }
}
@media (max-width: 480px) {
    .chart {
        height: 150px;
    }
}
@media (max-width: 320px) {
    header h1 {
        font-size: 1.5em;
    }
    .button {
        padding: 8px 16px;
    }
}
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('circuit-board.png') no-repeat center center;
    background-size: cover;
    opacity: 0.3;
    z-index: -1;
}
/* 动态粒子效果 */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
}

