
    @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
    * { margin: 0; padding: 0; box-sizing: border-box; }
    body { font-family: 'Inter', system-ui, sans-serif; background: #0f121e; color: #e2e8f0; min-height: 100vh; }

    /* Header */
    .header { background: rgba(15,18,30,0.9); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(139,92,246,0.1); padding: 16px 32px; display: flex; align-items: center; justify-content: space-between; }
    .header-left { display: flex; align-items: center; gap: 32px; }
    .brand { display: flex; align-items: center; gap: 10px; }
    .brand-icon { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #8b5cf6, #6366f1); display: flex; align-items: center; justify-content: center; font-size: 16px; }
    .brand-name { font-size: 18px; font-weight: 700; background: linear-gradient(135deg, #8b5cf6, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
    .nav { display: flex; gap: 24px; }
    .nav a, .nav span { color: #64748b; text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; cursor: pointer; }
    .nav a:hover, .nav span:hover, .nav .active { color: #e2e8f0; }
    .header-right { display: flex; align-items: center; gap: 12px; }
    .lang-toggle { background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.3); padding: 5px 14px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; transition: all 0.2s; user-select: none; display: flex; align-items: center; gap: 6px; }
    .lang-toggle:hover { background: rgba(139,92,246,0.2); border-color: rgba(139,92,246,0.5); box-shadow: 0 0 12px rgba(139,92,246,0.2); }
    .lang-toggle .lang-active { color: #a78bfa; }
    .lang-toggle .lang-inactive { color: #475569; }
    .lang-toggle .lang-sep { color: #334155; }
    .connect-btn { background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #fff; border: none; padding: 9px 22px; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 13px; transition: all 0.3s; }
    .connect-btn:hover { box-shadow: 0 0 20px rgba(139,92,246,0.35); transform: translateY(-1px); }
    .connect-btn.connected { background: linear-gradient(135deg, #10b981, #059669); }
    .badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; }
    .badge-purple { background: rgba(139,92,246,0.15); color: #a78bfa; }
    .badge-green { background: rgba(16,185,129,0.15); color: #34d399; }

    .container { max-width: 1400px; margin: 0 auto; padding: 24px 32px; }

    /* Top Metrics */
    .metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
    .metric-card { background: #161b2e; border: 1px solid rgba(139,92,246,0.08); border-radius: 12px; padding: 16px; transition: all 0.3s; height: 96px; }
    .metric-card:hover { border-color: rgba(139,92,246,0.2); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
    .metric-card .label { color: #64748b; font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
    .metric-card .value { font-size: 22px; font-weight: 700; color: #f1f5f9; }
    .metric-card .trend { margin-top: 4px; font-size: 11px; display: flex; align-items: center; gap: 4px; }
    .metric-card .trend.up { color: #34d399; }
    .metric-card .trend.down { color: #f87171; }

    /* Main Layout: Left + Right */
    .main { display: none; grid-template-columns: 2fr 1fr; gap: 24px; align-items: stretch; height: 620px; }
    /* 滚动条样式 */
    .agent-grid::-webkit-scrollbar, .tx-list::-webkit-scrollbar { width: 6px; margin-left: 4px; }
    .agent-grid::-webkit-scrollbar-track, .tx-list::-webkit-scrollbar-track { background: #0f121e; border-radius: 3px; margin: 4px; }
    .agent-grid::-webkit-scrollbar-thumb, .tx-list::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 3px; border: 2px solid transparent; background-clip: content-box; }
    .agent-grid::-webkit-scrollbar-thumb:hover, .tx-list::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.5); }
    /* 全局滚动条 - 细+同色系 */
    *::-webkit-scrollbar { width: 4px; height: 4px; }
    *::-webkit-scrollbar-track { background: transparent; }
    *::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.2); border-radius: 2px; }
    *::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.4); }
    @media (max-width: 900px) { .main { grid-template-columns: 1fr; } }

    /* 我的 Agent 面板（连钱包后显示） */
    .my-agent { display: none; background: #161b2e; border: 1px solid rgba(139,92,246,0.08); border-radius: 12px; padding: 20px; margin-bottom: 24px; }
    .my-agent.show { display: block; }
    .my-agent-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
    .my-agent-header .icon { font-size: 32px; }
    .my-agent-header h2 { color: #a78bfa; font-size: 18px; margin-bottom: 6px; }
    .my-agent-header .addr { color: #64748b; font-size: 12px; font-family: monospace; }
    .my-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
    .stat-card { background: #0f121e; border: 1px solid rgba(139,92,246,0.06); border-radius: 12px; padding: 16px; text-align: center; transition: all 0.3s; }
    .stat-card:hover { border-color: rgba(139,92,246,0.2); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
    .stat-card .label { color: #64748b; font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
    .stat-card .value { color: #a78bfa; font-size: 20px; font-weight: 700; font-family: 'SF Mono', monospace; }
    .stat-card .value.green { color: #34d399; }

    /* 支付成功弹窗 */
    .success-modal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:999; }
    .success-modal .card { max-width:560px; margin:80px auto; background:#161b2e; border-radius:16px; padding:30px; border:1px solid #34d399; }
    .progress-modal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:1000; }
    .progress-modal .card { max-width:720px; margin:60px auto; background:#161b2e; border-radius:16px; padding:28px; border:1px solid rgba(139,92,246,0.3); }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
    .success-modal .card { animation: fadeIn 0.3s ease-out; }
    .progress-modal .card { animation: fadeIn 0.3s ease-out; }
    .tx-hash-link { display: inline-flex; align-items: center; gap: 6px; color: #8b5cf6; font-family: monospace; font-size: 13px; word-break: break-all; }
    .tx-hash-link:hover { text-decoration: underline; }

    /* 状态指示器 */
    .status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
    .status-dot.pending { background: #fbbf24; animation: pulse 1.5s infinite; }
    .status-dot.confirmed { background: #34d399; }
    .status-dot.failed { background: #f87171; }
    @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

    /* 我的消费记录 */
    .my-tx-section { display: none; }
    .my-tx-section.show { display: block; }

    /* 公开市场 */
    .market-section { display: block; }

    /* Section Header */
    .section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
    .section-title { font-size: 16px; font-weight: 600; color: #e2e8f0; display: flex; align-items: center; gap: 8px; }
    .section-title .icon { font-size: 18px; }
    .filter-pills { display: flex; gap: 6px; }
    .pill { padding: 5px 14px; border-radius: 8px; font-size: 12px; cursor: pointer; color: #64748b; background: transparent; border: 1px solid rgba(100,116,139,0.2); transition: all 0.2s; }
    .pill.active { color: #a78bfa; background: rgba(139,92,246,0.1); border-color: rgba(139,92,246,0.3); }
    .pill:hover:not(.active) { color: #94a3b8; border-color: rgba(100,116,139,0.4); }

    /* Agent Cards Grid */
    .agent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-items: start; min-height: 0; overflow-y: auto; padding-right: 8px; }
    @media (min-width: 1400px) { .agent-grid { grid-template-columns: repeat(3, 1fr); } }
    .agent-card { background: #161b2e; border: 1px solid rgba(139,92,246,0.06); border-radius: 12px; padding: 12px; transition: all 0.3s; display: flex; flex-direction: column; }
    .agent-card:hover { border-color: rgba(139,92,246,0.2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
    .agent-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
    .agent-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
    .agent-icon.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
    .agent-icon.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
    .agent-icon.cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }
    .agent-icon.green { background: linear-gradient(135deg, #10b981, #059669); }
    .agent-icon.amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
    .agent-price { font-size: 12px; font-weight: 600; color: #34d399; font-family: 'SF Mono', monospace; margin-left: auto; }
    .agent-name { font-size: 13px; font-weight: 600; color: #f1f5f9; margin-bottom: 7px; }
    .agent-desc { font-size: 12px; color: #64748b; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; flex: 1; margin-bottom: 4px; word-break: break-all; }
    .agent-footer { display: flex; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px solid rgba(100,116,139,0.1); flex-shrink: 0; }
    .agent-meta { display: flex; align-items: center; gap: 3px; font-size: 11px; color: #64748b; }
    .agent-meta .star { color: #fbbf24; }
    .agent-buy-btn { margin-left: auto; background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: #fff; border: none; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap; line-height: 1.2; }
    .agent-buy-btn:hover { box-shadow: 0 0 12px rgba(139,92,246,0.4); }

    /* 交易记录面板 (右侧) */
    .tx-panel { background: #161b2e; border: 1px solid rgba(139,92,246,0.06); border-radius: 12px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
    .tx-panel .section-header { margin-bottom: 16px; }
    .tx-list { flex: 1; display: flex; flex-direction: column; gap: 0; overflow-y: auto; }
    .tx-item { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-radius: 8px; transition: background 0.2s; }
    .tx-item:hover { background: rgba(139,92,246,0.04); }
    .tx-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
    .tx-icon.in { background: rgba(16,185,129,0.12); }
    .tx-icon.out { background: rgba(139,92,246,0.12); }
    .tx-info { flex: 1; min-width: 0; }
    .tx-info .flow { font-size: 12px; color: #e2e8f0; font-weight: 500; }
    .tx-info .reason { font-size: 10px; color: #64748b; margin-top: 2px; }
    .tx-amount { text-align: right; }
    .tx-amount .val { font-size: 12px; font-weight: 600; font-family: 'SF Mono', monospace; }
    .tx-amount .val.pos { color: #34d399; }
    .tx-amount .val.neg { color: #f87171; }
    .tx-amount .time { font-size: 10px; color: #475569; margin-top: 2px; }

    .view-all { text-align: center; margin-top: 12px; }
    .view-all a { color: #8b5cf6; font-size: 12px; text-decoration: none; font-weight: 500; }
    .view-all a:hover { text-decoration: underline; }

    /* 旧的交易表格 (公开交易) */
    .txs { background: #161b2e; border: 1px solid rgba(139,92,246,0.06); border-radius: 14px; padding: 16px; }
    .tx-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
    .tx-table th { text-align: left; color: #64748b; font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; padding: 8px 10px; border-bottom: 1px solid rgba(100,116,139,0.1); }
    .tx-table td { padding: 8px 10px; border-bottom: 1px solid rgba(100,116,139,0.06); font-size: 12px; }
    .tx-table .time { color: #475569; font-family: monospace; }
    .tx-table .flow { color: #a78bfa; }
    .tx-table .amount { color: #34d399; font-family: monospace; }
    .tx-table .reason { color: #64748b; }
    .tx-table a { color: #8b5cf6; text-decoration: none; font-size: 11px; }
    .tx-table a:hover { text-decoration: underline; }

    .footer { text-align: center; padding: 28px 20px; color: #334155; font-size: 11px; border-top: 1px solid rgba(139,92,246,0.06); margin-top: 32px; }
    .footer .quote { color: #a78bfa; font-style: italic; font-size: 13px; margin-bottom: 6px; }

    /* Tabs */
    .tab-bar { display: flex; gap: 4px; margin-bottom: 16px; }
    .tab { padding: 7px 16px; border-radius: 8px; cursor: pointer; font-size: 13px; color: #64748b; background: #161b2e; border: 1px solid rgba(100,116,139,0.15); transition: all 0.2s; }
    .tab.active { color: #fff; background: rgba(139,92,246,0.2); border-color: rgba(139,92,246,0.4); font-weight: 500; }
    .tab:hover:not(.active) { border-color: rgba(100,116,139,0.3); color: #94a3b8; }

    /* Live tab */
    .live-pulse { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px rgba(52,211,153,0.6); animation: livePulse 2s ease-in-out infinite; }
    @keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.3); } }
    .live-event { padding: 14px 16px; border-radius: 10px; border-left: 3px solid; margin-bottom: 12px; background: rgba(15,18,30,0.6); transition: all 0.2s; }
    .live-event:hover { background: rgba(139,92,246,0.05); }
    .live-event.pay { border-left-color: #a78bfa; }
    .live-event.execute { border-left-color: #34d399; }
    .live-event.think { border-left-color: #fbbf24; }
    .live-event.result { border-left-color: #60a5fa; }
    .live-event-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
    .live-event-agent { font-size: 12px; font-weight: 600; color: #e2e8f0; }
    .live-event-time { font-size: 10px; color: #475569; margin-left: auto; }
    .live-event-body { font-size: 12px; color: #94a3b8; line-height: 1.6; }
    .live-event-detail { font-size: 11px; color: #64748b; margin-top: 6px; padding: 6px 10px; background: rgba(15,18,30,0.5); border-radius: 6px; }
    .live-event-tx { display: inline-flex; align-items: center; gap: 4px; color: #8b5cf6; font-family: monospace; font-size: 11px; text-decoration: none; margin-top: 4px; }
    .live-event-tx:hover { text-decoration: underline; }
    .live-chain-marker { display: flex; align-items: center; gap: 8px; padding: 8px 0; margin: 4px 0; }
    .live-chain-line { flex: 1; height: 1px; background: rgba(139,92,246,0.15); }
    .live-chain-text { font-size: 10px; color: #475569; white-space: nowrap; }

    /* 按钮通用 */
    .btn-primary { background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #fff; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 12px; transition: all 0.2s; }
    .btn-primary:hover { box-shadow: 0 0 14px rgba(139,92,246,0.35); transform: translateY(-1px); }
    .btn-danger { background: linear-gradient(135deg, #f87171, #dc2626); color: #fff; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 12px; transition: all 0.2s; }
    .btn-danger:hover { box-shadow: 0 0 14px rgba(239,68,68,0.35); }
    .btn-secondary { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.25); padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 500; transition: all 0.2s; }
    .btn-secondary:hover { background: rgba(100,116,139,0.25); color: #e2e8f0; }

    /* Lucide icon helpers */
    .icon-sm { width: 14px; height: 14px; display: inline-block; vertical-align: middle; }
    .icon-md { width: 18px; height: 18px; display: inline-block; vertical-align: middle; }
    .icon-inline { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; }
    .icon-lg { width: 1.5em; height: 1.5em; display: inline-block; vertical-align: -0.2em; }
    .spin { animation: spin 1s linear infinite; }
    @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

    /* 通用滚动条 - 紫色系 */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: rgba(49,46,129,0.3); border-radius: 3px; }
    ::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.35); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.55); }
    * { scrollbar-width: thin; scrollbar-color: rgba(139,92,246,0.35) rgba(49,46,129,0.3); }

  