.global-promo-bar {
    background: linear-gradient(90deg, #E53935, #FF5722);
    color: #fff;
    padding: 8px 16px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    transition: all 0.2s ease;
}

.global-promo-bar:hover {
    background: linear-gradient(90deg, #C62828, #E64A19);
}

.promo-bar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 1200px;
    margin: 0 auto;
}

.promo-bar-content i {
    font-size: 14px;
}

.promo-bar-text {
    font-weight: 500;
}

.promo-bar-action {
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
}

.promo-bar-action:hover {
    background: rgba(255,255,255,0.3);
}

/* 有活动提示时，调整导航栏位置 */
.has-promo-bar .main-navbar {
    top: 36px !important;
}

.has-promo-bar .mobile-channel-bar {
    top: 100px !important;
}

.has-promo-bar + .top-navbar + .content-body,
.has-promo-bar ~ .content-body {
    padding-top: 100px !important;
}

@media (max-width: 640px) {
    .global-promo-bar {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .promo-bar-content {
        gap: 6px;
    }
    
    .promo-bar-action {
        padding: 2px 8px;
        font-size: 11px;
    }
    
    .has-promo-bar .main-navbar {
        top: 32px !important;
    }
    
    .has-promo-bar .mobile-channel-bar {
        top: 80px !important;
    }
}

/* 基础重置 */
.top-navbar * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 移动端搜索图标按钮 */
.mobile-search-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 18px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-search-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #007bff;
}

/* 主导航栏 */
.main-navbar {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    z-index: 1000;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 12px;
}

/* Logo区域 */
.brand-section {
    flex-shrink: 0;
}

.brand-link {
    display: block;
    height: 40px;
}

.brand-logo {
    height: 40px;
    width: auto;
}

/* 桌面端导航 */
.desktop-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: space-between;
    margin-left: 40px;
    min-width: 0;
}

/* 导航链接区域 */
.nav-links-section {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.nav-link {
    display: block;
    padding: 10px 16px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: #333;
    color: #007bff;
    text-decoration: none;
}

.nav-link.active {
    background: #007bff;
    color: #fff;
}

.vip-link {
    color: #ff9800 !important;
    font-weight: 600;
}

.vip-link:hover {
    background: #2d2d2d !important;
    color: #ffb74d !important;
}

/* 搜索区域 */
.search-section {
    flex-shrink: 0;
}

.search-box {
    position: relative;
    width: 180px;
    height: 36px;
}

.search-field {
    width: 100%;
    height: 100%;
    padding: 8px 44px 8px 12px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 18px;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-field:focus {
    outline: none;
    border-color: #007bff;
}

.search-field::placeholder {
    color: #aaa;
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #007bff;
}

/* 用户区域 */
.user-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.action-button:hover {
    background: #0056b3;
    color: #fff;
    text-decoration: none;
}

.login-button {
    background: #007bff;
}

/* 通知图标样式 */
.notification-icon-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.notification-icon-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #007bff;
}

.notification-icon-link i {
    font-size: 18px;
}

.notification-icon-link .notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ff4757;
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* 用户菜单 */
.user-menu-container {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: none;
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.user-button:hover {
    background: #333;
}

.user-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #444;
}

.user-label {
    font-size: 14px;
    font-weight: 500;
}

.user-arrow {
    font-size: 12px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    padding: 8px 0;
    margin-top: 8px;
    display: none;
    z-index: 1001;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #404040;
    color: #ffffff;
    text-decoration: none;
}

.dropdown-separator {
    height: 1px;
    background: #404040;
    margin: 8px 0;
}

.logout-item {
    color: #ff6b6b;
}

.logout-item:hover {
    background: #404040;
    color: #ff6b6b;
}

/* 移动端频道导航栏 */
.mobile-channel-bar {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    z-index: 999;
    height: 40px;
}

.mobile-channel-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-channel-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-channel-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    color: #bbb;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    background: #2a2a2a;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mobile-channel-item:hover,
.mobile-channel-item.active {
    background: #fff;
    color: #111;
    text-decoration: none;
}

.mobile-channel-vip {
    color: #ffd700 !important;
    background: rgba(255, 152, 0, 0.15) !important;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.mobile-channel-vip:hover {
    background: #ff9800 !important;
    color: #fff !important;
}

/* 移动端全屏搜索面板 */
.mobile-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a1a1a;
    z-index: 2000;
    flex-direction: column;
}

.mobile-search-overlay.show {
    display: flex;
}

.search-overlay-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    height: 56px;
    flex-shrink: 0;
}

.search-overlay-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.2s;
}

.search-overlay-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-overlay-form {
    flex: 1;
    display: flex;
}

.search-overlay-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 18px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.search-overlay-input:focus {
    border-color: #007bff;
}

.search-overlay-input::placeholder {
    color: #888;
}

.search-overlay-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.2s;
}

.search-overlay-submit:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #007bff;
}

.search-overlay-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.search-history-section {
    /* 搜索历史区域 */
}

.search-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.search-history-title {
    color: #999;
    font-size: 13px;
    font-weight: 600;
}

.search-history-clear {
    background: none;
    border: none;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s;
}

.search-history-clear:hover {
    color: #ff4757;
}

.search-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-history-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #2a2a2a;
    color: #ccc;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.search-history-item:hover {
    background: #333;
    color: #fff;
    text-decoration: none;
}

.search-history-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: none;
    border: none;
    color: #666;
    font-size: 10px;
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    transition: all 0.2s;
}

.search-history-delete:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.15);
}

.search-history-empty {
    color: #555;
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
}

/* 页面主体偏移 */
body {
    padding-top: 64px;
}

/* 响应式设计 - 修复Chrome浏览器误判为移动端的问题 */
@media (max-width: 991px) {
    /* 移动端导航栏高度减小 */
    .main-navbar {
        height: 48px;
        background: rgba(35, 35, 35, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .mobile-search-toggle {
        display: flex;
    }

    .mobile-channel-bar {
        display: flex;
        top: 48px;
        background: rgba(35, 35, 35, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        transition: transform 0.3s ease-in-out;
    }
    
    /* 频道栏跟随顶部导航隐藏：向上移动自身高度+导航栏高度，彻底隐藏 */
    .main-navbar.header-hidden ~ .mobile-channel-bar {
        transform: translateY(calc(-100% - 48px));
    }
    
    .desktop-navigation {
        display: none;
    }
    
    .navbar-inner {
        padding: 0 12px;
        gap: 8px;
    }

    body {
        padding-top: 68px;
    }
    
    /* 有活动提示条时的偏移调整 */
    .has-promo-bar .mobile-channel-bar {
        top: 80px !important;
    }
}

/* 中等屏幕通知图标适配 */
@media (max-width: 768px) {
    .notification-icon-link {
        width: 36px;
        height: 36px;
    }
    
    .notification-icon-link i {
        font-size: 16px;
    }
    
    .notification-icon-link .notification-badge {
        top: 4px;
        right: 4px;
        min-width: 14px;
        height: 14px;
        font-size: 9px;
    }
}

/* 专门针对真正的移动设备的样式 */
@media (max-width: 576px) {
    .navbar-inner {
        padding: 0 8px;
        gap: 6px;
    }

    body {
        padding-top: 68px;
    }
}

/* ===== 内容容器活动提示条适配 ===== */
body.has-promo-bar .wrap {
    padding-top: 40px;
}

@media (max-width: 640px) {
    body.has-promo-bar .wrap {
        padding-top: 34px;
    }
}
