/* ===== 设计基础 ===== */ :root { --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --radius: 12px; --radius-sm: 8px; --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif; --bg: #f5f6f8; --bg-elev: #ffffff; --bg-elev-2: #f0f1f4; --border: rgba(15, 23, 42, 0.08); --border-strong: rgba(15, 23, 42, 0.14); --text: #1a1d24; --text-2: #5b6270; --text-3: #9aa1ad; --accent: #3b6ef6; --accent-strong: #2f5ae0; --accent-soft: rgba(59, 110, 246, 0.1); --ok: #16a34a; --ok-soft: rgba(22, 163, 74, 0.12); --warn: #d97706; --warn-soft: rgba(217, 119, 6, 0.13); --err: #dc2626; --err-soft: rgba(220, 38, 38, 0.11); --disabled-soft: rgba(100, 116, 139, 0.14); --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05); --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08); --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.16); } @media (prefers-color-scheme: dark) { :root { --bg: #0e1015; --bg-elev: #171a21; --bg-elev-2: #1e222b; --border: rgba(255, 255, 255, 0.07); --border-strong: rgba(255, 255, 255, 0.13); --text: #e8eaef; --text-2: #9aa1ad; --text-3: #6b7280; --accent: #5b8cff; --accent-strong: #3b6ef6; --accent-soft: rgba(91, 140, 255, 0.14); --ok: #34d399; --ok-soft: rgba(52, 211, 153, 0.13); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, 0.13); --err: #f87171; --err-soft: rgba(248, 113, 113, 0.13); --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3); --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35); --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5); } } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; } .hidden { display: none !important; } /* ===== 通用组件 ===== */ .btn { font-family: inherit; font-size: 13px; font-weight: 500; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text); cursor: pointer; transition: transform 120ms var(--ease-out), background 150ms ease, border-color 150ms ease, opacity 150ms ease; } .btn:active { transform: scale(0.97); } .btn:hover { background: var(--bg-elev-2); } .btn.primary { background: var(--accent); border-color: transparent; color: #fff; } .btn.primary:hover { background: var(--accent-strong); } .btn.danger { color: var(--err); } .btn.danger:hover { background: var(--err-soft); } .btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); } .btn.ghost:hover { background: var(--bg-elev-2); color: var(--text); } .btn.sm { padding: 5px 10px; font-size: 12px; } .btn.block { width: 100%; padding: 10px; font-size: 14px; } .btn:disabled { opacity: 0.5; cursor: not-allowed; } input, textarea, select { font-family: inherit; font-size: 13px; color: var(--text); background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 10px; width: 100%; transition: border-color 150ms ease, box-shadow 150ms ease; } input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } textarea { resize: vertical; min-height: 72px; font-family: "Cascadia Code", Consolas, monospace; } label { font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 5px; display: block; } /* ===== 登录 ===== */ .login-view { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; } .login-card { width: 320px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; padding: 32px 28px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 14px; animation: card-in 260ms var(--ease-out); } .login-logo { font-size: 28px; text-align: center; color: var(--accent); } .login-card h1 { font-size: 19px; text-align: center; letter-spacing: -0.02em; } .login-sub { text-align: center; color: var(--text-3); font-size: 12px; margin-top: -8px; } .login-error { color: var(--err); font-size: 12px; text-align: center; min-height: 16px; } /* ===== 顶栏 ===== */ .topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 52px; background: color-mix(in srgb, var(--bg-elev) 72%, transparent); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); border-bottom: 1px solid var(--border); } .brand { display: flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.01em; } .brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); } .tabs { display: flex; gap: 4px; } .tab { font-family: inherit; font-size: 13px; font-weight: 500; padding: 6px 14px; border: none; border-radius: 999px; background: transparent; color: var(--text-2); cursor: pointer; transition: background 150ms ease, color 150ms ease; } .tab:hover { background: var(--bg-elev-2); color: var(--text); } .tab.active { background: var(--accent-soft); color: var(--accent); } .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; } .refresh-time { font-size: 12px; color: var(--text-3); } /* ===== 内容 ===== */ .content { max-width: 1080px; margin: 0 auto; padding: 24px; } .view-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; } .view-head h2 { font-size: 17px; letter-spacing: -0.02em; } /* 统计条 */ .stats-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; } .stat { flex: 1; min-width: 90px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-sm); } .stat span { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; } .stat label { margin: 0; font-size: 11px; color: var(--text-3); } .stat.ok span { color: var(--ok); } .stat.warn span { color: var(--warn); } .stat.err span { color: var(--err); } .stat.disabled span { color: var(--text-2); } .stat.pending span { color: var(--text-3); } /* ===== 账号卡片 ===== */ .account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; } .account-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; opacity: 0; transform: translateY(8px); animation: card-in 300ms var(--ease-out) forwards; transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), border-color 180ms ease; } @media (hover: hover) and (pointer: fine) { .account-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); } } .account-card.below { border-color: color-mix(in srgb, var(--warn) 55%, transparent); } .account-card.error { border-color: color-mix(in srgb, var(--err) 55%, transparent); } .account-card.disabled { opacity: 0.65; } .card-top { display: flex; align-items: center; gap: 10px; } .badge { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; letter-spacing: 0.02em; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); } .card-title { min-width: 0; } .card-platform { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 5px; } .card-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .balance-row { display: flex; align-items: baseline; gap: 6px; } .balance-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; } .balance-value.below { color: var(--warn); } .balance-value.error { color: var(--err); } .balance-currency { font-size: 13px; color: var(--text-2); font-weight: 500; } .balance-empty { color: var(--text-3); font-size: 22px; font-weight: 600; } .card-meta { font-size: 11.5px; color: var(--text-3); display: flex; flex-direction: column; gap: 2px; } .card-meta .badge-pill { align-self: flex-start; } .badge-pill { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; } .badge-pill.ok { background: var(--ok-soft); color: var(--ok); } .badge-pill.warn { background: var(--warn-soft); color: var(--warn); } .badge-pill.err { background: var(--err-soft); color: var(--err); } .badge-pill.disabled { background: var(--disabled-soft); color: var(--text-2); } .badge-pill.pending { background: var(--bg-elev-2); color: var(--text-3); } .card-actions { display: flex; gap: 6px; margin-top: 2px; } /* 阈值条 */ .threshold-bar { height: 4px; border-radius: 2px; background: var(--bg-elev-2); overflow: hidden; } .threshold-fill { height: 100%; border-radius: 2px; background: var(--ok); transition: width 300ms var(--ease-out), background 200ms ease; } .threshold-fill.below { background: var(--warn); } /* ===== 平台列表 ===== */ .platform-list { display: flex; flex-direction: column; gap: 10px; } .platform-row { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm); opacity: 0; animation: card-in 260ms var(--ease-out) forwards; } .platform-info { flex: 1; min-width: 0; } .platform-name { font-weight: 600; display: flex; align-items: center; gap: 8px; } .platform-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; } .platform-actions { display: flex; gap: 6px; } .platform-off { opacity: 0.55; } /* ===== 设置 ===== */ .settings-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm); opacity: 0; animation: card-in 260ms var(--ease-out) forwards; } .settings-card h3 { font-size: 13px; margin-bottom: 12px; color: var(--text-2); font-weight: 600; } .form-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; max-width: 420px; } .form-row:last-child { margin-bottom: 0; } .settings-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; } .settings-hint { font-size: 12px; color: var(--text-3); } /* ===== 模态框 ===== */ .modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(10, 12, 18, 0.45); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade-in 180ms ease; backdrop-filter: blur(2px); } .modal { width: 480px; max-width: 100%; max-height: 86vh; overflow-y: auto; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 22px 24px; animation: modal-in 220ms var(--ease-out); } .modal h3 { font-size: 16px; letter-spacing: -0.02em; margin-bottom: 16px; } .modal .form-row { max-width: none; } .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; } .modal-error { color: var(--err); font-size: 12px; min-height: 16px; margin-top: 8px; } .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .form-grid .full { grid-column: 1 / -1; } .form-hint { font-size: 11px; color: var(--text-3); margin-top: 4px; } /* 历史弹窗 */ .history-modal .modal { width: 420px; } .history-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; } .history-item { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--bg-elev-2); font-size: 12.5px; font-variant-numeric: tabular-nums; } .history-item .h-bal { font-weight: 600; } .spark { display: flex; align-items: flex-end; gap: 2px; height: 34px; margin: 10px 0 4px; } .spark i { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; opacity: 0.85; min-height: 2px; transition: opacity 150ms ease; } .spark i:hover { opacity: 1; } /* 确认弹窗 */ .confirm-modal .modal { width: 340px; } .confirm-text { color: var(--text-2); font-size: 13px; margin-bottom: 18px; line-height: 1.6; } /* ===== Toast ===== */ #toast-root { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; } .toast { background: var(--bg-elev); border: 1px solid var(--border-strong); color: var(--text); font-size: 13px; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 8px; opacity: 0; transform: translateY(10px); transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); } .toast.show { opacity: 1; transform: translateY(0); } .toast.ok .toast-dot { background: var(--ok); } .toast.err .toast-dot { background: var(--err); } .toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); } /* 空状态 */ .empty-hint { text-align: center; color: var(--text-3); padding: 60px 0; font-size: 13px; } /* ===== 动画 ===== */ @keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } } @keyframes modal-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } } @media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } .account-card { opacity: 1; transform: none; } } /* 无动画模式:自动刷新静默更新,直接以最终态显示 */ .account-card.no-anim, .platform-row.no-anim { opacity: 1; transform: none; animation: none; } /* ===== 账号监控:筛选栏 ===== */ .filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; } .filter-pills { display: flex; gap: 6px; flex-wrap: wrap; } .pill { font-family: inherit; font-size: 12px; font-weight: 500; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text-2); cursor: pointer; transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 120ms var(--ease-out); } .pill:hover { color: var(--text); border-color: var(--text-3); } .pill:active { transform: scale(0.96); } .pill.active { background: var(--accent); border-color: transparent; color: #fff; } .pill.warn.active { background: var(--warn); } .pill.err.active { background: var(--err); } .pill.pending.active { background: var(--text-2); } .pill.disabled.active { background: var(--text-3); } .filter-select { width: auto; min-width: 130px; } /* ===== 账号卡片:重构 ===== */ .card-head { display: flex; align-items: center; gap: 10px; } .card-head .card-title { flex: 1; min-width: 0; } .card-head .badge-pill { margin-left: auto; flex-shrink: 0; } .balance-vs { margin-left: auto; font-size: 11px; color: var(--text-3); white-space: nowrap; } .card-meta { display: flex; flex-direction: column; gap: 3px; } .meta-item { display: inline-flex; align-items: center; gap: 5px; } .meta-item svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; } .card-error { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--err); background: var(--err-soft); padding: 4px 8px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .card-error svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; } /* 阈值条(新名,旧 .threshold-bar 保留) */ .threshold-track { height: 4px; border-radius: 2px; background: var(--bg-elev-2); overflow: hidden; } /* 操作区 */ .card-actions { display: flex; align-items: center; gap: 6px; margin-top: 2px; } .card-actions .btn { display: inline-flex; align-items: center; gap: 5px; } .card-actions .btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; } .icon-btn { padding: 6px; line-height: 0; } .icon-btn.danger:hover { color: var(--err); background: var(--err-soft); } /* 检查按钮 loading 态 */ .check-btn.loading { pointer-events: none; opacity: 0.75; } .spinner { width: 11px; height: 11px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; display: inline-block; animation: spin 0.7s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* 启用/停用开关 */ .switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; margin-left: auto; cursor: pointer; } .switch input { opacity: 0; width: 0; height: 0; position: absolute; } .switch .slider { position: absolute; inset: 0; background: var(--bg-elev-2); border: 1px solid var(--border-strong); border-radius: 999px; transition: background 180ms ease, border-color 180ms ease; } .switch .slider::before { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; left: 2px; top: 2px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 180ms var(--ease-out); } .switch input:checked + .slider { background: var(--ok); border-color: transparent; } .switch input:checked + .slider::before { transform: translateX(16px); } .switch:active .slider::before { transform: scale(0.9); } .switch input:checked:active + .slider::before { transform: translateX(16px) scale(0.9); } /* 筛选空结果 */ .empty-filter { text-align: center; color: var(--text-3); padding: 48px 0; font-size: 13px; } /* 余额历史迷你折线图 */ .spark-wrap { background: var(--bg-elev-2); border-radius: 6px; padding: 6px 8px 4px; overflow: hidden; } .sparkline { display: block; width: 100%; height: 30px; } .spark-title { font-size: 10px; color: var(--text-3); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .window-switch { display: flex; gap: 2px; justify-content: flex-end; margin-top: 3px; } .win-btn { font-family: inherit; font-size: 9.5px; font-weight: 600; letter-spacing: 0.02em; padding: 1px 5px; border-radius: 4px; border: none; background: transparent; color: var(--text-3); cursor: pointer; transition: color 120ms ease, background 120ms ease, transform 100ms var(--ease-out); } .win-btn:hover { color: var(--text); background: var(--bg-elev-2); } .win-btn:active { transform: scale(0.92); } .win-btn.active { color: var(--accent); background: var(--accent-soft); } /* 禁用卡片:原因提示保留可读性 */ .account-card.disabled .balance-value { color: var(--text-3); } .account-card.pending { border-color: var(--border-strong); }