
/* 基础样式重置和全局设定 */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #03071e, #370617, #6a040f, #9d0208, #d00000, #dc2f02, #e85d04, #f48c06, #faa307, #ffba08);
    background-size: 200% 200%;
    animation: gradientAnimation 30s infinite alternate;
    color: #fff;
    overflow-x: hidden;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    color: #f0f0f0;
    margin-bottom: 0.5em;
}

p {
    line-height: 1.6;
    color: #e0e0e0;
}

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

a:hover {
    color: #ffba08;
}

ul, ol {
    list-style: none;
    padding-left: 0;
}

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

.section {
    margin-bottom: 60px;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.section:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-item {
    background-color: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.15);
}

/* 头部和导航 */
header {
    padding: 30px 0;
    text-align: center;
    margin-bottom: 40px;
}

nav ul {
    display: flex;
    justify-content: center;
}

nav li {
    margin: 0 20px;
}

nav a {
    font-size: 1.1em;
    font-weight: bold;
    display: inline-block;
    padding: 10px 15px;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav a:hover {
    background-color: #f48c06;
    color: #03071e;
}

/* 首屏 hero section */
.hero-section {
    text-align: center;
    padding: 100px 20px;
}

.hero-title {
    font-size: 3em;
    margin-bottom: 20px;
    color: #ffba08;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.5em;
    color: #e0e0e0;
    margin-bottom: 40px;
}

/* 图片样式 */
.image-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.image-grid img {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    margin: 10px;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

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

/* 代码块样式 */
pre {
    background-color: rgba(0, 0, 0, 0.8);
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    tab-size: 4;
    font-size: 0.9em;
    line-height: 1.4;
    margin-bottom: 20px;
}

pre code {
    display: block; /* 确保代码块占据整个pre宽度 */
    white-space: pre-wrap; /* 代码块自动换行 */
    word-wrap: break-word; /* 长单词换行 */
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden; /* 防止border-radius溢出 */
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background-color: rgba(255, 255, 255, 0.08);
    font-weight: bold;
}

/* 示例数据和文章展示区域 */
.example-data-section, .article-section {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

.example-data-section h2, .article-section h2 {
    color: #faa307;
    margin-bottom: 25px;
    text-align: center;
}

.article-section article {
    padding: 0; /* 移除article内部padding，保持与section一致 */
}

.article-section article h2, .article-section article h3, .article-section article h4, .article-section article h5, .article-section article h6,  .article-section article p, .article-section article pre, .article-section article ul, .article-section article ol, .article-section article table{
    margin-left: 20px; /* 文章内容左侧内边距 */
    margin-right: 20px; /* 文章内容右侧内边距 */
}
.article-section article h2{
    color: #ffba08;
    text-align: left;
}

.article-section article h3{
    color: #f48c06;
    text-align: left;
}

.article-section article p{
    text-align: left;
}
.article-section article pre{
    margin-left: 40px;
    margin-right: 40px;
}

/* jQuery 交互效果示例 (可根据需要扩展) */
.interactive-element {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.interactive-element:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    .section {
        padding: 30px;
        margin-bottom: 40px;
    }
    .hero-section {
        padding: 80px 15px;
    }
    .hero-title {
        font-size: 2.5em;
    }
    .hero-subtitle {
        font-size: 1.2em;
    }
    nav ul {
        flex-direction: column;
        text-align: center;
    }
    nav li {
        margin: 10px 0;
    }
    .grid-container {
        grid-template-columns: 1fr;
    }
    .image-grid img {
        width: 100px;
        height: 100px;
        margin: 8px;
    }
    .article-section article h2, .article-section article h3, .article-section article h4, .article-section article h5, .article-section article h6,  .article-section article p, .article-section article pre, .article-section article ul, .article-section article ol, .article-section article table{
        margin-left: 10px; /* 文章内容左侧内边距 */
        margin-right: 10px; /* 文章内容右侧内边距 */
    }
    .article-section article pre{
        margin-left: 20px;
        margin-right: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2em;
    }
    .hero-subtitle {
        font-size: 1em;
    }
    .section {
        padding: 20px;
        margin-bottom: 30px;
    }
}

@media (max-width: 320px) {
    .hero-title {
        font-size: 1.8em;
    }
    .hero-subtitle {
        font-size: 0.9em;
    }
    .section {
        padding: 15px;
    }
}

/* 特殊字体 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Roboto:wght@400;700&display=swap');

/* jQuery 交互样式示例 */
.feature-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

