/* 基础样式（所有设备共享） */
.header-container {
    padding: 20px;
    text-align: center;
    max-width: 1200px; /* 限制最大宽度，避免大屏过宽 */
    margin: 0 auto; /* 居中容器 */
}
.site-title {
    font-size: 28px;
    margin-bottom: 10px;
    text-decoration: none;
    color: #333;
    display: inline-block;
}
.site-title strong {
    font-weight: 700;
}
.nav-container {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap; /* 所有设备默认允许换行，避免溢出 */
    flex-direction: row;
    align-content: center;
}
.nav-item {
    color: #666;
    text-decoration: none;
    font-size: 15px;
    padding: 3px 0; /* 基础点击区域 */
}
.nav-item:hover {
    color: #000;
    text-decoration: underline;
}
.separator {
    color: #999;
    font-size: 18px;
    line-height: 1;
}
.search-container {
}
#search-input {
    border: none;
    padding: 3px 8px;
    border-radius: 0;
    width: 80px;
    font-size: 15px;
    color: #666;
    background: transparent;
}
#search-input:focus {
    outline: none;
    background: transparent;
}
#search-input::placeholder {
    color: #999;
    opacity: 1;
}

/* 手机端占位符字体缩小 */
@media (max-width: 768px) {
    #search-input::placeholder {
        font-size: 13px;
    }
}

/* 1. 手机端适配（≤768px，小屏设备） */
@media (max-width: 768px) {
    .header-container {
        padding: 15px 8px; /* 最小内边距，节省空间 */
    }
    .site-title {
        font-size: 28px; /* 增大标题字体 */
        font-weight: 800; /* 增加标题粗细 */
        margin-bottom: 4px; /* 减少标题与导航区域的间距 */
    }
    .nav-container {
        gap: 6px; /* 最小间距 */
        padding: 0 4px;
        margin-top: 4px; /* 减少标题与导航区域的间距 */
    }
    .nav-item {
        font-size: 15px; /* 增大导航区域字体 */
        padding: 4px 0; /* 增大触摸区域（≥48px高度） */
    }
    .separator {
        font-size: 15px; /* 按比例缩小 */
    }
    #search-input {
        width: 60px; /* 最短搜索框 */
        font-size: 15px; /* 增大搜索框字体 */
        padding: 4px 6px; /* 增大触摸区域 */
        border: none;
        border-radius: 0;
        background: transparent;
    }
}

/* 2. 平板端适配（769px-1024px，中屏设备） */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-container {
        padding: 18px 15px; /* 中等内边距 */
    }
    .site-title {
        font-size: 26px; /* 中等标题 */
        margin-bottom: 9px;
    }
    .nav-container {
        gap: 10px; /* 中等间距 */
    }
    .nav-item {
        font-size: 14px; /* 中等字体 */
        padding: 3px 0;
    }
    .separator {
        font-size: 17px; /* 中等分隔符 */
    }
    #search-input {
        width: 70px; /* 中等搜索框 */
        font-size: 14px;
        border: none;
        border-radius: 0;
        background: transparent;
    }
}

/* 3. 电脑端适配（≥1025px，大屏设备） */
@media (min-width: 1025px) {
    .header-container {
        padding: 22px 30px; /* 宽松内边距，利用大屏空间 */
    }
    .site-title {
        font-size: 30px; /* 放大标题，增强视觉焦点 */
        margin-bottom: 12px;
    }
    .nav-container {
        gap: 15px; /* 宽松间距，避免拥挤 */
    }
    .nav-item {
        font-size: 16px; /* 较大字体，阅读舒适 */
    }
    .separator {
        font-size: 19px; /* 稍大分隔符，增强区分度 */
    }
    #search-input {
        width: 90px; /* 较宽搜索框，提升输入体验 */
        font-size: 16px;
        border: none;
        border-radius: 0;
        background: transparent;
    }
}