
/* 全局样式与配色方案 */
:root {
    --primary-color: #285943; /* 橄榄绿 */
    --secondary-color: #3d76cf; /* 电光蓝 */
    --tertiary-color: #e9d8a6; /* 米黄色 */
    --background-gradient: linear-gradient(to bottom right, #f5ebe0, #e0e5dc); /* 渐变背景 */
    --text-color: #354f52; /* 主文字颜色 */
    --accent-color: #f4a261; /* 点缀橙棕 */
}

body {
    margin: 0;
    font-family: 'Lora', serif;
    color: var(--text-color);
    background: var(--background-gradient);
    line-height: 1.6;
    padding: 20px;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 30px;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: var(--tertiary-color);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

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

code {
    display: block;
    background: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #333;
}

pre {
    margin: 20px 0;
}

.icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 18px;
    margin: 10px auto;
}

@keyframes leafWave {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.leaf {
    animation: leafWave 2s infinite ease-in-out;
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    code {
        font-size: 12px;
    }
}

