
/* 基础样式重置与全局设定 */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto Regular', sans-serif;
    background: linear-gradient(to bottom, #0D47A1, #000000);
    color: #f0f0f0;
    overflow-x: hidden; /* 防止水平滚动条 */
    scroll-behavior: smooth; /* 平滑滚动 */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

a:hover {
    color: #4FC3F7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat Bold', sans-serif;
    color: white;
    margin-bottom: 0.8em;
    font-weight: bold;
    line-height: 1.2;
}

p {
    line-height: 1.6;
    margin-bottom: 1.2em;
    color: #d0d0d0;
}

ul, ol {
    margin-bottom: 1.2em;
    padding-left: 20px;
    color: #d0d0d0;
}

li {
    line-height: 1.5;
}

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

.section {
    padding: 60px 0;
    position: relative;
    overflow: hidden; /* 确保动画元素不溢出 */
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

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

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

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* 特色组件样式 */
.feature-box {
    text-align: center;
    padding: 40px 20px;
    border-radius: 10px;
    background-color: rgba(41, 182, 246, 0.1); /* 亮蓝色背景 */
    border: 1px solid rgba(41, 182, 246, 0.3);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.feature-box:hover {
    background-color: rgba(41, 182, 246, 0.2);
    border-color: rgba(41, 182, 246, 0.5);
}

.feature-icon {
    font-size: 2.5em;
    color: #29B6F6;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 1.4em;
    margin-bottom: 15px;
}

/* 代码块样式 */
pre {
    background-color: #1a1a1a;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto; /* 代码块超出容器时显示水平滚动条，但小屏幕会自动换行 */
    tab-size: 4;
    -moz-tab-size: 4;
    -o-tab-size: 4;
    white-space: pre-wrap; /* 允许代码换行 */
    word-wrap: break-word; /* 强制单词断行，防止溢出 */
    font-family: monospace, monospace;
    font-size: 0.9em;
    line-height: 1.4;
}

code {
    font-family: monospace, monospace;
    color: #f8f8f2;
}

/* 按钮样式 */
button, .button {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    background-color: #29B6F6;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-family: 'Montserrat Bold', sans-serif;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

button:hover, .button:hover {
    background-color: #4FC3F7;
}

button:active, .button:active {
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    display: block; /* 移除图片底部默认间隙 */
    border-radius: 5px;
}

.image-container {
    border-radius: 8px;
    overflow: hidden; /* 确保图片圆角 */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 30px 0;
    color: #999;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto; /* 页脚推到页面底部 */
}

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

.fade-in {
    animation: fadeIn 1s ease forwards;
    opacity: 0;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .container {
        width: 95%;
    }
    .section {
        padding: 40px 0;
    }
    .section-title {
        margin-bottom: 40px;
    }
    .grid-container {
        grid-template-columns: 1fr; /* 移动设备上堆叠显示 */
    }
    .grid-item {
        padding: 20px;
    }
}

@media screen and (max-width: 480px) {
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.5em; }
    p, li { font-size: 0.95em; }
    button, .button { padding: 10px 25px; font-size: 0.9em; }
    .feature-box { padding: 30px 15px; }
    pre { padding: 15px; font-size: 0.85em; }
}

/* 背景粒子效果 (可选，如果需要更复杂的背景)
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
*/

/* 辅助类 */
.text-center { text-align: center; }
.mt-4 { margin-top: 40px; }
.mb-4 { margin-bottom: 40px; }
.pt-4 { padding-top: 40px; }
.pb-4 { padding-bottom: 40px; }
.no-margin-bottom { margin-bottom: 0; }

