
/* 全局样式 */
body {
    margin: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #EAECC6, #A7E8BD);
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 头部样式 */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-family: 'Segoe Script', cursive;
    color: #007BFF;
    font-size: 2rem;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #007BFF;
    font-weight: bold;
    transition: color 0.3s ease;
}

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

/* 主内容样式 */
.main {
    flex: 1;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    margin-bottom: 60px;
}

.section h2 {
    font-size: 2rem;
    color: #007BFF;
    margin-bottom: 20px;
    position: relative;
}

.section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: #FFC107;
    margin-top: 10px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

.feature-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.feature-item h3 {
    margin-top: 15px;
    color: #007BFF;
}

.feature-item p {
    margin-top: 10px;
    color: #555;
}

/* 示例展示样式 */
.example-display {
    background: rgba(240, 240, 240, 0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.example-display h2 {
    color: #007BFF;
}

.example-display pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin-top: 10px;
}

.example-display code {
    font-family: 'Courier New', Courier, monospace;
}

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

    .main {
        padding: 30px;
    }
}

@media (max-width: 1200px) {
    header h1 {
        font-size: 1.8rem;
    }

    .section h2 {
        font-size: 1.8rem;
    }
}

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

    nav ul li {
        margin-left: 0;
        margin-top: 10px;
    }

    .features {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    header {
        padding: 10px 20px;
    }

    .main {
        padding: 20px;
    }

    .section h2 {
        font-size: 1.6rem;
    }

    .feature-item h3 {
        font-size: 1.2rem;
    }
}

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

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin-left: 0;
        margin-top: 5px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .section h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 320px) {
    header {
        padding: 5px 10px;
    }

    .main {
        padding: 10px;
    }

    .section h2 {
        font-size: 1.2rem;
    }

    .feature-item h3 {
        font-size: 1rem;
    }
}

/* 按钮样式 */
.button {
    display: inline-block;
    background: #8BC34A;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 代码块样式 */
pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

code {
    font-family: 'Courier New', Courier, monospace;
    color: #c7254e;
    background-color: #f9f2f4;
    padding: 2px 4px;
    border-radius: 4px;
}

/* 图片响应 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* 结尾提示样式 */
footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 20px;
    font-size: 1rem;
    color: #555;
}

