
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Lato', sans-serif; /* 主体字体 */
    background: linear-gradient(135deg, #FFE4C4 70%, #1E90FF 25%, #CD7F32 5%);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden; /* 防止出现水平滚动条 */
}

/* 标题样式 */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif; /* 标题字体 */
    color: #333;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-top: 40px;
}

h2 {
    font-size: 2rem;
    margin-top: 40px;
}

h3 {
    font-size: 1.75rem;
    margin-top: 30px;
}

h4 {
    font-size: 1.5rem;
    margin-top: 25px;
}

/* 链接样式 */
a {
    color: #1E90FF;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #CD7F32;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.navbar li {
    margin: 0 20px;
}

.navbar a {
    font-size: 1.1rem;
    font-weight: bold;
}

/* 主内容区样式 */
.container {
    max-width: 1200px;
    margin: 120px auto 60px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px;
}

/* 侧边导航样式 */
.sidebar {
    position: sticky;
    top: 100px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.sidebar li {
    margin-bottom: 15px;
}

.sidebar a {
    font-size: 1rem;
    color: #1E90FF;
    transition: color 0.3s;
}

.sidebar a:hover {
    color: #CD7F32;
}

/* 文章内容样式 */
.article {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.article img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 20px 0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.article img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(0,0,0,0.2);
}

/* 提示信息样式 */
.notice {
    text-align: center;
    font-size: 1.2rem;
    color: #DAA520;
    margin-bottom: 40px;
    animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0;}
    to { opacity: 1;}
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #003366;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    text-decoration: none;
}

.button:hover {
    background-color: #1E90FF;
}

.button:active {
    background-color: #DAA520;
    transform: scale(0.98);
}

/* 图片库样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.image-gallery img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border: 2px solid #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(0,0,0,0.2);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
        margin-bottom: 20px;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.75rem;
    }
    h3 {
        font-size: 1.5rem;
    }
    h4 {
        font-size: 1.25rem;
    }
    .navbar ul {
        flex-direction: column;
    }
    .navbar li {
        margin: 10px 0;
    }
}

