/* ============================================
   首页顶部区域 - 现代化重设计
   ============================================ */

/* 整体 header 容器 */
.site-header {
    position: relative;
    background: linear-gradient(155deg, #ff6b35 0%, #f7415f 50%, #c0142b 100%);
    padding: 0;
    margin-bottom: 0;
    overflow: hidden;
}

/* 装饰气泡 - 背景层 */
.site-header-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.header-bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}

.header-bubble-1 {
    width: 200px;
    height: 200px;
    top: -80px;
    right: -50px;
    animation: bubbleFloat 8s ease-in-out infinite;
}

.header-bubble-2 {
    width: 120px;
    height: 120px;
    bottom: -50px;
    left: -20px;
    background: rgba(255, 255, 255, 0.05);
    animation: bubbleFloat 10s ease-in-out infinite reverse;
}

.header-bubble-3 {
    width: 60px;
    height: 60px;
    top: 20px;
    left: 30%;
    background: rgba(255, 255, 255, 0.04);
    animation: bubbleFloat 6s ease-in-out infinite 2s;
}

@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.03); }
}

/* Logo 区域 */
.header-logo-row {
    position: relative;
    z-index: 1;
    padding: 14px 16px 8px;
    display: flex;
    align-items: center;
}

.header-logo-img {
    height: 30px;
    width: auto;
    display: block;
    background: white;
    padding: 4px 10px;
    border-radius: 8px;
}

/* 公告栏 */
.header-announce {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px 14px;
}

.header-announce-icon {
    font-size: 13px;
    flex-shrink: 0;
    line-height: 1;
}

.header-announce-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    letter-spacing: 0.15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

/* 搜索框区域 */
.header-search-zone {
    position: relative;
    z-index: 1;
    padding: 0 12px 20px;
}

/* === WeUI 搜索框覆盖样式 === */

.header-search-zone .weui-search-bar {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 14px;
    box-shadow:
        0 4px 24px rgba(0, 60, 120, 0.18),
        0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    transition: box-shadow 0.2s ease;
}

.header-search-zone .weui-search-bar.weui-search-bar_focusing {
    box-shadow:
        0 6px 28px rgba(180, 30, 30, 0.2),
        0 0 0 3px rgba(247, 65, 95, 0.2);
    border-color: rgba(247, 65, 95, 0.4);
}

/* 去掉 WeUI 默认的 1px 灰线 */
.header-search-zone .weui-search-bar::before,
.header-search-zone .weui-search-bar::after {
    display: none !important;
}

.header-search-zone .weui-search-bar__form {
    background: transparent;
    padding: 0;
}

.header-search-zone .weui-search-bar__box {
    background: transparent;
    border-radius: 14px;
    border: none !important;
    height: 44px;
    padding: 0 12px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 去掉输入框的左侧竖线 */
.header-search-zone .weui-search-bar__box::before {
    display: none !important;
}

.header-search-zone .weui-search-bar__label {
    /* 必须用实色白底覆盖下方 input 的 placeholder，否则两行文字叠显 */
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #9ca3af;
    font-size: 14px;
    /* position/inset 继承 WeUI 的 absolute 定位，不覆盖 */
}

.header-search-zone .weui-search-bar__label span {
    color: #9ca3af;
    font-size: 14px;
}

.header-search-zone .weui-search-bar__input {
    font-size: 15px;
    color: #1f2937;
    background: transparent;
    border: none;
    height: 100%;
    flex: 1;
    padding: 0;
}

.header-search-zone .weui-search-bar__input::placeholder {
    color: #b0bec5;
}

/* 始终隐藏 box 内的搜索图标，输入时也不显示 */
.header-search-zone .weui-search-bar__box .weui-icon-search {
    display: none;
}

/* 搜索图标颜色 */
.header-search-zone .weui-icon-search::before {
    color: #9ca3af;
}

/* 聚焦时图标变色 */
.header-search-zone .weui-search-bar.weui-search-bar_focusing .weui-icon-search::before {
    color: #f7415f;
}

/* 搜索按钮 */
.header-search-zone .weui-search-bar__submit-btn {
    height: 44px;
    border-radius: 0 12px 12px 0;
    background: linear-gradient(135deg, #ff6b35, #c0142b);
    color: white;
    font-size: 13px;
    font-weight: 600;
    border: none;
    padding: 0 14px;
    flex-shrink: 0;
    margin: 0;
    line-height: 44px;
    letter-spacing: 0.5px;
}

/* ============================================
   快捷搜索标签行
   ============================================ */

.header-quick-tags {
    background: #ffffff;
    padding: 10px 10px 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid #f0f2f5;
    position: relative;
}

.header-quick-tags::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 28px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.95));
    pointer-events: none;
}

.header-quick-tags::-webkit-scrollbar {
    display: none;
}

.header-quick-tags-inner {
    display: flex;
    gap: 8px;
    align-items: center;
    width: max-content;
}

.quick-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    background: #f3f7fa;
    border: 1px solid #e8ecf2;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.quick-tag-chip:active {
    background: #fff0ee;
    border-color: #f7415f;
    color: #c0142b;
    transform: scale(0.95);
}

/* ============================================
   入场动画
   ============================================ */

@keyframes hdrFadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes searchPop {
    from { opacity: 0; transform: scale(0.97) translateY(4px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes tagsSlide {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

.site-header {
    animation: hdrFadeDown 0.35s ease-out both;
}

.header-search-zone {
    animation: searchPop 0.4s ease-out 0.08s both;
}

.header-quick-tags {
    animation: tagsSlide 0.4s ease-out 0.15s both;
}

/* ============================================
   桌面端 / 宽屏适配
   ============================================ */

@media (min-width: 768px) {
    .header-logo-row { padding: 16px 20px 10px; }
    .header-announce { padding: 0 20px 16px; }
    .header-search-zone { padding: 0 16px 22px; }
    .header-quick-tags { padding: 10px 16px; }
}
