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

/* 页面整体背景 */
body {
    background: linear-gradient(135deg, #0A1F44, #6E3CBC);
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    line-height: 1.6;
    animation: backgroundFade 15s linear infinite;
    padding: 20px;
}

/* 背景渐变动画 */
@keyframes backgroundFade {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 50px 0;
    background: rgba(10, 31, 68, 0.8);
    border-radius: 10px;
    margin-bottom: 30px;
}

header h1 {
    font-size: 3em;
    margin-bottom: 20px;
    animation: fadeInDown 2s ease-in-out;
}

header p {
    font-size: 1.2em;
    animation: fadeInUp 2s ease-in-out;
}

/* 文章样式 */
article {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

article h2 {
    font-size: 2em;
    margin-bottom: 15px;
    color: #00FFC7;
}

article h3 {
    font-size: 1.75em;
    margin: 20px 0 10px;
}

article h4 {
    font-size: 1.5em;
    margin: 15px 0 10px;
}

article p {
    margin-bottom: 15px;
}

article pre {
    background: rgba(0, 255, 199, 0.2);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

article code {
    color: #00FFC7;
    font-family: 'Courier New', Courier, monospace;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th, table td {
    border: 1px solid #00FFC7;
    padding: 10px;
    text-align: left;
}

table th {
    background: rgba(0, 255, 199, 0.3);
}

/* 按钮样式 */
.button {
    background: linear-gradient(90deg, #00FFC7, #6E3CBC);
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    color: #0A1F44;
    cursor: pointer;
    transition: background 0.5s ease;
    font-size: 1em;
}

.button:hover {
    background: linear-gradient(90deg, #6E3CBC, #00FFC7);
}

/* 图像样式 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.image-grid img {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

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

/* 动画效果 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 示例展示样式 */
.example-display {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
}

.example-display h2 {
    color: #6E3CBC;
    margin-bottom: 15px;
}

.example-display article {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 5px;
}

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

@media (min-width: 321px) and (max-width: 480px) {
    header h1 {
        font-size: 2em;
    }
    article h2 {
        font-size: 1.75em;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    header h1 {
        font-size: 2.5em;
    }
    article h2 {
        font-size: 2em;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    header h1 {
        font-size: 2.8em;
    }
    article h2 {
        font-size: 2.2em;
    }
}

@media (min-width: 1025px) and (max-width: 1200px) {
    header h1 {
        font-size: 3em;
    }
    article h2 {
        font-size: 2.5em;
    }
}

@media (min-width: 1201px) and (max-width: 1440px) {
    header h1 {
        font-size: 3.2em;
    }
    article h2 {
        font-size: 2.8em;
    }
}

@media (min-width: 1441px) {
    header h1 {
        font-size: 3.5em;
    }
    article h2 {
        font-size: 3em;
    }
}

