
/* 
  页面总体布局与响应式设计
  使用黄金比例布局，确保视觉上的平衡与美观
  采用Flexbox与Grid布局实现多样化的排版
*/

/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: #f5f5f5;
    color: #333333;
    line-height: 1.6;
}

/* 顶部导航栏 */
.nav-bar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #1E3A8A;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-bar .logo {
    color: #FFFFFF;
    font-size: 1.5em;
    font-weight: bold;
}

.nav-bar .nav-links {
    display: flex;
    gap: 15px;
}

.nav-bar .nav-links a {
    color: #FFFFFF;
    text-decoration: none;
    padding: 10px 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-bar .nav-links a:hover {
    background-color: #34D399;
    color: #FFFFFF;
    border-radius: 4px;
}

/* 主体内容 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px;
}

/* 侧边栏 */
.sidebar {
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.sidebar h3 {
    color: #1E3A8A;
    margin-bottom: 15px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: #34D399;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar ul li a:hover {
    color: #1E3A8A;
}

/* 文章内容 */
.content {
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.content h2 {
    color: #1E3A8A;
    margin-bottom: 15px;
}

.content p {
    margin-bottom: 20px;
    color: #6B7280;
}

.content pre {
    background-color: #f0f4f8;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.content code {
    font-family: 'Courier New', Courier, monospace;
    color: #D97706;
}

/* 按钮样式 */
.button {
    background-color: #34D399;
    color: #FFFFFF;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.button:hover {
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
    background-color: #10B981;
}

/* 图像样式 */
.content img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* 页脚 */
.footer {
    background-color: #6B7280;
    color: #FFFFFF;
    text-align: center;
    padding: 20px;
    position: relative;
}

/* 提示信息 */
.reference-note {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: #F59E0B;
    color: #FFFFFF;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: bold;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.content {
    animation: fadeIn 1s ease-in;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        order: 2;
    }
    .content {
        order: 1;
    }
}

@media (max-width: 768px) {
    .nav-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-bar .nav-links {
        flex-direction: column;
        width: 100%;
    }
    .nav-bar .nav-links a {
        width: 100%;
        padding: 10px 0;
    }
}

/* 动态特效：雨滴与阳光光斑 */
.rain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: url('https://images.gptkong.com/demo/rain.png') repeat;
    opacity: 0.2;
    animation: rainFall 1s linear infinite;
}

@keyframes rainFall {
    from { background-position: 0 0; }
    to { background-position: 0 1000px; }
}

.sunlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: url('https://images.gptkong.com/demo/sunlight.png') no-repeat center center;
    background-size: cover;
    animation: sunlightMove 20s linear infinite;
}

@keyframes sunlightMove {
    0% { opacity: 0; }
    50% { opacity: 0.3; }
    100% { opacity: 0; }
}

/* 分隔线与装饰元素 */
.section-divider {
    border-top: 2px solid #E5E7EB;
    margin: 40px 0;
}

.decorative-line {
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, #1E3A8A, #34D399);
    margin-bottom: 20px;
    border-radius: 2px;
}

