/* ═══════════ 设计令牌 ═══════════ */
    :root {
        --acc: #3b82f6;
        --acc-rgb: 59, 130, 246;
        --r-lg: 16px;
        --r-md: 12px;
        --r-sm: 10px;

        --bg: #f4f6fb;
        --surface: #ffffff;
        --border: rgba(20, 24, 40, 0.07);
        --shadow: 0 1px 2px rgba(20, 24, 40, 0.04), 0 6px 20px rgba(20, 24, 40, 0.045);
        --shadow-hover: 0 2px 6px rgba(20, 24, 40, 0.06), 0 12px 28px rgba(20, 24, 40, 0.08);
        --shadow-seg: 0 1px 2px rgba(20, 24, 40, 0.06), 0 2px 6px rgba(20, 24, 40, 0.05);
        --ink-1: rgba(20, 24, 40, 0.92);
        --ink-2: rgba(20, 24, 40, 0.56);
        --ink-3: rgba(20, 24, 40, 0.40);
        --hairline: rgba(20, 24, 40, 0.06);
        --track: rgba(20, 24, 40, 0.04);

        --ok: #16a34a;   --ok-bg: rgba(22, 163, 74, 0.10);
        --danger: #e5484d; --danger-bg: rgba(229, 72, 77, 0.10);
        --warn: #d97706; --warn-bg: rgba(217, 119, 6, 0.12);

        color-scheme: light;
    }

    [data-theme="dark"] {
        --bg: #0d0f14;
        --surface: #15181f;
        --border: rgba(255, 255, 255, 0.09);
        --shadow: none;
        --shadow-hover: none;
        --shadow-seg: 0 1px 2px rgba(0, 0, 0, 0.35);
        --ink-1: rgba(255, 255, 255, 0.92);
        --ink-2: rgba(255, 255, 255, 0.58);
        --ink-3: rgba(255, 255, 255, 0.42);
        --hairline: rgba(255, 255, 255, 0.08);
        --track: rgba(255, 255, 255, 0.04);

        --ok-bg: rgba(22, 163, 74, 0.16);
        --danger-bg: rgba(229, 72, 77, 0.16);
        --warn-bg: rgba(217, 119, 6, 0.18);

        color-scheme: dark;
    }

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

    body {
        font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        background: var(--bg);
        color: var(--ink-1);
        padding: 20px 16px 60px;
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
        transition: background 0.25s ease, color 0.25s ease;
    }

    .container { max-width: 1360px; margin: 0 auto; }

    .hidden { display: none !important; }

    /* ═══════════ 下载提示条 ═══════════ */
    .download-banner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        flex-wrap: wrap;
        padding: 12px 18px;
        margin-bottom: 16px;
        border-radius: var(--r-md);
        background: linear-gradient(120deg, rgba(var(--acc-rgb), 0.10), rgba(var(--acc-rgb), 0) 70%), var(--surface);
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .download-banner-left { display: flex; align-items: center; gap: 12px; }
    .download-banner-icon { font-size: 22px; }
    .download-banner-text { font-size: 13px; color: var(--ink-2); }
    .download-banner-text strong { color: var(--ink-1); font-weight: 600; }
    .download-banner-right { display: flex; align-items: center; gap: 8px; }
    .download-btn {
        display: inline-flex; align-items: center; gap: 6px;
        padding: 7px 14px; font-size: 12.5px; font-weight: 500;
        color: var(--ink-1); text-decoration: none;
        background: var(--surface); border: 1px solid var(--border);
        border-radius: 9px; transition: all 0.18s ease;
    }
    .download-btn:hover { border-color: var(--acc); color: var(--acc); }
    .close-banner-btn {
        width: 28px; height: 28px; border: none; border-radius: 8px;
        background: var(--track); color: var(--ink-3); font-size: 18px;
        cursor: pointer; line-height: 1; transition: all 0.18s ease;
    }
    .close-banner-btn:hover { background: var(--danger-bg); color: var(--danger); }

    /* ═══════════ 顶栏 ═══════════ */
    .navbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 16px;
    }
    .navbar-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
    .brand-icon {
        width: 38px; height: 38px;
        background: linear-gradient(135deg, var(--acc), rgba(var(--acc-rgb), 0.75));
        border-radius: 11px;
        display: flex; align-items: center; justify-content: center;
        color: #fff;
        box-shadow: 0 4px 12px rgba(var(--acc-rgb), 0.35);
    }
    .brand-text { font-size: 18px; font-weight: 650; color: var(--ink-1); letter-spacing: -0.01em; }
    .brand-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
    .theme-toggle {
        display: flex; align-items: center; justify-content: center;
        width: 38px; height: 38px; flex-shrink: 0;
        border: 1px solid var(--border); border-radius: 11px;
        background: var(--surface); color: var(--ink-2);
        cursor: pointer; transition: all 0.18s ease;
    }
    .theme-toggle:hover { color: var(--acc); border-color: var(--acc); }

    /* ═══════════ 两栏布局 ═══════════ */
    .layout {
        display: grid;
        grid-template-columns: 320px minmax(0, 1fr);
        gap: 16px;
        align-items: start;
    }
    .side {
        display: flex; flex-direction: column; gap: 14px;
        position: sticky; top: 16px; align-self: start;
    }
    .main-col { min-width: 0; }

    /* ═══════════ Hero ═══════════ */
    .hero {
        position: relative;
        overflow: hidden;
        padding: 20px 22px;
        border-radius: var(--r-lg);
        background: linear-gradient(120deg, rgba(var(--acc-rgb), 0.09) 0%, rgba(var(--acc-rgb), 0) 60%), var(--surface);
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .hero__main { position: relative; z-index: 1; }
    .hero__glow {
        position: absolute; top: -120px; right: -80px;
        width: 320px; height: 320px; border-radius: 50%;
        background: var(--acc); opacity: 0.10; filter: blur(64px); pointer-events: none;
    }
    .hero__title {
        font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
        color: var(--ink-1); line-height: 1.2;
    }
    .hero__desc {
        margin-top: 6px; font-size: 12.5px; color: var(--ink-3); max-width: 620px;
    }
    .hero__features {
        display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
    }
    .hero__chip {
        display: inline-flex; align-items: center; gap: 6px;
        padding: 5px 11px; font-size: 12px; font-weight: 500;
        color: var(--ink-2);
        background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    }
    .hero__chip svg { color: var(--acc); }

    /* ═══════════ 你的 IP 卡片 ═══════════ */
    .myip {
        position: relative; z-index: 1;
        width: 100%;
        padding: 15px 16px; border-radius: var(--r-md);
        background: var(--surface);
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .myip__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
    .myip__label { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.03em; }
    .myip__refresh {
        display: flex; align-items: center; justify-content: center;
        width: 26px; height: 26px; border: none; border-radius: 7px;
        background: rgba(var(--acc-rgb), 0.10); color: var(--acc);
        cursor: pointer; transition: all 0.18s ease;
    }
    .myip__refresh:hover { background: var(--acc); color: #fff; }
    .myip__refresh.spinning svg { animation: spin 0.7s linear infinite; }
    .myip__addr {
        font-size: 21px; font-weight: 700; letter-spacing: -0.02em;
        color: var(--ink-1); font-variant-numeric: tabular-nums;
        font-family: "SF Mono", "JetBrains Mono", Consolas, monospace;
        word-break: break-all; line-height: 1.15;
    }
    .myip__loc { margin-top: 3px; font-size: 12px; color: var(--ink-2); }
    .myip__risk {
        display: flex; align-items: center; gap: 10px;
        margin: 10px 0; padding: 9px 12px;
        background: var(--track); border-radius: var(--r-sm);
    }
    .myip__score { font-size: 22px; font-weight: 700; line-height: 1; min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink-3); }
    .myip__risk-meta { flex: 1; }
    .myip__risk-meta .risk-track { height: 6px; }
    .myip__risk-meta .risk-level { font-size: 11.5px; margin-top: 4px; color: var(--ink-3); font-weight: 500; }
    .myip__rows { display: flex; flex-direction: column; gap: 6px; }
    .myip__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
    .myip__row span { color: var(--ink-3); flex-shrink: 0; }
    .myip__row b { color: var(--ink-1); font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
    .myip__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
    .myip__badges:empty { display: none; }

    /* ═══════════ 分段导航 ═══════════ */
    .seg {
        display: inline-flex;
        gap: 2px;
        margin-bottom: 16px;
        padding: 4px;
        border-radius: 13px;
        background: var(--track);
        border: 1px solid var(--border);
    }
    .seg__item {
        display: flex; align-items: center; gap: 7px;
        padding: 9px 20px;
        border: none; border-radius: 9px;
        background: transparent; color: var(--ink-2);
        font-size: 13.5px; font-weight: 500; line-height: 1;
        cursor: pointer; white-space: nowrap;
        transition: all 0.18s ease;
    }
    .seg__item svg { opacity: 0.5; transition: all 0.18s ease; }
    .seg__item:hover:not(.is-active) { color: var(--ink-1); }
    .seg__item:hover:not(.is-active) svg { opacity: 0.8; }
    .seg__item.is-active {
        background: var(--surface); color: var(--ink-1); font-weight: 600;
        box-shadow: var(--shadow-seg);
    }
    .seg__item.is-active svg { opacity: 1; color: var(--acc); }

    /* ═══════════ 面板 ═══════════ */
    .panel {
        padding: 8px 26px 24px;
        border-radius: var(--r-lg);
        background: var(--surface);
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .content-section { display: none; }
    .content-section.active { display: block; }

    /* ═══════════ 区块 ═══════════ */
    .sec { padding: 22px 0 4px; }
    .sec + .sec { margin-top: 6px; border-top: 1px solid var(--hairline); }
    .sec__head { margin-bottom: 16px; }
    .sec__title {
        position: relative;
        font-size: 14.5px; font-weight: 600; color: var(--ink-1);
        margin: 0 0 6px; padding-left: 12px;
    }
    .sec__title::before {
        content: ''; position: absolute; left: 0; top: 50%;
        transform: translateY(-50%);
        width: 3px; height: 14px; border-radius: 2px; background: var(--acc);
    }
    .sec__desc {
        font-size: 12.5px; line-height: 1.7; color: var(--ink-3);
        margin: 0; padding-left: 12px; max-width: 780px;
    }

    /* ═══════════ 提示横幅 ═══════════ */
    .banner {
        display: flex; align-items: center; gap: 8px;
        padding: 11px 16px; margin-bottom: 4px;
        font-size: 12.5px; color: var(--warn);
        background: var(--warn-bg); border-radius: var(--r-sm);
    }

    /* ═══════════ 表单 ═══════════ */
    .form-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
    .form-item { flex: 1; min-width: 200px; }
    .form-item label,
    .textarea-wrapper > label {
        display: block; font-size: 12px; font-weight: 500;
        color: var(--ink-2); margin-bottom: 7px;
    }
    select, textarea, .input {
        width: 100%;
        font-family: inherit; font-size: 13.5px; color: var(--ink-1);
        background: var(--surface);
        border: 1px solid var(--border); border-radius: var(--r-sm);
        padding: 10px 12px;
        transition: border-color 0.18s ease, box-shadow 0.18s ease;
        outline: none;
    }
    select { height: 40px; cursor: pointer; appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
        background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
    }
    textarea { min-height: 150px; resize: vertical; line-height: 1.7; }
    select:focus, textarea:focus {
        border-color: var(--acc);
        box-shadow: 0 0 0 3px rgba(var(--acc-rgb), 0.14);
    }
    .textarea-wrapper { margin-bottom: 8px; }
    .tips { margin-top: 8px; font-size: 12px; color: var(--ink-3); line-height: 1.6; }

    /* ═══════════ 按钮 ═══════════ */
    .btn-primary {
        display: inline-flex; align-items: center; justify-content: center;
        min-width: 128px; height: 42px; padding: 0 24px; margin-top: 16px;
        font-family: inherit; font-size: 14px; font-weight: 600; color: #fff;
        background: linear-gradient(135deg, var(--acc), rgba(var(--acc-rgb), 0.82));
        border: none; border-radius: var(--r-sm); cursor: pointer;
        box-shadow: 0 4px 14px rgba(var(--acc-rgb), 0.32);
        transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    }
    .btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(var(--acc-rgb), 0.4); }
    .btn-primary:active:not(:disabled) { transform: translateY(0); }
    .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

    .action-buttons { display: flex; gap: 8px; }
    .btn-action {
        padding: 7px 14px; font-family: inherit; font-size: 12.5px; font-weight: 500;
        border-radius: 8px; cursor: pointer; border: 1px solid transparent;
        transition: all 0.18s ease;
    }
    .btn-primary-soft { color: var(--acc); background: rgba(var(--acc-rgb), 0.10); }
    .btn-primary-soft:hover { background: var(--acc); color: #fff; }
    .btn-success { color: var(--ok); background: var(--ok-bg); }
    .btn-success:hover { background: var(--ok); color: #fff; }
    .btn-danger { color: var(--danger); background: var(--danger-bg); }
    .btn-danger:hover { background: var(--danger); color: #fff; }

    .spinner {
        width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, 0.4);
        border-top-color: #fff; border-radius: 50%;
        display: inline-block; animation: spin 0.7s linear infinite;
    }
    .loading-text { display: inline-flex; align-items: center; gap: 8px; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ═══════════ 进度 & 统计 ═══════════ */
    .progress-wrap {
        height: 6px; border-radius: 999px; overflow: hidden;
        background: var(--track); margin: 20px 0 16px;
    }
    .progress-bar {
        height: 100%; width: 0; border-radius: 999px;
        background: linear-gradient(90deg, var(--acc), rgba(var(--acc-rgb), 0.7));
        transition: width 0.3s ease;
    }
    .stats-row {
        display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
        margin-bottom: 4px;
    }
    .stat-box {
        padding: 15px 18px; border-radius: var(--r-md);
        background: var(--surface); border: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .stat-label { font-size: 11.5px; color: var(--ink-3); }
    .stat-value {
        font-size: 24px; font-weight: 700; line-height: 1.1; margin-top: 4px;
        color: var(--ink-1); font-variant-numeric: tabular-nums;
    }
    .stat-box.success .stat-value { color: var(--ok); }
    .stat-box.failed .stat-value { color: var(--danger); }
    .stat-box.testing .stat-value { color: var(--warn); }

    /* ═══════════ 结果表 ═══════════ */
    .result-section { margin-top: 22px; }
    .result-header-row {
        display: flex; align-items: center; justify-content: space-between;
        flex-wrap: wrap; gap: 12px; margin-bottom: 14px;
    }
    .result-header {
        position: relative; font-size: 14.5px; font-weight: 600; color: var(--ink-1);
        padding-left: 12px;
    }
    .result-header::before {
        content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
        width: 3px; height: 14px; border-radius: 2px; background: var(--acc);
    }
    .table-wrapper {
        overflow-x: auto;
        border: 1px solid var(--hairline); border-radius: var(--r-md);
    }
    table { width: 100%; border-collapse: collapse; font-size: 13px; }
    thead th {
        text-align: left; font-weight: 500; font-size: 12px; color: var(--ink-3);
        background: var(--track); padding: 11px 14px;
        border-bottom: 1px solid var(--hairline); white-space: nowrap;
    }
    tbody td {
        padding: 11px 14px; color: var(--ink-1);
        border-bottom: 1px solid var(--hairline);
        font-variant-numeric: tabular-nums; vertical-align: middle;
    }
    tbody tr:last-child td { border-bottom: none; }
    tbody tr:hover td { background: var(--track); }
    tbody tr.row-failed td { background: rgba(229, 72, 77, 0.045); }

    .proxy-text { font-family: "SF Mono", "JetBrains Mono", Consolas, monospace; font-size: 12.5px; }

    .status-tag {
        display: inline-block; padding: 2px 10px; font-size: 12px; font-weight: 500;
        border-radius: 999px; white-space: nowrap;
    }
    .status-tag.success { color: var(--ok); background: var(--ok-bg); }
    .status-tag.failed { color: var(--danger); background: var(--danger-bg); }

    .empty-tip {
        text-align: center; color: var(--ink-3); font-size: 13px;
        padding: 44px 20px; margin-top: 16px;
        border: 1px dashed var(--border); border-radius: var(--r-md);
    }

    /* ═══════════ Ping 检测 ═══════════ */
    .ping-field-label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 8px; }
    .ping-nodes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
    .ping-node {
        display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 13px;
        font-family: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer;
        background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
        transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }
    .ping-node::before {
        content: ''; width: 7px; height: 7px; border-radius: 50%;
        background: var(--ink-3); opacity: 0.5;
    }
    .ping-node[aria-pressed="true"] {
        color: var(--acc); border-color: rgba(var(--acc-rgb), 0.45); background: rgba(var(--acc-rgb), 0.08);
    }
    .ping-node[aria-pressed="true"]::before { background: var(--acc); opacity: 1; }
    .ping-node:disabled { cursor: not-allowed; opacity: 0.65; }

    .ping-legend {
        display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
        font-size: 12px; color: var(--ink-3);
    }
    .ping-legend span { display: inline-flex; align-items: center; gap: 6px; }
    .ping-legend i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
    .ping-legend .l-fast { color: var(--ok); }
    .ping-legend .l-mid { color: var(--warn); }
    .ping-legend .l-slow { color: var(--danger); }
    .ping-legend em { font-style: normal; color: var(--ink-2); }

    .ping-table { min-width: 560px; }
    .ping-table th.ping-th-node, .ping-table td.ping-cell { text-align: center; min-width: 112px; }
    .ping-table .ping-col-target {
        position: sticky; left: 0; z-index: 1; min-width: 170px;
        background: var(--surface); border-right: 1px solid var(--hairline);
    }
    .ping-table thead .ping-col-target { background: var(--surface); }
    .ping-table tbody tr:hover .ping-col-target { background: var(--surface); }
    .ping-table tbody tr.row-failed td.ping-col-target { background: var(--surface); }
    .ping-table tfoot td {
        padding: 10px 14px; font-size: 12px; color: var(--ink-2);
        background: var(--track); border-top: 1px solid var(--hairline);
        font-variant-numeric: tabular-nums;
    }
    .ping-table tfoot td.ping-cell { text-align: center; }
    .ping-table tfoot .ping-col-target { background: var(--surface); }

    .ping-val { font-size: 15px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
    .ping-val small { margin-left: 2px; font-size: 11px; font-weight: 400; color: var(--ink-3); }
    .ping-cell.is-fast .ping-val { color: var(--ok); }
    .ping-cell.is-mid .ping-val { color: var(--warn); }
    .ping-cell.is-slow .ping-val { color: var(--danger); }
    .ping-node-err { font-size: 12px; font-weight: 500; line-height: 1.5; color: var(--ink-3); }
    .ping-x { display: inline-flex; color: var(--danger); vertical-align: middle; }

    .ping-dots {
        display: flex; align-items: center; justify-content: center; gap: 3px;
        position: relative; height: 14px; margin-top: 3px;
    }
    .ping-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); opacity: 0.35; }
    .ping-cell.is-fast .ping-dots i.hit { background: var(--ok); opacity: 1; }
    .ping-cell.is-mid .ping-dots i.hit { background: var(--warn); opacity: 1; }
    .ping-cell.is-slow .ping-dots i.hit { background: var(--danger); opacity: 1; }
    .ping-dots i.miss { background: transparent; opacity: 1; box-shadow: inset 0 0 0 1.5px var(--danger); }
    .ping-cell.is-pending .ping-dots i { animation: pingPulse 1s ease-in-out infinite; }
    .ping-cell.is-pending .ping-dots i:nth-child(2) { animation-delay: 0.12s; }
    .ping-cell.is-pending .ping-dots i:nth-child(3) { animation-delay: 0.24s; }
    .ping-cell.is-pending .ping-dots i:nth-child(4) { animation-delay: 0.36s; }
    .ping-cell.is-pending .ping-dots i:nth-child(5) { animation-delay: 0.48s; }
    .ping-loss { position: absolute; left: calc(50% + 26px); font-size: 11px; line-height: 1; color: var(--danger); white-space: nowrap; }
    @keyframes pingPulse { 0%, 100% { opacity: 0.2; } 50% { opacity: 0.8; } }
    @media (prefers-reduced-motion: reduce) {
        .ping-cell.is-pending .ping-dots i { animation: none; }
    }

    /* ═══════════ IP 徽章 & 风控 ═══════════ */
    .ip-badge {
        display: inline-block; padding: 2px 8px; font-size: 12px;
        border-radius: 6px; line-height: 1.5; white-space: nowrap;
    }
    .ip-badge.ok { background: var(--ok-bg); color: var(--ok); }
    .ip-badge.warn { background: var(--warn-bg); color: var(--warn); }
    .ip-badge.bad { background: var(--danger-bg); color: var(--danger); }
    .risk-wrap { display: flex; align-items: center; gap: 8px; }
    .risk-num { font-size: 16px; font-weight: 700; min-width: 26px; text-align: center; }
    .risk-meta { flex: 1; min-width: 60px; }
    .risk-track { width: 100%; height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
    .risk-fill { height: 100%; border-radius: 3px; }
    .risk-level { font-size: 11px; margin-top: 2px; }

    /* ═══════════ 弹窗 ═══════════ */
    .modal-overlay {
        position: fixed; inset: 0; z-index: 100;
        display: flex; align-items: center; justify-content: center; padding: 20px;
        background: rgba(10, 12, 20, 0.5); backdrop-filter: blur(4px);
    }
    .modal {
        width: 520px; max-width: 100%;
        background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--r-lg); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
        overflow: hidden;
    }
    .modal-header {
        display: flex; align-items: center; justify-content: space-between;
        padding: 18px 22px; border-bottom: 1px solid var(--hairline);
    }
    .modal-title { font-size: 15px; font-weight: 600; color: var(--ink-1); }
    .modal-close {
        width: 30px; height: 30px; border: none; border-radius: 8px;
        background: var(--track); color: var(--ink-3); font-size: 20px; line-height: 1;
        cursor: pointer; transition: all 0.18s ease;
    }
    .modal-close:hover { background: var(--danger-bg); color: var(--danger); }
    .modal-body { padding: 20px 22px; }
    .modal-textarea {
        width: 100%; min-height: 220px; resize: vertical;
        font-family: "SF Mono", Consolas, monospace; font-size: 12.5px; line-height: 1.7;
        color: var(--ink-1); background: var(--track);
        border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px;
    }
    .copy-tip { margin-top: 10px; font-size: 12px; color: var(--ok); }
    .modal-footer {
        display: flex; justify-content: flex-end;
        padding: 16px 22px; border-top: 1px solid var(--hairline);
    }
    .modal-footer .btn-primary { margin-top: 0; }

    /* ═══════════ 浮动广告 ═══════════ */
    .float-ad {
        position: fixed; right: 20px; bottom: 20px; z-index: 90;
        width: 190px; padding: 16px; cursor: pointer;
        background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--r-md); box-shadow: var(--shadow-hover);
    }
    .float-ad-close {
        position: absolute; top: 8px; right: 8px;
        width: 22px; height: 22px; border: none; border-radius: 6px;
        background: var(--track); color: var(--ink-3); font-size: 15px; line-height: 1;
        cursor: pointer;
    }
    .float-ad-item { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
    .float-ad-cta {
        margin-top: 10px; padding: 7px; text-align: center;
        font-size: 12.5px; font-weight: 600; color: #fff;
        background: linear-gradient(135deg, var(--acc), rgba(var(--acc-rgb), 0.8));
        border-radius: 8px;
    }

    /* ═══════════ 格式转换 ═══════════ */
    .fc-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px; }
    .fc-tab {
        display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
        padding: 10px 12px; text-align: left;
        font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink-1);
        background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
        cursor: pointer; transition: all 0.18s ease;
    }
    .fc-tab small { font-size: 11px; font-weight: 400; color: var(--ink-3); }
    .fc-tab:hover:not(.is-active) { border-color: rgba(var(--acc-rgb), 0.4); }
    .fc-tab.is-active { border-color: var(--acc); background: rgba(var(--acc-rgb), 0.08); color: var(--acc); }

    .fc-opts { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 14px; }
    .fc-opt { display: flex; align-items: center; gap: 8px; }
    .fc-opt-label { font-size: 12.5px; color: var(--ink-2); }
    .fc-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--track); border: 1px solid var(--border); }
    .fc-seg button {
        padding: 5px 11px; border: none; border-radius: 7px; background: transparent;
        font-family: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; white-space: nowrap;
    }
    .fc-seg button.is-active { background: var(--acc); color: #fff; font-weight: 600; }
    .fc-cbx { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-1); cursor: pointer; user-select: none; }
    .fc-cbx input { accent-color: var(--acc); width: 14px; height: 14px; cursor: pointer; }
    .fc-note { margin-left: auto; font-size: 12px; color: var(--ink-3); }
    .fc-note code {
        font-family: "SF Mono", Consolas, monospace; color: var(--acc);
        background: var(--track); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px;
    }
    .fc-note .warn { color: var(--warn); }

    .fc-main { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .fc-col { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
    .fc-col-head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-1); }
    .fc-sub { font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
    .fc-text {
        height: 380px; min-height: 200px; resize: vertical; white-space: pre; overflow: auto;
        font-family: "SF Mono", "JetBrains Mono", Consolas, monospace; font-size: 12.5px;
    }
    .fc-out { background: var(--track); }
    .fc-cards {
        height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
        padding: 8px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--track);
    }
    .fc-card { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
    .fc-card.bad { border-color: rgba(229, 72, 77, 0.35); background: var(--danger-bg); }
    .fc-proto {
        display: inline-block; margin-bottom: 7px; padding: 1px 9px; border-radius: 999px;
        font-size: 11.5px; font-weight: 700; color: var(--acc); background: rgba(var(--acc-rgb), 0.12);
    }
    .fc-rows { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; }
    .fc-k { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
    .fc-v { font-family: "SF Mono", Consolas, monospace; font-size: 12px; color: var(--ink-1); word-break: break-all; }
    .fc-bad { font-size: 12px; color: var(--danger); word-break: break-all; }
    .fc-empty { padding: 40px 10px; text-align: center; font-size: 12.5px; color: var(--ink-3); }

    .fc-foot {
        display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px;
        padding: 10px 14px; border-radius: var(--r-sm); background: var(--track); border: 1px solid var(--border);
    }
    .fc-stat { font-size: 12.5px; color: var(--ink-2); }
    .fc-stat b.ok { color: var(--ok); } .fc-stat b.warn { color: var(--warn); } .fc-stat b.bad { color: var(--danger); }
    .fc-tip { flex: 1; font-size: 12px; color: var(--ok); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .fc-btn { color: var(--ink-1); background: var(--surface); border-color: var(--border); }
    .fc-btn:hover:not(:disabled) { border-color: var(--acc); color: var(--acc); }
    .fc-btn-primary { color: #fff; background: var(--acc); border-color: var(--acc); }
    .fc-btn-primary:hover:not(:disabled) { color: #fff; opacity: 0.9; }
    .fc-btn:disabled { opacity: 0.45; cursor: not-allowed; }

    @media (max-width: 980px) {
        .fc-tabs { grid-template-columns: repeat(3, 1fr); }
    }
    @media (max-width: 680px) {
        .fc-tabs { grid-template-columns: repeat(2, 1fr); }
        .fc-main { grid-template-columns: 1fr; }
        .fc-text, .fc-cards { height: 240px; }
        .fc-note { margin-left: 0; }
    }
    @media (max-width: 440px) {
        .seg__item svg { display: none; } /* 四个标签在窄屏放不下图标 */
    }

    /* ═══════════ 响应式 ═══════════ */
    /* 中等及以下：左右栏合并为单列，侧栏取消吸顶 */
    @media (max-width: 980px) {
        .layout { grid-template-columns: 1fr; }
        .side { position: static; }
        /* 单列时让 hero 与 IP 卡片并排，节省纵向空间 */
        .side { flex-direction: row; flex-wrap: wrap; align-items: stretch; }
        .side .hero { flex: 1; min-width: 280px; }
        .side .myip { width: 300px; flex-shrink: 0; }
    }

    @media (max-width: 680px) {
        .stats-row { grid-template-columns: repeat(2, 1fr); }
        .side { flex-direction: column; }
        .side .myip { width: 100%; }
        .hero__title { font-size: 21px; }
        .panel { padding: 8px 16px 20px; }
        .seg { display: flex; width: 100%; }
        .seg__item { flex: 1; justify-content: center; padding: 9px 8px; }
    }
