
/* 全局样式设置 */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(to bottom right, #f5deb3, #654321, #4b0082);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Times New Roman', serif;
    color: #4b0082;
}

a {
    color: #ff69b4;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff1493;
}

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

.header {
    background: linear-gradient(to right, #f5deb3, #a0522d);
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    position: relative;
}

.header::after {
    content: "这是一个网页样式设计参考";
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 14px;
    color: #fff;
    opacity: 0.7;
}

.section {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow: hidden;
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.gptkong.com/demo/sample1.png');
    background-size: cover;
    opacity: 0.1;
    z-index: -1;
}

.article {
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}

.article h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #4b0082;
}

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

.article pre {
    background-color: #f5f5dc;
    border: 1px solid #a0522d;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

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

.button {
    display: inline-block;
    background-color: #4b0082;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-transform: uppercase;
    font-size: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    transform: scale(0.95);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.grid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.grid-gallery img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

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

    .header {
        font-size: 20px;
    }

    .article h2 {
        font-size: 24px;
    }

    .article pre {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 10px;
    }

    .article pre {
        font-size: 12px;
    }
}

