/* 通用样式 */
body {
    background: url('https://xpoet.cn/images/bg.svg') center center / cover no-repeat, linear-gradient(135deg, #f8f0e3, #f5f5f5);
    font-family: 'KaiTi', 'SimSun', serif;
    margin: 0;
    color: #4a3b2a;
    line-height: 1.8;
    background-attachment: fixed;
}

header {
    text-align: center;
    padding: 40px 20px;
    color: #101010;
    border-radius: 12px;
    margin: 30px auto;
    max-width: 1000px;
    box-shadow: 0 5px 15px rgba(112, 112, 112, 0.15);
    animation: fadeIn 1.5s ease-in-out;
    border: 2px solid #c18e62;
    background-blend-mode: overlay;
}

header h1 {
    font-size: 2.8rem;
    margin: 0;
    background: linear-gradient(to right, #4a3b2a, #6f4f27);
    -webkit-background-clip: text;
    color: transparent;
    font-family: 'FZShuTi', 'KaiTi', serif;
}

header p {
    font-size: 1.2rem;
    margin-top: 10px;
    color: rgba(141, 141, 141, 0.95);
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.4);
    font-family: 'KaiTi', serif;
}

.content {
    max-width: 900px;
    margin: 20px auto;
    padding: 25px;
    background: rgba(255, 247, 230, 0.95);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-in-out;
    border: 2px solid #d69e3d;
    background-image: url('https://xpoet.cn/images/texture-light.png'); /* 增加轻微背景纹理 */
    background-blend-mode: multiply;
}

.content p {
    margin: 15px 0;
    font-size: 1.1rem;
    line-height: 1.7;
    font-family: 'SimSun', serif;
    color: #4a3b2a;
}

.content strong {
    color: #a0643c;
}

.images {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.images img {
    width: 30%;
    height: auto;
    max-height: 200px;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s, filter 0.3s;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    filter: brightness(90%);
    border: 1px solid #d69e3d; /* 古铜色边框 */
}

.images img:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    filter: brightness(100%);
}

h3 {
    font-size: 1.8rem;
    margin-top: 20px;
    color: #6f4f27;
    text-align: center;
    border-bottom: 3px solid #c18e62;
    padding-bottom: 10px;
    font-family: 'KaiTi', serif;
}

ul#more {
    list-style: none;
    padding: 0;
    text-align: center;
    margin-top: 20px;
}

ul#more li {
    display: inline-block;
    margin: 10px 15px;
}

ul#more li a {
    text-decoration: none;
    color: #9b7b5c;
    font-weight: bold;
    padding: 8px 14px;
    border: 2px solid #9b7b5c;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'SimHei', 'KaiTi', serif;
}

ul#more li a::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: #9b7b5c;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: width 0.3s, height 0.3s;
}

ul#more li a:hover::before {
    width: 100%;
    height: 100%;
}

ul#more li a:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

footer {
    text-align: center;
    padding: 15px;
    margin-top: 30px;
    background: linear-gradient(135deg, #d69e3d, #9b7b5c);
    color: white;
    border-radius: 5px;
    font-size: 0.9rem;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.1);
    font-family: 'SimSun', serif;
}

footer p {
    margin: 0;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 span {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .images img {
        width: 45%;
        max-height: 150px;
    }

    ul#more li a {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 20px 15px;
    }

    header h1 span {
        font-size: 1.8rem;
    }

    header p {
        font-size: 0.9rem;
    }

    .content {
        padding: 15px;
    }

    .images img {
        width: 100%;
        max-height: 150px;
    }

    footer p {
        font-size: 0.8rem;
    }
}

/* 列表容器样式 */
#ten {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 280px); /* 每列固定宽度 */
    gap: 20px; /* 项目间距 */
    padding: 0;
    margin: 20px auto; /* 自动设置左右边距使其居中 */
    max-width: calc(3 * 280px + 2 * 20px); /* 根据列数计算最大宽度 */
    justify-content: center; /* 内容在容器内居中 */
}

/* 单个美食项样式 */
#ten li {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    width: 280px; /* 固定宽度 */
    height: 300px; /* 固定高度 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* 保证文字显示在底部 */
    background-color: #f9f9f9; /* 添加背景色 */
}

#ten li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* 图片样式 */
#ten li img {
    width: 100%; /* 图片宽度填满容器 */
    height: 70%; /* 图片高度占容器的70% */
    object-fit: cover; /* 保持图片的宽高比，覆盖区域 */
    border-radius: 10px 10px 0 0; /* 圆角，顶部的图片部分 */
}

/* 美食文字说明 */
#ten .food-caption {
    width: 100%;
    padding: 10px 0;
    text-align: center;
    font-size: 1.1rem;
    color: #333;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.9);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, color 0.3s ease;
}

#ten li:hover .food-caption:last-child {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
}

/* 响应式适配 */
@media (max-width: 1024px) {
    #ten {
        grid-template-columns: repeat(2, 280px); /* 平板显示两列 */
        max-width: calc(2 * 280px + 1 * 20px); /* 调整最大宽度 */
    }
}

@media (max-width: 768px) {
    #ten {
        grid-template-columns: 1fr; /* 手机屏幕显示一列 */
        max-width: 280px; /* 一列时的宽度 */
    }

    #ten li {
        height: 280px; /* 手机屏幕上的项目高度略小 */
    }
}
