:root { 
    --border-style: 1px solid #d1d5db; 
    --bg-body: #f3f4f6;
    --bg-sidebar: #1e293b;
    --bg-sidebar-hover: #334155;
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-sub: #6b7280;
    --primary-color: #2563eb;
    --danger-color: #dc2626;
    --success-color: #16a34a;
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: var(--bg-body); display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; color: var(--text-main); user-select: none; }
.window { width: 860px; height: 560px; background: var(--bg-card); border: var(--border-style); border-radius: 12px; display: flex; overflow: hidden; position: relative; }

/* ================= 侧边栏 & 基础布局 ================= */
.sidebar { width: 88px; background: var(--bg-sidebar); display: flex; flex-direction: column; align-items: center; padding-top: 40px; border-right: var(--border-style); position: relative; }
.nav-item { width: 64px; height: 64px; margin-bottom: 16px; display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer; font-size: 13px; color: #94a3b8; border-radius: 10px; transition: all 0.2s ease; border: 1px solid transparent; }
.nav-item.active { background: var(--primary-color); color: #ffffff; font-weight: 500; }

/* 左下角用户头像区域 (微笑头像双行文字) */
.sidebar-user { margin-top: auto; margin-bottom: 24px; display: flex; flex-direction: column; align-items: center; cursor: pointer; padding: 10px 4px; border-radius: 8px; transition: background 0.2s; width: 76px; }
.sidebar-user:hover { background: var(--bg-sidebar-hover); }
.user-avatar-box { width: 40px; height: 40px; border-radius: 50%; background: #334155; display: flex; justify-content: center; align-items: center; margin-bottom: 8px; overflow: hidden; border: 1px solid #475569; color: #cbd5e1; }
.user-name-group { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.user-name { font-size: 12px; color: #f8fafc; font-weight: 500; text-align: center; }
.user-phone { font-size: 10px; color: #94a3b8; text-align: center; }

/* ================= 主内容区 ================= */
.main-content { flex: 1; position: relative; background: #fafafa; overflow-y: auto; }
.page { display: none; padding: 32px 40px; height: 100%; box-sizing: border-box; flex-direction: column; }
.page.active { display: flex; }
.card { background: var(--bg-card); border: var(--border-style); border-radius: 10px; padding: 24px; margin-bottom: 16px; }
.header-title { font-size: 20px; font-weight: 600; margin-bottom: 24px; }

/* 纯净度检测主区 */
.purity-card { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 24px; }
.purity-info { flex: 1; }
.purity-info .label { font-size: 13px; color: var(--text-sub); margin-bottom: 12px; }
.purity-content-box { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.purity-uncheck { font-size: 15px; color: var(--text-sub); font-weight: 500; display: block; }
.purity-result { display: none; flex-direction: column; gap: 8px; }
.purity-score-line { display: flex; align-items: baseline; gap: 8px; }
.purity-score { font-size: 28px; font-weight: 700; line-height: 1; }
.purity-status-text { font-size: 14px; font-weight: 500; }
.purity-suggestion { font-size: 12px; padding: 6px 10px; border-radius: 4px; display: inline-block; width: fit-content; font-weight: 500; border: var(--border-style); }
.purity-suggestion.risk { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.purity-suggestion.safe { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }

.action-links { display: flex; align-items: center; gap: 16px; }
.link-text { font-size: 13px; color: var(--primary-color); cursor: pointer; font-weight: 500; display: none; }
.link-text:hover { text-decoration: underline; }
.refresh-btn { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; cursor: pointer; color: var(--text-sub); border-radius: 4px; transition: all 0.2s; }
.refresh-btn:hover { color: var(--primary-color); background: #f3f4f6; }
.refresh-btn svg { transition: transform 0.3s; }
.refresh-btn:hover svg { transform: rotate(90deg); }

/* 节点与状态网格 */
.node-selector { display: flex; justify-content: space-between; align-items: center; }
.node-info .label { font-size: 12px; color: var(--text-sub); margin-bottom: 6px; }
.node-info .value { font-size: 16px; font-weight: 500; }
.node-buy-link { font-size: 14px; color: var(--primary-color); cursor: pointer; font-weight: 600; display: none; }
.node-buy-link:hover { text-decoration: underline; }

.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; opacity: 0; transition: opacity 0.3s; }
.status-grid.active { opacity: 1; }
.data-box { border: var(--border-style); border-radius: 8px; padding: 12px; text-align: center; background: #fafafa; }
.data-box .label { font-size: 11px; color: var(--text-sub); margin-bottom: 8px;}
.data-box .value { font-size: 15px; font-weight: 600; }

/* 底部操作 */
.center-action { display: flex; flex-direction: column; justify-content: center; align-items: center; margin-top: auto; }
.btn-power { padding: 16px 56px; font-size: 18px; font-weight: 600; color: #ffffff; background: var(--primary-color); border: 1px solid var(--primary-color); border-radius: 99px; cursor: pointer; transition: all 0.2s; min-width: 240px;}
.btn-power.connected { background: #ffffff; color: var(--danger-color); border: 1px solid var(--danger-color); }
.btn-power.disabled { background: #cbd5e1; border-color: #cbd5e1; color: #ffffff; cursor: not-allowed; box-shadow: none; }
.btn-power.disabled:hover { transform: none; box-shadow: none; }

.ai-icons { display: flex; gap: 8px; margin-top: 20px; justify-content: center;}
.ai-tag { padding: 4px 12px; font-size: 11px; border: var(--border-style); border-radius: 100px; color: var(--text-sub); background: white; }

/* ================= 弹窗系统通用 ================= */
.overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(17, 24, 39, 0.6); backdrop-filter: blur(4px); z-index: 100; display: none; justify-content: center; align-items: center; }
.modal-box { background: var(--bg-card); border: var(--border-style); border-radius: 12px; padding: 24px 32px; width: 360px; display: flex; flex-direction: column; max-height: 90vh; box-sizing: border-box; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-shrink: 0; }
.modal-title { font-size: 18px; font-weight: 600; }
.close-btn { cursor: pointer; color: var(--text-sub); font-size: 16px; padding: 4px; border-radius: 4px; transition: background 0.2s; }
.close-btn:hover { color: var(--text-main); background: #f3f4f6; }
.input-box { width: 100%; padding: 12px; border: var(--border-style); border-radius: 6px; box-sizing: border-box; margin-bottom: 16px; font-size: 14px; }
.checkbox-row { display: flex; align-items: center; font-size: 13px; color: var(--text-sub); margin-bottom: 16px; }
.checkbox-row input { margin-right: 8px; margin-left: 0; cursor: pointer; }
.checkbox-row label { cursor: pointer; }
.btn-modal { width: 100%; padding: 12px; background: var(--primary-color); color: white; border: 1px solid var(--primary-color); border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; margin-bottom: 12px; transition: background 0.2s; }
.btn-modal:hover { background: #1d4ed8; }
.btn-modal.secondary { background: white; color: var(--text-main); border: var(--border-style); }
.btn-modal.secondary:hover { background: #f9fafb; }
.register-link { text-align: center; font-size: 13px; color: var(--text-sub); cursor: pointer; }

/* ================= 深度安全审计报告专属样式 ================= */
.report-modal { width: 560px; padding: 0; max-height: 90vh; } 
.report-header-top { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; padding: 20px 32px; border-bottom: var(--border-style); background: var(--bg-card); border-radius: 12px 12px 0 0; }
.report-content { flex: 1; overflow-y: auto; padding: 24px 32px; min-height: 0; } 
.report-score-box { display: flex; justify-content: space-between; align-items: center; border-bottom: var(--border-style); padding-bottom: 16px; margin-bottom: 20px; }
.report-score-ring { width: 48px; height: 48px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 18px; font-weight: 700; color: white; flex-shrink: 0;}
.audit-section { margin-bottom: 24px; }
.audit-section-title { font-size: 14px; font-weight: 600; color: var(--text-main); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.audit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.audit-item { border: var(--border-style); border-radius: 6px; padding: 12px; background: #fafafa; }
.audit-item-header { font-size: 12px; color: var(--text-sub); margin-bottom: 6px; display: flex; justify-content: space-between; }
.audit-item-value { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; word-break: break-all;}
.full-width { grid-column: span 2; }

/* 已过期红色小标签 */
.tag-expired { background: #fef2f2; color: var(--danger-color); padding: 2px 6px; border-radius: 4px; font-size: 11px; border: 1px solid #fecaca; font-weight: 500;}