/*
 * 虫虫开发者社区 - 清爽双层白底极客顶栏与深色页脚
 * 第一层：QFP 芯片电子虫品牌标识 + 居中宽敞搜索中枢（含热搜词） + 右侧规整按钮组
 * 第二层：全宽白底水平主频道导航条（11 个频道完整舒展展示，绝不截断）
 * Strictly <= 400 lines per FRONTEND_STANDARDS.md
 */
.ee-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid var(--ee-color-line);
    box-shadow: 0 2px 8px rgba(29, 33, 41, 0.04);
}

.ee-header__top {
    border-bottom: 1px solid #f0f2f5;
    background: #ffffff;
}

.ee-header__top-inner {
    max-width: var(--ee-width);
    margin: 0 auto;
    padding: 12px 16px 10px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

/* 左侧品牌标识（还原 QFP 芯片电子虫横版 Logo） */
.ee-brand {
    flex-shrink: 0;
    padding-top: 2px;
}

.ee-brand__link {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none !important;
}

.ee-brand__icon {
    width: 44px;
    height: 44px;
    display: block;
    flex-shrink: 0;
}

.ee-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.ee-brand__name {
    font-size: 20px;
    font-weight: 700;
    color: #1d2129;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.ee-brand__sub {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 2px;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

/* 中间宽敞双模搜索中枢 + 底部热搜词条 */
.ee-search-hub {
    flex: 1;
    max-width: 560px;
    min-width: 260px;
    display: block;
}

.ee-search-form {
    display: flex;
    align-items: center;
    height: 38px;
    border: 1.5px solid var(--ee-color-brand);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(30, 128, 255, 0.08);
    transition: all 0.16s ease;
}

.ee-search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(30, 128, 255, 0.14);
}

.ee-search-form__type {
    height: 100%;
    background: #f7f8fa;
    border-right: 1px solid #e5e6eb;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ee-search-form__type select {
    height: 100%;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: #1d2129;
    font-size: 13px;
    font-weight: 500;
    outline: 0;
    cursor: pointer;
}

.ee-search-form__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13.5px;
    color: var(--ee-color-ink);
}

.ee-search-form__input::placeholder { color: #86909c; }

.ee-search-form__btn {
    height: 100%;
    padding: 0 20px;
    border: 0 !important;
    background: var(--ee-color-brand);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.ee-search-form__btn:hover {
    background: var(--ee-color-brand-dark);
}

.ee-search-hub__hot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
    padding-left: 2px;
    font-size: 12px;
    color: #86909c;
}

.ee-search-hub__hot a {
    color: #4e5969 !important;
}

.ee-search-hub__hot a:hover {
    color: var(--ee-color-brand) !important;
}

.ee-search-hub__more {
    color: var(--ee-color-brand) !important;
    font-weight: 500;
}

/* 右侧操作按钮组（统一高度 36px，间距匀称） */
.ee-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 1px;
    flex-shrink: 0;
}

.ee-vip-entry {
    height: 36px;
    padding: 0 13px;
    border-radius: 7px;
    background: #fff7e8;
    border: 1px solid #ffd591;
    color: #d46b08 !important;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.ee-vip-entry:hover { background: #ffe7ba; }

.ee-btn-upload {
    height: 36px;
    padding: 0 15px;
    border-radius: 7px;
    background: linear-gradient(135deg, #1e80ff 0%, #3b5bdb 100%);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(30, 128, 255, 0.22);
}

.ee-btn-upload:hover {
    background: linear-gradient(135deg, #1171ee 0%, #364fc7 100%);
    color: #ffffff !important;
}

.ee-auth-btns {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ee-btn-login, .ee-btn-Register {
    height: 36px;
    padding: 0 15px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ee-btn-login {
    background: #eaf2ff;
    border: 1px solid #baddff;
    color: var(--ee-color-brand) !important;
}

.ee-btn-login:hover { background: #d6e8ff; }

.ee-btn-Register {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155 !important;
}

.ee-btn-Register:hover { border-color: var(--ee-color-brand); color: var(--ee-color-brand) !important; }

.ee-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px;
    background: #f8fafc;
    border: 1px solid var(--ee-color-line);
    border-radius: 7px;
    font-size: 13px;
}

.ee-user-pill__name { color: var(--ee-color-ink) !important; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.ee-user-pill__vip { padding: 0 4px; border-radius: 3px; background: #ff7d00; color: #ffffff; font-size: 10px; font-weight: 600; }
.ee-user-pill__credit { color: var(--ee-color-brand) !important; font-weight: 600; padding-left: 6px; border-left: 1px solid var(--ee-color-line); }
.ee-user-pill__logout { color: var(--ee-color-muted) !important; font-size: 12px; padding-left: 6px; border: 0; border-left: 1px solid var(--ee-color-line); background: transparent; cursor: pointer; font-family: inherit; }
.ee-user-pill__logout:hover { color: var(--ee-color-red) !important; }

/* 第二层：全宽清爽白底主频道导航条（11个频道完整呈现，零截断） */
.ee-header__nav-bar {
    background: #ffffff;
}

.ee-header__nav-inner {
    max-width: var(--ee-width);
    height: 42px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ee-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.ee-nav::-webkit-scrollbar { display: none; }

.ee-nav__link {
    position: relative;
    height: 42px;
    padding: 0 12px;
    color: #4e5969 !important;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.ee-nav__link:hover {
    color: var(--ee-color-brand) !important;
}

.ee-nav__link.is-active {
    color: var(--ee-color-brand) !important;
    font-weight: 600;
}

.ee-nav__link.is-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--ee-color-brand);
}

.ee-header__stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--ee-color-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.ee-header__stats strong {
    color: var(--ee-color-brand);
    font-weight: 600;
}

.ee-header__stats-today {
    padding: 1px 7px;
    border-radius: 4px;
    background: #e8ffea;
    color: #009a29;
    font-size: 12px;
    font-weight: 600;
}

/* 页脚 */
.ee-footer { margin-top: 40px; background: #1d2129; color: #86909c; border-top: 1px solid #272e3b; font-size: 13px; }
.ee-footer__inner { max-width: var(--ee-width); margin: 0 auto; padding: 36px 16px 20px; }
.ee-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 28px; padding-bottom: 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.ee-footer__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ee-footer__logo-text { font-size: 16px; font-weight: 600; color: #f7f8fa; }
.ee-footer__desc { margin: 0 0 12px; line-height: 1.7; color: #86909c; font-size: 12.5px; }
.ee-footer__desc strong { color: #4080ff; font-weight: 600; }
.ee-footer__badges { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #c9cdd4; }
.ee-footer__badges span { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); }
.ee-footer__badges i { color: #4080ff; }
.ee-footer__title { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: #f7f8fa; }
.ee-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 12.5px; }
.ee-footer__links a, .ee-footer__legal a, .ee-footer__copy a, .ee-footer__sublinks a { color: #86909c !important; }
.ee-footer__links a:hover, .ee-footer__legal a:hover, .ee-footer__copy a:hover, .ee-footer__sublinks a:hover { color: #ffffff !important; }
.ee-footer__qr-wrap { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.ee-footer__qr { width: 72px; height: 72px; border-radius: 6px; background: #ffffff; padding: 3px; flex-shrink: 0; }
.ee-footer__qr-info { display: flex; flex-direction: column; gap: 3px; font-size: 12px; line-height: 1.5; }
.ee-footer__qr-info strong { color: #f7f8fa; font-size: 12.5px; }
.ee-footer__bottom { padding-top: 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12px; }
.ee-footer__legal { display: flex; flex-wrap: wrap; gap: 14px; }
.ee-footer__sep { margin: 0 6px; opacity: 0.4; }

@media (max-width: 1024px) {
    .ee-header__top-inner { flex-wrap: wrap; gap: 10px; }
    .ee-search-hub { order: 3; flex: 0 0 100%; max-width: 100%; }
    .ee-header__stats { display: none; }
    .ee-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .ee-vip-entry span, .ee-btn-upload span, .ee-search-hub__hot { display: none; }
    .ee-footer__grid { grid-template-columns: 1fr; }
}
.ee-footer__brand, .ee-footer__col { min-width: 0; }
