
/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Lora', serif;
    background: radial-gradient(circle at top left, #e0f7fa, #ffffff);
    color: #333;
    line-height: 1.6;
    transition: background 0.5s ease;
}

header, footer {
    background: linear-gradient(135deg, #4caf50, #81c784);
    color: #fff;
    padding: 20px 40px;
    text-align: center;
    position: relative;
}

header h1 {
    font-family: 'Fira Sans', sans-serif;
    margin: 0;
    font-size: 2.5em;
    letter-spacing: 2px;
}

nav {
    margin-top: 10px;
}

nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1em;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ffeb3b;
}

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

.card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.2);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-family: 'Fira Sans', sans-serif;
    margin-top: 0;
    color: #2e7d32;
}

.card-content p {
    margin: 10px 0;
    color: #555;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #388e3c;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    font-family: 'Fira Sans', sans-serif;
}

.button:hover {
    background-color: #2e7d32;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.section-title {
    font-family: 'Fira Sans', sans-serif;
    font-size: 2em;
    color: #1b5e20;
    text-align: center;
    margin-bottom: 20px;
}

.example-display {
    background: rgba(240, 240, 240, 0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.example-display h2 {
    font-family: 'Fira Sans', sans-serif;
    color: #004d40;
}

.example-display pre {
    background: #e0f2f1;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

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

footer p {
    margin: 10px 0 0;
    font-size: 0.9em;
    color: #c8e6c9;
}

/* 动画效果 */
@keyframes aurora-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background: linear-gradient(-45deg, #e0f7fa, #a5d6a7, #81c784, #4caf50);
    background-size: 400% 400%;
    animation: aurora-move 15s linear infinite;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 1200px) {
    header, footer {
        padding: 15px 30px;
    }

    .section-title {
        font-size: 1.8em;
    }

    .card img {
        height: 180px;
    }
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    header h1 {
        font-size: 2.2em;
    }

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

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

    .card img {
        height: 150px;
    }

    nav a {
        display: block;
        margin: 10px 0;
    }
}

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

    .section-title {
        font-size: 1.5em;
    }

    .card img {
        height: 120px;
    }
}

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

    .section-title {
        font-size: 1.2em;
    }

    .button {
        padding: 6px 12px;
        font-size: 0.9em;
    }
}

/* 特殊元素样式 */
img.decorative {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.code-block {
    background: #f5f5f5;
    border-left: 4px solid #4caf50;
    padding: 10px;
    margin: 20px 0;
    overflow-x: auto;
}

.rel-no-follow a {
    text-decoration: none;
    color: #1e88e5;
}

.rel-no-follow a:hover {
    color: #1565c0;
}


