
/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 主题色彩 */
:root {
    --color-background: #f5e9d8; /* 浅米白色 */
    --color-text: #333333;       /* 深灰色 */
    --color-header-footer: #4a69bd; /* 深蓝色 */
    --color-header-footer-text: #ffffff; /* 白色 */
    --color-primary: #8bc34a;    /* 橄榄绿色 */
    --color-primary-dark: #689f38; /* 较深的绿色 */
    --color-secondary: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); /* 渐变紫蓝 */
    --font-title: 'Roboto Mono', monospace;
    --font-body: 'Source Sans Pro', sans-serif;
}

/* 全局样式 */
body {
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    padding: 20px;
}

/* 头部和尾部样式 */
header, footer {
    background-color: var(--color-header-footer);
    color: var(--color-header-footer-text);
    padding: 20px;
    text-align: center;
}

header h1 {
    font-family: var(--font-title);
    font-size: 2.5rem;
}

footer p {
    font-size: 1rem;
}

/* 主内容区域 */
main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #ffffffcc; /* 半透明白色 */
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 文章样式 */
article h2 {
    font-family: var(--font-title);
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--color-header-footer);
}

article h3, article h4 {
    font-family: var(--font-title);
    color: var(--color-primary);
    margin-top: 20px;
    margin-bottom: 10px;
}

article p {
    margin-bottom: 15px;
}

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

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

article table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

article table, article th, article td {
    border: 1px solid #ddd;
}

article th, article td {
    padding: 10px;
    text-align: left;
}

article table th {
    background-color: var(--color-primary);
    color: #fff;
}

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

article img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 10px 0;
}

/* 示例数据展示 */
.section-sample-data {
    background: var(--color-secondary);
    color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.section-sample-data h2 {
    font-family: var(--font-title);
    margin-bottom: 15px;
}

.section-sample-data ul {
    list-style: none;
}

.section-sample-data li {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.section-sample-data li h4 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.section-sample-data li p {
    font-size: 0.95rem;
}

/* 响应式网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.container img {
    width: 100%;
    height: auto;
}

/* 波浪效果 */
.wave {
    height: 100px;
    background: url('https://images.gptkong.com/demo/sample12.png') repeat-x;
    animation: wave-animation 10s linear infinite;
}

@keyframes wave-animation {
    from { background-position: 0 0; }
    to { background-position: -200px 0; }
}

/* 按钮样式 */
button {
    background-color: var(--color-primary);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

button:hover {
    background-color: var(--color-primary-dark);
    transform: scale(1.05);
}

/* 动态交互 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    article h2 {
        font-size: 1.75rem;
    }

    .section-sample-data h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    article h2 {
        font-size: 1.5rem;
    }

    article h3 {
        font-size: 1.2rem;
    }

    article h4 {
        font-size: 1rem;
    }

    button {
        width: 100%;
    }
}

/* 自适应调整 */
@media (min-width: 1440px) {
    main {
        padding: 40px;
    }

    article h2 {
        font-size: 2.5rem;
    }

    .section-sample-data h2 {
        font-size: 2rem;
    }
}

