/* 全局重置与古典风格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "SimSun", "宋体", serif;
}
body {
    background-color: #fff8e8;
    background-image: url('https://img1.baidu.com/it/u=123456,789012&fm=253&fmt=auto&app=138&f=JPEG?w=1920&h=1080');
    background-attachment: fixed;
    color: #5c1a1a;
    line-height: 1.8;
}
/* 头部导航 */
header {
    background: linear-gradient(90deg, #990000, #cc2222);
    padding: 20px 0;
    text-align: center;
    border-bottom: 4px solid #ffd700;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
header h1 {
    color: #fff;
    font-size: 2.5rem;
    letter-spacing: 8px;
    text-shadow: 2px 2px 4px #000;
}
nav {
    background: #770000;
    padding: 12px;
    display: flex;
    justify-content: center;
    gap: 40px;
}
nav a {
    color: #ffeb99;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 8px 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
nav a:hover {
    border: 2px solid #ffd700;
    background: rgba(255,215,0,0.2);
    border-radius: 30px;
}
nav a.active {
    background: #ffd700;
    color: #770000;
    border-radius: 30px;
}
/* 容器通用 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
    background: rgba(255,253,245,0.95);
    padding: 40px;
    border: 2px solid #cc9933;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(153,0,0,0.2);
}
h2 {
    color: #990000;
    font-size: 2rem;
    border-left: 5px solid #ffd700;
    padding-left: 15px;
    margin-bottom: 25px;
}
p {
    font-size: 1.05rem;
    margin-bottom: 18px;
    text-indent: 2em;
}
/* 图片样式 */
.img-box {
    text-align: center;
    margin: 30px 0;
}
.img-box img {
    max-width: 400px;  /* 限制最大宽度，可自行调小，比如500px */
    width: 100%;
    height: auto;       /* 高度自动等比例缩放，不变形 */
    border: 4px solid #ffd700;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.4s;
}
.img-box img:hover {
    transform: scale(1.03);
}
/* 页脚 */
footer {
    background: #5c1a1a;
    color: #ffeb99;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    border-top: 3px solid #ffd700;
}
/* 图集网格 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
    gap: 25px;
    margin-top: 30px;
}
.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border: 3px solid #ddb866;
    border-radius: 6px;
}
.gallery-item p {
    text-align: center;
    text-indent: 0;
    margin-top:8px;
    font-weight:bold;
}
/* 制作步骤 */
.step-list li {
    margin:20px 0;
    padding:15px;
    background:rgba(255,235,153,0.2);
    border-left:4px solid #990000;
    list-style:none;
}
/* 花灯漂浮动画 */
.lantern-float {
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%{transform: translateY(0);}
    50%{transform: translateY(-12px);}
    100%{transform: translateY(0);}
}
/* 弹窗大图 */
.modal {
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.85);
    z-index:999;
    text-align:center;
    padding-top:50px;
}
.modal img {
    max-width:90%;
    max-height:85vh;
    border:4px solid gold;
}
.close-btn {
    position:absolute;
    top:20px;
    right:40px;
    color:white;
    font-size:3rem;
    cursor:pointer;
}

/* 历史页专属小尺寸花灯图 */
.history-small-img img {
    max-width: 450px;  /* 控制宽度，和标题文字宽度匹配 */
    width: 80%;
    height: auto;
}
.history-small-img {
    margin: 15px 0; /* 缩小上下间距，不会空一大块 */
}