/**
 * 顶部布局优化样式
 * 紧凑化、科技风、整体上移
 */

/* 1. 整体布局调整 - Dashboard 风格 */
.header {
    position: relative;
    height: auto;
    min-height: 70px;
    margin-top: -20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 10px;
    z-index: 100;
}

/* 左侧信息区域 */
.header-left-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 12px;
    z-index: 10;
    width: 248px;
}

.brand-signature-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0 0;
}

/* ========== Premium Signature System ========== */
.premium-signature {
    position: relative;
}

.brand-signature-main {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-signature-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding-left: 0;
}

.brand-signature-name {
    font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.25;
    color: #64748b;
}

.brand-signature-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 0;
}

/* --- Premium Version Number --- */
.brand-meta-value {
    font-size: 22px;
    /* 版本号优先使用更硬朗的数字字体，避免字形过圆 */
    font-family: "Bahnschrift", "DIN Alternate", "Arial Narrow", "Helvetica Neue", "Arial Nova", Arial, sans-serif;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    letter-spacing: -0.015em;
}

.premium-version {
    position: relative;
    background: linear-gradient(135deg,
            #f7d96e 0%,
            #e8b730 18%,
            #f5e08a 38%,
            #d4a216 55%,
            #f7d96e 72%,
            #c78900 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: premiumGoldShift 4s ease-in-out infinite;
    filter: drop-shadow(0 1px 2px rgba(212, 162, 22, 0.25));
    transition: filter 0.4s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.premium-signature:hover .premium-version {
    filter: drop-shadow(0 2px 8px rgba(212, 162, 22, 0.45));
    transform: scale(1.04);
}

@keyframes premiumGoldShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* --- Premium Decorative Marks --- */
.premium-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    flex: 0 0 30px;
    transition: opacity 0.3s ease;
}

/* Gold marks (version row) */
.premium-mark--gold {
    color: #d4a216;
}

/* Ink marks (author row) */
.premium-mark--ink {
    color: #7a8da2;
}

/* --- Gold Capsule Badge (version row) --- */
.pm-capsule {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(212, 166, 58, 0.35);
    background: linear-gradient(135deg, rgba(247, 217, 110, 0.1) 0%, rgba(212, 166, 58, 0.06) 100%);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.pm-capsule::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(247, 217, 110, 0.25) 50%,
            transparent 100%);
    animation: pmCapsuleSweep 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pmCapsuleSweep {

    0%,
    70%,
    100% {
        left: -100%;
    }

    35% {
        left: 150%;
    }
}

.pm-capsule-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0c94b, #d4a216);
    box-shadow: 0 0 6px rgba(212, 162, 22, 0.45);
    animation: pmCapsuleDotPulse 3s ease-in-out infinite;
}

@keyframes pmCapsuleDotPulse {

    0%,
    100% {
        box-shadow: 0 0 4px rgba(212, 162, 22, 0.35);
    }

    50% {
        box-shadow: 0 0 9px rgba(247, 217, 110, 0.7);
    }
}

.pm-capsule-bar {
    width: 1.5px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(212, 166, 58, 0.7) 0%, rgba(212, 166, 58, 0.25) 100%);
}

.premium-signature:hover .pm-capsule {
    border-color: rgba(212, 166, 58, 0.55);
    background: linear-gradient(135deg, rgba(247, 217, 110, 0.18) 0%, rgba(212, 166, 58, 0.1) 100%);
    box-shadow: 0 2px 12px rgba(212, 162, 22, 0.18);
}

/* --- Ink Bracket (author row) --- */
.pm-bracket {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
    padding: 2px 0;
    align-items: flex-start;
    width: 100%;
    transition: gap 0.4s ease;
}

.pm-bracket-line {
    width: 12px;
    height: 1.5px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.55;
    transition: all 0.4s ease;
}

.pm-bracket-line:first-child {
    width: 12px;
}

.pm-bracket-line:last-child {
    width: 8px;
}

.premium-signature:hover .pm-bracket {
    gap: 4px;
}

.premium-signature:hover .pm-bracket-line {
    opacity: 0.8;
}

.premium-signature:hover .pm-bracket-line:last-child {
    width: 12px;
}

/* --- Premium Author Name --- */
.premium-author {
    font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #475569;
    transition: color 0.4s ease, letter-spacing 0.4s ease;
}

.premium-signature:hover .premium-author {
    color: #334155;
    letter-spacing: 0.18em;
}

/* Hover glow on the whole card */
.premium-signature:hover .premium-mark--gold {
    filter: drop-shadow(0 0 6px rgba(247, 217, 110, 0.4));
}

/* 中央弧形标题区域 */
.header-center-wrapper {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    z-index: 20;
}

/* 弧形背景装饰 */
.header-arc-bg {
    position: absolute;
    top: -65px;
    /* 再次上移5px */
    width: 540px;
    height: 95px;
    background: linear-gradient(180deg, #ffffff 40%, #f0f7ff 100%);
    border-radius: 0 0 50% 50%;
    box-shadow:
        0 8px 20px -5px rgba(59, 130, 246, 0.15),
        0 4px 8px -2px rgba(0, 0, 0, 0.05),
        inset 0 -4px 8px rgba(148, 163, 184, 0.1);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 15px;
    /* 增加底部内边距，使标题更靠上 */
    z-index: -1;
}

/* 标题装饰线（可选） */
.header-arc-bg::before {
    content: '';
    position: absolute;
    bottom: 12px;
    /* 上移装饰线 */
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #54A0FF, transparent);
    /* 改用更浅的蓝色 */
    opacity: 0.3;
}

/* 标题内容 */
.header-title-content {
    text-align: center;
    padding-top: 0;
    /* 移除顶部内边距 */
    transform: translateY(-5px);
    /* 整体上移标题 */
}

.dashboard-main-title {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 32px;
    /* 稍微缩小字体 (36px -> 32px) */
    font-weight: 900;
    margin: 0;
    line-height: 1.2;
    /* 纯色，不再使用渐变，使用更深更稳重的品牌蓝 */
    color: #2563eb;
    background: none;
    -webkit-text-fill-color: initial;
    letter-spacing: 2px;
    text-shadow: none;
    /* 移除阴影，更干净 */
    animation: titleSlideDown 0.8s ease-out;
}

@keyframes titleSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
}

/* 右侧信息区域 */
.header-right-info {
    width: 200px;
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    z-index: 10;
}

.subtitle-exam {
    font-size: 14px;
    color: #2563eb;
    font-weight: 600;
    background: rgba(239, 246, 255, 0.8);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(191, 219, 254, 0.5);
}

/* 响应式适配 */
@media (max-width: 900px) {
    .header {
        margin-top: 0;
        margin-bottom: 10px;
    }

    .header-center-wrapper {
        position: relative;
        left: auto;
        transform: none;
        width: 100%;
    }

    .header-arc-bg {
        width: 100%;
        height: auto;
        min-height: 80px;
        top: -20px;
        border-radius: 0 0 20px 20px;
        /* 移动端改回圆角矩形 */
    }

    .header-left-info,
    .header-right-info {
        display: none;
        /* 移动端简化显示 */
    }
}

/* 兼容旧代码 */
.modern-brand-card {
    display: none !important;
}
