:root {
    --bg-dark: #07050f;
    --bg-card: rgba(15, 11, 28, 0.6);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(168, 85, 247, 0.35);
    
    --primary: #a855f7;
    --primary-glow: rgba(168, 85, 247, 0.4);
    --secondary: #3b82f6;
    
    --text-main: #f3f4f6;
    --text-muted: #cbd5e1;
    --text-dim: #94a3b8;
    
    --green: #10b981;
    --green-glow: rgba(16, 185, 129, 0.2);
    --red: #ef4444;
    --red-glow: rgba(239, 68, 68, 0.2);
    
    --gold: #f59e0b;
    --gold-glow: rgba(245, 158, 11, 0.3);
    --silver: #94a3b8;
    --bronze: #b45309;
    --glow-opacity: 1;
}

body.light-theme {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.65);
    --border-color: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(168, 85, 247, 0.50);
    --text-main: #0f172a;
    --text-muted: #334155;
    --text-dim: #475569;
    --green: #047857;
    --green-glow: rgba(4, 120, 87, 0.1);
    --red: #b91c1c;
    --red-glow: rgba(185, 28, 28, 0.1);
    --glow-opacity: 0.25;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 霓虹发光背景层 */
.bg-glow {
    position: fixed;
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, rgba(59, 130, 246, 0.05) 50%, rgba(0, 0, 0, 0) 100%);
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
}

.bg-glow-2 {
    position: fixed;
    bottom: -15%;
    left: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(168, 85, 247, 0.03) 60%, rgba(0, 0, 0, 0) 100%);
    filter: blur(150px);
    z-index: -1;
    pointer-events: none;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* 玻璃卡片基类 */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.logo-icon i {
    color: white;
    width: 24px;
    height: 24px;
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-text h1 span {
    color: var(--primary);
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text p {
    font-size: 13px;
    color: var(--text-muted);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 倒计时刷新器 */
.refresh-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.spinner-container {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-ring {
    width: 24px;
    height: 24px;
    transform: rotate(-90deg);
}

.spinner-ring path {
    fill: none;
    stroke-width: 3.5;
}

.ring-bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.ring-progress {
    stroke: var(--primary);
    stroke-linecap: round;
    transition: stroke-dasharray 0.1s linear;
}

.icon-btn {
    position: absolute;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    padding: 0;
    transition: color 0.2s;
}

.icon-btn i {
    width: 12px;
    height: 12px;
}

.icon-btn:hover {
    color: var(--primary);
}

/* 状态显示 */
.token-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.green {
    background-color: var(--green);
    box-shadow: 0 0 10px var(--green);
}

.status-dot.red {
    background-color: var(--red);
    box-shadow: 0 0 10px var(--red);
}

.settings-btn {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.settings-btn:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(59, 130, 246, 0.3) 100%);
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
    transform: translateY(-1px);
}

/* 概览统计 */
.overview-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    width: 28px;
    height: 28px;
    color: white;
}

.stat-icon.purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(168, 85, 247, 0.4) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.stat-icon.green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.4) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-icon.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.4) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-title {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 4px;
}

/* 主面板网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 24px;
}

.leaderboard-panel {
    padding: 24px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tab-selectors {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 12px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.rank-count-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.rank-count-filter select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 4px 10px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rank-count-filter select option {
    background-color: #0f0b1c;
    color: #f3f4f6;
}

/* 前三名大卡片 */
.top-three-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.podium-card {
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.podium-card.rank-1 {
    order: 2; /* 放在中间 */
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.15);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.05) 0%, var(--bg-card) 100%);
    transform: scale(1.05);
}

.podium-card.rank-2 {
    order: 1; /* 放在左边 */
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.03) 0%, var(--bg-card) 100%);
}

.podium-card.rank-3 {
    order: 3; /* 放在右边 */
    border: 1px solid rgba(180, 83, 9, 0.3);
    background: linear-gradient(180deg, rgba(180, 83, 9, 0.03) 0%, var(--bg-card) 100%);
}

.medal-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 12px;
    color: white;
}

.rank-1 .medal-badge {
    background: linear-gradient(135deg, #fcd34d 0%, #d97706 100%);
    box-shadow: 0 0 15px var(--gold-glow);
}

.rank-2 .medal-badge {
    background: linear-gradient(135deg, #e2e8f0 0%, #64748b 100%);
    box-shadow: 0 0 15px rgba(148, 163, 184, 0.2);
}

.rank-3 .medal-badge {
    background: linear-gradient(135deg, #fed7aa 0%, #b45309 100%);
    box-shadow: 0 0 15px rgba(180, 83, 9, 0.2);
}

.podium-user {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--text-main);
    word-break: break-all;
    max-width: 100%;
}

.podium-winrate {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.podium-profit {
    font-size: 22px;
    font-weight: 800;
}

.profit-text.win {
    color: var(--green);
    text-shadow: 0 0 10px var(--green-glow);
}

.profit-text.loss {
    color: var(--red);
    text-shadow: 0 0 10px var(--red-glow);
}

/* 排行榜表格 */
.leaderboard-list-wrapper {
    margin-top: 16px;
}

.list-header {
    display: grid;
    grid-template-columns: 1fr 3fr 2.5fr 2.5fr 2.5fr;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    min-height: 250px;
}

.list-row {
    display: grid;
    grid-template-columns: 1fr 3fr 2.5fr 2.5fr 2.5fr;
    padding: 16px;
    align-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
}

.list-row:hover {
    background: rgba(168, 85, 247, 0.04);
    border-color: var(--border-hover);
    transform: scale(1.005) translateY(-1px);
}

.col-rank {
    font-weight: 700;
    font-size: 14px;
}

.rank-pill {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: white;
}

.rank-pill.gold { background: var(--gold); }
.rank-pill.silver { background: var(--silver); }
.rank-pill.bronze { background: var(--bronze); }
.rank-pill.normal { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }

.col-user {
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.col-winrate {
    font-size: 13px;
    color: var(--text-main);
}

.sample-lbl {
    font-size: 11px;
    color: var(--text-dim);
}

.col-orders {
    font-size: 13px;
    color: var(--text-muted);
}

.wl-badge {
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
}

.wl-badge.win {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}

.wl-badge.loss {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.col-profit {
    font-weight: 700;
    font-size: 15px;
}

/* 图表面板 */
.chart-panel {
    padding: 24px;
    margin-bottom: 24px;
}

.chart-panel h3, .trades-panel h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-panel h3 i, .trades-panel h3 i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.chart-container {
    position: relative;
    height: 260px;
    margin-top: 16px;
}

/* 订单面板 */
.trades-panel {
    padding: 24px;
}

.live-pulse {
    font-size: 10px;
    font-weight: 800;
    color: var(--red);
    background: rgba(239, 68, 68, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.orders-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--primary);
}

.order-item.win { border-left-color: var(--green); }
.order-item.loss { border-left-color: var(--red); }

.order-main-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-user {
    font-size: 13px;
    font-weight: 600;
}

.order-meta {
    font-size: 11px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}

.side-badge {
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
}

.side-badge.long {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}

.side-badge.short {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.order-value {
    text-align: right;
}

.order-pnl {
    font-weight: 700;
    font-size: 14px;
}

.order-time {
    font-size: 11px;
    color: var(--text-dim);
}

/* 占位符/骨架屏 */
.list-placeholder {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.shimmer-line {
    height: 48px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 25%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.02) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

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

/* Token 配置侧边栏 Drawer */
.settings-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.settings-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.settings-drawer {
    position: absolute;
    top: 0;
    right: -450px;
    width: 420px;
    height: 100%;
    border-radius: 0;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.settings-drawer-overlay.open .settings-drawer {
    right: 0;
}

.drawer-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: white;
}

.drawer-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.drawer-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.form-group textarea,
.form-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-main);
    outline: none;
    font-size: 13px;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s ease;
}

.form-group textarea {
    font-family: monospace;
    font-size: 12px;
    height: 100px;
    resize: none;
}

.form-group textarea:focus,
.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.token-tutorial h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.token-tutorial ol {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.token-tutorial code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    color: var(--primary);
}

.drawer-footer {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.action-btn {
    flex: 1;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.primary-btn:hover {
    box-shadow: 0 4px 15px var(--primary-glow);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.status-message {
    margin-top: 16px;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    display: none;
}

.status-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* 适配小屏幕 */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    .header-controls {
        width: 100%;
        justify-content: space-between;
    }
    .top-three-showcase {
        grid-template-columns: 1fr;
    }
    .podium-card.rank-1 {
        order: 1;
        transform: none;
    }
    .podium-card.rank-2 { order: 2; }
    .podium-card.rank-3 { order: 3; }
}

/* ==================== 用户详情 Modal 弹窗 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    width: 100%;
    max-width: 760px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.open .modal-card {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-profile-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    word-break: break-all;
}

.rank-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 汇总统计 */
.modal-stats-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.m-stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.m-lbl {
    font-size: 12px;
    color: var(--text-muted);
}

.m-val {
    font-size: 20px;
    font-weight: 800;
}

/* Modal 子 Tabs */
.modal-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 3px;
    border-radius: 10px;
}

.m-tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    flex: 1;
    padding: 8px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.m-tab-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.modal-tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
}

.modal-tab-content.active {
    display: flex;
}

/* 每日汇总列表 */
.daily-list-header {
    display: grid;
    grid-template-columns: 2.5fr 2.5fr 2fr 3fr;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
}

.daily-list-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    max-height: 280px;
    overflow-y: auto;
}

.daily-list-row {
    display: grid;
    grid-template-columns: 2.5fr 2.5fr 2fr 3fr;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.01);
    align-items: center;
    border: 1px solid transparent;
    font-size: 13px;
}

.daily-list-row:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

/* 历史明细列表 */
.history-list-header {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr 1.5fr 1.5fr 1.5fr 2.5fr;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
}

.history-list-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    max-height: 280px;
    overflow-y: auto;
}

.history-list-row {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr 1.5fr 1.5fr 1.5fr 2.5fr;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.01);
    align-items: center;
    border: 1px solid transparent;
    font-size: 13px;
}

.history-list-row:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.h-side-asset {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.h-asset {
    font-weight: 700;
}

.h-pnl {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.h-time {
    font-size: 10px;
    color: var(--text-dim);
}

.no-data-modal {
    padding: 40px;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
}

/* Theme Toggle Button Styling */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    transform: rotate(15deg) scale(1.05);
}

.theme-toggle-btn i {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

/* Default Dark Theme: Hide moon icon, show sun icon */
body:not(.light-theme) .theme-toggle-btn .moon-icon {
    display: none;
}
body:not(.light-theme) .theme-toggle-btn .sun-icon {
    display: block;
}

/* Light Theme: Hide sun icon, show moon icon */
body.light-theme .theme-toggle-btn .sun-icon {
    display: none;
}
body.light-theme .theme-toggle-btn .moon-icon {
    display: block;
}

/* Detailed Light Theme Color Adjustments */
body.light-theme {
    /* Main body background overlay */
    background-color: var(--bg-dark);
}

body.light-theme .bg-glow {
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, rgba(59, 130, 246, 0.03) 50%, rgba(0, 0, 0, 0) 100%);
}

body.light-theme .bg-glow-2 {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, rgba(168, 85, 247, 0.02) 60%, rgba(0, 0, 0, 0) 100%);
}

body.light-theme .glass-card {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body.light-theme header {
    border-bottom-color: var(--border-color);
}

body.light-theme .refresh-badge,
body.light-theme .token-status,
body.light-theme .tab-selectors,
body.light-theme .rank-count-filter select {
    background: rgba(15, 23, 42, 0.04);
}

body.light-theme .theme-toggle-btn {
    background: rgba(15, 23, 42, 0.04);
}

body.light-theme .theme-toggle-btn:hover {
    background: rgba(15, 23, 42, 0.08);
}

body.light-theme .settings-btn {
    color: var(--text-main);
    border-color: rgba(168, 85, 247, 0.3);
}

body.light-theme .rank-pill.normal {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-muted);
}

body.light-theme .list-header,
body.light-theme .daily-list-header,
body.light-theme .history-list-header {
    background: rgba(15, 23, 42, 0.02);
}

body.light-theme .list-row,
body.light-theme .daily-list-row,
body.light-theme .history-list-row,
body.light-theme .order-item,
body.light-theme .m-stat-card {
    background: rgba(15, 23, 42, 0.01);
}

body.light-theme .list-row:hover,
body.light-theme .daily-list-row:hover,
body.light-theme .history-list-row:hover {
    background: rgba(168, 85, 247, 0.04);
    border-color: var(--border-hover);
}

body.light-theme .modal-tabs {
    background: rgba(15, 23, 42, 0.03);
}

body.light-theme .m-tab-btn.active {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-main);
}

body.light-theme .token-tutorial code {
    background: rgba(15, 23, 42, 0.08);
}

body.light-theme .form-group textarea,
body.light-theme .form-group input {
    background: rgba(15, 23, 42, 0.03);
    color: var(--text-main);
}

body.light-theme .close-btn:hover {
    color: var(--text-main);
}

body.light-theme .shimmer-line {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.02) 25%, rgba(15, 23, 42, 0.06) 50%, rgba(15, 23, 42, 0.02) 75%);
}

body.light-theme .secondary-btn {
    background: rgba(15, 23, 42, 0.04);
}

body.light-theme .secondary-btn:hover {
    background: rgba(15, 23, 42, 0.08);
}

body.light-theme .profit-text.win,
body.light-theme .profit-text.loss {
    text-shadow: none;
}

/* Light Theme Badges Contrast Overrides */
body.light-theme .side-badge.long,
body.light-theme .wl-badge.win {
    background: rgba(4, 120, 87, 0.08);
    color: #047857;
}

body.light-theme .side-badge.short,
body.light-theme .wl-badge.loss {
    background: rgba(185, 28, 28, 0.08);
    color: #b91c1c;
}

/* Light Theme Controls & Indicators Contrast Overrides */
body.light-theme .rank-count-filter select {
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.04);
}

body.light-theme .rank-count-filter select option {
    background-color: #ffffff;
    color: #0f172a;
}

body.light-theme .live-pulse {
    background: rgba(185, 28, 28, 0.1);
    color: var(--red);
}

/* Platform label styling inside order items */
.platform-lbl {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-weight: 600;
}

body.light-theme .platform-lbl {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-muted);
}

