/* ========== 人物卡片（三级分级） ========== */
.hero-card {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    backdrop-filter: blur(10px);
    padding: 24px;
    /* 默认保持可见，入场仅做位移，避免同帧插入时过渡冻结导致永久透明 */
    opacity: 1;
    transform: translateY(30px);
    transition: transform var(--duration-normal) var(--ease-smooth), opacity var(--duration-normal) var(--ease-smooth);
    cursor: pointer;
    z-index: 2;
}

/* 一级：国之柱石 —— 居中放大，金边光晕 */
.hero-card.level-1 {
    width: 520px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    border-color: var(--gold-primary);
    box-shadow: 0 0 40px var(--gold-glow);
    padding: 32px;
}

/* 二级：行业奠基 —— 时间轴左侧 */
.hero-card.level-2 {
    width: 420px;
    left: calc(50% - 460px);
}

/* 三级：杰出贡献 —— 时间轴右侧 */
.hero-card.level-3 {
    width: 380px;
    right: calc(50% - 460px);
}

/* 卡片入场状态 */
.hero-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.hero-card.level-1.visible {
    transform: translateX(-50%) translateY(0);
}

/* 卡片悬停效果 */
.hero-card:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 0 30px var(--gold-glow);
    transform: translateY(-4px);
}
.hero-card.level-1:hover {
    transform: translateX(-50%) translateY(-4px);
    box-shadow: 0 0 50px var(--gold-glow-strong);
}

/* 卡片内部结构 */
.card-header {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.card-name {
    font-family: var(--font-title);
    font-size: 24px;
    color: var(--text-white);
    margin-bottom: 4px;
}
.hero-card.level-1 .card-name {
    font-size: 30px;
    color: var(--gold-light);
}

.card-years {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.card-category {
    display: inline-block;
    padding: 2px 10px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--gold-primary);
    border: 1px solid var(--border-light);
    border-radius: 2px;
}

.card-summary {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.8;
}

/* 大纲跳转定位高亮 */
.hero-card.jump-hl {
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 30px var(--gold-glow-strong) !important;
}

/* ========== 人物详情全屏层 ========== */
.hero-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    z-index: 300; /* 从100改为300，高于全景层的200 */
    /* 用 display 切换显隐，规避 opacity/visibility 过渡在部分环境冻结在初始态 */
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.hero-detail.active {
    display: flex;
}

.detail-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    font-size: 28px;
    color: var(--text-gray);
    z-index: 10;
    line-height: 1;
}

.detail-close:hover {
    color: var(--gold-primary);
    transform: rotate(90deg);
}

.detail-wrapper {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: start;
    padding-top: 40px;
}

/* 人物详情左侧肖像区 */
.detail-portrait {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    border: 1px solid var(--border-strong);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 内外双边框，增强碑刻质感 */
.detail-portrait::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid var(--border-light);
    pointer-events: none;
    z-index: 2;
}

.detail-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%) contrast(1.05);
}

/* 无肖像时的姓氏占位 */
.portrait-placeholder {
    font-family: var(--font-title);
    font-size: 130px;
    color: var(--gold-primary);
    opacity: 0.75;
    line-height: 1;
    user-select: none;
}

.detail-content h2 {
    font-family: var(--font-title);
    font-size: 48px;
    color: var(--gold-light);
    letter-spacing: 6px;
    margin-bottom: 8px;
}

.detail-years {
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.detail-category {
    display: inline-block;
    padding: 4px 16px;
    margin-bottom: 32px;
    color: var(--gold-primary);
    border: 1px solid var(--border-strong);
    font-size: 14px;
}

.detail-block {
    margin-bottom: 28px;
}

.detail-block h3 {
    font-family: var(--font-title);
    font-size: 20px;
    color: var(--gold-primary);
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.detail-block p,
.detail-block div {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 2;
}

.detail-evaluation {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    font-family: var(--font-title);
    font-size: 22px;
    color: var(--gold-primary);
    line-height: 1.8;
    text-align: right;
}

/* 传记 / 作品 入口按钮组（置于姓名领域下方，第一屏可见） */
.detail-links {
    margin: 0 0 28px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.detail-link-btn {
    padding: 8px 22px;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    font-size: 14px;
    letter-spacing: 2px;
    background: transparent;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.detail-link-btn:hover {
    background: var(--gold-primary);
    color: var(--bg-deep);
    box-shadow: 0 0 16px var(--gold-glow);
}

/* ========== 星河全景层 ========== */
.panorama-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-deep);
    z-index: 200;
    /* 用 display 切换显隐，规避 opacity/visibility 过渡在部分环境冻结在初始态 */
    display: none;
}

.panorama-view.active {
    display: block;
}

#star-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.panorama-tip {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 2px;
    pointer-events: none;
}

.panorama-close {
    position: absolute;
    top: 30px;
    right: 40px;
    width: 40px;
    height: 40px;
    font-size: 32px;
    color: var(--text-gray);
    transition: all var(--duration-fast);
    z-index: 10;
    line-height: 1;
}

.panorama-close:hover {
    color: var(--gold-primary);
    transform: rotate(90deg);
}





/* 星河悬浮信息提示 */
.star-tooltip {
    position: absolute;
    padding: 12px 16px;
    background: rgba(15, 21, 34, 0.92);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(8px);
    border-radius: 2px;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transform: translate(-50%, calc(-100% - 12px));
    transition: opacity 0.25s var(--ease-smooth);
    white-space: nowrap;
}
.star-tooltip.show {
    opacity: 1;
}
.star-tooltip .tip-name {
    font-family: var(--font-title);
    font-size: 18px;
    color: var(--gold-light);
    margin-bottom: 4px;
}
.star-tooltip .tip-years {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.star-tooltip .tip-category {
    font-size: 12px;
    color: var(--gold-primary);
}

/* ========== 鼠标追光层 ========== */
.cursor-light {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s var(--ease-smooth);
}

/* ========== 移动端适配（≤768px） ========== */
@media (max-width: 1024px) {
    /* 卡片：脱离左右分栏，统一右侧单列 */
    .hero-card,
    .hero-card.level-1,
    .hero-card.level-2,
    .hero-card.level-3 {
        width: calc(100% - 56px);
        left: 40px;
        right: auto;
        padding: 16px;
        transform: translateY(30px);
    }

    .hero-card.visible,
    .hero-card.level-1.visible {
        transform: translateY(0);
    }

    .hero-card:hover,
    .hero-card.level-1:hover {
        transform: translateY(-4px);
    }

    .card-name {
        font-size: 20px;
    }

    .hero-card.level-1 .card-name {
        font-size: 22px;
    }

    .card-summary {
        font-size: 13px;
        line-height: 1.7;
    }

    /* 详情层：单列、内容（姓名/按钮）在前，肖像在后，保证入口按钮第一屏可见 */
    .detail-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
        width: 92%;
        max-width: 480px;
        padding: 64px 0 32px;
    }

    .detail-content {
        order: 1;
    }

    .detail-portrait {
        order: 2;
        max-width: 240px;
        margin: 0 auto;
    }

    .detail-content h2 {
        font-size: 28px;
        letter-spacing: 2px;
    }

    .detail-category {
        margin-bottom: 20px;
    }

    .detail-block p,
    .detail-block div {
        font-size: 15px;
        line-height: 1.9;
    }

    .detail-evaluation {
        text-align: left;
        font-size: 18px;
        margin-top: 24px;
    }

    /* 全景层收口 */
    .panorama-view {
        height: 100vh;
        height: 100dvh;
    }

    .panorama-close {
        top: 16px;
        right: 16px;
    }

    .panorama-tip {
        bottom: 20px;
        font-size: 12px;
        white-space: nowrap;
    }

    .star-tooltip {
        white-space: normal;
        max-width: 200px;
    }

    /* 移动端无鼠标，隐藏追光层 */
    .cursor-light {
        display: none;
    }
}
/* ========== 神话图谱入口与关联词条（20261122） ========== */
a.nav-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.detail-myths {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.detail-myth-link {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gold-light);
    transition: all var(--duration-fast) var(--ease-smooth);
}
.detail-myth-link:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 0 12px var(--gold-glow);
    color: var(--gold-primary);
}
.detail-myth-link span {
    font-size: 11px;
    color: var(--text-muted);
}
