/* ============================================
   8001 报告读一读 - 手机优先 · 单屏设计
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-primary: #0a0f1e;
    --bg-secondary: #0f172a;
    --bg-card: #131b2e;
    --bg-card-hover: #182238;
    --border: #1f2a44;
    --border-strong: #2d3a5a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "SF Pro Display", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

body {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a { color: var(--accent-light); text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:hover, a:active { text-decoration: none; }

button {
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

/* ============ 顶部导航（手机优先） ============ */
.navbar {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 52px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-size: 1.05em;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.brand-icon {
    font-size: 1.1em;
    filter: drop-shadow(0 0 6px var(--accent-glow));
}

/* 右上角按钮区 */
.nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
/* 精致胶囊按钮（我的报告） */
.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 36px;
    padding: 0 10px 0 8px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 18px;
    color: var(--text-primary);
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.nav-pill:hover, .nav-pill:active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.25));
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}
.nav-pill-icon { font-size: 1.05em; line-height: 1; }
.nav-pill-label { color: var(--text-primary); }
.nav-pill-badge {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 2px;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: #fff;
    font-size: 0.72em;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 0 0 2px var(--bg-primary), 0 2px 6px rgba(239, 68, 68, 0.5);
    animation: badge-pulse 2.4s ease-in-out infinite;
    pointer-events: none;
}

/* 汉堡菜单按钮（圆形描边） */
.nav-menu-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s;
    font-size: 1.05em;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}
.nav-menu-btn:hover, .nav-menu-btn:active {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    color: var(--accent-light);
    transform: rotate(90deg);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.nav-icon {
    line-height: 1;
    display: block;
}

/* nav badge - 报告数小红点 */
.nav-icon-reports {
    position: relative;
}
.nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: #fff;
    font-size: 0.65em;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    box-shadow: 0 0 0 2px var(--bg-primary), 0 2px 6px rgba(239, 68, 68, 0.5);
    animation: badge-pulse 2.4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes badge-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 2px var(--bg-primary), 0 2px 6px rgba(239, 68, 68, 0.5); }
    50%      { transform: scale(1.08); box-shadow: 0 0 0 2px var(--bg-primary), 0 2px 10px rgba(239, 68, 68, 0.7); }
}

/* 汉堡下拉菜单 */
.nav-dropdown {
    position: absolute;
    top: 100%;
    right: 16px;
    margin-top: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 6px;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
}
.nav-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 0.92em;
    font-weight: 500;
}
.nav-dropdown-item:hover, .nav-dropdown-item:active {
    background: var(--bg-card-hover);
    text-decoration: none;
    color: var(--text-primary);
}

/* ============ 单屏主页 ============ */
.main-container {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.home {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Hero 区（紧凑） */
.home-hero {
    text-align: center;
    padding: 24px 0 16px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
/* 流光装饰 */
.home-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.45;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
}
.home-hero-glow-1 {
    width: 220px; height: 220px;
    background: radial-gradient(circle, #3b82f6, transparent 70%);
    top: -40px; left: -60px;
    animation: glow-drift-1 14s ease-in-out infinite;
}
.home-hero-glow-2 {
    width: 180px; height: 180px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    top: 30px; right: -50px;
    animation: glow-drift-2 16s ease-in-out infinite;
}
.home-hero-glow-3 {
    width: 160px; height: 160px;
    background: radial-gradient(circle, #ec4899, transparent 70%);
    bottom: -30px; left: 40%;
    animation: glow-drift-3 18s ease-in-out infinite;
}
@keyframes glow-drift-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(30px, 20px) scale(1.15); }
}
@keyframes glow-drift-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-25px, 35px) scale(1.1); }
}
@keyframes glow-drift-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(20px, -25px) scale(1.2); }
}
.home-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 14px;
    color: var(--accent-light);
    font-size: 0.78em;
    font-weight: 500;
    margin-bottom: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.home-hero-title {
    font-size: 2.2em;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: 10px;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.home-hero-title-row1 {
    display: block;
    font-size: 0.7em;
    opacity: 0.7;
    letter-spacing: 0.1em;
    font-weight: 600;
}
.home-hero-title-row2 {
    display: block;
    font-size: 1em;
}
.home-hero-title-accent {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 40%, #f472b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
}
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
.home-hero-subtitle {
    font-size: 0.9em;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 0 8px;
    margin-bottom: 16px;
}
.home-hero-subtitle strong {
    color: var(--accent-light);
    font-weight: 700;
}

/* 上传区（首屏主角 · V3.0 玻璃卡） */
.home-upload {
    background: linear-gradient(135deg, rgba(19,27,46,0.85), rgba(15,23,42,0.7));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 24px 16px;
    box-shadow:
        0 20px 50px rgba(0,0,0,0.4),
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 -1px 0 rgba(255,255,255,0.05) inset;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}
.home-upload::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.6), rgba(167, 139, 250, 0.6), transparent);
}

/* 拖拽区（大而突出 · 渐变呼吸边） */
.home-dropzone {
    border: 2px dashed rgba(96, 165, 250, 0.4);
    border-radius: 16px;
    padding: 36px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background:
        linear-gradient(135deg, rgba(59,130,246,0.04), rgba(139,92,246,0.04)),
        var(--bg-secondary);
    margin-bottom: 14px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
}
.home-dropzone:active, .home-dropzone.dragover {
    border-color: var(--accent);
    background:
        linear-gradient(135deg, rgba(59,130,246,0.12), rgba(139,92,246,0.12)),
        var(--bg-secondary);
    transform: scale(0.99);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.home-dropzone-icon {
    font-size: 3.4em;
    line-height: 1;
    margin-bottom: 10px;
    display: inline-block;
    animation: dropzone-float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.4));
}
@keyframes dropzone-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-6px) scale(1.05); }
}
.home-dropzone-text {
    color: var(--text-primary);
    font-size: 1.05em;
    font-weight: 600;
    margin-bottom: 4px;
}
.home-dropzone-hint {
    color: var(--text-muted);
    font-size: 0.8em;
}

/* 已选文件 */
.home-file-list {
    margin-bottom: 12px;
}
.home-file-list:empty { margin-bottom: 0; }
.home-file-item, .file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 0.88em;
}
.home-file-item-name, .file-item-name {
    flex: 1;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.home-file-item-size, .file-item-size { color: var(--text-muted); font-size: 0.85em; }
.home-file-item-remove, .file-item-remove {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 0.85em;
}

/* 上传按钮（强调 · V3.0 渐变光晕） */
.home-upload-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.05em;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow:
        0 8px 24px rgba(59, 130, 246, 0.45),
        0 0 0 1px rgba(255,255,255,0.1) inset;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    animation: gradient-shift 4s ease infinite;
}
.home-upload-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}
.home-upload-btn:hover:not(:disabled)::before { left: 100%; }
.home-upload-btn:active:not(:disabled) { transform: scale(0.98); }
.home-upload-btn:disabled {
    background: var(--border-strong);
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
    animation: none;
}

/* 进度条 */
.home-progress {
    margin-top: 14px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 10px;
}
.home-progress-bar-bg {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.home-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--success));
    transition: width 0.3s;
}
.home-progress-text {
    color: var(--text-secondary);
    font-size: 0.82em;
    text-align: center;
}

/* 成功结果 */
.home-result {
    margin-top: 14px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    border-radius: 12px;
    text-align: center;
}
.home-result-icon { font-size: 2.4em; margin-bottom: 6px; }
.home-result-text {
    color: var(--text-primary);
    font-size: 0.95em;
    margin-bottom: 10px;
}
.home-result-text strong {
    color: var(--success);
    font-size: 1.3em;
    font-weight: 800;
}
.home-result-link {
    display: inline-block;
    padding: 10px 24px;
    background: var(--success);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95em;
}
.home-result-link:active { transform: scale(0.98); }

/* 错误 */
.home-error {
    margin-top: 14px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 0.9em;
}

/* 底部信任条（一行 4 项 · V3.0 渐变边） */
.home-trust {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 14px 8px;
    background: linear-gradient(135deg, rgba(19,27,46,0.7), rgba(15,23,42,0.5));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 14px;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}
.home-trust::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.6), rgba(167, 139, 250, 0.6), transparent);
}
.home-trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
    text-align: center;
}
.home-trust-num {
    font-size: 1.15em;
    font-weight: 900;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    animation: gradient-shift 5s ease infinite;
    font-variant-numeric: tabular-nums;
}
.home-trust-label {
    font-size: 0.72em;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
}
.home-trust-divider {
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg, transparent, var(--border-strong), transparent);
    flex-shrink: 0;
}

/* ============ 页脚 ============ */
.footer {
    text-align: center;
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 0.78em;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}
.footer p { margin: 0; }

/* ============ 卡片（其他页用） ============ */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.card h2 {
    font-size: 1.05em;
    margin-bottom: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    font-weight: 700;
}
.card p { color: var(--text-secondary); }
.success-card { border-left: 4px solid var(--success); }

/* ============ 评分卡片 ============ */
.score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}
.score-item {
    text-align: center;
    padding: 16px 12px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border);
}
.score-label { font-size: 0.85em; color: var(--text-secondary); margin-bottom: 6px; }
.score-value { font-size: 2em; font-weight: 700; }
.score-desc { font-size: 0.75em; color: var(--text-muted); margin-top: 4px; }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--accent-light); }
.text-purple { color: #a78bfa; }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88em;
}
.data-table th, .data-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.data-table th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85em;
}
.data-table td.mono { font-family: monospace; }
.muted { color: var(--text-muted); font-size: 0.82em; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.78em;
    color: white;
}
.badge-danger { background: var(--danger); }
.badge-warning { background: var(--warning); }

/* 可信度横幅（重点：异常项 OCR 不可靠警告） */
.confidence-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid;
    position: relative;
    overflow: hidden;
}
.confidence-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.4;
}
.confidence-banner-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.04));
    border-color: rgba(245, 158, 11, 0.45);
    color: #fcd34d;
}
.confidence-banner-critical {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border-color: rgba(239, 68, 68, 0.55);
    color: #fca5a5;
    animation: banner-pulse 3s ease-in-out infinite;
}
@keyframes banner-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    50%      { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.08); }
}
.confidence-banner-icon {
    font-size: 1.6em;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px currentColor);
}
.confidence-banner-body { flex: 1; }
.confidence-banner-title {
    font-weight: 800;
    font-size: 0.95em;
    margin-bottom: 4px;
}
.confidence-banner-title strong {
    color: white;
    font-size: 1.1em;
}
.confidence-banner-desc {
    font-size: 0.82em;
    line-height: 1.4;
    opacity: 0.85;
}

/* ============ 系统模块评分 ============ */
.module-grid { display: flex; flex-direction: column; gap: 10px; }
.module-item {
    display: grid;
    grid-template-columns: 80px 1fr 36px;
    gap: 10px;
    align-items: center;
}
.module-label { color: var(--text-secondary); font-size: 0.88em; }
.module-bar-bg {
    height: 7px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}
.module-bar { height: 100%; transition: width 0.5s; }
.bar-success { background: var(--success); }
.bar-warning { background: var(--warning); }
.bar-danger { background: var(--danger); }
.module-score { text-align: right; font-weight: 600; font-size: 0.9em; }

/* ============ 我的报告 ============ */
.my-container { max-width: 720px; margin: 0 auto; padding: 20px 16px; }
.my-container h1 { color: var(--text-primary); margin-bottom: 20px; font-size: 1.5em; }
.empty-state {
    text-align: center;
    padding: 48px 20px;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px dashed var(--border-strong);
}
.empty-icon { font-size: 3em; margin-bottom: 10px; opacity: 0.5; }
.empty-state h2 { color: var(--text-secondary); margin-bottom: 6px; font-size: 1.1em; }
.empty-state p { color: var(--text-muted); margin-bottom: 16px; font-size: 0.9em; }

.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
}
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.report-header h3 { color: var(--text-primary); font-size: 1em; }
.report-meta { color: var(--text-secondary); font-size: 0.82em; margin-bottom: 10px; }
.profile-summary { display: flex; gap: 10px; align-items: center; }
.score-pill {
    padding: 3px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.82em;
    color: var(--text-secondary);
}
.score-pill.pill-warning { color: var(--warning); border-color: var(--warning); }

/* 可信度标签（/my 列表用） */
.confidence-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78em;
    font-weight: 700;
    border: 1px solid;
}
.confidence-tag-critical {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(239, 68, 68, 0.06));
    border-color: rgba(239, 68, 68, 0.55);
    color: #fca5a5;
    animation: badge-pulse 2.4s ease-in-out infinite;
}
.confidence-tag-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.06));
    border-color: rgba(245, 158, 11, 0.55);
    color: #fcd34d;
}
.btn-link { color: var(--accent-light); font-weight: 500; }

/* ============ 登录注册 ============ */
.auth-container { max-width: 420px; margin: 20px auto; padding: 0 16px; }
.auth-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 28px 24px;
    border: 1px solid var(--border);
}
.auth-card h1 { font-size: 1.3em; color: var(--text-primary); margin-bottom: 6px; }
.auth-subtitle { color: var(--text-muted); margin-bottom: 20px; font-size: 0.9em; }
.auth-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent), #2563eb);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
}
.user-form { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

input[type="text"], input[type="tel"], input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;  /* iOS 不自动缩放 */
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}
input:focus { outline: none; border-color: var(--accent); }

.profile-header { margin-bottom: 20px; }
.profile-header h1 { color: var(--text-primary); margin-bottom: 6px; font-size: 1.3em; }
.patient-info { color: var(--text-secondary); font-size: 0.9em; }

.summary-text {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-secondary);
}

.details-toggle {
    cursor: pointer;
    color: var(--accent-light);
    user-select: none;
}

.profile-footer {
    text-align: center;
    margin-top: 24px;
    padding: 16px;
    color: var(--text-muted);
    font-size: 0.85em;
}
.profile-footer p { margin-bottom: 6px; }
.profile-footer .muted { font-size: 0.82em; }

.auth-error {
    margin-top: 10px;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.88em;
    display: none;
}
.auth-error:not(:empty) { display: block; }
.auth-footer {
    text-align: center;
    margin-top: 14px;
    color: var(--text-secondary);
    font-size: 0.85em;
}

.report-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.82em;
}
.status-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.status-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.status-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

/* ============ 移动端强化 ============ */
@media (max-width: 480px) {
    .home { padding: 16px 12px 12px; gap: 14px; }
    .home-hero-title { font-size: 1.5em; }
    .home-hero-subtitle { font-size: 0.85em; }
    .home-upload { padding: 16px 12px; }
    .home-dropzone { padding: 24px 12px; }
    .home-dropzone-icon { font-size: 2.6em; }
    .home-trust-num { font-size: 0.95em; }
    .home-trust-label { font-size: 0.68em; }
    .home-trust-divider { height: 20px; }
}

/* iPhone 安全区 */
@supports (padding: env(safe-area-inset-top)) {
    .navbar { padding-top: env(safe-area-inset-top); }
    .footer { padding-bottom: env(safe-area-inset-bottom); }
}

/* ============ 微信内置浏览器适配 ============ */
.weiXin-fix {
    /* 微信浏览器优化 */
}

/* ============ V2.0 主页新组件 ============ */

/* Hero tag 加闪烁点 */
.home-hero-tag-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 6px var(--success);
    animation: dot-blink 1.8s ease-in-out infinite;
}
@keyframes dot-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.85); }
}

/* Hero 实时统计（V3.0 玻璃卡片） */
.home-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 18px;
    padding: 16px 0;
    background: linear-gradient(135deg, rgba(15,23,42,0.6), rgba(15,23,42,0.4));
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.05);
}
.home-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0 4px;
}
.home-stat-num {
    font-size: 1.6em;
    font-weight: 900;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
    animation: gradient-shift 4s ease infinite;
    font-variant-numeric: tabular-nums;
}
.home-stat-label {
    font-size: 0.72em;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
}
.home-stat-divider {
    width: 1px;
    height: 30px;
    background: linear-gradient(180deg, transparent, var(--border-strong), transparent);
}

/* 上传区拖拽层背景光 */
.home-dropzone {
    position: relative;
    overflow: hidden;
}
.home-dropzone-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(59,130,246,0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* 上传按钮强化 */
.home-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}
.home-upload-btn-icon {
    font-size: 1.05em;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.3));
}

/* Section 标题（V3.0） */
.home-section-title {
    font-size: 1.1em;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.home-section-title::before,
.home-section-title::after {
    content: "";
    flex: 0 0 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.5), transparent);
}
.home-section-title-text {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-shift 6s ease infinite;
}

/* 3 步骤（V3.0 玻璃卡） */
.home-steps {
    background: linear-gradient(135deg, rgba(19,27,46,0.7), rgba(15,23,42,0.5));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 14px;
    position: relative;
    overflow: hidden;
}
.home-steps::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.5), rgba(167, 139, 250, 0.5), transparent);
}
.home-steps-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.home-step {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    border-radius: 12px;
    transition: all 0.3s;
}
.home-step:hover {
    background: rgba(59, 130, 246, 0.06);
    transform: translateY(-2px);
}
.home-step-num {
    font-size: 0.65em;
    color: var(--accent-light);
    font-weight: 800;
    letter-spacing: 0.15em;
    margin-bottom: 6px;
    opacity: 0.8;
}
.home-step-icon {
    font-size: 1.8em;
    margin-bottom: 6px;
    filter: drop-shadow(0 4px 12px rgba(59,130,246,0.5));
    display: inline-block;
    transition: transform 0.3s;
}
.home-step:hover .home-step-icon { transform: scale(1.15) rotate(-5deg); }
.home-step h3 {
    font-size: 0.88em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.home-step p {
    font-size: 0.7em;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}
.home-step-arrow {
    color: var(--accent-light);
    font-size: 1.3em;
    font-weight: 700;
    flex-shrink: 0;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: arrow-pulse 2s ease-in-out infinite;
}
@keyframes arrow-pulse {
    0%, 100% { opacity: 0.5; transform: translateX(0); }
    50%      { opacity: 1; transform: translateX(3px); }
}

/* 报告对比（V3.0） */
.home-demo {
    background: linear-gradient(135deg, rgba(19,27,46,0.7), rgba(15,23,42,0.5));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 14px;
    position: relative;
    overflow: hidden;
}
.home-demo::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.5), rgba(167, 139, 250, 0.5), transparent);
}
.home-demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.home-demo-card {
    border-radius: 14px;
    padding: 12px 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    transition: all 0.3s;
}
.home-demo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.home-demo-before {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
    border-color: rgba(239, 68, 68, 0.3);
}
.home-demo-after {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
    border-color: rgba(16, 185, 129, 0.3);
}
.home-demo-tag {
    font-size: 0.72em;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: 0.03em;
    display: inline-block;
    padding: 3px 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
}
.home-demo-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}
.home-demo-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.78em;
    padding: 3px 0;
    border-bottom: 1px dashed rgba(148,163,184,0.1);
}
.home-demo-line.demo-faded {
    opacity: 0.4;
}
.home-demo-name {
    color: var(--text-secondary);
}
.home-demo-value {
    color: var(--danger);
    font-weight: 600;
    font-family: ui-monospace, monospace;
}
.home-demo-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    padding: 8px 0 10px;
    margin-bottom: 10px;
    border-bottom: 1px dashed rgba(148,163,184,0.25);
}
.home-demo-score-num {
    font-size: 2.6em;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}
.home-demo-score-label {
    font-size: 0.7em;
    color: var(--text-secondary);
    font-weight: 600;
}
.home-demo-bullets {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.home-demo-bullet {
    font-size: 0.72em;
    padding: 5px 8px;
    border-radius: 6px;
    line-height: 1.3;
    font-weight: 600;
}
.home-demo-bullet.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-left: 2px solid #ef4444;
}
.home-demo-bullet.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    border-left: 2px solid #f59e0b;
}
.home-demo-footer {
    text-align: center;
    font-size: 0.68em;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(148,163,184,0.15);
}

/* 移动端进一步压缩 */
@media (max-width: 480px) {
    .home-stat-num { font-size: 1.2em; }
    .home-step-icon { font-size: 1.4em; }
    .home-step-arrow { font-size: 0.9em; }
    .home-demo-card { padding: 10px 8px; }
    .home-demo-line { font-size: 0.7em; }
    .home-demo-score-num { font-size: 2em; }
}
