
/* 基础样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Lora', serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

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

/* 头部样式 */
header {
    background: radial-gradient(circle, rgba(255,87,34,1) 0%, rgba(255,255,255,0) 70%);
    padding: 40px 0;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

header h1 {
    font-family: 'Merriweather', sans-serif;
    font-size: 2.5em;
    margin: 0;
    animation: fadeIn 2s ease-in-out;
}

header p {
    font-size: 1.2em;
    margin-top: 10px;
    animation: fadeIn 3s ease-in-out;
}

/* 导航栏样式 */
nav {
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s;
}

nav ul li a::after {
    content: '';
    width: 0%;
    height: 2px;
    background: #ff5722;
    position: absolute;
    left: 0;
    bottom: 0;
    transition: width 0.3s;
}

nav ul li a:hover::after {
    width: 100%;
}

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

/* 主内容样式 */
main {
    padding: 40px 0;
}

/* 文章展示样式 */
.article {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.article h2 {
    font-family: 'Merriweather', sans-serif;
    color: #333;
    margin-bottom: 20px;
}

.article p {
    margin-bottom: 15px;
}

.article pre {
    background: #f4f4f4;
    padding: 10px;
    border-left: 4px solid #ff5722;
    overflow-x: auto;
    border-radius: 5px;
}

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

/* 示例展示样式 */
.example-display {
    background: rgba(240, 248, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 40px;
    position: relative;
}

.example-display::before {
    content: '示例展示';
    position: absolute;
    top: -20px;
    left: 20px;
    background: #ff5722;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

.example-display img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
}

.example-display .description {
    font-size: 1em;
    color: #555;
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: #ff5722;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s;
}

.button:hover {
    background: #e64a19;
}

.button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    opacity: 0;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.button:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* 图片库样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-gallery img {
    width: calc(25% - 10px);
    border-radius: 5px;
    transition: transform 0.3s;
}

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

/* 响应式设计 */
@media (max-width: 1440px) {
    .image-gallery img {
        width: calc(33.333% - 10px);
    }
}

@media (max-width: 1200px) {
    .image-gallery img {
        width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 10px 0;
    }

    .image-gallery img {
        width: 100%;
    }
}

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

    .button {
        padding: 8px 16px;
    }
}

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

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

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 页面提示样式 */
.page-note {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-left: 5px solid #ffeeba;
    margin: 20px 0;
    border-radius: 5px;
}

/* 代码块样式 */
.code-block {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

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

