:root {
    --accent: #bfa4ff;
    --font-main: 'Work Sans', sans-serif;
    --font-logo: 'Syncopate', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #0a0a0c; color: #fff; font-family: var(--font-main); overflow: hidden; }

/* Canvas 置于底层，但要保证能接收事件 */
#webgl-canvas { position: fixed; inset: 0; z-index: 1; transition: opacity 1.5s ease 0.5s; opacity: 0; outline: none; }

/* 首页 */
#landing-screen {
    position: fixed; inset: 0; z-index: 50; 
    background: radial-gradient(circle at center, #110e19 0%, #0a0a0c 100%);
    display: flex; justify-content: center; align-items: center;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s;
    pointer-events: auto;
}
.cyber-grid { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.15; background-image: linear-gradient(to right, #bfa4ff 1px, transparent 1px), linear-gradient(to bottom, #bfa4ff 1px, transparent 1px); background-size: 60px 60px; mask-image: radial-gradient(circle at center, black 20%, transparent 80%); -webkit-mask-image: radial-gradient(circle at center, black 20%, transparent 80%); }
.scanline { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(to bottom, transparent, rgba(191, 164, 255, 0.1), transparent); height: 15px; animation: scan 6s linear infinite; }
.ui-corner { position: absolute; width: 40px; height: 40px; border: 2px solid rgba(191, 164, 255, 0.3); z-index: 3; }
.top-left { top: 3rem; left: 3rem; border-right: none; border-bottom: none; }
.top-right { top: 3rem; right: 3rem; border-left: none; border-bottom: none; }
.bottom-left { bottom: 3rem; left: 3rem; border-right: none; border-top: none; }
.bottom-right { bottom: 3rem; right: 3rem; border-left: none; border-top: none; }
.landing-title { font-family: var(--font-logo); font-size: clamp(3rem, 8vw, 5rem); font-weight: 700; letter-spacing: 16px; color: #fff; text-shadow: 0 0 30px rgba(191, 164, 255, 0.4); margin-bottom: 1.5rem; line-height: 1.1; margin-right: -16px; }
.landing-line { width: 60px; height: 2px; background: var(--accent); margin: 0 auto 2.5rem; opacity: 0.5; }
.landing-subtitle { font-size: 0.75rem; letter-spacing: 8px; color: rgba(255,255,255,0.6); margin-bottom: 4.5rem; text-align: center; }
#enter-btn { background: rgba(191, 164, 255, 0.05); border: 1px solid rgba(191, 164, 255, 0.4); color: var(--accent); padding: 1.2rem 3rem; font-size: 0.7rem; letter-spacing: 4px; cursor: pointer; transition: all 0.4s ease; backdrop-filter: blur(5px); }
#enter-btn:hover { background: var(--accent); color: #000; box-shadow: 0 0 30px rgba(191, 164, 255, 0.4); transform: scale(1.02); }
.landing-footer-data { position: absolute; bottom: 3rem; left: 0; width: 100%; display: flex; justify-content: space-between; padding: 0 5rem; font-size: 0.55rem; letter-spacing: 4px; color: rgba(255,255,255,0.3); z-index: 10; }

/* 加载层 */
#loader { position: fixed; inset: 0; z-index: 80; background: #0a0a0c; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1.5rem; opacity: 0; visibility: hidden; transition: opacity 0.5s ease; }
.spinner { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,0.1); border-top: 1px solid var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
#loader span { font-size: 0.7rem; letter-spacing: 5px; color: var(--accent); animation: blink 1.5s infinite; }

/* 主界面 UI */
.specimen-interface {
    position: relative; z-index: 10; height: 100vh; padding: 3rem; 
    /* 🌟 核心修复：整个 UI 层禁止拦截点击，确保穿透到下方的 Canvas */
    pointer-events: none; 
    display: flex; flex-direction: column; justify-content: space-between;
    opacity: 0; transform: translateY(20px); transition: all 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 🌟 核心修复：只让具体的 UI 元素响应点击 */
.logo, .side-info, .interact-btn, .return-btn { pointer-events: auto; }

.top-bar { display: flex; justify-content: space-between; align-items: flex-start; }
.logo { font-family: var(--font-logo); font-weight: 700; font-size: 1.2rem; letter-spacing: 2px; }
.logo span { font-size: 0.6rem; vertical-align: super; font-weight: 400; opacity: 0.5; margin-left: 5px; }
.status { font-size: 0.6rem; letter-spacing: 2px; opacity: 0.7; }
.pulse { color: #00ffaa; animation: blink 1.5s infinite; }

.side-info { max-width: 380px; background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.1); padding: 2.5rem; border-radius: 24px; box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5); }
.tag { font-size: 0.6rem; letter-spacing: 3px; color: var(--accent); margin-bottom: 0.5rem; }
h1 { font-family: var(--font-logo); font-size: 2rem; margin-bottom: 1.5rem; line-height: 1.2; }
.line { width: 50px; height: 1px; background: var(--accent); margin-bottom: 2rem; }
.data-row { display: flex; justify-content: space-between; font-size: 0.65rem; letter-spacing: 1px; margin-bottom: 0.8rem; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 0.4rem; }
.data-row span:last-child { color: var(--accent); }
.desc { font-size: 0.85rem; line-height: 1.6; color: #aaa; margin: 1.5rem 0; }
.interact-btn { background: transparent; border: 1px solid var(--accent); color: #fff; padding: 0.8rem 1.5rem; font-size: 0.7rem; letter-spacing: 2px; cursor: pointer; transition: 0.3s; border-radius: 4px; margin-top: 1rem; width: 100%; }
.interact-btn:hover { background: var(--accent); color: #000; box-shadow: 0 0 20px rgba(191, 164, 255, 0.4); }
.return-btn { background: transparent; border: none; color: rgba(255,255,255,0.4); padding: 1rem 0 0 0; font-size: 0.6rem; letter-spacing: 2px; cursor: pointer; transition: 0.3s; width: 100%; text-decoration: underline; text-underline-offset: 4px; }
.return-btn:hover { color: var(--accent); }
.bottom-nav { text-align: center; font-size: 0.6rem; letter-spacing: 3px; opacity: 0.3; }

/* 状态切换 */
body.hide-landing #landing-screen { opacity: 0; visibility: hidden; pointer-events: none; }
body.show-loader #loader { opacity: 1; visibility: visible; }
body.system-active #webgl-canvas { opacity: 1; pointer-events: auto; }
body.system-active .specimen-interface { opacity: 1; transform: translateY(0); }
body.system-active #landing-screen { display: none; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes scan { 0% { transform: translateY(-100vh); } 100% { transform: translateY(100vh); } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- 首页内容区强力居中 --- */
#landing-screen {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important; /* 垂直居中 */
    align-items: center !important;     /* 水平居中 */
    text-align: center !important;
}

/* --- 移除可能导致偏移的包裹层限制 --- */
.landing-content, .enter-system {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* --- 按钮精准居中修正 --- */
#enter-btn {
    display: inline-block !important;
    margin: 0 auto !important;
    /* 核心：由于你设置了 4px 的字间距，必须加上 text-indent 抵消右侧多出的 4px，否则视觉上会偏左 */
    letter-spacing: 4px !important;
    text-indent: 4px !important; 
    
    /* 保持你的基础样式 */
    padding: 1.2rem 3rem !important;
    cursor: pointer;
}

/* --- 追踪模式 (Focus Mode) 的 UI 变化 --- */
body.focus-active .side-info {
    background: rgba(191, 164, 255, 0.05);
    border-color: rgba(191, 164, 255, 0.4);
    box-shadow: 0 0 30px rgba(191, 164, 255, 0.1);
    transition: all 0.5s ease;
}

body.focus-active .data-row,
body.focus-active .desc-container {
    opacity: 0.5 !important; /* 让描述文字变暗，视线集中在模型上 */
}

/* 追踪模式下改变按钮样式 */
body.focus-active .interact-btn {
    background: rgba(191, 164, 255, 0.2);
    border-color: #fff;
    color: #fff;
    animation: blink 2s infinite; /* 按钮呼吸闪烁，提示用户点击即可重置 */
}

/* 隐藏底部滚动提示，因为该模式下禁用了鼠标控制 */
body.focus-active .bottom-nav {
    opacity: 0 !important;
}

/* --- 模型切换遮罩 --- */
.switch-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* 激活遮罩时的状态 */
.switch-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* 扫描线动画 */
.scan-bar {
    width: 100%;
    height: 2px;
    background: #bfa4ff;
    box-shadow: 0 0 20px #bfa4ff;
    position: absolute;
    top: -10%;
    animation: scanMove 0.8s linear infinite;
}

@keyframes scanMove {
    0% { top: 0%; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.loader-text {
    font-size: 14px;
    letter-spacing: 4px;
    color: #bfa4ff;
    text-shadow: 0 0 10px rgba(191, 164, 255, 0.5);
    margin-top: 20px;
}