/* ======================================
   全局页头导航栏
   ====================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 20px;
    background: rgba(13, 8, 5, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212, 168, 83, 0.15);
    font-family: 'Noto Serif SC', 'PingFang SC', serif;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 播放页面时可自动隐藏 */
.site-header.auto-hide {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.site-header.auto-hide:hover,
.site-header.auto-hide.shown {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* 左侧 — Logo / 返回广场 */
.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-logo {
    text-decoration: none;
    color: var(--gold, #d4a853);
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.header-logo:hover {
    color: var(--gold-light, #f0d68a);
}

.header-back {
    text-decoration: none;
    color: var(--text-dim, #a89080);
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.header-back:hover {
    color: var(--gold-light, #f0d68a);
    background: rgba(212, 168, 83, 0.1);
}

/* 右侧 — 用户区 */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-user-name {
    color: var(--gold-light, #f0d68a);
    font-size: 0.85rem;
    white-space: nowrap;
}

.header-btn {
    padding: 5px 14px;
    border: 1px solid rgba(212, 168, 83, 0.3);
    border-radius: 6px;
    background: transparent;
    color: var(--text-dim, #a89080);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

.header-btn:hover {
    border-color: var(--gold, #d4a853);
    color: var(--gold-light, #f0d68a);
    background: rgba(212, 168, 83, 0.1);
}

.header-btn-primary {
    border-color: var(--gold, #d4a853);
    color: var(--gold, #d4a853);
}

.header-btn-primary:hover {
    background: rgba(212, 168, 83, 0.2);
    color: #fff;
}

/* 为页面内容留出顶部空间 */
body.has-header {
    padding-top: 48px;
}

/* 在播放页面不需要额外 padding（全屏舞台） */
body.has-header.play-page {
    padding-top: 0;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .site-header {
        padding: 0 12px;
        height: 44px;
    }

    .header-logo {
        font-size: 1rem;
    }

    .header-btn {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    body.has-header {
        padding-top: 44px;
    }
}
