/* ===== Header - Match original yyzb80.com ===== */
.header-wrapper {
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
    background: transparent;
    font-size: 18px;
    color: #fff;
    z-index: var(--z-header);
    transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.header-wrapper.solid {
    background: #fff;
    box-shadow: var(--shadow-header);
    color: #000;
}

.header-wrapper.solid .header-left { color: #000; }
.header-wrapper.solid .header-right { color: var(--color-primary); }

.header-inner {
    position: relative;
    width: 1200px;
    height: 72px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* -- Left side -- */
.header-left {
    display: flex;
    align-items: center;
}

.header-logo-box {
    display: inline-block;
    width: 160px;
    margin-right: 58px;
    line-height: 72px;
    vertical-align: middle;
}

.header-logo,
.header-logo-active {
    width: 160px;
    cursor: pointer;
    vertical-align: middle;
}

.header-menu {
    display: inline-block;
    line-height: 72px;
    vertical-align: middle;
}

.header-menu > ul {
    display: inline-block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-menu > ul > li {
    position: relative;
    display: inline-block;
    height: 36px;
    padding: 0 18px;
    line-height: 36px;
    margin: 0 16px;
    text-align: center;
    cursor: pointer;
    vertical-align: middle;
    font-size: 18px;
    color: #fff;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.header-wrapper.solid .header-menu > ul > li {
    color: #000;
}

.header-menu > ul > li > a {
    display: inline-block;
    width: 100%;
    height: 100%;
    color: inherit;
}

.header-menu > ul > li:hover,
.header-menu > ul > li.active {
    color: #fff;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
}

/* Download menu special */
.header-menu > ul > li.download-menu a,
.header-menu > ul > li.download-menu:hover {
    color: #ffb600;
    background: none;
}

.header-menu > ul > li.download-menu .hot {
    position: absolute;
    top: -2px;
    width: 29px;
    height: 19px;
}

/* Live submenu dropdown */
.header-menu > ul > li .live-submenu {
    display: none;
    position: absolute;
    top: 36px;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 10px;
    z-index: var(--z-dropdown);
    cursor: default;
}

.header-menu > ul > li:hover .live-submenu {
    display: block;
}

.live-submenu ul {
    display: block;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,.2);
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.live-submenu ul::before {
    display: block;
    position: absolute;
    height: 0;
    width: 0;
    content: '';
    border: 8px solid transparent;
    border-bottom-color: #fff;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
}

.live-submenu li {
    width: 108px;
    height: 44px;
    line-height: 44px;
    color: #777;
    font-size: 16px;
    padding: 0;
    margin: 0;
    text-align: center;
    cursor: pointer;
    background: none;
    border-radius: 0;
}

.live-submenu li:hover {
    background: #efefef;
    color: #777;
}

.live-submenu li:first-child {
    border-radius: 8px 8px 0 0;
}

.live-submenu li:last-child {
    border-radius: 0 0 8px 8px;
}

/* -- Right side -- */
.header-right {
    display: flex;
    align-items: center;
    height: 72px;
}

.no-login {
    display: inline-block;
    font-size: 16px;
    vertical-align: middle;
}

.header-login,
.header-register {
    cursor: pointer;
    transition: color var(--transition-fast);
}

.header-login:hover,
.header-register:hover {
    color: #ffb600;
}

.header-wrapper.solid .header-login:hover,
.header-wrapper.solid .header-register:hover {
    color: var(--color-primary);
}

.header-login .login-icon {
    font-size: 18px;
    margin-right: 4px;
}

.header-divider {
    display: inline-block;
    width: 1px;
    height: 12px;
    margin: 0 6px;
    background: #fff;
    font-size: 14px;
    vertical-align: middle;
}

.header-wrapper.solid .header-divider {
    background: #ddd;
}

/* -- Logged-in User -- */
.logged-in {
    display: flex;
    align-items: center;
    height: 72px;
}
.user-menu-wrap {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}
.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
}
.header-wrapper.solid .user-avatar-sm {
    border-color: #e0e0e0;
}
.user-nick {
    font-size: 14px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 120px;
    z-index: 999;
    padding: 8px 0;
}
.user-menu-wrap:hover .user-dropdown {
    display: block;
}
.user-dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}
.user-dropdown-item:hover {
    background: #f5f5f5;
    color: var(--color-primary);
}

/* -- Search Bar -- */
.header-search {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    margin-left: 20px;
}

.header-search input {
    width: 180px;
    height: 32px;
    padding: 0 32px 0 14px;
    border-radius: 16px;
    font-size: 13px;
    transition: all var(--transition-fast);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.header-wrapper.solid .header-search input {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e6e6e6;
}

.header-wrapper.solid .header-search input::placeholder {
    color: #999;
}

.header-search input:focus {
    width: 240px;
    border-color: var(--color-primary);
}

/* -- Mobile Toggle -- */
.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 10px 8px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: all var(--transition-normal);
}

.header-wrapper.solid .mobile-menu-toggle span { background: #333; }

.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* -- Mobile Nav Drawer -- */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: calc(var(--z-header) - 1);
    padding: 20px 16px;
    overflow-y: auto;
    animation: fadeIn var(--transition-fast);
}

.mobile-nav.active { display: block; }

.mobile-nav li {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.mobile-nav li a {
    font-size: 16px;
    color: #333;
    display: block;
}

.mobile-nav li.active a { color: var(--color-primary); font-weight: 600; }

.mobile-nav .mobile-auth {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.mobile-nav .mobile-auth .btn-m {
    flex: 1;
    text-align: center;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mobile-nav .mobile-auth .btn-m-login {
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.mobile-nav .mobile-auth .btn-m-login:active {
    background: var(--color-primary-light);
}

.mobile-nav .mobile-auth .btn-m-register {
    background: var(--color-primary);
    color: #fff;
}

.mobile-nav .mobile-auth .btn-m-register:active {
    background: var(--color-primary-hover);
}

/* ===== 1400px breakpoint ===== */
@media screen and (max-width: 1400px) {
    .header-inner {
        width: 960px;
    }

    .header-menu > ul > li {
        margin: 0 8px;
    }
}

/* ===== Mobile - handled by responsive.css ===== */
