:root {
    --text-color: #ffffff;
    --accent-color: #7700ff; 
    --accent-glow: rgba(0, 243, 255, 0.6);
    --bg-deep: #000510;
    --card-bg: rgba(0, 20, 40, 0.85);
    --card-border: rgba(0, 243, 255, 0.4);
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-deep);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
}

/* --- 关键修复：Loading Screen 强制置顶 --- */
#loading {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    background-color: #000000 !important;
    z-index: 99999 !important; /* 确保比任何3D元素都高 */
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transition: opacity 1.5s ease-out;
}

#loading-text {
    color: var(--accent-color);
    font-family: monospace;
    font-size: 1.2rem;
    text-shadow: 0 0 10px var(--accent-color);
    letter-spacing: 2px;
}

#enter-btn {
    display: none; /* JS加载完前隐藏 */
    padding: 15px 40px;
    font-size: 1.5rem;
    color: #ffffff;
    background: transparent;
    border: 2px solid var(--accent-color);
    border-radius: 50px;
    cursor: pointer !important; /* 强制显示手型光标 */
    pointer-events: auto !important; /* 强制接收点击事件 */
    font-family: serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 0 0 15px rgba(119, 0, 255, 0.5);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

#enter-btn:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 40px rgba(119, 0, 255, 0.8);
    transform: scale(1.05);
}

@keyframes pulse {
    0% { box-shadow: 0 0 10px rgba(119, 0, 255, 0.4); }
    50% { box-shadow: 0 0 30px rgba(119, 0, 255, 0.7); }
    100% { box-shadow: 0 0 10px rgba(119, 0, 255, 0.4); }
}

/* --- Containers --- */
#scene-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: filter 0.5s ease;
}

#scene-container.blurred {
    filter: blur(10px) brightness(0.6);
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none; /* 必须透传点击事件给3D场景 */
    transition: opacity 0.3s;
}

#ui-layer.hidden {
    opacity: 0;
}

/* --- Nodes --- */
.node-label {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto; /* 节点本身可以点击 */
    cursor: pointer;
    transition: transform 0.1s linear, opacity 0.3s ease;
    user-select: none;
}

.node-label.faded { opacity: 0.2; filter: grayscale(1) blur(2px); }
.node-root, .node-l1 { opacity: 1 !important; filter: none !important; }

/* Avatar */
.node-root .avatar {
    width: 200px; height: 200px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 50px var(--accent-glow), inset 0 0 20px var(--accent-glow);
    object-fit: cover; background: #000;
    transition: transform 0.3s;
}
.node-root:hover .avatar { transform: scale(1.05); }
.node-root .info {
    margin-top: 18px; text-align: center;
    text-shadow: 0 0 10px var(--accent-color);
    background: rgba(0, 10, 20, 0.5);
    padding: 8px 16px; border-radius: 12px;
    backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
}
.name { font-size: 1.8rem; font-weight: 700; color: #fff; letter-spacing: 1px; }
.unit { font-size: 0.95rem; color: #bdeeff; margin-top: 5px; font-weight: 300; }

/* L1 & L2 Nodes */
.node-l1 { width: 160px; text-align: center; }
.dot-l1 {
    width: 22px; height: 22px; background: #fff;
    border-radius: 50%; margin: 0 auto 10px auto;
    box-shadow: 0 0 25px var(--accent-color), 0 0 10px #fff;
    border: 2px solid var(--accent-color);
}
.text-l1 {
    font-size: 1.1rem; color: #fff; font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px; border-radius: 6px;
    backdrop-filter: blur(4px);
    border: 1px solid var(--accent-glow);
    text-align: center;
}

.node-l2 { width: 120px; text-align: center; }
.dot-l2 {
    width: 14px; height: 14px; background: #cca5fb;
    border-radius: 50%; margin: 0 auto 6px auto;
    box-shadow: 0 0 20px var(--accent-color), 0 0 10px #fff;
    border: 2px solid var(--accent-color);
}
.node-l2:hover .dot-l2 { transform: scale(1.3); }
.text-l2 {
    font-size: 0.9rem; color: #d0f0ff;
    background: rgba(0, 20, 40, 0.6);
    padding: 4px 10px; border-radius: 4px;
    border: 1px solid rgba(136, 23, 249, 0.2);
}

/* --- OVERLAY SYSTEM --- */
#overlay-container {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; z-index: 10;
    background: rgba(0, 5, 10, 0.4);
    display: flex; flex-direction: column; align-items: center;
    padding: 40px 20px; box-sizing: border-box;
    opacity: 0; pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    overflow-y: auto;
}
#overlay-container.active { opacity: 1; pointer-events: auto; transform: translateY(0); }

.overlay-header {
    width: 100%; max-width: 1200px;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 40px; padding-bottom: 20px;
    border-bottom: 1px solid var(--accent-color);
}
#overlay-title { font-size: 2.5rem; color: #fff; text-shadow: 0 0 15px var(--accent-color); margin: 0; }
#close-overlay-btn {
    background: transparent; border: 2px solid var(--accent-color);
    color: var(--accent-color); font-size: 2rem;
    width: 50px; height: 50px; border-radius: 50%;
    cursor: pointer; transition: all 0.3s; line-height: 1;
}
#close-overlay-btn:hover { background: var(--accent-color); color: #000; box-shadow: 0 0 20px var(--accent-color); }

/* Grid Layout for Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Columns */
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    padding-bottom: 50px;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .cards-grid { grid-template-columns: 1fr; }
    #overlay-title { font-size: 1.8rem; }
}

/* Card Style (In Overlay) */
/* 塔罗牌卡片基础样式 */
.overlay-card {
    width: 300px; /* 固定宽度 */
    aspect-ratio: 2 / 3.5; /* 经典的扑克牌/塔罗牌比例 */
    background: #1a1a1a;
    border: 1px solid #c0c0c0; /* 暗金色边框 */
    position: relative;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

/* 模拟图片中的金色装饰性内框 */
.overlay-card::before {
    content: '';
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border: 1px solid #F6F6F6; /* 亮金色 */
    pointer-events: none;
    opacity: 0.6;
}

/* 角部的L型装饰（模拟塔罗牌花纹） */
.overlay-card::after {
    content: '✦'; /* 顶部的星型符号 */
    position: absolute;
    top: 12px;
    color: #F6F6F6;
    font-size: 12px;
}

.overlay-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.3);
    border-color: #F6F6F6;
}

/* 1:1 的形容图片 */
.tarot-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-top: 20px;
    border: 1px solid #c0c0c0;
    filter: sepia(0.3) contrast(1.1); /* 增加一点复古感 */
}

.tarot-title {
    font-family: "Cinzel", "Georgia", serif; /* 建议引入古典字体 */
    color: #f6f6f6;
    font-size: 1.4rem;
    margin: 20px 0 10px 0;
    text-align: center;
    letter-spacing: 2px;
}

.tarot-short-desc {
    color: #aaa;
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.6;
    padding: 0 10px;
}

/* Detail Modal */
#detail-modal {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%; max-width: 1200px; max-height: 85vh;
    overflow-y: auto; overflow-x: hidden;
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid #f6f6f6; padding: 40px;
    z-index: 100; opacity: 0; pointer-events: none;
    transition: all 0.4s; backdrop-filter: blur(20px);
    box-sizing: border-box;
}
#detail-modal.active { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }

.outcome-list { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.outcome-item {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 8px; padding: 18px; margin-bottom: 15px;
    transition: all 0.3s; cursor: pointer; display: flex; flex-direction: column; gap: 8px;
}
.outcome-item:hover { background: rgba(197, 160, 89, 0.1); border-color: #f6f6f6; transform: translateX(5px); }
.outcome-header { display: flex; align-items: center; gap: 10px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }
.outcome-source { color: #f6f6f6; font-weight: bold; }
.outcome-status { color: #888; border-left: 1px solid #444; padding-left: 10px; }
.outcome-title { color: #fff; font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
.outcome-authors { color: #aaa; font-size: 0.85rem; font-style: italic; }
.outcome-intro { color: #888; font-size: 0.85rem; line-height: 1.5; margin-top: 5px; }

.leisure-hero { width: 100%; height: 400px; background-size: cover; background-position: center; position: relative; display: flex; align-items: flex-end; }
.leisure-header { background: linear-gradient(transparent, rgba(0,0,0,0.8)); width: 100%; padding: 40px; }
.leisure-header h1 { font-family: 'Cinzel', serif; color: #fff; margin: 0; font-size: 3rem; }
.leisure-meta { color: #c5a059; font-size: 0.9rem; letter-spacing: 2px; }
.leisure-body { padding: 40px; }
.leisure-story { font-family: 'Georgia', serif; font-size: 1.1rem; line-height: 2; color: #ddd; margin-bottom: 40px; }
.leisure-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; }
.gallery-img { width: 100%; border-radius: 4px; transition: transform 0.3s; filter: brightness(0.8); }
.gallery-img:hover { transform: scale(1.02); filter: brightness(1); }

.about-modal-content { display: flex; gap: 40px; align-items: flex-start; }
.about-left { flex: 1; text-align: center; }
.about-portrait { width: 100%; max-width: 250px; border-radius: 15px; border: 2px solid #f6f6f6; box-shadow: 0 0 30px rgba(197, 160, 89, 0.3); }
.cv-download-btn { margin-top: 25px; display: inline-block; padding: 12px 25px; background: transparent; border: 1px solid #f6f6f6; color: #f6f6f6; text-decoration: none; border-radius: 30px; font-size: 0.9rem; transition: all 0.3s; }
.cv-download-btn:hover { background: #f6f6f6; color: #000; box-shadow: 0 0 20px rgba(197, 160, 89, 0.5); }
.about-right { flex: 2; }
.about-bio { color: #ddd; line-height: 1.8; font-size: 1.05rem; margin-bottom: 30px; }
.skills-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.skill-tag { padding: 5px 15px; background: rgba(197, 160, 89, 0.1); border: 1px solid rgba(197, 160, 89, 0.3); border-radius: 20px; color: #f6f6f6; font-size: 0.8rem; }
.about-socials { display: flex; gap: 20px; }
.social-link { color: #fff; font-size: 1.5rem; text-decoration: none; transition: transform 0.3s; }
.social-link:hover { transform: scale(1.2); color: #f6f6f6; }

@media (max-width: 768px) { .about-modal-content { flex-direction: column; align-items: center; } }

#detail-modal::-webkit-scrollbar, #overlay-container::-webkit-scrollbar { width: 6px; }
#detail-modal::-webkit-scrollbar-track, #overlay-container::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); }
#detail-modal::-webkit-scrollbar-thumb, #overlay-container::-webkit-scrollbar-thumb { background: #c5a059; border-radius: 10px; }
#detail-modal::-webkit-scrollbar-thumb:hover { background: #bf5fff; }

.modal-content-wrapper { width: 100%; position: relative; }
.close-modal { position: sticky; top: -20px; left: 100%; background: none; border: none; color: #c5a059; font-size: 2rem; cursor: pointer; z-index: 101; }

/* --- New Feature 1: Cosmic Whispers (左上角动态) --- */
#cosmic-whispers {
    position: fixed;
    top: 30px;
    left: 30px;
    width: 280px;
    max-height: 200px; /* 限制高度，超出则滚动 */
    z-index: 5; /* 保证在 3D 场景之上，但在 Loading 之下 */
    
    /* 玻璃拟态风格 */
    background: rgba(0, 15, 30, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(119, 0, 255, 0.3);
    border-top: 2px solid var(--accent-color); /* 顶部亮条 */
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    
    display: flex;
    flex-direction: column;
    pointer-events: auto; /* 允许鼠标滚动 */
    transition: opacity 0.5s;
    font-family: 'Helvetica Neue', sans-serif;
}

/* 标题栏 */
.whisper-title {
    padding: 12px;
    font-family: 'Cinzel', serif; /* 使用衬线体增加神秘感 */
    font-size: 0.9rem;
    color: var(--accent-color);
    text-align: center;
    border-bottom: 1px solid rgba(119, 0, 255, 0.2);
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.3);
    text-shadow: 0 0 5px var(--accent-color);
}

/* 内容区域 */
.whisper-content {
    padding: 0 10px 10px 10px;
    overflow-y: auto; /* 允许垂直滑动 */
    scrollbar-width: thin; /* Firefox 细滚动条 */
    scrollbar-color: var(--accent-color) rgba(0,0,0,0.3);
}

/* 自定义滚动条 (Chrome/Safari/Edge) */
.whisper-content::-webkit-scrollbar {
    width: 4px;
}
.whisper-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}
.whisper-content::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 2px;
}

/* 单条动态样式 */
.whisper-item {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: #ddd;
    line-height: 1.5;
    margin-top: 10px; /* 缩小条目之间的间距 (之前是15px) */
    padding-bottom: 8px; /* 缩小底部分割线的距离 */
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    /* 确保里面的文字紧凑排列 */
    display: flex;
    flex-direction: column;
    gap: 2px; /* 日期和文字之间只留 2px 的缝隙 */
}
.whisper-item:last-child {
    border-bottom: none;
}

.whisper-date {
    display: block;
    font-size: 0.75rem;
    color: #00f3ff; /* 青色日期 */
    margin-bottom: 3px;
    font-weight: bold;
    font-family: monospace;
}
.whisper-item p {
    margin: 0; /* 【核心】杀掉浏览器默认的段落间距！ */
    font-size: 0.85rem;
    color: #ddd;
    line-height: 1.35; /* 行高稍微紧凑一点，阅读感更像“清单” */
}

/* 鼠标悬停时稍微亮一点 */
#cosmic-whispers:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(119, 0, 255, 0.2);
}

#cosmic-whispers.blurred {
    /* 1. 强力高斯模糊 */
    filter: blur(8px) brightness(0.7); 
    
    /* 2. 稍微缩小一点，增加纵深感，感觉离镜头更远了 */
    transform: scale(0.92); 
    
    /* 3. 关键：变模糊时禁止鼠标交互（不能再滚动它了） */
    pointer-events: none; 
    
    /* 4. 稍微降低透明度，让它退居次席 */
    opacity: 0.6;
}

/* --- New Feature 2: Interaction Hint (底部提示) --- */
#interaction-hint {
    position: fixed;
    bottom: 25px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 40;
    
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
    
    pointer-events: none; /* 【关键】让鼠标可以直接穿透文字，拖动地球 */
    user-select: none;
    
    animation: textPulse 4s infinite ease-in-out;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.4; text-shadow: 0 0 5px rgba(0, 243, 255, 0.1); }
    50% { opacity: 0.9; text-shadow: 0 0 15px rgba(0, 243, 255, 0.5); }
}

/* 移动端适配：屏幕太窄时隐藏左上角，或者缩小底部文字 */
@media (max-width: 600px) {
    #cosmic-whispers {
        width: 200px;
        left: 20px;
        font-size: 0.8rem;
    }
    #interaction-hint {
        font-size: 0.7rem;
        width: 80%;
        left: 10%;
        line-height: 1.5;
    }
}