SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>夏以昼 · 全球资产查询终端</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
        }

        body {
            background: #0a0612;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 16px;
            position: relative;
            overflow-x: hidden;
        }

        /* 橙紫双色权势背景 */
        body::before {
            content: '';
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: 
                radial-gradient(ellipse at 15% 15%, rgba(255, 94, 0, 0.18) 0%, transparent 55%),
                radial-gradient(ellipse at 85% 85%, rgba(140, 40, 255, 0.22) 0%, transparent 60%),
                radial-gradient(ellipse at 50% 40%, #1a0e2c 0%, #07030c 100%);
            z-index: -2;
        }

        body::after {
            content: '';
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background-image: 
                repeating-linear-gradient(120deg, rgba(255, 140, 0, 0.025) 0px, rgba(255, 140, 0, 0.025) 1px, 
                                          transparent 1px, transparent 90px),
                repeating-linear-gradient(60deg, rgba(160, 80, 255, 0.025) 0px, rgba(160, 80, 255, 0.025) 1px, 
                                          transparent 1px, transparent 90px);
            z-index: -1;
            pointer-events: none;
            animation: bgShift 28s linear infinite;
        }

        @keyframes bgShift {
            0% { background-position: 0 0, 0 0; }
            100% { background-position: 180px 180px, -180px 180px; }
        }

        /* 主终端 */
        .terminal {
            width: 100%;
            max-width: 920px;
            background: rgba(10, 5, 18, 0.9);
            border: 1px solid rgba(200, 100, 255, 0.3);
            border-radius: 26px;
            box-shadow: 
                0 0 0 1px rgba(255, 140, 0, 0.12),
                0 30px 70px rgba(0, 0, 0, 0.85),
                0 0 90px rgba(150, 50, 255, 0.18) inset,
                0 0 70px rgba(255, 100, 0, 0.08) inset;
            backdrop-filter: blur(6px);
            padding: 32px 34px 28px;
            position: relative;
            z-index: 5;
            transition: box-shadow 0.4s;
        }

        .terminal:hover {
            box-shadow: 
                0 0 0 1px rgba(255, 160, 0, 0.2),
                0 30px 70px rgba(0, 0, 0, 0.85),
                0 0 110px rgba(160, 60, 255, 0.25) inset,
                0 0 80px rgba(255, 110, 0, 0.12) inset;
        }

        /* 顶部装饰条: 橙紫渐变 */
        .terminal::before {
            content: '';
            position: absolute;
            top: 14px; left: 34px; right: 34px;
            height: 2px;
            background: linear-gradient(90deg, #ff6a00, #c04dff, #ff8a2b, #a64dff, #ff6a00);
            background-size: 200% 100%;
            border-radius: 4px;
            filter: blur(0.4px);
            animation: gradientSlide 6s linear infinite;
            box-shadow: 0 0 14px rgba(200, 90, 255, 0.5);
        }

        @keyframes gradientSlide {
            0% { background-position: 0% 0; }
            100% { background-position: 200% 0; }
        }

        /* 头部 */
        .header {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            margin-bottom: 30px;
            margin-top: 10px;
            border-bottom: 1px solid rgba(170, 80, 255, 0.25);
            padding-bottom: 18px;
        }

        .header h1 {
            font-size: 1.95rem;
            font-weight: 700;
            letter-spacing: 5px;
            color: #ffd9b0;
            text-shadow: 
                0 0 10px rgba(255, 140, 0, 0.8),
                0 0 28px rgba(180, 70, 255, 0.7),
                0 0 60px rgba(120, 40, 200, 0.4);
            text-transform: uppercase;
        }

        .header .badge {
            color: #e3b0ff;
            font-size: 0.78rem;
            letter-spacing: 3px;
            background: rgba(60, 20, 90, 0.6);
            padding: 5px 14px;
            border-radius: 30px;
            border: 1px solid rgba(220, 130, 255, 0.4);
            box-shadow: 0 0 16px rgba(180, 70, 255, 0.3);
            text-transform: uppercase;
        }

        /* 阶段容器 */
        .stage {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .hidden {
            display: none !important;
        }

        /* 输入框标签 */
        label {
            color: #d4a0e0;
            font-size: 0.85rem;
            letter-spacing: 3px;
            text-transform: uppercase;
            margin-bottom: 8px;
            display: block;
            text-shadow: 0 0 10px rgba(200, 100, 255, 0.4);
        }

        .input-group {
            display: flex;
            flex-direction: column;
        }

        input {
            background: rgba(20, 8, 30, 0.9);
            border: 1px solid rgba(190, 100, 255, 0.35);
            border-radius: 60px;
            padding: 18px 26px;
            font-size: 1.25rem;
            color: #ffe5c8;
            letter-spacing: 1.5px;
            outline: none;
            transition: all 0.25s;
            box-shadow: 0 0 22px rgba(120, 40, 200, 0.15) inset, 0 0 8px rgba(255, 120, 0, 0.08);
        }

        input:focus {
            border-color: #ffa04d;
            box-shadow: 
                0 0 30px rgba(255, 130, 0, 0.35), 
                0 0 18px rgba(180, 70, 255, 0.4) inset,
                0 0 8px rgba(255, 160, 0, 0.2) inset;
            background: rgba(30, 12, 45, 0.95);
        }

        input::placeholder {
            color: #7d5a8a;
            font-style: italic;
            letter-spacing: 1px;
            font-size: 1rem;
        }

        .btn {
            background: linear-gradient(145deg, #2b0e3a, #170720);
            border: 1px solid rgba(220, 120, 255, 0.5);
            border-radius: 60px;
            color: #ffe0b8;
            padding: 18px 28px;
            font-size: 1.15rem;
            font-weight: 700;
            letter-spacing: 5px;
            text-transform: uppercase;
            cursor: pointer;
            transition: all 0.25s;
            box-shadow: 
                0 9px 0 #0b0311,
                0 0 28px rgba(190, 70, 255, 0.35),
                0 0 18px rgba(255, 130, 0, 0.25);
            margin-top: 8px;
            text-shadow: 0 0 10px rgba(255, 160, 0, 0.7);
        }

        .btn:hover {
            background: linear-gradient(145deg, #3d154c, #200a2e);
            border-color: #ffb066;
            box-shadow: 
                0 9px 0 #0b0311,
                0 0 45px rgba(220, 100, 255, 0.55),
                0 0 30px rgba(255, 140, 0, 0.45);
            color: #fff2e0;
        }

        .btn:active {
            transform: translateY(5px);
            box-shadow: 
                0 4px 0 #0b0311,
                0 0 35px rgba(220, 100, 255, 0.7),
                0 0 25px rgba(255, 150, 0, 0.5);
        }

        .btn-secondary {
            background: rgba(18, 8, 26, 0.85);
            border-color: rgba(190, 100, 255, 0.35);
            box-shadow: 0 5px 0 #0b0311, 0 0 20px rgba(140, 50, 220, 0.25);
            font-size: 0.9rem;
            padding: 14px 22px;
            letter-spacing: 3px;
        }

        .btn-secondary:hover {
            background: rgba(32, 14, 44, 0.95);
            border-color: #ff9f4d;
            box-shadow: 0 5px 0 #0b0311, 0 0 32px rgba(255, 130, 0, 0.4);
        }

        /* 加载动画 */
        .loading-box {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 50px 20px;
            background: rgba(12, 5, 20, 0.85);
            border-radius: 32px;
            border: 1px solid rgba(170, 80, 255, 0.35);
            box-shadow: 0 0 50px rgba(140, 50, 220, 0.25) inset, 0 0 30px rgba(255, 100, 0, 0.1);
        }

        .spinner {
            width: 80px;
            height: 80px;
            border: 3px solid rgba(160, 70, 255, 0.2);
            border-top: 3px solid #ffa03c;
            border-right: 3px solid #b44dff;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 28px;
            box-shadow: 0 0 40px rgba(180, 70, 255, 0.5), 0 0 20px rgba(255, 130, 0, 0.4);
            filter: drop-shadow(0 0 8px rgba(255, 150, 0, 0.5));
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .loading-text {
            color: #e0b8ff;
            font-size: 1.25rem;
            letter-spacing: 6px;
            text-transform: uppercase;
            animation: pulseGlow 1.8s infinite;
            text-shadow: 0 0 20px rgba(200, 100, 255, 0.8);
        }

        @keyframes pulseGlow {
            0%, 100% { opacity: 0.65; text-shadow: 0 0 12px rgba(200, 100, 255, 0.5); }
            50% { opacity: 1; text-shadow: 0 0 35px rgba(255, 140, 0, 0.8), 0 0 20px rgba(180, 70, 255, 0.9); }
        }

        /* 机密确认面板 */
        .confirm-box {
            display: flex;
            flex-direction: column;
            gap: 22px;
            background: rgba(14, 6, 22, 0.9);
            border: 1px solid rgba(200, 100, 255, 0.45);
            border-radius: 32px;
            padding: 34px 30px;
            box-shadow: 
                0 0 60px rgba(120, 40, 180, 0.3) inset,
                0 0 40px rgba(255, 100, 0, 0.15) inset,
                0 10px 30px rgba(0, 0, 0, 0.7);
        }

        .warning-icon {
            color: #ffaa50;
            font-size: 2.4rem;
            text-align: center;
            letter-spacing: 10px;
            text-shadow: 0 0 30px #ff8a00, 0 0 20px #b44dff;
            margin-bottom: 4px;
            animation: iconPulse 1.6s infinite alternate;
        }

        @keyframes iconPulse {
            0% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(255, 140, 0, 0.6)); }
            100% { transform: scale(1.03); filter: drop-shadow(0 0 22px rgba(200, 100, 255, 0.9)); }
        }

        .confirm-title {
            color: #ffd6ae;
            text-align: center;
            font-size: 1.5rem;
            letter-spacing: 8px;
            text-transform: uppercase;
            border-bottom: 1px dashed rgba(190, 100, 255, 0.45);
            padding-bottom: 18px;
            text-shadow: 0 0 20px rgba(255, 130, 0, 0.7);
        }

        .confirm-hint {
            color: #c69ad4;
            text-align: center;
            font-size: 0.9rem;
            letter-spacing: 3px;
            margin-top: -12px;
        }

        /* 资产列表 */
        .assets-container {
            background: rgba(8, 3, 14, 0.9);
            border: 1px solid rgba(180, 80, 255, 0.4);
            border-radius: 28px;
            padding: 24px 22px;
            box-shadow: 
                0 0 40px rgba(110, 40, 170, 0.3) inset,
                0 0 30px rgba(255, 100, 0, 0.1),
                0 15px 30px rgba(0, 0, 0, 0.6);
        }

        .terminal-header-line {
            display: flex;
            justify-content: space-between;
            color: #dbb0ff;
            font-size: 0.8rem;
            letter-spacing: 3px;
            padding-bottom: 16px;
            border-bottom: 1px solid rgba(190, 100, 255, 0.35);
            margin-bottom: 18px;
            text-transform: uppercase;
            text-shadow: 0 0 12px rgba(180, 70, 255, 0.5);
        }

        .asset-table {
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-height: 360px;
            overflow-y: auto;
            padding-right: 8px;
        }

        .asset-table::-webkit-scrollbar {
            width: 6px;
        }

        .asset-table::-webkit-scrollbar-track {
            background: rgba(30, 12, 44, 0.6);
            border-radius: 10px;
        }

        .asset-table::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #b44dff, #ff7a1a);
            border-radius: 10px;
            border: 1px solid rgba(255, 180, 0, 0.4);
        }

        .asset-row {
            display: grid;
            grid-template-columns: 2fr 1.2fr 1.8fr;
            align-items: center;
            padding: 14px 18px;
            background: rgba(18, 8, 26, 0.85);
            border-radius: 18px;
            border: 1px solid rgba(140, 60, 200, 0.4);
            transition: all 0.25s;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
        }

        .asset-row:hover {
            background: rgba(32, 14, 46, 0.95);
            border-color: #ffa040;
            box-shadow: 
                0 0 25px rgba(200, 90, 255, 0.5),
                0 0 15px rgba(255, 130, 0, 0.3);
            transform: translateX(4px);
        }

        .asset-name {
            color: #f2d2ff;
            font-weight: 700;
            letter-spacing: 0.8px;
            font-size: 1rem;
            text-shadow: 0 0 8px rgba(200, 100, 255, 0.6);
        }

        .asset-ticker {
            color: #b07bd0;
            font-size: 0.78rem;
            letter-spacing: 2px;
            text-transform: uppercase;
            text-shadow: 0 0 6px rgba(180, 70, 255, 0.5);
        }

        .asset-value {
            text-align: right;
            color: #ffdbb0;
            font-weight: 700;
            font-size: 1.15rem;
            letter-spacing: 1.5px;
            text-shadow: 0 0 12px rgba(255, 140, 0, 0.8), 0 0 8px rgba(180, 70, 255, 0.5);
            font-variant-numeric: tabular-nums;
            transition: color 0.2s;
        }

        .asset-change {
            font-size: 0.78rem;
            color: #ff9b5a;
            text-align: left;
            display: block;
            font-weight: 600;
            text-shadow: 0 0 8px rgba(255, 120, 0, 0.6);
            letter-spacing: 0.5px;
        }

        .total-value {
            margin-top: 22px;
            padding-top: 20px;
            border-top: 1px solid rgba(190, 100, 255, 0.45);
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            color: #d4a0e8;
            font-size: 0.95rem;
            letter-spacing: 3px;
            text-transform: uppercase;
        }

        .total-amount {
            color: #fff0d0;
            font-size: 1.9rem;
            font-weight: 800;
            text-shadow: 
                0 0 20px #ff8a00, 
                0 0 35px rgba(180, 70, 255, 0.9),
                0 0 60px rgba(255, 100, 0, 0.5);
            font-variant-numeric: tabular-nums;
            letter-spacing: 2px;
        }

        .footer-note {
            margin-top: 18px;
            font-size: 0.68rem;
            color: #6a4a78;
            text-align: center;
            letter-spacing: 3px;
            text-transform: uppercase;
        }

        /* 控制行 */
        .action-row {
            display: flex;
            justify-content: flex-end;
            margin-top: 16px;
            gap: 12px;
        }
    </style>
</head>
<body>
    <div class="terminal">
        <div class="header">
            <h1>夏以昼 · 资产终端</h1>
            <div class="badge">GLOBAL ASSET</div>
        </div>

        <!-- 阶段1:输入姓名 -->
        <div id="stageName" class="stage">
            <div class="input-group">
                <label>▸ 身份识别 · 输入姓名</label>
                <input type="text" id="nameInput" placeholder="输入授权姓名" autocomplete="off" value="夏以昼">
            </div>
            <button class="btn" id="proceedBtn">访问数据库</button>
        </div>

        <!-- 阶段2:加载中 -->
        <div id="stageLoading" class="stage hidden">
            <div class="loading-box">
                <div class="spinner"></div>
                <div class="loading-text">量子加密链路建立中 ···</div>
            </div>
        </div>

        <!-- 阶段3:机密确认 + 密码 -->
        <div id="stageConfirm" class="stage hidden">
            <div class="confirm-box">
                <div class="warning-icon">⛔</div>
                <div class="confirm-title">机密层级 · 欧米伽</div>
                <div class="confirm-hint">需二级授权密码 (6位数字)</div>
                <input type="password" id="passwordInput" inputmode="numeric" placeholder="· · · · · ·" maxlength="6" style="text-align: center; letter-spacing: 12px; font-size: 1.7rem;">
                <button class="btn" id="verifyBtn">验证并解锁</button>
                <div id="pwdError" style="color: #ff8a6b; text-align: center; font-size: 0.85rem; letter-spacing: 2px; min-height: 24px;"></div>
            </div>
        </div>

        <!-- 阶段4:资产列表 -->
        <div id="stageAssets" class="stage hidden">
            <div class="assets-container">
                <div class="terminal-header-line">
                    <span>资产标的</span>
                    <span>代码</span>
                    <span style="text-align: right;">估值 (USD)</span>
                </div>
                <div class="asset-table" id="assetTable">
                    <!-- 动态渲染 -->
                </div>
                <div class="total-value">
                    <span>总资产净值</span>
                    <span class="total-amount" id="totalAmount">$ 0</span>
                </div>
            </div>
            <div class="action-row">
                <button class="btn btn-secondary" id="refreshBtn">⟳ 刷新行情</button>
            </div>
        </div>

        <div class="footer-note">加密终端 · 夏以昼专属 · 量子加密信道</div>
    </div>

    <script>
        (function(){
            // ---------- 阶段元素 ----------
            const stageName = document.getElementById('stageName');
            const stageLoading = document.getElementById('stageLoading');
            const stageConfirm = document.getElementById('stageConfirm');
            const stageAssets = document.getElementById('stageAssets');

            const nameInput = document.getElementById('nameInput');
            const proceedBtn = document.getElementById('proceedBtn');
            const passwordInput = document.getElementById('passwordInput');
            const verifyBtn = document.getElementById('verifyBtn');
            const pwdError = document.getElementById('pwdError');
            const assetTable = document.getElementById('assetTable');
            const totalAmountSpan = document.getElementById('totalAmount');
            const refreshBtn = document.getElementById('refreshBtn');

            // 正确密码 & 授权姓名
            const CORRECT_PASSWORD = '613115';
            const AUTHORIZED_NAME = '夏以昼';

            // 资产数据 (橙紫权势风格: 能源、科技、地产、金融、贵金属)
            const assets = [
                { name: '星环能源控股', ticker: 'OR-ENERGY', baseValue: 42800000, dynamicFactor: 0.0024 },
                { name: '极光科技集团', ticker: 'AU-TECH', baseValue: 31700000, dynamicFactor: 0.0028 },
                { name: '紫金矿业信托', ticker: 'PZ-MINING', baseValue: 25600000, dynamicFactor: 0.0020 },
                { name: '橙岸地产基金', ticker: 'OC-REALTY', baseValue: 59400000, dynamicFactor: 0.0015 },
                { name: '新纪元私募股权', ticker: 'NE-PE', baseValue: 18900000, dynamicFactor: 0.0030 },
                { name: '皇家离岸银行', ticker: 'RY-BANK', baseValue: 71200000, dynamicFactor: 0.0011 },
                { name: '量子通信实验室', ticker: 'QT-LABS', baseValue: 14600000, dynamicFactor: 0.0035 },
                { name: '太阳风能源', ticker: 'SW-ENERGY', baseValue: 22800000, dynamicFactor: 0.0022 },
                { name: '琥珀金条储备', ticker: 'AM-GOLD', baseValue: 38500000, dynamicFactor: 0.0019 },
                { name: '极昼医疗基金', ticker: 'PD-MED', baseValue: 16700000, dynamicFactor: 0.0026 }
            ];

            // 当前值数组 (动态)
            let currentValues = [];
            // 定时器
            let updateInterval = null;
            let refreshInterval = null;

            // 初始化当前值
            function initCurrentValues() {
                currentValues = assets.map(a => a.baseValue);
            }
            initCurrentValues();

            // 格式化货币
            function formatMoney(value) {
                return value.toLocaleString('en-US', { 
                    style: 'currency', 
                    currency: 'USD', 
                    minimumFractionDigits: 0,
                    maximumFractionDigits: 0 
                });
            }

            // 计算总资产
            function calcTotal() {
                return currentValues.reduce((sum, v) => sum + v, 0);
            }

            // 更新总资产
            function updateTotalDisplay() {
                const total = calcTotal();
                totalAmountSpan.textContent = formatMoney(total);
            }

            // 渲染表格
            function renderAssets() {
                if (!assetTable) return;
                
                let html = '';
                for (let i = 0; i < assets.length; i++) {
                    const asset = assets[i];
                    const value = currentValues[i];
                    // 随机上涨百分比用于展示 (0.4% ~ 2.8%)
                    const changePercent = (Math.random() * 2.4 + 0.4).toFixed(2);
                    html += `
                        <div class="asset-row" data-index="${i}">
                            <div>
                                <div class="asset-name">${asset.name}</div>
                                <span class="asset-change">+${changePercent}%</span>
                            </div>
                            <div class="asset-ticker">${asset.ticker}</div>
                            <div class="asset-value" data-index="${i}">${formatMoney(value)}</div>
                        </div>
                    `;
                }
                assetTable.innerHTML = html;
                updateTotalDisplay();
            }

            // 持续上涨函数 (每个资产按各自因子增长)
            function tickUp() {
                let changed = false;
                for (let i = 0; i < currentValues.length; i++) {
                    const factor = assets[i].dynamicFactor || 0.002;
                    // 保证上涨: 0.01% ~ 0.12% 左右
                    const baseRate = 0.0001 + factor * 0.008;  // 调整到可见上涨
                    const randomExtra = Math.random() * 0.0006;
                    const increment = currentValues[i] * (baseRate + randomExtra);
                    // 最小涨幅确保总是涨
                    const positiveIncrement = Math.max(increment, currentValues[i] * 0.00006);
                    currentValues[i] += positiveIncrement;
                    changed = true;
                }
                
                if (changed) {
                    // 更新所有asset-value
                    const valueElements = document.querySelectorAll('.asset-value');
                    valueElements.forEach((el, idx) => {
                        if (idx < currentValues.length) {
                            el.textContent = formatMoney(currentValues[idx]);
                        }
                    });
                    // 更新变化百分比展示
                    const changeSpans = document.querySelectorAll('.asset-change');
                    changeSpans.forEach((span) => {
                        const newChange = (Math.random() * 2.8 + 0.5).toFixed(2);
                        span.textContent = `+${newChange}%`;
                    });
                    updateTotalDisplay();
                }
            }

            // 停止所有定时器
            function stopAllIntervals() {
                if (updateInterval) {
                    clearInterval(updateInterval);
                    updateInterval = null;
                }
                if (refreshInterval) {
                    clearInterval(refreshInterval);
                    refreshInterval = null;
                }
            }

            // 启动上涨
            function startUpdating() {
                if (updateInterval) clearInterval(updateInterval);
                updateInterval = setInterval(tickUp, 380);
            }

            // 显示资产阶段
            function showAssetsStage() {
                // 隐藏其他阶段
                stageName.classList.add('hidden');
                stageLoading.classList.add('hidden');
                stageConfirm.classList.add('hidden');
                stageAssets.classList.remove('hidden');

                // 重置资产数据 (基于baseValue,微小随机偏移)
                initCurrentValues();
                currentValues = currentValues.map(v => v * (0.99 + Math.random() * 0.02));

                renderAssets();
                startUpdating(); // 开始不断上涨
            }

            // 重置到姓名阶段 (保留,未直接使用但提供重置可能)
            function resetToNameStage() {
                stopAllIntervals();
                stageName.classList.remove('hidden');
                stageLoading.classList.add('hidden');
                stageConfirm.classList.add('hidden');
                stageAssets.classList.add('hidden');
                pwdError.textContent = '';
                passwordInput.value = '';
                nameInput.value = AUTHORIZED_NAME;
            }

            // ---------- 事件绑定 ----------
            // 第一步: 访问数据库
            proceedBtn.addEventListener('click', function() {
                const enteredName = nameInput.value.trim();
                if (!enteredName) {
                    alert('请输入授权姓名');
                    return;
                }
                // 姓名匹配 (忽略大小写)
                if (enteredName.toLowerCase() !== AUTHORIZED_NAME.toLowerCase()) {
                    alert('身份未授权 · 无法访问终端');
                    return;
                }

                // 显示加载阶段
                stageName.classList.add('hidden');
                stageLoading.classList.remove('hidden');
                stageConfirm.classList.add('hidden');
                stageAssets.classList.add('hidden');

                // 2.2秒后进入机密确认
                setTimeout(() => {
                    stageLoading.classList.add('hidden');
                    stageConfirm.classList.remove('hidden');
                    passwordInput.focus();
                }, 2200);
            });

            // 姓名框回车触发
            nameInput.addEventListener('keypress', (e) => {
                if (e.key === 'Enter') {
                    e.preventDefault();
                    proceedBtn.click();
                }
            });

            // 第二步: 验证密码
            verifyBtn.addEventListener('click', function() {
                const enteredPwd = passwordInput.value.trim();
                if (enteredPwd === CORRECT_PASSWORD) {
                    // 密码正确
                    pwdError.textContent = '';
                    showAssetsStage();
                } else {
                    pwdError.textContent = '⚠ 密码错误 · 拒绝访问';
                    passwordInput.value = '';
                    passwordInput.focus();
                }
            });

            // 密码框回车触发验证
            passwordInput.addEventListener('keypress', (e) => {
                if (e.key === 'Enter') {
                    e.preventDefault();
                    verifyBtn.click();
                }
            });

            // 刷新行情按钮: 重置资产值,重新开始上涨
            refreshBtn.addEventListener('click', function() {
                // 重置资产为baseValue加上微小的随机偏移
                currentValues = assets.map(a => a.baseValue * (0.995 + Math.random() * 0.01));
                renderAssets();
                // 重新启动上涨 (清除旧的)
                if (updateInterval) {
                    clearInterval(updateInterval);
                }
                startUpdating();
            });

            // 限制密码输入为6位数字
            passwordInput.addEventListener('input', function(e) {
                this.value = this.value.replace(/\D/g, '').slice(0, 6);
            });

            // 卸载时清理定时器
            window.addEventListener('beforeunload', function() {
                stopAllIntervals();
            });

            // 初始化: 隐藏其他阶段,显示姓名阶段
            stageLoading.classList.add('hidden');
            stageConfirm.classList.add('hidden');
            stageAssets.classList.add('hidden');
            pwdError.textContent = '';

            // 预填充姓名 (已通过value属性设置)
        })();
    </script>
</body>
</html>