/* --- 新增: 基础优化 (防止横向滚动) --- */
html, body {
    width: 100%;
    overflow-x: hidden; /* 关键规则：隐藏任何超出屏幕宽度的内容，防止横向滚动条出现 */
}

a {
    text-decoration: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}



        /* --- 新增: 图片自适应规则 --- */
        img {
            display: block; /* 移除图片底部可能存在的空白间隙 */
            max-width: 100%; /* 关键规则：图片的最大宽度不能超过其容器的宽度 */
            height: auto;   /* 关键规则：高度自动调整，以保持图片的原始宽高比 */
        }

        /* --- 头部导航栏样式 --- */
        .main-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 2rem;
            background-color: #fff;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            position: sticky;
            top: 0;
            z-index: 1000;
            flex-wrap: wrap;
            gap: 1rem;
        }



        .logo {
            flex-shrink: 0;
        }

        .logo h1 {
            font-size: 1.8rem;
            color: #2c3e50;
        }

        .logo p {
            color: #7f8c8d;
            font-size: 0.9rem;
        }


    /* --- 新增: 搜索框样式 --- */
    .search-container {
        position: relative;
        width: 100%;
        max-width: 350px;
        margin: 0 1rem;
    }

    #searchInput {
        width: 100%;
        padding: 0.7rem 1rem;
        padding-left: 2.5rem;
        border: 1px solid #ddd;
        border-radius: 25px;
        font-size: 0.9rem;
        outline: none;
        transition: all 0.3s ease;
        background-color: #f9f9f9;
    }

    #searchInput:focus {
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        background-color: #fff;
    }

    .search-icon {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #95a5a6;
        font-size: 1rem;
    }



        .nav-links {
            display: flex;
            gap: 1.5rem;
            margin-left: auto;
        }

        .nav-links a {
            text-decoration: none;
            color: #333;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .nav-links a:hover {
            color: #3498db;
        }

        .menu-toggle {
            display: none;
            flex-direction: column;
            cursor: pointer;
            gap: 5px;
            flex-shrink: 0;
        }

        .menu-toggle .bar {
            width: 25px;
            height: 3px;
            background-color: #333;
            border-radius: 3px;
            transition: all 0.3s ease;
        }