:root {
    /* 深邃科技主题色 */
    --c-primary: #3b82f6; --c-primary-hover: #2563eb;
    --c-success: #10b981; --c-success-hover: #059669;
    --c-danger: #ef4444; --c-danger-hover: #dc2626;
    --c-slate-50: #f8fafc; --c-slate-100: #f1f5f9; --c-slate-200: #e2e8f0;
    --c-slate-300: #cbd5e1; --c-slate-400: #94a3b8; --c-slate-500: #64748b; 
    --c-slate-600: #475569; --c-slate-700: #334155; --c-slate-800: #1e293b; --c-slate-900: #0f172a;
    --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: var(--font-sans); 
    background-color: #fafbfc;
    /* 引入科技感底纹网格 */
    background-image: radial-gradient(var(--c-slate-200) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--c-slate-800); min-height: 100vh; -webkit-font-smoothing: antialiased; 
}

/* 公共原子类合并 */
.hidden, .dash-pane.hidden { display: none !important; }
.flex-row, .flex-center-left, .nav-brand, .nav-actions, .btn, .captcha-img, .header-content, .sidebar-item, .status-text, .status-success, .toast, .modal-overlay, .modal-header, .card-header { display: flex; align-items: center; }
.flex-col, .view-section, .form-stack, .sidebar-menu, .dash-pane, .toast-container { display: flex; flex-direction: column; }

/* 修复微信扫码步骤容器，使其内部所有元素（标题、金额、二维码、状态文本）水平居中 */
#rechargeQrStep {
    display: flex;
    flex-direction: column;
    align-items: center; /* 关键：子元素水平居中 */
    text-align: center;
    width: 100%;
}
.navbar, .header-content, .modal-header, .card-header { justify-content: space-between; }
.btn, .captcha-img, .status-text, .status-success, .modal-overlay { justify-content: center; }
.flex-1 { flex: 1; }

.gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; }
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; } .mt-12 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; } .mb-12 { margin-bottom: 3rem; } .mb-16 { margin-bottom: 4rem; }
.m-0 { margin: 0; } .mx-auto { margin-left: auto; margin-right: auto; } .px-4 { padding-left: 1rem; padding-right: 1rem; }
.w-full { width: 100%; }

.text-center, .hero-section { text-align: center; } .text-right { text-align: right; } .whitespace-nowrap { white-space: nowrap; }
.text-muted { color: var(--c-slate-500); }
.text-success, .status-success { color: var(--c-success); }
.text-danger { color: var(--c-danger); }
.text-primary, .link-text, .btn-text.primary, .status-text { color: var(--c-primary); }
.bg-slate-50 { background-color: var(--c-slate-50); }

.font-bold, .nav-title, .card-title, .hero-title, .balance-display, .modal-title { font-weight: 700; }
.font-medium, .lang-select, .btn, .form-label, .link-text, .table th, .sidebar-item, .status-text, .toast { font-weight: 500; }
.font-mono, .td-highlight, .td-code, .input-lg { font-family: ui-monospace, SFMono-Regular, monospace; }

.text-xs { font-size: 0.75rem; } .text-sm, .dropdown-item, .btn, .btn-text, .form-label, .input-field, .link-text, .table, .status-text, .toast { font-size: 0.875rem; }
.text-lg, .input-lg { font-size: 1.125rem; } .text-xl { font-size: 1.25rem; } .text-2xl { font-size: 1.5rem; }
.balance-display { font-size: 2.25rem; }

.btn, .input-field, .captcha-img, .account-badge, .sidebar-item { border-radius: 0.5rem; }
.dropdown-menu, .table-wrapper, .qr-container, .toast, .sidebar, .progress-bg { border-radius: 0.75rem; }
.card, .modal-content { border-radius: 1rem; }

.dropdown-menu, .toast { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.card, .sidebar, .qr-container { box-shadow: var(--shadow-card); background: white; }

.nav-link, .dropdown-item, .btn-text, .modal-close, .sidebar-item { background: transparent; border: none; cursor: pointer; outline: none; }
.btn, .input-field, .sidebar-item, .toast, .nav-link, .link-text, .dropdown-item { transition: all 0.2s; }
.nav-link:hover, .btn-text.primary:hover { color: var(--c-primary); }
.btn-text.danger:hover { color: var(--c-danger-hover); }
.link-text:hover { color: var(--c-primary-hover); }

/* 容器尺寸 */
.container { max-width: 1600px !important; margin: 0 auto; padding: 0 1rem 5rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-7xl { max-width: 80rem; }
.view-section { gap: 1.5rem; }

/* ================== Navbar ================== */
.navbar { padding: 1rem 1.5rem; position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(226, 232, 240, 0.8); }
.glass-nav { background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.nav-logo {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--c-primary), #4f46e5);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    display: flex; align-items: center; justify-content: center;
    color: white; padding: 6px;
}
.nav-title {
    font-size: 1.375rem; font-weight: 800; letter-spacing: -0.025em; margin-left: 0.75rem;
    background: linear-gradient(to right, #0f172a, #334155);
    -webkit-background-clip: text; color: transparent;
}
.nav-actions { position: relative; }

/* Navbar 右侧交互群组美化 */
.nav-btn-outline {
    display: flex; align-items: center; gap: 0.375rem;
    padding: 0.5rem 0.875rem; border-radius: 9999px;
    color: var(--c-slate-600); font-weight: 500; font-size: 0.875rem;
    transition: all 0.2s; text-decoration: none; border: 1px solid transparent;
}
.nav-btn-outline:hover { background: var(--c-slate-50); color: var(--c-slate-900); border-color: var(--c-slate-200); }

.lang-select-wrapper { position: relative; display: flex; align-items: center; }
.lang-select {
    appearance: none; -webkit-appearance: none;
    background: transparent; border: 1px solid var(--c-slate-200);
    padding: 0.5rem 2rem 0.5rem 2.25rem; border-radius: 9999px;
    color: var(--c-slate-700); font-size: 0.875rem; font-weight: 500;
    cursor: pointer; transition: all 0.2s; outline: none; box-shadow: var(--shadow-sm);
}
.lang-select:hover { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); }
.lang-icon { position: absolute; left: 0.75rem; color: var(--c-slate-400); pointer-events: none; }
.lang-arrow { position: absolute; right: 0.75rem; color: var(--c-slate-400); pointer-events: none; }

.nav-login-btn { border-radius: 9999px !important; padding: 0.5rem 1.25rem !important; font-weight: 600 !important; }

/* ================== Hero Section ================== */
.hero-badge {
    display: inline-block; padding: 0.375rem 1rem;
    background: rgba(59, 130, 246, 0.1); color: var(--c-primary);
    border-radius: 9999px; font-size: 0.875rem; font-weight: 600;
    margin-bottom: 1.5rem; border: 1px solid rgba(59, 130, 246, 0.2);
}
.hero-title { font-size: 3.5rem; letter-spacing: -0.05em; line-height: 1.2; margin-bottom: 1rem; color: var(--c-slate-900); }
.hero-desc { font-size: 1.25rem; color: var(--c-slate-500); font-weight: 400; }

/* ================== UI Components ================== */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: 100%; margin-top: 0.75rem; background: white; width: 10rem; border: 1px solid var(--c-slate-100); overflow: hidden; z-index: 50; }
.dropdown-item { width: 100%; text-align: left; padding: 0.75rem 1rem; color: var(--c-slate-700); }
.dropdown-item:hover { background: var(--c-slate-50); }
.dropdown-item.text-danger:hover { background: #fef2f2; }
.border-top { border-top: 1px solid var(--c-slate-100); }

/* Buttons & Forms */
.btn { padding: 0.5rem 1rem; border: none; cursor: pointer; }
.btn-primary { 
    background: linear-gradient(135deg, var(--c-primary), #4f46e5); color: white; 
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35); }
.btn-success { background: var(--c-success); color: white; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); }
.btn-success:hover { background: var(--c-success-hover); }
.btn-outline { background: white; border: 1px solid var(--c-slate-200); color: var(--c-slate-700); }
.btn-outline:hover { background: var(--c-slate-50); border-color: var(--c-slate-300); }
.btn-block { width: 100%; padding: 0.75rem 1rem; font-weight: 600; font-size: 1rem; }
.btn-sm { padding: 0.375rem 0.75rem; font-weight: 600; }
.btn-text { padding: 0; text-decoration: none; }

.input-field { width: 100%; border: 1px solid var(--c-slate-200); padding: 0.625rem 1rem; background: var(--c-slate-50); outline: none; }
.input-field:focus { background: white; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.input-lg { padding: 0.75rem 1rem; }
.form-label { display: block; color: var(--c-slate-700); margin-bottom: 0.375rem; }

/* ================== Models Grid & Cards ================== */
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.model-card {
    background: white; border: 1px solid var(--c-slate-200);
    border-radius: 1rem; padding: 1.5rem;
    transition: all 0.3s ease; box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; 
}
.model-card:hover {
    border-color: var(--c-primary); transform: translateY(-3px);
    box-shadow: 0 12px 25px -5px rgba(59, 130, 246, 0.1), 0 8px 10px -6px rgba(59, 130, 246, 0.1);
}
.model-icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: #eff6ff; color: var(--c-primary);
    display: flex; align-items: center; justify-content: center;
}
.model-pricing { background: var(--c-slate-50); border-radius: 0.5rem; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; margin-top: auto; border: 1px solid var(--c-slate-100); }
.price-item { display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; }
.price-label { color: var(--c-slate-500); font-weight: 500; }
.price-val { font-family: ui-monospace, monospace; font-weight: 700; }

/* ================== Dashboard ================== */
.card { padding: 2rem; border: 1px solid var(--c-slate-100); }
.table-wrapper { overflow-x: auto; border: 1px solid var(--c-slate-200); }
.table { width: 100%; border-collapse: collapse; text-align: left; }
.table th, .table td { padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--c-slate-100); color: var(--c-slate-600); }
.table th { background: var(--c-slate-50); border-bottom: 1px solid var(--c-slate-200); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background-color: #f8fafc; }
.td-highlight { color: var(--c-slate-800); font-weight: 600; }
.td-code { color: var(--c-slate-700); background: var(--c-slate-50); }
.w-40 { width: 10rem; }

.dashboard-layout { display: flex; gap: 1.5rem; align-items: flex-start; width: 100%; }
.sidebar { width: 14rem; flex-shrink: 0; background: white; border: 1px solid var(--c-slate-100); padding: 1rem 0; position: sticky; top: 6rem; }
.sidebar-menu { list-style: none; padding: 0 0.75rem; }
.sidebar-item { width: 100%; text-align: left; padding: 0.75rem 1rem; color: var(--c-slate-600); }
.sidebar-item:hover { background: var(--c-slate-50); color: var(--c-slate-900); }
.sidebar-item.active { background: #eff6ff; color: var(--c-primary); font-weight: 600; }
.dashboard-main { min-width: 0; }
.dashboard-header { position: relative; overflow: hidden; }
.bg-glow { position: absolute; top: 0; right: 0; width: 16rem; height: 16rem; background: #eff6ff; border-radius: 50%; filter: blur(64px); opacity: 0.6; margin-right: -5rem; margin-top: -5rem; z-index: 0; }
.header-content { position: relative; z-index: 10; width: 100%; }

/* Utilities */
.progress-bg { width: 100%; background: var(--c-slate-100); height: 0.375rem; margin-top: 0.375rem; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 9999px; }
.bg-safe { background-color: var(--c-success); } .bg-warn { background-color: #fb923c; } .bg-danger { background-color: var(--c-danger); }
.badge { padding: 0.25rem 0.625rem; font-size: 0.75rem; font-weight: 600; display: inline-block; border-radius: 9999px; }
.badge-success { background: #d1fae5; color: #047857; } .badge-danger { background: #fee2e2; color: #b91c1c; }
.captcha-img { border: 1px solid var(--c-slate-200); background: white; min-width: 110px; cursor: pointer; overflow: hidden; }
.account-badge { background: var(--c-slate-100); padding: 0.25rem 0.75rem; font-weight: 600; color: var(--c-slate-700); display: inline-block; border-radius: 0.5rem; }
.qr-container { 
    padding: 0.75rem; 
    display: inline-block; 
    margin: 0 auto 1rem auto; /* 自动左右外边距居中，并保留底部 1rem 间距 */
    border-radius: 1rem; 
}

/* Modal & Toast & Animations */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(6px); z-index: 50; }
.modal-content { background: white; padding: 2.5rem 2rem; width: 100%; max-width: 26rem; margin: 0 1rem; position: relative; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.modal-close { font-size: 1.5rem; color: var(--c-slate-400); line-height: 1; padding: 0; }
.modal-close:hover { color: var(--c-slate-700); }
.modal-close-absolute { position: absolute; top: 1.25rem; right: 1.25rem; }

.toast-container { position: fixed; top: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 100; gap: 0.5rem; pointer-events: none; }
.toast { background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(8px); color: white; padding: 0.75rem 1.25rem; opacity: 1; transform: translateY(0); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2); }
.toast.hide { opacity: 0; transform: translateY(-10px); }

.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--c-slate-300); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 768px) {
    .dashboard-layout { flex-direction: column; }
    .sidebar { width: 100%; position: relative; top: 0; margin-bottom: 1rem; }
    .hero-title { font-size: 2.5rem; }
    .nav-actions { gap: 0.5rem; }
}
.log-table-wrapper { max-height: none !important; overflow: visible !important; }
.sticky-thead th { position: sticky; top: 4.5rem !important; z-index: 30 !important; background-color: var(--c-slate-50) !important; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important; }