/* ================================================================
   🎨 TinyGate · 视觉系统 
   ================================================================ */

:root {
    /* 色彩 - Slate 色系 */
    --color-primary: #2563eb;
    --color-primary-light: #3b82f6;
    --color-primary-dark: #1d4ed8;
    --color-primary-gradient: linear-gradient(135deg, #2563eb, #7c3aed);

    --color-success: #10b981;
    --color-success-bg: rgba(16, 185, 129, 0.12);
    --color-warning: #f59e0b;
    --color-warning-bg: rgba(245, 158, 11, 0.12);
    --color-danger: #ef4444;
    --color-danger-bg: rgba(239, 68, 68, 0.12);
    --color-purple: #7c3aed;
    --color-purple-bg: rgba(124, 58, 237, 0.12);

    /* 背景 */
    --bg-base: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-2: #334155;
    --bg-elevated: rgba(30, 41, 59, 0.88);
    --bg-card: rgba(30, 41, 59, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.92);
    --bg-input: rgba(15, 23, 42, 0.7);
    --bg-modal: rgba(15, 23, 42, 0.96);

    /* 文字 */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;

    /* 边框 */
    --border-color: rgba(148, 163, 184, 0.08);
    --border-color-strong: rgba(148, 163, 184, 0.16);
    --border-glow: rgba(37, 99, 235, 0.25);

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 80px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 60px rgba(37, 99, 235, 0.06);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* 字体 */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* 间距 - 8px 网格 */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* 尺寸 */
    --sidebar-width: 248px;
    --topbar-height: 60px;

    /* 过渡 */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- 重置 ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.3);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.5);
}

/* ---------- 工具类 ---------- */
.hidden {
    display: none !important;
}
.text-muted {
    color: var(--text-muted);
}
.text-center {
    text-align: center;
}
.text-secondary {
    color: var(--text-secondary);
}
.flex {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    align-items: center;
}
.flex-1 {
    flex: 1;
    min-width: 140px;
}
.mt-10 {
    margin-top: var(--space-2);
}
.mt-20 {
    margin-top: var(--space-4);
}
.mb-10 {
    margin-bottom: var(--space-2);
}
.mb-20 {
    margin-bottom: var(--space-4);
}
.gap-2 {
    gap: var(--space-2);
}
.gap-4 {
    gap: var(--space-4);
}

/* ---------- 登录页 ---------- */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;      /* 垂直居中 */
    min-height: 100vh;
    padding: var(--space-5) var(--space-6) var(--space-10);
    background:
        radial-gradient(ellipse at 20% 30%, rgba(37, 99, 235, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(124, 58, 237, 0.04) 0%, transparent 50%),
        var(--bg-base);
    overflow: hidden;            /* 防止内容溢出破坏居中 */
}

.login-left {
    max-width: 1000px;
    width: 100%;
    padding: 10px 0 20px;
    margin: 0 auto;              /* 额外保险，确保水平居中 */
    box-sizing: border-box;
}

/* ---------- 登录入口 ---------- */
.login-entry {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}
.login-greeting {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.btn-login-link {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: var(--color-primary-light);
    padding: 6px 22px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    font-family: var(--font-family);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}
.btn-login-link:hover {
    background: rgba(37, 99, 235, 0.18);
    border-color: var(--color-primary);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.12);
}

/* ---------- Hero 区 ---------- */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--text-secondary);
    padding: 6px 18px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(8px);
    animation: heroIn 0.7s ease both;
}
.hero-badge b {
    color: var(--color-success);
}
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-4);
    animation: heroIn 0.7s 0.1s ease both;
}
.hero-gradient-text {
    background: var(--color-primary-gradient);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 8s ease-in-out infinite;
}
@keyframes gradientFlow {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-6);
    animation: heroIn 0.7s 0.2s ease both;
}
.typing-text {
    color: var(--color-primary-light);
    font-weight: 600;
}
.typing-cursor {
    color: var(--color-primary-light);
    animation: blink 0.9s step-end infinite;
}
@keyframes blink {
    50% {
        opacity: 0;
    }
}
@keyframes heroIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- 信任数据条 ---------- */
.trust-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    animation: heroIn 0.7s 0.4s ease both;
}
.trust-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-3);
    text-align: center;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}
.trust-item:hover {
    border-color: rgba(37, 99, 235, 0.25);
    background: rgba(30, 41, 59, 0.5);
}
.trust-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--color-primary-gradient);
    transition: width 1s ease;
}
.trust-item:hover::after {
    width: 100%;
}
.trust-num {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
}
.trust-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* ---------- CTA ---------- */
.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
    animation: heroIn 0.7s 0.5s ease both;
}
.btn-cta-primary {
    background: var(--color-primary-gradient);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: var(--radius-full);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-family);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.35);
    transition: var(--transition-base);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 280px;
    line-height: 1.4;
}
.btn-cta-primary::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: calc(var(--radius-full) + 4px);
    background: var(--color-primary-gradient);
    opacity: 0.15;
    filter: blur(16px);
    z-index: -1;
    transition: opacity 0.4s;
}
.btn-cta-primary:hover::before {
    opacity: 0.35;
}
.btn-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(37, 99, 235, 0.45);
}
.btn-main-text {
    font-weight: 700;
    font-size: 1.05rem;
}
.btn-sub-text {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 2px;
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: var(--space-4) var(--space-8);
    flex-wrap: wrap;
    margin: var(--space-2) 0;
}
.cta-feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    padding: 5px 16px 5px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}
.cta-feature-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}
.cta-feature-item i {
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
}

.cta-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2) var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-1);
}
.cta-divider {
    color: rgba(255, 255, 255, 0.06);
    user-select: none;
}
.hero-cta-tip {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.hero-cta-tip b {
    color: var(--color-success);
}

/* ---------- 兼容徽标墙 ---------- */
.compat-section {
    margin-bottom: var(--space-6);
    animation: heroIn 0.7s 0.55s ease both;
}
.compat-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}
.compat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.compat-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    cursor: default;
}
.compat-chip:hover {
    color: var(--text-primary);
    border-color: rgba(37, 99, 235, 0.4);
    background: rgba(37, 99, 235, 0.08);
}

/* ---------- 三步接入 ---------- */
.steps-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-6);
    animation: heroIn 0.7s 0.6s ease both;
}
.step-item {
    text-align: center;
    flex: 1;
}
.step-num {
    width: 36px;
    height: 36px;
    margin: 0 auto var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-primary-gradient);
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}
.step-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}
.step-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.step-arrow {
    color: var(--color-primary-light);
    font-size: 1.2rem;
    padding: 0 var(--space-2);
    opacity: 0.5;
    animation: arrowPulse 2s ease-in-out infinite;
}
@keyframes arrowPulse {
    50% {
        opacity: 1;
        transform: translateX(4px);
    }
}

/* ---------- 核心优势 ---------- */
.features-card {
    animation: heroIn 0.7s 0.65s ease both;
}
.feature-grid-new {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
.feature-card-new {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-4);
    transition: var(--transition-base);
}
.feature-card-new:hover {
    border-color: rgba(37, 99, 235, 0.2);
    background: rgba(37, 99, 235, 0.04);
}
.fcn-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}
.fcn-body h4 {
    font-size: 0.95rem;
    margin-bottom: var(--space-1);
    color: var(--text-primary);
}
.fcn-body p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---------- 安全与合规 ---------- */
.trust-signals {
    margin-top: var(--space-6);
}
.trust-signals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
.trust-signal-item {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    padding: var(--space-4) var(--space-4);
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}
.trust-signal-item:hover {
    border-color: rgba(37, 99, 235, 0.15);
    background: rgba(30, 41, 59, 0.4);
}
.trust-signal-item i {
    font-size: 1.3rem;
    color: var(--color-primary-light);
    margin-top: 2px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}
.trust-signal-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
}
.trust-signal-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ---------- 社会证明 ---------- */
.social-proof {
    margin: var(--space-6) 0 var(--space-4);
    padding: var(--space-4) var(--space-6);
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.social-proof-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.social-proof-inner .trust-num {
    font-size: 1.6rem;
}
.social-proof-inner span:last-child {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---------- 发光边框 ---------- */
[data-glow] {
    position: relative;
}
[data-glow]::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(124, 58, 237, 0.08));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.4s;
}
[data-glow]:hover::before {
    opacity: 1;
}

/* ---------- 主应用布局 ---------- */
.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    transition: transform var(--transition-slow), width var(--transition-slow);
    z-index: 1000;
}
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5) var(--space-4);
    border-bottom: 1px solid var(--border-color);
}
.sidebar .logo {
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.3px;
}
.sidebar-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    display: none;
}
.sidebar-close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-3) 0;
}
.sidebar-nav .menu-item {
    padding: 10px var(--space-5);
    cursor: pointer;
    color: var(--text-secondary);
    border-left: 3px solid transparent;
    transition: var(--transition-fast);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    position: relative;
}
.sidebar-nav .menu-item:hover {
    background: rgba(37, 99, 235, 0.06);
    color: var(--text-primary);
}
.sidebar-nav .menu-item.active {
    border-left-color: var(--color-primary);
    color: var(--color-primary-light);
    background: rgba(37, 99, 235, 0.08);
}
.sidebar-nav .menu-item.active::after {
    content: '';
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
}

.sidebar-footer {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border-color);
}
.sidebar-footer .btn {
    width: 100%;
}

/* ---------- 主内容 ---------- */
.main {
    flex: 1;
    overflow-y: auto;
    background:
        radial-gradient(ellipse at 10% 20%, rgba(37, 99, 235, 0.025) 0%, transparent 60%),
        radial-gradient(ellipse at 90% 80%, rgba(124, 58, 237, 0.015) 0%, transparent 50%),
        var(--bg-base);
    display: flex;
    flex-direction: column;
}

/* ---------- 顶栏 ---------- */
.topbar {
    display: flex;
    align-items: center;
    padding: 0 var(--space-6);
    height: var(--topbar-height);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    gap: var(--space-4);
    position: sticky;
    top: 0;
    z-index: 100;
}
.hamburger-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    display: none;
}
.hamburger-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.topbar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}
.topbar-user {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ---------- 页面容器 ---------- */
.page-container {
    flex: 1;
    padding: var(--space-6) 24px var(--space-10);   /* 左侧改为 24px */
    overflow-y: auto;
}
.page {
    display: none;
    animation: fadeSlideUp 0.4s ease forwards;
}
.page.active {
    display: block;
}
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- 卡片 ---------- */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: var(--space-6) var(--space-7);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transition: var(--transition-base);
}
.card:hover {
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    letter-spacing: -0.2px;
}

/* ---------- 统计卡片 ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}
.stat-card {
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}
.stat-card:hover {
    border-color: rgba(37, 99, 235, 0.15);
    background: rgba(15, 23, 42, 0.7);
}
.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: var(--space-1);
    font-weight: 500;
}

.user-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}
.user-stat-card {
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition-fast);
}
.user-stat-card:hover {
    border-color: rgba(37, 99, 235, 0.12);
    background: rgba(15, 23, 42, 0.7);
}
.user-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary-light);
    word-break: break-all;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.user-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: var(--space-1);
    font-weight: 500;
}

/* ---------- 表格 ---------- */
.table-wrap {
    overflow-x: auto;
    margin-top: var(--space-1);
    border-radius: var(--radius-sm);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
th {
    text-align: left;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.3);
    white-space: nowrap;
}
td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.04);
    vertical-align: middle;
    color: var(--text-primary);
}
tr:hover td {
    background: rgba(37, 99, 235, 0.03);
}
tr:last-child td {
    border-bottom: none;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 7px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color-strong);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-family);
    transition: var(--transition-fast);
    position: relative;
    user-select: none;
    white-space: nowrap;
}
.btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: rgba(148, 163, 184, 0.2);
}
.btn:active {
    transform: scale(0.97);
}
.btn-primary {
    background: var(--color-primary-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-dark));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 28px rgba(37, 99, 235, 0.35);
}
.btn-success {
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--color-success);
}
.btn-success:hover {
    background: var(--color-success-bg);
}
.btn-danger {
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--color-danger);
}
.btn-danger:hover {
    background: var(--color-danger-bg);
}
.btn-warning {
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--color-warning);
}
.btn-warning:hover {
    background: var(--color-warning-bg);
}
.btn-sm {
    padding: 4px 14px;
    font-size: 0.75rem;
}

/* ---------- 表单 ---------- */
.form-group {
    margin-bottom: var(--space-4);
}
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
}
.form-control {
    width: 100%;
    padding: 9px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-family);
    transition: var(--transition-fast);
    outline: none;
}
.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: rgba(15, 23, 42, 0.8);
}
.form-control:hover {
    border-color: rgba(148, 163, 184, 0.2);
}
.form-control::placeholder {
    color: var(--text-muted);
}
.form-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
select.form-control option {
    background: var(--bg-surface);
    color: var(--text-primary);
}
textarea.form-control {
    font-family: var(--font-mono);
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* ---------- 徽章 ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    gap: var(--space-1);
}
.badge-green {
    background: var(--color-success-bg);
    color: var(--color-success);
}
.badge-red {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}
.badge-orange {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}
.badge-blue {
    background: rgba(37, 99, 235, 0.12);
    color: var(--color-primary-light);
}
.badge-purple {
    background: var(--color-purple-bg);
    color: var(--color-purple);
}
.badge-gray {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
}

/* ---------- 分页 ---------- */
.pagination {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: wrap;
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-color);
}
.pagination span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.pagination select {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 0.8rem;
    font-family: var(--font-family);
    outline: none;
}
.pagination select:focus {
    border-color: var(--color-primary);
}

/* ---------- 模态框 ---------- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-modal);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-lg);
    padding: var(--space-8) var(--space-8);
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-glow);
    box-shadow: var(--shadow-xl), 0 0 80px rgba(37, 99, 235, 0.03);
    animation: modalSlide 0.35s ease forwards;
    width: 100%;
}
@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(16px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.modal-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-5);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.modal-content .section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary-light);
    margin: var(--space-5) 0 var(--space-3);
    padding-bottom: var(--space-1);
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
    letter-spacing: 0.2px;
}
.modal-content.modal-lg {
    max-width: 960px;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    background: var(--bg-modal);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glow);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-md);
    z-index: 9999;
    display: none;
    max-width: 480px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(37, 99, 235, 0.05);
    font-weight: 500;
    font-size: 0.9rem;
    align-items: center;
    gap: var(--space-3);
    opacity: 0;
    transform: translateX(40px) scale(0.96);
    transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
}
.toast.success {
    border-left: 4px solid var(--color-success);
}
.toast.success::before {
    content: '✅ ';
}
.toast.error {
    border-left: 4px solid var(--color-danger);
}
.toast.error::before {
    content: '❌ ';
}
.toast.info {
    border-left: 4px solid var(--color-primary);
}
.toast.info::before {
    content: 'ℹ️ ';
}
.toast.warning {
    border-left: 4px solid var(--color-warning);
}
.toast.warning::before {
    content: '⚠️ ';
}

/* ---------- 公开接口卡片 ---------- */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-3);
}
.api-card {
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-4) var(--space-3);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}
.api-card:hover:not(.empty-card) {
    border-color: rgba(37, 99, 235, 0.2);
    background: rgba(15, 23, 42, 0.6);
}
.api-card.empty-card {
    border: 1px dashed var(--border-color);
    background: rgba(15, 23, 42, 0.2);
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: default;
    opacity: 0.5;
    min-height: 80px;
}
.api-card .api-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.api-card .api-path {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    word-break: break-all;
    margin-bottom: var(--space-1);
}
.api-card .api-method {
    display: inline-block;
    padding: 1px 10px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(37, 99, 235, 0.12);
    color: var(--color-primary-light);
    margin-right: var(--space-1);
    text-transform: uppercase;
}
.api-card .api-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-success);
}
.api-card .api-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: var(--space-1);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.api-card .api-footer {
    margin-top: var(--space-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-2);
}

.public-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-3);
}
.public-controls {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: wrap;
}
.public-controls .form-control {
    width: 200px;
}
.public-pagination {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    align-items: center;
    margin-top: var(--space-4);
    flex-wrap: wrap;
}

/* ---------- 接口信息卡片 ---------- */
.api-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-3);
}
.api-info-card {
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-4);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
}
.api-info-card:hover {
    border-color: rgba(37, 99, 235, 0.15);
    background: rgba(15, 23, 42, 0.6);
}
.api-info-card .api-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}
.api-info-card .api-path {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-bottom: var(--space-2);
    word-break: break-all;
}
.api-info-card .api-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}
.api-info-card .api-meta .badge {
    font-size: 0.65rem;
}
.api-info-card .api-actions {
    margin-top: auto;
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* ---------- 其他组件 ---------- */
.code-wrapper {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: wrap;
}
.code-wrapper .form-control {
    flex: 1 1 0;
    min-width: 100px;
}
.code-wrapper .btn-send {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 18px;
    font-size: 0.85rem;
    white-space: nowrap;
}
.code-wrapper .btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pwd-wrapper {
    position: relative;
    width: 100%;
}
.pwd-wrapper .form-control {
    padding-right: 44px;
}
.pwd-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    user-select: none;
    line-height: 1;
    transition: var(--transition-fast);
}
.pwd-toggle:hover {
    color: var(--text-secondary);
}

.copy-btn {
    background: transparent;
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--color-success);
    padding: 2px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition-fast);
    font-family: var(--font-family);
}
.copy-btn:hover {
    background: var(--color-success-bg);
}

.usage-btn {
    background: transparent;
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: var(--color-primary-light);
    padding: 2px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition-fast);
    font-family: var(--font-family);
}
.usage-btn:hover {
    background: rgba(37, 99, 235, 0.08);
}

.error-msg {
    color: var(--color-danger);
    font-size: 0.85rem;
    margin-top: var(--space-1);
}
.inline-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-1);
}

.mode-group {
    display: flex;
    gap: var(--space-6);
    align-items: center;
    flex-wrap: wrap;
    padding: var(--space-1) 0;
}
.mode-group label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
}
.mode-group input[type="radio"] {
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.cache-actions {
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
}
.cache-actions .btn {
    padding: 2px 10px;
    font-size: 0.7rem;
}

.response-preview {
    background: rgba(15, 23, 42, 0.6);
    padding: var(--space-4);
    border-radius: var(--radius-sm);
    margin-top: var(--space-2);
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    line-height: 1.7;
}

.usage-preview {
    background: rgba(15, 23, 42, 0.5);
    padding: var(--space-4);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
    color: var(--text-secondary);
    line-height: 1.8;
}
.usage-preview h1,
.usage-preview h2,
.usage-preview h3 {
    color: var(--text-primary);
    margin-top: var(--space-3);
    margin-bottom: var(--space-1);
}
.usage-preview code {
    background: rgba(15, 23, 42, 0.6);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--color-primary-light);
}
.usage-preview pre {
    background: rgba(15, 23, 42, 0.6);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    border: 1px solid var(--border-color);
}
.usage-preview blockquote {
    border-left: 3px solid var(--color-primary);
    padding-left: var(--space-3);
    color: var(--text-secondary);
    margin: var(--space-2) 0;
}
.usage-preview a {
    color: var(--color-primary-light);
    text-decoration: none;
}
.usage-preview a:hover {
    text-decoration: underline;
}

.search-bar {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    margin-bottom: var(--space-2);
}
.search-bar .form-control {
    flex: 1;
}
.search-bar .btn {
    flex-shrink: 0;
}

/* ---------- 预设金额按钮 ---------- */
.preset-amount {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-family);
    font-size: 0.8rem;
}
.preset-amount:hover {
    background: rgba(255, 255, 255, 0.08);
}
.preset-amount.active {
    background: rgba(37, 99, 235, 0.2);
    color: var(--color-primary-light);
    border-color: var(--color-primary);
}

/* ---------- Tab 按钮 ---------- */
.tab-nav {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}
.tab-btn {
    padding: 6px 20px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    transition: var(--transition-fast);
    border: 1px solid transparent;
    user-select: none;
}
.tab-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}
.tab-btn.active {
    background: rgba(37, 99, 235, 0.12);
    color: var(--color-primary-light);
    border-color: rgba(37, 99, 235, 0.2);
}

/* ---------- 模型价格卡片 ---------- */
.model-price-card .model-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.model-price-card .model-price-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-1);
}
.model-price-card .price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding: 3px 0;
    border-bottom: 1px solid var(--border-color);
}
.model-price-card .price-item:last-child {
    border-bottom: none;
}
.model-price-card .price-label {
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
}
.model-price-card .price-label i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
}
.model-price-card .price-value {
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
.model-price-card .price-item.input .price-value {
    color: #60a5fa;
}
.model-price-card .price-item.output .price-value {
    color: #34d399;
}
.model-price-card .price-unit {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: var(--space-1);
    padding-top: var(--space-1);
    border-top: 1px solid var(--border-color);
}

/* ---------- 登录模态框 ---------- */
.login-modal-content {
    max-width: 420px;
    padding: var(--space-8) var(--space-8);
}
.login-modal-content h2 {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-6);
    letter-spacing: -0.3px;
}
.login-modal-content .form-group {
    margin-bottom: var(--space-4);
}
.login-modal-content .form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
    display: block;
}
.login-modal-content .btn {
    width: 100%;
    padding: 11px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: var(--space-1);
}
.login-modal-content a {
    color: var(--color-primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}
.login-modal-content a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}
.login-modal-content .error-msg {
    color: var(--color-danger);
    font-size: 0.8rem;
    margin-top: var(--space-1);
}

/* ---------- 首页页脚 ---------- */
.home-footer {
    margin-top: auto;
    padding: var(--space-6) 0 var(--space-3);
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    width: 100%;
}
.home-footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-4);
    max-width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-4);
}
.home-footer-inner .link-btn {
    background: none;
    border: none;
    color: var(--color-primary-light);
    cursor: pointer;
    font: inherit;
    padding: 0 4px;
    text-decoration: none;
    transition: var(--transition-fast);
}
.home-footer-inner .link-btn:hover {
    color: var(--color-primary);
    text-decoration: underline;
}
.home-footer-inner .sep {
    color: rgba(148, 163, 184, 0.15);
    user-select: none;
}

/* ---------- Shimmer 骨架屏 ---------- */
.shimmer-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.015);
    border-radius: var(--radius-md);
}
.shimmer-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.04) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: shimmerSmooth 2s ease-in-out infinite;
}
@keyframes shimmerSmooth {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}
.shimmer-card .shimmer-line {
    height: 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-1);
}
.shimmer-card .shimmer-line:last-child {
    width: 60%;
}
.shimmer-card .shimmer-line-sm {
    height: 8px;
    width: 40%;
}

/* ---------- 进度条 ---------- */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--color-primary-gradient);
    background-size: 200% 100%;
    z-index: 99999;
    transition: width 0.3s ease;
    animation: progressGradient 1.5s linear infinite;
    pointer-events: none;
    opacity: 0;
}
.progress-bar.active {
    opacity: 1;
}
@keyframes progressGradient {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

/* ---------- 复制脉冲 ---------- */
@keyframes copyPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}
.copy-flash {
    animation: copyPulse 0.6s ease;
}

/* ---------- 空状态 ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-10) var(--space-5);
    color: var(--text-muted);
    text-align: center;
}
.empty-state .empty-icon {
    font-size: 2.8rem;
    margin-bottom: var(--space-3);
    opacity: 0.4;
}
.empty-state .empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
}
.empty-state .empty-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 400px;
}

/* ---------- 状态指示器 ---------- */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}
.status-indicator .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}
.status-indicator .dot.on {
    background: var(--color-success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}
.status-indicator .dot.off {
    background: var(--color-danger);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}
.status-indicator .dot.pending {
    background: var(--color-warning);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
    animation: pulseDot 1.5s ease-in-out infinite;
}

/* ---------- 模态框锁定滚动 ---------- */
body.modal-open {
    overflow: hidden;
}

/* ================================================================
   📱 响应式设计
   ================================================================ */

/* 平板及以下 */
@media (max-width: 1024px) {
    .login-page {
        padding: var(--space-4) var(--space-5) var(--space-8);
    }
    .hero-title {
        font-size: 2.6rem;
    }
}

@media (max-width: 820px) {
    .login-page {
        padding: var(--space-4) var(--space-4) var(--space-6);
    }
    .login-left {
        max-width: 100%;
    }
    .api-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .user-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* 侧栏滑动 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        width: 280px;
        z-index: 1100;
        border-right: 1px solid var(--border-color-strong);
        box-shadow: var(--shadow-xl);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close-btn {
        display: block;
    }
    .hamburger-btn {
        display: block;
    }
    .main {
        padding: 0;
    }
    .topbar {
        padding: 0 var(--space-4);
    }
    .page-container {
        padding: var(--space-4) var(--space-4) var(--space-8);
    }
    .card {
        padding: var(--space-4) var(--space-4);
    }

    
    .modal-content {
        padding: var(--space-5) var(--space-4);
    }
    .api-info-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    /* 营销区 */
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
    .trust-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    .steps-section {
        flex-direction: column;
        gap: var(--space-3);
        padding: var(--space-4);
    }
    .step-arrow {
        transform: rotate(90deg);
        padding: var(--space-1) 0;
    }
    .feature-grid-new {
        grid-template-columns: 1fr;
    }
    .trust-signals-grid {
        grid-template-columns: 1fr;
    }
    .social-proof-inner {
        font-size: 0.95rem;
    }
    .social-proof-inner .trust-num {
        font-size: 1.3rem;
    }
}

/* 手机 */
@media (max-width: 480px) {
    .login-page {
        padding: var(--space-3) var(--space-3) var(--space-5);
    }
    .login-entry {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-2);
    }
    .login-greeting {
        text-align: center;
    }
    .btn-login-link {
        justify-content: center;
    }

    .hero-title {
        font-size: 1.6rem;
    }
    .hero-subtitle {
        font-size: 0.85rem;
    }
    .hero-badge {
        font-size: 0.75rem;
        padding: 4px 14px;
    }
    .btn-cta-primary {
        padding: 12px 24px;
        font-size: 0.9rem;
        min-width: 100%;
        width: 100%;
    }
    .btn-main-text {
        font-size: 0.9rem;
    }
    .btn-sub-text {
        font-size: 0.7rem;
    }
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .cta-features {
        flex-direction: column;
        align-items: center;
        gap: var(--space-2);
    }
    .cta-feature-item {
        font-size: 0.75rem;
        padding: 4px 14px 4px 10px;
        width: 100%;
        justify-content: center;
    }
    .cta-feature-item i {
        font-size: 0.8rem;
        width: 16px;
    }
    .cta-footer {
        flex-direction: column;
        gap: var(--space-1);
    }
    .cta-divider {
        display: none;
    }
    .hero-cta-tip {
        font-size: 0.75rem;
    }

    .trust-bar {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }
    .trust-item {
        padding: var(--space-3) var(--space-2);
    }
    .trust-num {
        font-size: 1.3rem;
    }
    .trust-label {
        font-size: 0.65rem;
    }

    .steps-section {
        padding: var(--space-3);
        gap: var(--space-2);
    }
    .step-num {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    .step-title {
        font-size: 0.8rem;
    }
    .step-desc {
        font-size: 0.7rem;
    }
    .step-arrow {
        font-size: 1rem;
    }

    .compat-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-1);
    }
    .compat-chip {
        font-size: 0.7rem;
        padding: 4px 10px;
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .feature-card-new {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: var(--space-3);
    }
    .fcn-icon {
        font-size: 1.8rem;
    }
    .fcn-body h4 {
        font-size: 0.85rem;
    }
    .fcn-body p {
        font-size: 0.75rem;
    }

    .trust-signal-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: var(--space-3);
    }
    .trust-signal-item i {
        margin-top: 0;
        margin-bottom: var(--space-1);
    }
    .trust-signal-item strong {
        font-size: 0.85rem;
    }
    .trust-signal-item span {
        font-size: 0.75rem;
    }

    .social-proof {
        padding: var(--space-3) var(--space-4);
    }
    .social-proof-inner {
        font-size: 0.85rem;
        flex-direction: column;
        gap: var(--space-1);
    }
    .social-proof-inner .trust-num {
        font-size: 1.2rem;
    }
    .social-proof-inner span:last-child {
        font-size: 0.75rem;
    }

    .home-footer-inner {
        flex-direction: column;
        gap: var(--space-2);
        font-size: 0.75rem;
    }
    .home-footer-inner .sep {
        display: none;
    }

    .api-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    .api-info-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        width: 260px;
    }
    .topbar-title {
        font-size: 0.9rem;
    }
    .topbar-user {
        font-size: 0.75rem;
    }
    .page-container {
        padding: var(--space-3) var(--space-3) var(--space-6);
    }
    .card {
        padding: var(--space-3) var(--space-3);
        border-radius: var(--radius-md);
    }
    .card-title {
        font-size: 0.9rem;
        gap: var(--space-2);
    }
    .modal-content {
        padding: var(--space-4) var(--space-3);
        max-height: 95vh;
        border-radius: var(--radius-md);
    }
    .modal-content h3 {
        font-size: 1.1rem;
    }
    .public-controls .form-control {
        width: 100%;
    }
    .public-header {
        flex-direction: column;
        align-items: stretch;
    }
    .flex {
        gap: var(--space-2);
    }
    .flex-1 {
        min-width: 100%;
    }
    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-bar .btn {
        width: 100%;
    }
    .pagination {
        justify-content: center;
        gap: var(--space-1);
    }
    .pagination span {
        font-size: 0.75rem;
    }
    .btn {
        font-size: 0.75rem;
        padding: 5px 14px;
    }
    .btn-sm {
        padding: 3px 10px;
        font-size: 0.7rem;
    }
    .code-wrapper {
        flex-wrap: wrap;
    }
    .code-wrapper .btn-send {
        width: 100%;
    }
    .modal-content.modal-lg {
        width: 98% !important;
        padding: var(--space-4) var(--space-3);
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-2);
    }
    .user-stats-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-2);
    }
    .stat-value {
        font-size: 1.4rem;
    }
    .user-stat-value {
        font-size: 1.5rem;
    }

    /* 表格响应式 */
    .table-wrap {
        font-size: 0.75rem;
    }
    th,
    td {
        padding: 6px 8px;
        font-size: 0.7rem;
    }
    th {
        font-size: 0.6rem;
    }

    /* 算力市场 */
    #page-token-market>.card>div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    #myTokenOrdersBody td {
        font-size: 0.65rem;
        padding: 4px 4px;
    }
    #myTokenOrdersBody th {
        font-size: 0.6rem;
        padding: 4px 4px;
    }

    /* 模型服务 */
    #aiHelp .table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin: var(--space-2) 0;
        font-size: 0.7rem;
    }
    #aiHelp .table-wrap table {
        min-width: 360px;
        font-size: 0.7rem;
    }
    #aiHelp .table-wrap th,
    #aiHelp .table-wrap td {
        padding: 4px 6px !important;
        font-size: 0.65rem;
        white-space: nowrap;
    }
    #aiHelp pre {
        font-size: 0.65rem !important;
        padding: 6px 8px !important;
        white-space: pre-wrap !important;
        word-break: break-all !important;
        max-height: 160px;
        overflow-y: auto;
    }
    #aiHelp code {
        font-size: 0.65rem !important;
    }
    #aiHelp>div[style*="background:rgba(64,159,255,0.04)"] {
        flex-wrap: wrap !important;
        padding: 4px 10px !important;
        gap: 4px !important;
    }
    #aiHelp>div[style*="background:rgba(64,159,255,0.04)"] code {
        font-size: 0.7rem !important;
        word-break: break-all;
    }
    #aiHelp>div[style*="display:flex; gap:24px; flex-wrap:wrap"] {
        gap: var(--space-2) !important;
        font-size: 0.7rem !important;
    }
    #aiHelp {
        padding: var(--space-3) var(--space-2) !important;
    }
    #aiHelp p {
        font-size: 0.75rem !important;
        line-height: 1.6 !important;
    }

    /* 模态框内表单 */
    .login-modal-content {
        padding: var(--space-5) var(--space-4);
    }
    .login-modal-content h2 {
        font-size: 1.3rem;
    }

    /* 图表高度 */
    #myCallsChart,
    #pricingHistoryChart,
    #pubPricingHistoryChart {
        height: 160px !important;
    }

    /* 充值模态框 */
    #rechargeModal .preset-amount {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
    #rechargeModal .form-control#rechargeAmount {
        font-size: 0.9rem;
        height: 36px;
    }

    /* 按钮组换行 */
    #userStats .flex {
        gap: var(--space-2);
    }
    #userStats .flex .btn {
        flex: 1 1 auto;
        min-width: 80px;
        justify-content: center;
    }
}

/* 安全区域适配 */
@supports (padding: env(safe-area-inset-bottom)) {
    .page-container {
        padding-bottom: calc(var(--space-8) + env(safe-area-inset-bottom));
    }
    .login-page {
        padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
    }
}

/* 禁用全局悬停位移（保持稳定） */
#mainApp .card:hover,
#mainApp .stat-card:hover,
#mainApp .user-stat-card:hover,
#mainApp .api-info-card:hover,
#mainApp .feature-card-new:hover,
#mainApp .trust-signal-item:hover,
#mainApp .compat-chip:hover,
#mainApp .menu-item:hover,
#mainApp .btn:hover,
#mainApp .btn-cta-primary:hover,
#mainApp .btn:active,
#mainApp .btn-cta-primary:active,
#mainApp .table-wrap tr:hover {
    transform: none !important;
}

/* 保留菜单项的位移（可选） */
.sidebar-nav .menu-item:hover {
    transform: none !important;
}

/* ================================================================
   🔧 额外辅助类
================================================================ */

/* 隐藏滚动条（用于特定容器） */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* 文本截断 */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 柔性容器 */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.flex-col {
    display: flex;
    flex-direction: column;
}

/* 网格工具 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-4);
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* 毛玻璃增强 */
.glass {
    background: var(--bg-elevated);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
}

/* 渐变文字 */
.gradient-text {
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 卡片悬停提升 */
.card-hover-lift {
    transition: var(--transition-base);
}
.card-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* 脉冲动画（通用） */
@keyframes pulse-glow {
    0%,
    100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* 隐藏仪表盘卡片标题 */
#dashTitle {
    display: none;
}

/* ===== 仪表盘欢迎区域 ===== */
#welcomeMsg {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(124, 58, 237, 0.03));
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

#welcomeMsg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--color-primary-gradient);
    border-radius: 0 2px 2px 0;
}

#welcomeMsg .user-name {
    color: var(--color-primary-light);
    font-weight: 700;
}

#welcomeMsg .user-email {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 12px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#welcomeMsg .user-email::before {
    content: '📧';
    font-size: 12px;
}

/* 响应式调整 */
@media (max-width: 480px) {
    #welcomeMsg {
        font-size: 15px;
        padding: 6px 12px;
        gap: 4px 10px;
        border-radius: var(--radius-sm);
    }
    #welcomeMsg .user-email {
        font-size: 11px;
        padding: 1px 10px;
    }
}

/* ================================================================
   🚀 使用指南（2×2 网格布局 · 头部单行）
   ================================================================ */
.guide-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(124, 58, 237, 0.02));
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.1);
    overflow: hidden;
    position: relative;
}

/* 顶部渐变装饰条 */
.guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-purple));
    z-index: 1;
}

/* ---------- 头部（单行，全部左对齐） ---------- */
.guide-header {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
    flex-wrap: wrap;
}

.guide-title-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.guide-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    flex-shrink: 0;
}

/* ---------- 副标题（胶囊） ---------- */
.guide-subtitle {
    font-size: 11.5px;
    font-weight: 400;
    color: var(--text-muted);
    padding: 3px 10px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 30px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
}

/* ---------- QQ 群按钮（紧凑胶囊，紧跟副标题） ---------- */
.guide-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    margin-left: 2px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 30px;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
}

.guide-cta:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.3);
    color: var(--text-primary);
}

.guide-cta:active {
    transform: scale(0.97);
}

.guide-cta i {
    color: var(--color-primary-light);
    font-size: 11px;
}

.guide-cta code {
    font-family: var(--font-mono);
    color: var(--color-primary-light);
    font-size: 11px;
    letter-spacing: 0.3px;
    font-weight: 600;
}

/* ---------- 步骤网格 ---------- */
.guide-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 6px 0;
}

.guide-step {
    display: flex;
    gap: 12px;
    padding: 12px 18px;
    transition: background 0.2s;
    align-items: flex-start;
    position: relative;
    min-width: 0;
}

/* 用伪元素画分隔线 */
.guide-step::after {
    content: '';
    position: absolute;
    background: rgba(148, 163, 184, 0.06);
    pointer-events: none;
}

/* 左列元素的右侧竖线 */
.guide-step:nth-child(odd)::after {
    top: 12px;
    bottom: 12px;
    right: 0;
    width: 1px;
}

/* 第一行元素的底部横线 */
.guide-step:nth-child(-n+2)::after {
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 1px;
}

.guide-step:nth-child(odd):nth-child(-n+2)::after {
    right: 0;
}

.guide-step:hover {
    background: rgba(37, 99, 235, 0.04);
}

/* ---------- 编号徽章 ---------- */
.guide-step-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    letter-spacing: 0.5px;
    line-height: 1;
}

/* ---------- 步骤内容 ---------- */
.guide-step-body {
    flex: 1;
    min-width: 0;
}

.guide-step-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
    line-height: 1.4;
}

.guide-step-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.55;
    word-break: break-word;
}

/* ================================================================
   📱 响应式
   ================================================================ */

/* 平板及以下：单列堆叠 */
@media (max-width: 768px) {
    .guide-steps {
        grid-template-columns: 1fr;
    }

    .guide-step::after {
        display: none;
    }

    .guide-step {
        border-bottom: 1px solid rgba(148, 163, 184, 0.06);
        padding: 12px 18px;
    }

    .guide-step:last-child {
        border-bottom: none;
    }
}

/* 手机端 */
@media (max-width: 480px) {
    .guide-header {
        padding: 12px 14px;
        gap: 8px;
    }

    .guide-title-icon {
        font-size: 15px;
    }

    .guide-title {
        font-size: 13px;
    }

    /* 字号缩小 */
    .guide-subtitle {
        font-size: 10.5px;
        padding: 2px 8px;
    }

    .guide-cta {
        font-size: 10.5px;
        padding: 2px 8px;
        gap: 4px;
    }

    .guide-cta i {
        font-size: 10px;
    }

    .guide-cta code {
        font-size: 10px;
    }

    .guide-step {
        padding: 10px 14px;
        gap: 10px;
    }

    .guide-step-num {
        width: 26px;
        height: 26px;
        font-size: 10px;
        border-radius: 6px;
    }

    .guide-step-title {
        font-size: 12.5px;
    }

    .guide-step-desc {
        font-size: 11.5px;
    }
}

/* ================================================================
   📊 算力价值说明卡片
   ================================================================ */
.value-info-card {
    margin-top: 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(124, 58, 237, 0.02));
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.1);
    padding: 16px 20px 18px;
    position: relative;
    overflow: hidden;
}

/* 左侧渐变竖条 */
.value-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: linear-gradient(180deg, #409eff, #7c3aed);
}

/* ---------- 头部 ---------- */
.value-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.value-info-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.value-info-title {
    font-size: 15px;
    font-weight: 700;
    color: #aab;
    letter-spacing: -0.2px;
}

/* 状态胶囊（脉冲点） */
.value-info-badge {
    font-size: 11px;
    font-weight: 500;
    color: #409eff;
    padding: 3px 10px 3px 9px;
    background: rgba(64, 159, 255, 0.08);
    border: 1px solid rgba(64, 159, 255, 0.2);
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.value-info-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #409eff;
    box-shadow: 0 0 0 0 rgba(64, 159, 255, 0.6);
    animation: pulseDotBlue 2s infinite;
    flex-shrink: 0;
}

@keyframes pulseDotBlue {
    0% {
        box-shadow: 0 0 0 0 rgba(64, 159, 255, 0.5);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(64, 159, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(64, 159, 255, 0);
    }
}

/* ---------- 供需对比双栏 ---------- */
.value-info-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.value-flow-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

/* 上升（需求增加）— 绿色系 */
.value-flow-up {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(16, 185, 129, 0.02));
    border-color: rgba(16, 185, 129, 0.18);
}

.value-flow-up:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.04));
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

/* 下降（供应增加）— 红色系 */
.value-flow-down {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06), rgba(239, 68, 68, 0.02));
    border-color: rgba(239, 68, 68, 0.18);
}

.value-flow-down:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.04));
    border-color: rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

/* 图标 */
.value-flow-item .flow-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.value-flow-item .flow-body {
    min-width: 0;
    flex: 1;
}

.value-flow-item .flow-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 2px;
}

.value-flow-up .flow-title {
    color: #67c23a;
}

.value-flow-down .flow-title {
    color: #f56c6c;
}

.value-flow-item .flow-desc {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 中间 VS 分隔 */
.flow-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 4px;
    flex-shrink: 0;
}

.flow-divider-line {
    width: 1px;
    height: 12px;
    background: linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.3), transparent);
}

.flow-divider-text {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    background: rgba(148, 163, 184, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.4;
}

/* ---------- 底部结论条 ---------- */
.value-info-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.08);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    flex-wrap: wrap;
}

.value-info-footer .footer-icon {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.value-info-footer strong {
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    margin: 0 1px;
    white-space: nowrap;
}

/* 复用参考价卡片的高亮类，保证全局一致 */
.value-info-footer .hl-blue {
    color: #409eff;
    background: rgba(64, 159, 255, 0.1);
}

/* ================================================================
   📱 响应式
   ================================================================ */
@media (max-width: 768px) {
    /* 双栏改为上下堆叠 */
    .value-info-flow {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* VS 分隔条改为水平方向 */
    .flow-divider {
        flex-direction: row;
        padding: 2px 0;
        gap: 8px;
    }

    .flow-divider-line {
        width: auto;
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.3), transparent);
    }
}

@media (max-width: 480px) {
    .value-info-card {
        padding: 14px 16px 16px;
        margin-top: 14px;
    }
    .value-info-icon {
        font-size: 16px;
    }
    .value-info-title {
        font-size: 14px;
    }
    .value-info-badge {
        font-size: 10px;
        padding: 2px 8px 2px 7px;
        gap: 5px;
    }
    .value-flow-item {
        padding: 10px 12px;
        gap: 10px;
    }
    .value-flow-item .flow-icon {
        font-size: 20px;
    }
    .value-flow-item .flow-title {
        font-size: 12.5px;
    }
    .value-flow-item .flow-desc {
        font-size: 11px;
    }
    .value-info-footer {
        font-size: 11.5px;
        padding: 8px 10px;
        gap: 8px;
    }
    .value-info-footer strong {
        padding: 0 4px;
        white-space: normal;
    }
}

/* ================================================================
   💡 参考价说明卡片
   ================================================================ */
.price-info-card {
    margin-top: 24px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(124, 58, 237, 0.02));
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.1);
    padding: 18px 22px 20px;
    position: relative;
    overflow: hidden;
}

/* 左侧渐变竖条 */
.price-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: linear-gradient(180deg, #409eff, #7c3aed);
}

/* ---------- 头部 ---------- */
.price-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.price-info-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.price-info-title {
    font-size: 15px;
    font-weight: 700;
    color: #f7c948;
    letter-spacing: -0.2px;
}

/* 状态胶囊（带脉冲点） */
.price-info-badge {
    font-size: 11px;
    font-weight: 500;
    color: #67c23a;
    padding: 3px 10px 3px 9px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.price-info-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #67c23a;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: pulseDot 2s infinite;
    flex-shrink: 0;
}

/* ---------- 正文 ---------- */
.price-info-text {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.9;
    margin: 0 0 14px 0;
}

/* 高亮关键词 */
.price-info-text strong {
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    margin: 0 1px;
    white-space: nowrap;
}

.hl-blue {
    color: #409eff;
    background: rgba(64, 159, 255, 0.1);
}
.hl-gold {
    color: #f7c948;
    background: rgba(247, 201, 72, 0.1);
}
.hl-green {
    color: #67c23a;
    background: rgba(16, 185, 129, 0.1);
}

/* ---------- 底部三宫格要点 ---------- */
.price-info-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.06);
}

.price-info-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    min-width: 0;
}

.price-info-chip:hover {
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(37, 99, 235, 0.18);
    color: var(--text-primary);
}

.price-info-chip .chip-icon {
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}

.price-info-chip span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ================================================================
   📱 响应式
   ================================================================ */
@media (max-width: 768px) {
    .price-info-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .price-info-card {
        padding: 14px 16px 16px;
        margin-top: 18px;
    }
    .price-info-icon {
        font-size: 16px;
    }
    .price-info-title {
        font-size: 14px;
    }
    .price-info-badge {
        font-size: 10px;
        padding: 2px 8px 2px 7px;
        gap: 5px;
    }
    .price-info-text {
        font-size: 12.5px;
        line-height: 1.85;
    }
    .price-info-text strong {
        padding: 0 4px;
        white-space: normal;
    }
    .price-info-chip {
        font-size: 11.5px;
        padding: 7px 10px;
    }
}

/* ================================================================
   🧑‍💻 国产 AI 生态接入卡片
   ================================================================ */
.eco-info-card {
    margin-top: 18px;
    padding: 16px 20px 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(124, 58, 237, 0.02));
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.1);
    position: relative;
    overflow: hidden;
}

/* 左侧渐变竖条 */
.eco-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: linear-gradient(180deg, #409eff, #7c3aed);
}

/* ---------- 头部 ---------- */
.eco-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.eco-info-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.eco-info-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

/* 状态胶囊（蓝色脉冲） */
.eco-info-badge {
    font-size: 11px;
    font-weight: 500;
    color: #409eff;
    padding: 3px 10px 3px 9px;
    background: rgba(64, 159, 255, 0.08);
    border: 1px solid rgba(64, 159, 255, 0.2);
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.eco-info-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #409eff;
    box-shadow: 0 0 0 0 rgba(64, 159, 255, 0.6);
    animation: pulseDotBlue 2s infinite;
    flex-shrink: 0;
}

/* 若 loader.css 中尚未定义 pulseDotBlue，则补上 */
@keyframes pulseDotBlue {
    0%   { box-shadow: 0 0 0 0 rgba(64, 159, 255, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(64, 159, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(64, 159, 255, 0); }
}

/* ---------- 正文 ---------- */
.eco-info-text {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.85;
    margin: 0 0 14px 0;
}

.eco-info-text strong {
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    margin: 0 1px;
    white-space: nowrap;
}

/* 复用全局高亮类 */
.eco-info-text .hl-blue {
    color: #409eff;
    background: rgba(64, 159, 255, 0.1);
}
.eco-info-text .hl-green {
    color: #67c23a;
    background: rgba(16, 185, 129, 0.1);
}

/* ---------- 余额查询 URL 行 ---------- */
.eco-url-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(64, 159, 255, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.eco-url-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.eco-url-label .eco-url-icon {
    font-size: 13px;
    line-height: 1;
}

.eco-url-value {
    flex: 1;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: #66b1ff;
    font-weight: 600;
    word-break: break-all;
    letter-spacing: 0.2px;
}

.eco-url-copy {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(64, 159, 255, 0.08);
    border: 1px solid rgba(64, 159, 255, 0.2);
    border-radius: 6px;
    color: #66b1ff;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    font-family: var(--font-family);
    padding: 0;
}

.eco-url-copy:hover {
    background: rgba(64, 159, 255, 0.18);
    border-color: rgba(64, 159, 255, 0.4);
    color: #fff;
}

.eco-url-copy:active {
    transform: scale(0.92);
}

.eco-url-copy.copied {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #67c23a;
}

/* ---------- 底部双要点 ---------- */
.eco-info-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.06);
}

.eco-info-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    min-width: 0;
}

.eco-info-chip:hover {
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(37, 99, 235, 0.18);
    color: var(--text-primary);
}

.eco-info-chip .chip-icon {
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}

.eco-info-chip span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ================================================================
   📱 响应式
   ================================================================ */
@media (max-width: 768px) {
    .eco-info-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .eco-info-card {
        padding: 14px 16px 16px;
        margin-top: 14px;
    }
    .eco-info-icon {
        font-size: 16px;
    }
    .eco-info-title {
        font-size: 14px;
    }
    .eco-info-badge {
        font-size: 10px;
        padding: 2px 8px 2px 7px;
        gap: 5px;
    }
    .eco-info-text {
        font-size: 12.5px;
        line-height: 1.8;
    }
    .eco-info-text strong {
        padding: 0 4px;
        white-space: normal;
    }
    .eco-url-row {
        padding: 8px 10px;
        gap: 8px;
    }
    .eco-url-label {
        font-size: 11.5px;
        flex-basis: 100%;
    }
    .eco-url-value {
        font-size: 11.5px;
    }
    .eco-url-copy {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    .eco-info-chip {
        font-size: 11.5px;
        padding: 7px 10px;
    }
}

/* ================================================================
   📋 收支明细页面
   REQ-ID TRANSFERS-CSS-001
   ================================================================ */

/* ---------- 顶部区域：账户概览 + 刷新按钮 ---------- */
.transfers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.transfers-overview {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 14px;
}

.transfers-overview .overview-item {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.transfers-overview .overview-label {
    color: var(--text-secondary);
}

.transfers-overview .overview-value-points {
    color: #409eff;
    font-size: 16px;
    font-weight: 700;
}

.transfers-overview .overview-value-cash {
    color: #67c23a;
    font-size: 16px;
    font-weight: 700;
}

.transfers-overview .overview-unit {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 2px;
}

/* ---------- 快捷筛选按钮组 ---------- */
.transfers-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.transfer-filter {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-family);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.transfer-filter:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.transfer-filter.active {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.3);
    color: var(--color-primary-light);
    font-weight: 600;
}

/* ---------- 流水表格行 ---------- */
#transfersBody td {
    font-size: 13px;
    padding: 8px 10px;
    vertical-align: middle;
}

#transfersBody .cell-time {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

#transfersBody .cell-amount {
    font-weight: 600;
    white-space: nowrap;
}

#transfersBody .amount-unit {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 2px;
}

#transfersBody .cell-fee {
    color: var(--text-muted);
    font-size: 12px;
}

/* ---------- 金额正负色 ---------- */
#transfersBody .is-plus {
    color: #67c23a;   /* 收入：绿色 */
}

#transfersBody .is-minus {
    color: #f56c6c;   /* 支出：红色 */
}

/* ---------- 类型徽章 ---------- */
#transfersBody .badge {
    font-size: 11px;
    padding: 2px 10px;
    white-space: nowrap;
}

/* ---------- 分页按钮间隔 ---------- */
#transfersPagination .pagination-gap {
    margin-left: 10px;
}

/* ---------- 响应式适配（手机端） ---------- */
@media (max-width: 480px) {
    .transfers-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .transfers-overview {
        gap: 16px;
        font-size: 13px;
    }
    .transfers-overview .overview-value-points,
    .transfers-overview .overview-value-cash {
        font-size: 15px;
    }
    .transfers-filters {
        gap: 6px;
    }
    .transfer-filter {
        font-size: 11px;
        padding: 3px 12px;
    }
    #transfersBody td {
        font-size: 12px;
        padding: 6px 6px;
    }
    #transfersBody .cell-time {
        font-size: 11px;
    }
    #transfersBody .badge {
        font-size: 10px;
        padding: 1px 8px;
    }
    #transfersBody .amount-unit {
        font-size: 10px;
    }
}

/* ---------- 可复制徽章：悬停反馈 ---------- */
.badge-blue[title] {
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    user-select: none;
}

.badge-blue[title]:hover {
    background: rgba(64, 159, 255, 0.25);
    border-color: rgba(64, 159, 255, 0.4);
    color: #fff;
}

.badge-blue[title]:active {
    transform: scale(0.94);
}

/* ---------- 复制成功对勾状态（.copied） ---------- */
.copied {
    background: rgba(16, 185, 129, 0.18) !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
    color: #67c23a !important;
}

/* ================================================================
   📋 可复制的代码 / URL（表格内）
   REQ-ID COMMON-COPY-CODE-CSS-001
   ================================================================ */
.copy-code {
    display: inline-block;
    cursor: pointer;
    user-select: none;
    max-width: 100%;
    word-break: break-all;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.copy-code:hover {
    background: rgba(64, 159, 255, 0.18) !important;
    color: #66b1ff !important;
}

.copy-code:active {
    transform: scale(0.98);
}

/* 复制成功的绿色闪烁 */
.copy-code.copied {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #67c23a !important;
}

/* ================================================================
   🌐 网络服务 · 全页面样式（整体布局优化版）
   REQ-ID NETWORK-CSS-FULL-006
   结构：工具条 → 快速引导 → 设备区 → 隧道区
   ================================================================ */

/* ================================================================
   ① 工具条
   ================================================================ */
.net-toolbar {
    padding: 14px 18px !important;
    margin-bottom: 14px;
}

.net-toolbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.net-stats {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.net-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13.5px;
    color: var(--text-secondary);
}
.net-stat strong {
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
.net-stat i { font-size: 13px; }

/* Endpoint 显示：无外框，纯文本 */
.net-server-info {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    cursor: default !important;
    box-shadow: none !important;
}
.net-server-info:hover {
    background: transparent !important;
    border: none !important;
}
.net-server-info i {
    color: var(--text-muted);
    font-size: 13px;
}
.net-server-info code {
    font-family: var(--font-family) !important;
    font-size: 13.5px !important;
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
    background: transparent !important;
    padding: 0 !important;
    max-width: none !important;
}

.net-toolbar-actions {
    display: flex;
    gap: 8px;
}

.net-help-btn {
    background: rgba(64, 159, 255, 0.1) !important;
    border-color: rgba(64, 159, 255, 0.3) !important;
    color: #66b1ff !important;
}
.net-help-btn:hover {
    background: rgba(64, 159, 255, 0.2) !important;
    border-color: rgba(64, 159, 255, 0.5) !important;
    color: #fff !important;
}

/* ================================================================
   ② 区块标题栏
   ================================================================ */
.net-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}
.net-section-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.net-section-title i { font-size: 13px; }
.net-section-hint {
    font-size: 11.5px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 2px;
}
.net-section-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.net-help-icon {
    width: 26px;
    height: 26px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50% !important;
    color: var(--text-muted) !important;
}
.net-help-icon:hover {
    color: #66b1ff !important;
    background: rgba(64, 159, 255, 0.12) !important;
    border-color: rgba(64, 159, 255, 0.3) !important;
}

/* ================================================================
   ③ 快速开始引导卡片
   ================================================================ */
.net-quickstart {
    position: relative;
    background: linear-gradient(135deg, rgba(64, 159, 255, 0.05), rgba(124, 58, 237, 0.03));
    border: 1px solid rgba(64, 159, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 16px 20px 14px;
    margin-bottom: 14px;
    overflow: hidden;
    animation: qsSlideIn 0.4s ease;
}
@keyframes qsSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.net-quickstart::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: linear-gradient(180deg, #409eff, #7c3aed);
}

.net-quickstart-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.qs-icon { font-size: 18px; line-height: 1; }
.qs-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}
.qs-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s;
}
.qs-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.qs-steps {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
}
.qs-step {
    flex: 1;
    min-width: 180px;
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-radius: var(--radius-sm);
}
.qs-step-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #409eff, #7c3aed);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.qs-step-body { min-width: 0; flex: 1; }
.qs-step-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.qs-step-desc {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.qs-arrow {
    display: flex;
    align-items: center;
    color: rgba(64, 159, 255, 0.4);
    font-size: 12px;
    padding: 0 2px;
}
.qs-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.06);
    font-size: 12px;
}
.qs-hint { color: var(--text-muted); }
.qs-hint a {
    color: #66b1ff;
    text-decoration: none;
    font-weight: 600;
}
.qs-hint a:hover { text-decoration: underline; }

/* ================================================================
   ④ 卡片：3 行紧凑结构（★ 核心优化）
   
   结构：
     ┌───────────────────────────────────────┐
     │ ● 设备名称                  📄 ✏️ ⏸ 🗑 │ ← 第一行：点+名称+按钮
     │ 10.50.0.2                            │ ← 第二行：IP / 映射
     │ ↓1.2MB ↑0.8MB · 2分钟前               │ ← 第三行：辅助信息
     └───────────────────────────────────────┘
   ================================================================ */

/* 网格 */
.compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.compact-empty {
    grid-column: 1 / -1;
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    background: rgba(15, 23, 42, 0.3);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
}

/* 卡片主体 */
.compact-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    min-width: 0;
    overflow: hidden;
}
.compact-card:hover {
    border-color: rgba(64, 159, 255, 0.35);
    background: rgba(15, 23, 42, 0.75);
    box-shadow: 0 4px 16px rgba(64, 159, 255, 0.08);
}
.compact-card.off  { opacity: 0.55; }
.compact-card.warn { border-color: rgba(230, 162, 60, 0.4); }

/* ---- 第一行：状态点 + 名称（左） + 操作按钮（右） ---- */
.compact-row1 {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}
.compact-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    letter-spacing: -0.1px;
}

.compact-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.compact-dot.on {
    background: #67c23a;
    box-shadow: 0 0 8px rgba(103, 194, 58, 0.6);
}
.compact-dot.off {
    background: #f56c6c;
    box-shadow: 0 0 8px rgba(245, 108, 108, 0.5);
}
.compact-dot.warn {
    background: #e6a23c;
    box-shadow: 0 0 8px rgba(230, 162, 60, 0.6);
}

/* ---- 第二行：IP / 映射 ---- */
.compact-row2 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-secondary);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.compact-ip {
    font-family: var(--font-mono);
    background: rgba(64, 159, 255, 0.1);
    color: #66b1ff;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

/* ---- 第三行：辅助信息（流量/时间/到期） ---- */
.compact-row3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.5;
    min-width: 0;
    white-space: nowrap;
}
.compact-row3 .warn   { color: #e6a23c; }
.compact-row3 .danger { color: #f56c6c; }

.compact-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.compact-info > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.compact-hs {
    font-size: 11.5px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* ---- 操作按钮组：并入第一行右侧 ---- */
.compact-actions {
    display: flex;
    gap: 7px;              /* ★ 加大按钮间距 */
    flex-shrink: 0;
    padding: 0;
    border: none;
    white-space: nowrap;
    flex-wrap: nowrap;
    margin-left: 4px;
}
.icon-btn {
    width: 26px;           /* ★ 微调尺寸 */
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 11.5px;
    transition: all 0.15s;
    font-family: var(--font-family);
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}
.icon-btn:hover {
    background: rgba(64, 159, 255, 0.15);
    border-color: rgba(64, 159, 255, 0.4);
    color: #66b1ff;
    transform: translateY(-1px);
}
.icon-btn.danger:hover {
    background: rgba(245, 108, 108, 0.15);
    border-color: rgba(245, 108, 108, 0.4);
    color: #f56c6c;
}
.icon-btn:active { transform: scale(0.92) translateY(0); }

/* ---- 隧道映射：单行显示 ---- */
.tunnel-map {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.5;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}
.tunnel-src {
    color: #66b1ff;
    font-weight: 700;
    font-size: 13px;
    background: rgba(64, 159, 255, 0.12);
    border: 1px solid rgba(64, 159, 255, 0.22);
    padding: 3px 10px;
    border-radius: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}
.tunnel-arrow {
    color: var(--text-muted);
    font-size: 13px;
    opacity: 0.8;
    flex-shrink: 0;
    padding: 0 2px;
}
.tunnel-dst {
    color: #67c23a;
    font-weight: 600;
    background: rgba(103, 194, 58, 0.08);
    border: 1px solid rgba(103, 194, 58, 0.18);
    padding: 3px 9px;
    border-radius: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
    font-size: 12.5px;
}

/* ================================================================
   ⑤ 主帮助弹窗（3 Tab）
   ================================================================ */
.net-help-modal {
    max-width: 860px;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    overflow: hidden;
}
.net-help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 14px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.net-help-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.net-help-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.15s;
}
.net-help-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}
.net-help-tabs {
    display: flex;
    gap: 4px;
    padding: 10px 24px 0;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    overflow-x: auto;
}
.net-help-tab {
    background: transparent;
    border: none;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: -1px;
    white-space: nowrap;
}
.net-help-tab:hover { color: var(--text-primary); }
.net-help-tab.active {
    color: #66b1ff;
    border-bottom-color: #409eff;
    font-weight: 600;
}
.net-help-panel {
    display: none;
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}
.net-help-panel.active { display: block; }
.net-help-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 10px;
}
.help-footer-hint {
    font-size: 12.5px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.qq-inline {
    background: rgba(64, 159, 255, 0.1);
    border: 1px solid rgba(64, 159, 255, 0.3);
    color: #66b1ff;
    padding: 2px 10px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    transition: all 0.15s;
}
.qq-inline:hover {
    background: rgba(64, 159, 255, 0.2);
    color: #fff;
}

/* ================================================================
   ⑥ 帮助内容 · 通用构件
   ================================================================ */
.help-intro {
    background: rgba(64, 159, 255, 0.05);
    border-left: 3px solid #409eff;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.75;
}
.help-intro strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}
.help-intro p { margin: 4px 0 0; }

.help-example {
    background: rgba(247, 201, 72, 0.05);
    border: 1px solid rgba(247, 201, 72, 0.18);
    border-radius: 8px;
    padding: 14px 18px;
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
}
.help-example-title {
    font-size: 13px;
    font-weight: 700;
    color: #f7c948;
    margin-bottom: 6px;
}
.help-example-body code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    color: #66b1ff;
    font-family: var(--font-mono);
    font-size: 12px;
}
.help-example-url {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    flex-wrap: wrap;
}
.help-example-url code {
    flex: 1;
    min-width: 0;
    background: transparent;
    color: #67c23a;
    font-weight: 600;
    word-break: break-all;
}
.copy-btn-inline {
    background: rgba(64, 159, 255, 0.1);
    border: 1px solid rgba(64, 159, 255, 0.25);
    color: #66b1ff;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.15s;
    font-family: var(--font-family);
}
.copy-btn-inline:hover {
    background: rgba(64, 159, 255, 0.2);
    color: #fff;
}

.help-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 16px 0;
}
.help-step {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s;
}
.help-step:hover { border-color: rgba(64, 159, 255, 0.2); }
.help-step-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #409eff, #7c3aed);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(64, 159, 255, 0.3);
}
.help-step-content { flex: 1; min-width: 0; }
.help-step-content h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}
.help-step-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.75;
    margin: 4px 0;
}
.help-step-content code {
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 6px;
    border-radius: 3px;
    color: #66b1ff;
    font-family: var(--font-mono);
    font-size: 12px;
}
.help-note {
    font-size: 12.5px !important;
    color: #e6a23c !important;
    padding-left: 2px;
}

.help-list {
    margin: 6px 0 4px 18px;
    padding-left: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}
.help-list li { margin: 2px 0; }
.help-list code {
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 6px;
    border-radius: 3px;
    color: #66b1ff;
    font-family: var(--font-mono);
    font-size: 12px;
}

.help-download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.help-download-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}
.help-download-item:hover {
    background: rgba(64, 159, 255, 0.08);
    border-color: rgba(64, 159, 255, 0.3);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.help-download-item i { font-size: 20px; }

.help-map-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
    margin: 8px 0;
    flex-wrap: wrap;
}
.map-src   { color: #66b1ff; font-weight: 700; }
.map-arrow { color: var(--text-muted); }
.map-dst   { color: #67c23a; font-weight: 700; }

.help-tip-box {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.7;
    margin: 16px 0 0;
    align-items: flex-start;
}
.help-tip-box i { font-size: 15px; margin-top: 2px; flex-shrink: 0; }
.help-tip-success {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #67c23a;
}
.help-tip-success strong { color: #67c23a; }
.help-tip-warn {
    background: rgba(230, 162, 60, 0.06);
    border: 1px solid rgba(230, 162, 60, 0.2);
    color: #e6a23c;
}
.help-tip-warn strong { color: #e6a23c; }
.help-tip-box .help-list { color: inherit; }

.help-faq {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.faq-item {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.faq-item[open] { border-color: rgba(64, 159, 255, 0.25); }
.faq-item > summary {
    cursor: pointer;
    padding: 12px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    transition: background 0.15s;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
    content: '›';
    margin-left: auto;
    font-size: 18px;
    color: var(--text-muted);
    transition: transform 0.2s;
    line-height: 1;
}
.faq-item[open] > summary::after { transform: rotate(90deg); }
.faq-item > summary:hover { background: rgba(64, 159, 255, 0.04); }
.faq-item > summary i { color: #66b1ff; font-size: 13px; }
.faq-answer {
    padding: 0 16px 14px 40px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}
.faq-answer p { margin: 4px 0; }
.faq-answer ol { margin: 6px 0 4px 18px; padding-left: 0; }

/* ================================================================
   ⑦ 通用确认 / 输入 对话框
   ================================================================ */
.confirm-modal,
.prompt-modal {
    max-width: 460px;
    padding: 28px 28px 22px;
    text-align: left;
}
.confirm-icon,
.prompt-icon {
    font-size: 42px;
    line-height: 1;
    margin-bottom: 14px;
    text-align: center;
}
.confirm-modal h3,
.prompt-modal h3 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}
.confirm-body,
.prompt-desc {
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 18px;
}
.confirm-body p { margin: 0 0 8px; }
.confirm-body p:last-child { margin-bottom: 0; }
.confirm-body strong { color: var(--text-primary); font-weight: 600; }

.dialog-hint {
    color: var(--text-muted) !important;
    font-size: 12.5px !important;
    margin-top: 10px !important;
    padding-top: 8px;
    border-top: 1px dashed rgba(148, 163, 184, 0.1);
    line-height: 1.7 !important;
}
.dialog-list {
    margin: 10px 0 0;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.9;
}
.dialog-list li { list-style: none; padding-left: 0; }

.confirm-actions,
.prompt-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.confirm-actions .btn,
.prompt-actions .btn {
    min-width: 92px;
    padding: 8px 20px;
    font-size: 13.5px;
    font-weight: 600;
}
.btn-danger-solid {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.28);
}
.btn-danger-solid:hover {
    background: linear-gradient(135deg, #f87171, #ef4444) !important;
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4);
}
.prompt-modal .form-control {
    font-size: 14px;
    padding: 10px 14px;
    margin-bottom: 6px;
}
.prompt-hint {
    font-size: 12px;
    color: var(--text-muted);
    min-height: 16px;
    margin-bottom: 4px;
    line-height: 1.5;
}

/* ================================================================
   ⑧ 复制的视觉反馈
   ================================================================ */
.copied {
    background: rgba(16, 185, 129, 0.18) !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
    color: #67c23a !important;
}
.copy-code {
    display: inline-block;
    cursor: pointer;
    user-select: none;
    max-width: 100%;
    word-break: break-all;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.copy-code:hover {
    background: rgba(64, 159, 255, 0.18) !important;
    color: #66b1ff !important;
}
.copy-code:active { transform: scale(0.98); }
.copy-code.copied {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #67c23a !important;
}

/* ================================================================
   ⑨ 响应式
   ================================================================ */
@media (max-width: 1024px) {
    .compact-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .net-toolbar-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .net-stats {
        gap: 12px;
        justify-content: center;
    }
    .net-toolbar-actions { width: 100%; }
    .net-toolbar-actions .btn { flex: 1; }

    .qs-arrow { display: none; }
    .qs-step  { min-width: 100%; }

    .compact-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 10px;
    }
    .icon-btn {
        width: 27px;
        height: 27px;
        font-size: 12px;
    }
    .compact-actions { gap: 6px; }

    .net-help-modal {
        max-width: 95% !important;
        max-height: 92vh;
    }
    .net-help-header { padding: 14px 18px 12px; }
    .net-help-tabs   { padding: 8px 18px 0; overflow-x: auto; }
    .net-help-tab    { padding: 6px 12px; font-size: 12px; white-space: nowrap; }
    .net-help-panel  { padding: 16px 18px; }
    .net-help-footer {
        padding: 12px 18px;
        flex-direction: column;
        align-items: stretch;
    }
    .net-help-footer .btn { width: 100%; }
}

@media (max-width: 480px) {
    .net-stat { font-size: 12px; }

    .compact-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .compact-card {
        padding: 12px 13px;
        gap: 7px;
    }
    .compact-name  { font-size: 14px; }
    .compact-ip    { font-size: 12px; padding: 3px 9px; }
    .compact-row2  { font-size: 12.5px; }
    .compact-row3  { font-size: 11.5px; }
    .tunnel-map    { font-size: 12.5px; }
    .tunnel-src    { font-size: 13px; padding: 3px 9px; }
    .tunnel-dst    { font-size: 12.5px; }
    .icon-btn {
        width: 27px;
        height: 27px;
        font-size: 12px;
    }
    .compact-actions { gap: 6px; }

    .help-step { padding: 12px; gap: 10px; }
    .help-step-num { width: 26px; height: 26px; font-size: 12px; }
    .help-step-content h4 { font-size: 13px; }
    .help-step-content p  { font-size: 12px; }

    .help-download-grid { grid-template-columns: repeat(3, 1fr); }
    .help-example-url {
        flex-direction: column;
        align-items: stretch;
    }
    .copy-btn-inline { align-self: flex-start; }

    .confirm-modal,
    .prompt-modal {
        max-width: 92%;
        padding: 22px 20px 18px;
    }
    .confirm-icon,
    .prompt-icon  { font-size: 34px; margin-bottom: 10px; }
    .confirm-modal h3,
    .prompt-modal h3 { font-size: 15.5px; }
    .confirm-actions .btn,
    .prompt-actions .btn {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 360px) {
    .compact-grid { grid-template-columns: 1fr; }
    .net-toolbar-actions { flex-direction: column; }
    .net-toolbar-actions .btn { width: 100%; }
}


/* ================================================================
   💰 续费隧道模态框 · 布局优化
   REQ-ID PT-RENEW-CSS-003
   ================================================================ */
.renew-modal {
    width: 440px;
    max-width: 95%;
    padding: 24px 26px 22px;
}

/* 标题：加一条分隔线，明确层级 */
.renew-modal h3 {
    margin: 0 0 18px;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: -0.2px;
}

/* ---------- 隧道信息卡片 ---------- */
.renew-info {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.renew-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 13px;
    line-height: 1.5;
    min-width: 0;
}

.renew-info-label {
    color: var(--text-secondary);
    flex-shrink: 0;
    font-weight: 500;
    min-width: 68px;
}

.renew-info-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

/* 端口映射：等宽字体高亮 */
.renew-info-mono {
    font-family: var(--font-mono);
    color: var(--color-primary-light);
    font-size: 12.5px;
    letter-spacing: 0.2px;
}

/* 单价：金色突出 */
.renew-info-price {
    color: #f7c948;
    font-family: var(--font-mono);
    font-size: 13.5px;
}

/* ---------- 续费月数 ---------- */
.renew-section {
    margin-bottom: 18px;
}

.renew-section .form-label {
    margin-bottom: 8px;
}

/* 快捷按钮：4 列等宽网格 */
.renew-month-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.renew-month-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color-strong);
    color: var(--text-secondary);
    padding: 8px 0;
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    white-space: nowrap;
}

.renew-month-btn:hover {
    background: rgba(64, 159, 255, 0.08);
    border-color: rgba(64, 159, 255, 0.3);
    color: var(--text-primary);
}

.renew-month-btn.active {
    background: rgba(64, 159, 255, 0.15);
    border-color: rgba(64, 159, 255, 0.5);
    color: #66b1ff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(64, 159, 255, 0.15);
}

/* 自定义输入：一行紧凑布局 */
.renew-month-custom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.renew-month-custom-label {
    font-size: 12.5px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.renew-month-custom .form-control {
    flex: 1;
    font-size: 13.5px;
    padding: 7px 12px;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-primary);
}

.renew-month-custom-unit {
    font-size: 12.5px;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 14px;
}

/* ---------- 合计费用 ---------- */
.renew-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(64, 159, 255, 0.08), rgba(124, 58, 237, 0.05));
    border: 1px solid rgba(64, 159, 255, 0.2);
    border-radius: 8px;
    margin-bottom: 14px;
}

.renew-total-label {
    font-size: 13.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.renew-total-amount {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    color: #f7c948;
    font-family: var(--font-mono);
}

.renew-total-symbol {
    font-size: 14px;
    font-weight: 600;
}

.renew-total-amount strong {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1;
}

/* ---------- 结果提示 ---------- */
.renew-result {
    font-size: 13px;
    min-height: 18px;
    margin-bottom: 14px;
}

/* ---------- 操作按钮 ---------- */
.renew-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.renew-actions .btn {
    min-width: 100px;
    padding: 9px 20px;
    font-size: 13.5px;
    font-weight: 600;
}

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
    .renew-modal {
        padding: 20px 18px 18px;
    }
    .renew-modal h3 {
        font-size: 15.5px;
        margin-bottom: 14px;
        padding-bottom: 12px;
    }
    .renew-info {
        padding: 10px 12px;
        gap: 8px;
    }
    .renew-info-row {
        font-size: 12.5px;
    }
    .renew-info-label {
        min-width: 62px;
    }
    .renew-month-btn {
        font-size: 11.5px;
        padding: 7px 0;
    }
    .renew-total {
        padding: 12px 14px;
    }
    .renew-total-amount strong {
        font-size: 1.2rem;
    }
    .renew-actions {
        flex-direction: column-reverse;
    }
    .renew-actions .btn {
        width: 100%;
    }
}