/* 全局登录入口 - 对齐 wow-mythic GlobalLoginEntry.vue */

.index-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    gap: 12px;
    padding: 0 2vw;
    max-width: 100%;
    box-sizing: border-box;
    line-height: normal;
}

/* 正式服 / 怀旧服 logo 切换 */
.site-edition-switch {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 4px;
    height: 50px;
    margin: 0;
    padding: 0 10px 0 0;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    margin-right: 4px;
}

.site-edition-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 44px;
    padding: 0;
    border-radius: 8px;
    opacity: 0.72;
    transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    line-height: 0;
}

.site-edition-link img {
    display: block;
    width: auto;
    max-width: 36px;
    height: 34px;
    object-fit: contain;
}

.site-edition-link:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.site-edition-link.is-active {
    opacity: 1;
    background-color: rgba(255, 193, 69, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 193, 69, 0.35);
}

.index-header-main .index-header-menu {
    flex: 1;
    min-width: 0;
    width: auto;
    padding-left: 0;
}

/* 右侧：推广入口 + 登录，统一垂直居中 */
.index-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    height: 50px;
    line-height: 1;
}

/* 顶栏推广入口（对齐 wow-mythic header.vue） */
.update-menu-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    height: 50px;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.promo-entry {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px 0 11px;
    margin: 0;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: #ffe9c7;
    text-decoration: none;
    border: 1px solid rgba(255, 192, 69, 0.35);
    background: linear-gradient(180deg, rgba(78, 40, 22, 0.55), rgba(40, 22, 16, 0.78));
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
    vertical-align: middle;
    white-space: nowrap;
}

.promo-entry:hover {
    transform: translateY(-1px);
    color: #ffffff;
    border-color: rgba(255, 192, 69, 0.7);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.promo-dot {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
    animation: promoDotPulse 2.4s ease-in-out infinite;
    font-style: normal;
}

.promo-text {
    letter-spacing: 0.02em;
    line-height: 1;
}

.promo-new {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #2a1400;
    background: linear-gradient(180deg, #ffd76a, #ff9b00);
    padding: 2px 5px 1px;
    border-radius: 7px;
    line-height: 1;
    font-style: normal;
}

.promo-entry-hero .promo-dot {
    background: #ffc045;
    color: #ffc045;
}

.promo-entry-hero:hover {
    background: linear-gradient(180deg, rgba(170, 36, 9, 0.55), rgba(88, 24, 13, 0.88));
}

.promo-entry-party {
    border-color: rgba(79, 209, 138, 0.42);
    background: linear-gradient(180deg, rgba(20, 70, 48, 0.5), rgba(14, 40, 28, 0.78));
}

.promo-entry-party .promo-dot {
    background: #4fd18a;
    color: #4fd18a;
}

.promo-entry-party .promo-new {
    color: #06220f;
    background: linear-gradient(180deg, #9df7c2, #2f9d62);
}

.promo-entry-party:hover {
    border-color: rgba(79, 209, 138, 0.78);
    background: linear-gradient(180deg, rgba(20, 92, 60, 0.55), rgba(12, 52, 34, 0.9));
}

.promo-entry-mplus {
    border-color: rgba(96, 165, 250, 0.42);
    background: linear-gradient(180deg, rgba(28, 52, 90, 0.5), rgba(16, 30, 54, 0.78));
}

.promo-entry-mplus .promo-dot {
    background: #60a5fa;
    color: #60a5fa;
}

.promo-entry-mplus .promo-new {
    color: #071a33;
    background: linear-gradient(180deg, #a8d0ff, #3b82f6);
}

.promo-entry-mplus:hover {
    border-color: rgba(96, 165, 250, 0.78);
    background: linear-gradient(180deg, rgba(34, 66, 116, 0.55), rgba(14, 34, 62, 0.9));
}

.promo-entry-sponsor {
    cursor: pointer;
    font-family: inherit;
    border: 1px solid rgba(148, 108, 230, 0.5);
    background: linear-gradient(180deg, rgba(78, 48, 130, 0.55), rgba(40, 22, 70, 0.85));
    color: #f0e7ff;
}

.promo-entry-sponsor .promo-dot {
    background: #b28cff;
    color: #b28cff;
}

.promo-entry-sponsor:hover {
    border-color: rgba(178, 140, 255, 0.85);
    background: linear-gradient(180deg, rgba(102, 64, 170, 0.65), rgba(52, 30, 96, 0.95));
    color: #ffffff;
}

/* AI 入口：更醒目 */
.promo-entry-ai {
    overflow: hidden;
    z-index: 1;
    height: 32px;
    padding: 0 12px 0 10px;
    color: #fff8ea !important;
    border: 1px solid rgba(255, 192, 69, 0.72) !important;
    background:
        linear-gradient(105deg, rgba(255, 210, 120, 0.22), transparent 42%),
        linear-gradient(180deg, #7a3ad4 0%, #4a1f8f 48%, #2d1458 100%) !important;
    box-shadow:
        0 0 0 1px rgba(255, 192, 69, 0.18),
        0 0 18px rgba(157, 78, 221, 0.45),
        0 4px 12px rgba(0, 0, 0, 0.35);
    animation: promoAiBreath 2.8s ease-in-out infinite;
}

.promo-entry-ai .promo-ai-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 0%,
        transparent 38%,
        rgba(255, 255, 255, 0.28) 50%,
        transparent 62%,
        transparent 100%
    );
    transform: translateX(-120%);
    animation: promoAiShimmer 3.2s ease-in-out infinite;
    pointer-events: none;
}

.promo-entry-ai .promo-ai-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 10px;
    line-height: 1;
    color: #2a1400;
    background: linear-gradient(180deg, #ffe08a, #ffb020);
    box-shadow: 0 0 10px rgba(255, 192, 69, 0.75);
    flex-shrink: 0;
}

.promo-entry-ai .promo-text {
    font-weight: 800;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.promo-entry-ai .promo-ai-badge {
    color: #2a1400;
    background: linear-gradient(180deg, #ffe08a, #ff9b00);
    box-shadow: 0 0 8px rgba(255, 176, 40, 0.55);
}

.promo-entry-ai:hover {
    transform: translateY(-1px) scale(1.03);
    color: #ffffff !important;
    border-color: rgba(255, 220, 140, 0.95) !important;
    background:
        linear-gradient(105deg, rgba(255, 220, 140, 0.32), transparent 46%),
        linear-gradient(180deg, #9350f0 0%, #5c28b0 48%, #3a1870 100%) !important;
    box-shadow:
        0 0 0 1px rgba(255, 208, 110, 0.35),
        0 0 26px rgba(192, 132, 252, 0.65),
        0 6px 16px rgba(0, 0, 0, 0.4);
}

@keyframes promoAiShimmer {
    0%, 55% { transform: translateX(-120%); }
    80%, 100% { transform: translateX(120%); }
}

@keyframes promoAiBreath {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(255, 192, 69, 0.18),
            0 0 14px rgba(157, 78, 221, 0.38),
            0 4px 12px rgba(0, 0, 0, 0.35);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(255, 208, 110, 0.32),
            0 0 22px rgba(192, 132, 252, 0.62),
            0 4px 12px rgba(0, 0, 0, 0.35);
    }
}

@keyframes promoDotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px currentColor; }
    50% { opacity: 0.55; box-shadow: 0 0 2px currentColor; }
}

@media (max-width: 1280px) {
    .promo-entry {
        padding: 0 8px;
        gap: 5px;
        font-size: 12px;
    }

    .update-menu-box {
        gap: 6px;
    }

    .index-header-actions {
        gap: 8px;
    }
}

@media (max-width: 1100px) {
    .update-menu-box { display: none; }
}

.header-login-entry {
    flex-shrink: 0;
    position: relative;
    z-index: 10000000001;
    display: flex;
    align-items: center;
    height: 50px;
    line-height: 1;
}

.global-login-entry {
    display: inline-flex;
    align-items: center;
    height: 34px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
    user-select: none;
    border: none;
    background: transparent;
    font-family: inherit;
}

.global-login-entry-btn {
    padding: 0 16px;
    border: 1px solid rgba(255, 192, 69, 0.45);
    background: rgba(42, 28, 27, 0.9);
    color: #ffc045;
    gap: 6px;
    text-decoration: none;
    box-sizing: border-box;
}

.global-login-entry-btn:hover:not(:disabled) {
    border-color: #ffc045;
    background: rgba(255, 192, 69, 0.12);
}

.global-login-entry-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.global-login-entry-user {
    padding: 0 10px 0 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(34, 20, 19, 0.85);
    color: #efe6d8;
    gap: 8px;
}

.global-login-entry-user:hover {
    border-color: rgba(255, 192, 69, 0.55);
    background: rgba(42, 28, 27, 0.95);
}

.global-login-entry-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 192, 69, 0.35);
}

.global-login-entry-avatar-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #3a2625;
    color: #ffc045;
    font-size: 14px;
}

.global-login-entry-nickname {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: #f5e6c8;
}

.global-login-entry-arrow {
    font-size: 10px;
    color: #aaa;
    margin-left: 2px;
}

.global-login-entry-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* 下拉菜单（对齐主站 UserAccountMenu） */
.global-login-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: #1a110f;
    border: 1px solid #3a2625;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    border-radius: 4px;
    padding: 6px 0;
    z-index: 10000000002;
}

.global-login-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 16px;
    color: #efe6d8;
    font-size: 13px;
    text-align: left;
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
    line-height: 1.4;
}

.global-login-menu-item:hover {
    background: rgba(255, 192, 69, 0.1);
    color: #ffc045;
}

.global-login-menu-item:hover .global-login-menu-icon {
    fill: #ffc045;
}

.global-login-menu-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: #efe6d8;
}

.global-login-menu-item .menu-label {
    margin-left: 8px;
}

.global-login-menu-divider {
    height: 1px;
    background: #2a1c1b;
    margin: 4px 0;
}

@media (max-width: 768px) {
    .index-header-main {
        padding: 0 12px;
    }

    .site-edition-switch {
        gap: 2px;
        padding-right: 8px;
        margin-right: 0;
    }

    .site-edition-link {
        width: 34px;
        height: 40px;
    }

    .site-edition-link img {
        max-width: 30px;
        height: 30px;
    }

    .global-login-entry-nickname {
        max-width: 64px;
    }
}
