
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #000046, #1cb5e0);
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    overflow-x: hidden;
}

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

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

header h1 {
    font-size: 2em;
    color: #ffffff;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #1cb5e0;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #ffffff;
}

/* 主要内容 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.section {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #ff8a00;
}

.section p {
    line-height: 1.6;
    font-size: 1em;
    color: #d1d1d1;
}

.section pre {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 0.9em;
}

.section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.section table, .section th, .section td {
    border: 1px solid #444;
}

.section th, .section td {
    padding: 10px;
    text-align: left;
}

.section th {
    background: #1cb5e0;
    color: #ffffff;
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-gallery img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

/* 示例展示 */
.sample-display {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid #ff8a00;
}

.sample-display h2 {
    font-size: 1.5em;
    color: #ff8a00;
}

.sample-display article {
    margin-top: 10px;
}

.sample-display pre {
    background: #2c2c2c;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em;
}

/* 底部导航 */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 0;
    text-align: center;
}

footer ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

footer ul li a {
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s ease;
}

footer ul li a:hover {
    color: #1cb5e0;
}

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

@media (max-width: 1200px) {
    .container {
        width: 90%;
    }
}

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

    nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .image-gallery {
        flex-direction: column;
        align-items: center;
    }

    .section h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }

    nav ul li a {
        font-size: 0.9em;
    }

    footer ul li a {
        font-size: 0.8em;
    }
}

@media (max-width: 320px) {
    .container {
        width: 95%;
    }

    .section h2 {
        font-size: 1.3em;
    }

    .section p, .section pre {
        font-size: 0.9em;
    }
}

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

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

.button-interactive {
    background-color: #1cb5e0;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border-radius: 5px;
}

.button-interactive:hover {
    transform: scale(1.1);
    background-color: #000046;
}

