
/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f0f8ff, #add8e6);
    color: #333;
    line-height: 1.6;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    padding: 20px 40px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-family: 'Pacifico', cursive;
    font-size: 2.5em;
    color: #2e8b57;
    margin: 0;
    letter-spacing: 2px;
}

/* 导航栏样式 */
nav {
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 0;
}

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: #2e8b57;
    font-weight: bold;
    position: relative;
}

nav a:hover {
    color: #1e6b47;
}

nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #2e8b57;
    transition: width 0.3s;
}

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

/* 主内容区域 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 40px;
}

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

article h2 {
    font-family: 'Pacifico', cursive;
    color: #2e8b57;
    font-size: 1.8em;
    margin-bottom: 15px;
}

article h3 {
    color: #2e8b57;
    margin-top: 20px;
    margin-bottom: 10px;
}

article h4 {
    color: #2e8b57;
    margin-top: 15px;
    margin-bottom: 10px;
}

article p {
    margin-bottom: 15px;
}

article ul {
    list-style: disc inside;
    margin-bottom: 15px;
}

article ul li {
    margin-bottom: 10px;
}

article pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
}

article code {
    background: #f0f0f0;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 示例展示样式 */
.sample-display {
    border: 2px dashed #2e8b57;
    padding: 20px;
    margin-top: 40px;
    background: rgba(240, 248, 255, 0.8);
    border-radius: 10px;
}

.sample-display h2 {
    font-family: 'Pacifico', cursive;
    color: #1e6b47;
    margin-bottom: 15px;
}

.sample-display article {
    background: transparent;
    box-shadow: none;
}

.sample-display pre {
    background: #e8e8e8;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

/* 图片样式 */
img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.decorative {
    width: 320px;
    height: 320px;
}

/* 动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse-animation {
    animation: pulse 3s infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #2e8b57;
    animation: typing 4s steps(40, end);
}

/* 动态背景 */
.dynamic-background {
    background-image: radial-gradient(circle, #ffffff, #dcdcdc);
    animation: pulse 5s infinite;
    padding: 20px;
    border-radius: 10px;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    header h1 {
        font-size: 2.2em;
    }
}

@media (max-width: 1200px) {
    .container {
        padding: 30px;
    }
}

@media (max-width: 1024px) {
    nav {
        flex-direction: column;
    }
    
    nav a {
        margin: 10px 0;
    }
}

@media (max-width: 768px) {
    header, nav, .container {
        padding: 20px;
    }
    
    article h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .container {
        grid-template-columns: 1fr;
    }
}

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

    nav a {
        margin: 5px 0;
    }
    
    article {
        padding: 15px;
    }
}

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

.button:hover {
    background: #1e6b47;
}

/* 提示信息样式 */
.footer-note {
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    color: #555;
    background: rgba(255, 255, 255, 0.8);
}

