
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #ffffff;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 头部样式 */
header {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 10;
}
header h1 {
    font-size: 2.5em;
    margin: 0;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    color: #ff5722;
}
header p {
    font-size: 1em;
    margin-top: 10px;
}

/* 导航栏样式 */
nav {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    gap: 30px;
}
nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.3s ease, transform 0.3s ease;
}
nav a:hover {
    color: #ff9800;
    transform: scale(1.1);
    rel: nofollow;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, background 0.3s ease;
}
.section:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
}
.section h2 {
    font-size: 1.8em;
    color: #ff9800;
    margin-bottom: 15px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}
.section p {
    font-size: 1em;
    color: #ffffff;
}
.section img {
    width: 100%;
    border-radius: 10px;
    margin-top: 15px;
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% {
        transform: translatey(0px);
    }
    50% {
        transform: translatey(-20px);
    }
}

/* 示例展示区域 */
.demo-section {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: 10px;
}
.demo-section h2 {
    font-size: 2em;
    color: #4caf50;
    margin-bottom: 20px;
    text-align: center;
}
.demo-section article {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    overflow: auto;
}
.demo-section pre {
    background: #2d2d2d;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}
.demo-section code {
    color: #ffc107;
    font-family: 'Courier New', Courier, monospace;
}
.demo-section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.demo-section th, .demo-section td {
    border: 1px solid #ffffff;
    padding: 10px;
    text-align: left;
}
.demo-section th {
    background: #3f51b5;
    color: #ffffff;
}
.demo-section tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.1);
}

/* 页脚样式 */
footer {
    background: rgba(0, 0, 0, 0.7);
    text-align: center;
    padding: 20px;
    color: #ffffff;
    font-size: 0.9em;
}
footer p {
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    header h1 {
        font-size: 2.2em;
    }
    nav a {
        font-size: 1em;
    }
}
@media (max-width: 1200px) {
    .main-content {
        padding: 30px 15px;
    }
    .section h2 {
        font-size: 1.6em;
    }
}
@media (max-width: 1024px) {
    header h1 {
        font-size: 2em;
    }
    .main-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 15px;
    }
    .section h2 {
        font-size: 1.4em;
    }
}
@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }
    nav a {
        font-size: 0.9em;
    }
    .main-content {
        padding: 20px 10px;
    }
}
@media (max-width: 320px) {
    header h1 {
        font-size: 1.5em;
    }
    .section h2 {
        font-size: 1.2em;
    }
}

