/* GhostRadar (幽灵雷达) - 全维度反欺诈检测系统样式 (style.css) */

:root {
    --bg-dark: #090d16;
    --card-bg: rgba(17, 24, 39, 0.88);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(56, 189, 248, 0.35);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.25);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.25);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.25);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 10% 15%, rgba(56, 189, 248, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 85%, rgba(16, 185, 129, 0.06) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    padding: 24px 20px max(28px, env(safe-area-inset-bottom)) 20px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* ================= Header ================= */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 24px;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    font-size: 28px;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px var(--primary-glow));
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-header-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.brand-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(180deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-badge {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.brand-version {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 11px;
    padding: 1.5px 7px;
    border-radius: 6px;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

.brand-version::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.brand-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.35;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    user-select: none;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0369a1, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

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

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

/* ================= Radar Hero Card ================= */
.hero-radar {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    border-radius: 18px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 28px;
    margin-bottom: 24px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

.hero-radar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.3), transparent);
}

.radar-circle-wrap {
    position: relative;
    width: 170px;
    height: 170px;
    flex-shrink: 0;
}

.radar-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.radar-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 8;
}

.radar-circle-fill {
    fill: none;
    stroke: var(--success);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.9s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.4s ease;
}

.radar-score-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.radar-score-num {
    font-size: 46px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.radar-score-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.radar-info {
    flex: 1;
    min-width: 260px;
}

.radar-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.radar-summary-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.pill {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pill:hover {
    transform: translateY(-1px);
}

.pill:active {
    transform: scale(0.95);
}

.pill-critical {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.pill-critical:hover {
    background: rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.pill-warn {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.pill-warn:hover {
    background: rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.pill-pass {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.pill-pass:hover {
    background: rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.badge-level {
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.radar-verdict {
    font-size: 14.5px;
    color: #e5e7eb;
    margin-bottom: 14px;
    line-height: 1.55;
}

.scan-status-text {
    font-size: 12px;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ================= Grid Layout ================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 18px 20px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.card:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.card-title {
    font-size: 14.5px;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f1f5f9;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.prop-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
    gap: 12px;
}

.prop-row:last-child {
    border-bottom: none;
    padding-bottom: 2px;
}

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

.prop-val {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #f3f4f6;
    text-align: right;
    word-break: break-all;
    overflow-wrap: anywhere;
    font-size: 12.5px;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

.badge {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-info {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge-purple {
    background: rgba(192, 132, 252, 0.15);
    color: #c084fc;
    border: 1px solid rgba(192, 132, 252, 0.25);
}

.text-success { color: #34d399; }
.text-warning { color: #fbbf24; }
.text-danger { color: #f87171; }
.text-info { color: #38bdf8; }
.text-purple { color: #c084fc; }
.text-muted { color: var(--text-muted); }
.text-xs { font-size: 11.5px; opacity: 0.85; margin-left: 6px; }

/* ================= Checklist Section ================= */
.checklist-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 14px;
    flex-wrap: wrap;
}

.checklist-title {
    font-size: 16.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f8fafc;
}

.checklist-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid var(--card-border);
    transition: all 0.2s;
    user-select: none;
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.filter-tab.active {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.filter-tab.tab-critical.active {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

.filter-tab.tab-warn.active {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}

.filter-tab.tab-pass.active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.4);
}

.check-item {
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 10px;
    transition: all 0.2s;
}

.check-item:last-child {
    margin-bottom: 0;
}

.check-critical {
    border-left: 4px solid var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.check-warn {
    border-left: 4px solid var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.check-pass {
    border-left: 4px solid var(--success);
}

.check-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.check-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.score-deduct-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
}

.deduct-critical {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.deduct-warn {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.check-title {
    font-weight: 600;
    font-size: 13.5px;
}

.check-detail {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.45;
}

.check-suggestion {
    margin-top: 8px;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    line-height: 1.45;
}

.sug-critical {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.sug-warn {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.sug-pass {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #7dd3fc;
}

/* ================= 手机端深度响应式适配 (Mobile Optimization) ================= */
@media (max-width: 640px) {
    body {
        padding: 14px 12px max(24px, env(safe-area-inset-bottom)) 12px;
    }

    /* 1. Header 在移动端自适应重构 */
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding-bottom: 16px;
        margin-bottom: 18px;
    }

    .brand {
        gap: 10px;
    }

    .brand-icon {
        font-size: 26px;
    }

    .brand-title {
        font-size: 21px;
    }

    .brand-sub {
        font-size: 11px;
        margin-top: 2px;
    }

    .header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    .dropdown-wrapper {
        width: 100%;
    }

    .dropdown-toggle {
        width: 100%;
        justify-content: center;
    }

    .btn {
        width: 100%;
        padding: 9px 12px;
        font-size: 13px;
        border-radius: 8px;
    }

    /* 2. Hero Radar 卡片紧凑而富有层次 */
    .hero-radar {
        padding: 20px 16px;
        flex-direction: column;
        text-align: center;
        gap: 18px;
        margin-bottom: 18px;
        border-radius: 14px;
    }

    .radar-circle-wrap {
        width: 140px;
        height: 140px;
    }

    .radar-score-num {
        font-size: 38px;
    }

    .radar-score-label {
        font-size: 10px;
    }

    .radar-info {
        width: 100%;
        min-width: unset;
    }

    .radar-status-bar {
        justify-content: center;
        margin-bottom: 12px;
        flex-direction: column;
        gap: 8px;
    }

    .radar-summary-pills {
        justify-content: center;
        width: 100%;
        gap: 6px;
    }

    .pill {
        padding: 3px 8px;
        font-size: 11px;
    }

    .badge-level {
        font-size: 12.5px;
        padding: 4px 12px;
    }

    .radar-verdict {
        font-size: 13.5px;
        line-height: 1.5;
        margin-bottom: 10px;
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 10px;
        text-align: left;
    }

    .scan-status-text {
        font-size: 11.5px;
    }

    /* 3. 网格卡片全面单列紧凑排版 */
    .grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 18px;
    }

    .card {
        padding: 16px 14px;
        border-radius: 12px;
    }

    .card-title {
        font-size: 14px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    /* 4. 属性行在移动端自适应：短值横排对齐，长值折行靠右 */
    .prop-row {
        padding: 7px 0;
        font-size: 12.5px;
        gap: 8px;
    }

    .prop-label {
        font-size: 12px;
        color: #94a3b8;
    }

    .prop-val {
        font-size: 12px;
        max-width: 65%;
    }

    /* 5. Checklist 移动端优化 */
    .checklist-section {
        padding: 18px 14px;
        border-radius: 14px;
    }

    .checklist-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .checklist-title {
        font-size: 15px;
        margin-bottom: 0;
    }

    .checklist-filters {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .filter-tab {
        padding: 6px 2px;
        font-size: 11px;
        text-align: center;
        border-radius: 6px;
    }

    .check-item {
        padding: 12px 12px;
    }

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

    .check-detail {
        font-size: 12px;
        line-height: 1.4;
    }

    .check-suggestion {
        font-size: 11.5px;
        padding: 6px 9px;
    }
}

/* 超窄屏幕额外适配 (如 iPhone SE / 375px) */
@media (max-width: 380px) {
    .brand-title {
        font-size: 19px;
    }
    .brand-badge {
        font-size: 10px;
        padding: 1px 6px;
    }
    .btn {
        font-size: 12px;
        padding: 8px 10px;
    }
    .prop-val {
        max-width: 60%;
        font-size: 11.5px;
    }
}

/* ================= 回到顶部悬浮按钮 ================= */
.btn-back-to-top {
    position: fixed;
    bottom: max(28px, env(safe-area-inset-bottom) + 20px);
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 999;
}

.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.btn-back-to-top:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: #38bdf8;
    color: #ffffff;
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.4);
}

.btn-back-to-top:active {
    transform: translateY(0) scale(0.95);
}

@media (max-width: 640px) {
    .btn-back-to-top {
        bottom: max(20px, env(safe-area-inset-bottom) + 12px);
        right: 18px;
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   导出与分享下拉菜单 (Dropdown Popover & Mobile Bottom Sheet)
   ========================================================================== */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-backdrop {
    display: none;
}

.sheet-handle-bar {
    display: none;
}

.dropdown-cancel-btn {
    display: none;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.dropdown-caret {
    font-size: 11px;
    opacity: 0.7;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-wrapper.open .dropdown-caret {
    transform: rotate(180deg);
}

.dropdown-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 290px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(56, 189, 248, 0.12);
    padding: 8px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-wrapper.open .dropdown-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-header {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 6px 10px 8px;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    transition: all 0.18s ease;
}

.dropdown-item:hover {
    background: rgba(56, 189, 248, 0.12);
    transform: translateX(3px);
}

.dropdown-item:active {
    transform: scale(0.98);
}

.dropdown-item .item-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.dropdown-item .item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-item .item-title {
    font-size: 13px;
    font-weight: 600;
    color: #f3f4f6;
}

.dropdown-item .item-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

/* ==========================================================================
   高清长截图预览模态框 (Screenshot Preview Modal)
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(3, 7, 18, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 32px rgba(56, 189, 248, 0.2);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.show .modal-card {
    transform: translateY(0) scale(1);
}

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

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.modal-tips {
    background: rgba(56, 189, 248, 0.1);
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #bae6fd;
    line-height: 1.4;
}

.modal-tips .tip-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.modal-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #060910;
    display: flex;
    justify-content: center;
}

.preview-scroll-wrap {
    width: 100%;
    max-height: 56vh;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #090d16;
    padding: 8px;
}

.preview-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    user-select: auto;
    -webkit-user-select: auto;
    -webkit-touch-callout: default;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.95);
}

/* ==========================================================================
   全局 Toast 提示组件
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.toast-message {
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.25);
    border-radius: 50px;
    padding: 10px 22px;
    color: #f8fafc;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(-16px) scale(0.92);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.toast-message.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-message.success {
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(34, 197, 94, 0.3);
}

.toast-message.error {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(239, 68, 68, 0.3);
}

/* 按钮加载状态动效 */
.btn.is-busy {
    opacity: 0.75;
    pointer-events: none;
    cursor: wait;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin-icon {
    display: inline-block;
    animation: spin 0.9s linear infinite;
}

@media (max-width: 640px) {
    /* 移动端全屏半透明遮罩 */
    .dropdown-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(3, 7, 18, 0.72);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 1100;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .dropdown-wrapper.open .dropdown-backdrop {
        opacity: 1;
        visibility: visible;
    }

    /* 移动端底部滑出抽屉面板 (Bottom Action Sheet) */
    .dropdown-popover {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        max-width: 100%;
        border-radius: 22px 22px 0 0;
        padding: 12px 18px max(24px, env(safe-area-inset-bottom) + 16px);
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid rgba(56, 189, 248, 0.35);
        border-bottom: none;
        box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.9), 0 0 32px rgba(56, 189, 248, 0.2);
        z-index: 1200;
        transform: translateY(100%);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
        opacity: 1;
        visibility: hidden;
        pointer-events: none;
        margin: 0;
    }

    .dropdown-wrapper.open .dropdown-popover {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }

    /* 移动端顶部药丸拖动条 */
    .sheet-handle-bar {
        display: block;
        width: 44px;
        height: 5px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 10px;
        margin: 4px auto 14px;
    }

    .dropdown-header {
        text-align: center;
        padding: 0 0 12px;
        font-size: 12px;
    }

    .dropdown-item {
        padding: 12px 14px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        margin-bottom: 8px;
        background: rgba(255, 255, 255, 0.03);
    }

    .dropdown-item:hover,
    .dropdown-item:active {
        background: rgba(56, 189, 248, 0.15);
        border-color: rgba(56, 189, 248, 0.3);
    }

    /* 移动端取消按钮 */
    .dropdown-cancel-btn {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: center;
        margin-top: 10px;
        padding: 13px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.14);
        color: #f8fafc;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .dropdown-cancel-btn:active {
        background: rgba(255, 255, 255, 0.18);
    }

    .modal-backdrop {
        padding: 12px;
    }

    .modal-card {
        max-height: 94vh;
        border-radius: 16px;
    }
    .modal-footer {
        flex-direction: column;
    }
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ================= Behavioral Biometrics Sandbox ================= */
.card-biometrics {
    border: 1px solid rgba(129, 140, 248, 0.25);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.92) 0%, rgba(30, 27, 75, 0.25) 100%);
}

.biometrics-sandbox-box {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px dashed rgba(129, 140, 248, 0.35);
    transition: all 0.25s ease;
    cursor: crosshair;
}

.biometrics-sandbox-box:hover,
.biometrics-sandbox-box:active {
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
}

.sandbox-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
    line-height: 1.4;
}

.sandbox-metrics-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sandbox-chip {
    font-size: 11.5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.sandbox-chip b {
    color: #38bdf8;
    font-weight: 600;
}


