/* ========== 京智观人生密码 样式 — 浅灰色调 · 现代简约 ========== */

:root {
    /* 主色调 — 浅灰系 */
    --gray-50:  #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* 品牌色 — 低调蓝灰 */
    --primary:       #6366f1;
    --primary-light: #818cf8;
    --primary-dark:  #4f46e5;
    --accent:        #0ea5e9;
    --accent-light:  #38bdf8;

    /* 语义色 */
    --success: #10b981;
    --warning: #f59e0b;
    --danger:  #ef4444;
    --info:    #6366f1;

    /* 背景/卡片/文字 */
    --bg-page:       var(--gray-50);
    --bg-card:       #ffffff;
    --bg-card-hover: var(--gray-50);
    --text-primary:  var(--gray-800);
    --text-secondary:var(--gray-500);
    --text-muted:    var(--gray-400);
    --border:        var(--gray-200);
    --border-light:  var(--gray-100);

    /* 阴影 — 柔和大阴影 */
    --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);
    --shadow-xl: 0 20px 50px rgba(0,0,0,.1), 0 8px 16px rgba(0,0,0,.04);

    /* 圆角 */
    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* 过渡 */
    --transition: all .25s cubic-bezier(.4,0,.2,1);
}

/* ========== 全局重置 ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    font-size: 15px;
}

/* ========== 导航栏 — 白色磨砂 ========== */
.navbar {
    background: rgba(255,255,255,.88);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 24px;
}

.nav-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    text-decoration: none;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 汉堡菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-toggle:hover { background: var(--gray-100); }
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gray-600);
    border-radius: 2px;
    transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}
.nav-links a:hover { color: var(--primary); background: var(--gray-100); }

#userStatus { margin-left: 8px; }
#userStatus .btn { padding: 5px 14px; font-size: .8rem; border-radius: var(--radius-sm); }

/* ========== 按钮体系 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 22px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,.25);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(99,102,241,.35);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
    background: #fff;
    color: var(--gray-700);
    border: 1.5px solid var(--gray-300);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f5f3ff;
}

.btn-lg { padding: 12px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 5px 12px; font-size: .8rem; border-radius: var(--radius-sm); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ========== 主容器 ========== */
.main-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 24px;
    min-height: calc(100vh - 120px);
}

/* ========== Section 切换动画 ========== */
.section { display: none; animation: fadeSlide .35s ease; }
.section.active { display: block; }

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== Hero 区域 ========== */
.hero {
    text-align: center;
    padding: 64px 20px 48px;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 12px;
    letter-spacing: -.5px;
}
.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.1rem;
    color: var(--gray-500);
    margin-bottom: 6px;
    font-weight: 500;
}
.hero .hero-desc {
    font-size: .92rem;
    color: var(--gray-400);
    margin-bottom: 36px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ========== 特性卡片网格 ========== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    padding: 16px 0 40px;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    text-align: center;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99,102,241,.03) 0%, rgba(14,165,233,.03) 100%);
    opacity: 0;
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-300);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: block;
}
.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 6px;
}
.feature-card p {
    font-size: .85rem;
    color: var(--gray-500);
    line-height: 1.5;
}

/* ========== 页面标题 ========== */
.analysis-container h2,
.match-container h2,
.reports-container h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 6px;
}
.section-desc {
    color: var(--gray-500);
    margin-bottom: 24px;
    font-size: .9rem;
}

/* ========== 表单卡片 ========== */
.analysis-form {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.form-group { flex: 1; min-width: 140px; }

.form-group label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 5px;
}
.required { color: var(--danger); }

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: .9rem;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--gray-50);
    transition: var(--transition);
    outline: none;
    -webkit-appearance: none;
}
.form-group input::placeholder { color: var(--gray-400); }
.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99,102,241,.08);
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

/* ========== 可选模块 ========== */
.optional-section {
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
}
.optional-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 20px;
    background: var(--gray-50);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: .9rem;
    color: var(--gray-700);
    user-select: none;
}
.optional-header:hover { background: var(--gray-100); color: var(--primary); }
.toggle-arrow {
    font-size: .75rem;
    transition: transform .3s ease;
    color: var(--gray-400);
}
.optional-content {
    padding: 20px;
    background: #fff;
}
.optional-desc {
    color: var(--gray-500);
    margin-bottom: 16px;
    font-size: .88rem;
}

/* ========== 指纹网格 ========== */
.fingerprint-grid,
.palm-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.fingerprint-grid .hand-group,
.palm-grid .hand-group {
    flex: 1;
    min-width: 240px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 18px;
    border: 1px solid var(--border-light);
}
.fingerprint-grid .hand-group h4,
.palm-grid .hand-group h4 {
    text-align: center;
    margin-bottom: 14px;
    color: var(--gray-700);
    font-size: .95rem;
    font-weight: 700;
}
.finger-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.finger-row label {
    width: 56px;
    font-size: .85rem;
    font-weight: 600;
    text-align: right;
    color: var(--gray-600);
}
.finger-row select {
    flex: 1;
    padding: 7px 10px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: .82rem;
    background: #fff;
    color: var(--gray-700);
    outline: none;
    transition: var(--transition);
}
.finger-row select:focus { border-color: var(--primary); }

/* 掌纹表单组 */
.palm-form-group { margin-bottom: 10px; }
.palm-form-group label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--gray-600);
}
.palm-form-group select {
    width: 100%;
    padding: 7px 10px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: .82rem;
    background: #fff;
    color: var(--gray-700);
    outline: none;
    transition: var(--transition);
}
.palm-form-group select:focus { border-color: var(--primary); }

/* 示例图片 */
.example-images {
    margin: 14px 0;
    padding: 14px 18px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px dashed var(--gray-300);
}
.example-label {
    font-size: .82rem;
    color: var(--gray-500);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}
.example-img-row { display: flex; gap: 14px; flex-wrap: wrap; }
.example-img-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.example-img-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius);
    border: 2px solid var(--gray-200);
    transition: var(--transition);
    cursor: pointer;
    background: #fff;
}
.example-img-item img:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: scale(1.06);
}
.example-img-item span { font-size: .75rem; color: var(--gray-500); }

/* ========== 结果容器 ========== */
.result-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-top: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.result-section {
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-light);
}
.result-section:last-child { border-bottom: none; margin-bottom: 0; }

.result-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 14px;
    padding-left: 14px;
    border-left: 3px solid var(--primary);
}

/* 表格 */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: .88rem;
}
.result-table th, .result-table td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: center;
}
.result-table th {
    background: var(--gray-800);
    color: #fff;
    font-weight: 600;
    font-size: .82rem;
    letter-spacing: .3px;
}
.result-table tr:nth-child(even) { background: var(--gray-50); }
.result-table tr:hover { background: #f5f3ff; }

/* 标签 */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .76rem;
    margin: 2px 4px;
    font-weight: 600;
    letter-spacing: .2px;
}
.tag-daiji       { background: #ecfdf5; color: #065f46; }
.tag-banji       { background: #fffbeb; color: #92400e; }
.tag-xiong       { background: #fef2f2; color: #991b1b; }
.tag-personality { background: #eef2ff; color: #3730a3; }
.tag-primary     { background: #f5f3ff; color: #6d28d9; }

/* 评分 */
.score-display { text-align: center; padding: 20px; }
.score-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    box-shadow: 0 4px 20px rgba(99,102,241,.25);
}
.score-high   { background: linear-gradient(135deg, #10b981 0%, #34d399 100%); }
.score-medium { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
.score-low    { background: linear-gradient(135deg, #ef4444 0%, #f87171 100%); }

/* 图表容器 */
.chart-container { max-width: 400px; margin: 20px auto; }

/* 解读文本 */
.interpretation-text {
    line-height: 1.85;
    color: var(--gray-700);
    white-space: pre-line;
    background: var(--gray-50);
    padding: 18px;
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

/* ========== 双人匹配 ========== */
.match-form-dual {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.match-person {
    flex: 1;
    min-width: 260px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.match-person h3 {
    text-align: center;
    margin-bottom: 16px;
    color: var(--gray-800);
    font-weight: 700;
}
.match-heart {
    font-size: 3rem;
    text-align: center;
    animation: heartbeat 1.5s ease infinite;
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}
.match-score-large {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== 模态框 ========== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(17,24,39,.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 36px;
    width: 92%;
    max-width: 420px;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: modalIn .25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(.94) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--gray-400);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-content h3 { margin-bottom: 20px; color: var(--gray-800); font-weight: 700; font-size: 1.2rem; }
.modal-content .form-group { margin-bottom: 16px; }

.auth-switch {
    text-align: center;
    margin-top: 18px;
    font-size: .88rem;
    color: var(--gray-500);
}
.auth-switch a { color: var(--primary); text-decoration: none; font-weight: 700; }

/* ========== 知识弹窗 ========== */
.knowledge-content {
    max-width: 700px !important;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px !important;
}
.knowledge-content h4 {
    color: var(--gray-800);
    margin: 18px 0 8px;
    font-size: 1rem;
    padding-left: 10px;
    border-left: 3px solid var(--primary);
}
.knowledge-content p { margin-bottom: 10px; line-height: 1.75; color: var(--gray-700); }
.knowledge-content ul, .knowledge-content ol {
    margin: 8px 0 16px 22px;
    line-height: 1.75;
    color: var(--gray-700);
}
.knowledge-content li { margin-bottom: 6px; }

/* 纹型图解弹窗 */
.pattern-content {
    max-width: 800px !important;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px !important;
}
.pattern-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin: 16px 0;
}
.pattern-guide-item {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.pattern-guide-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}
.pattern-guide-item .pattern-image {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 10px;
}
.pattern-guide-item h4 {
    color: var(--gray-800);
    margin-bottom: 8px;
    font-size: 1rem;
    text-align: center;
    font-weight: 700;
}
.pattern-guide-item p { font-size: .85rem; color: var(--gray-600); margin-bottom: 6px; line-height: 1.6; }

.guide-img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: var(--radius);
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    background: #fff;
}

/* 知识弹窗表格 */
.knowledge-content .result-table,
.pattern-content .result-table { font-size: .84rem; width: 100%; }
.knowledge-content .result-table th,
.pattern-content .result-table th {
    background: var(--gray-700);
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    padding: 13px 24px;
    border-radius: var(--radius);
    color: #fff;
    font-weight: 600;
    font-size: .9rem;
    z-index: 2000;
    animation: slideIn .3s ease;
    box-shadow: var(--shadow-lg);
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.info    { background: var(--info); }

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* ========== 历史报告 ========== */
.reports-list { display: flex; flex-direction: column; gap: 10px; }
.report-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px 22px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
}
.report-item:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-md);
    background: var(--bg-card-hover);
}
.report-type-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 600;
}
.badge-name          { background: #ecfdf5; color: #065f46; }
.badge-bazi          { background: #fffbeb; color: #92400e; }
.badge-constellation { background: #eef2ff; color: #3730a3; }
.badge-comprehensive { background: #f5f3ff; color: #6d28d9; }
.badge-match         { background: #fef2f2; color: #991b1b; }

.empty-hint {
    text-align: center;
    color: var(--gray-400);
    padding: 48px 20px;
    font-size: .9rem;
}

/* ========== 指纹统计条 ========== */
.fp-stats { display: flex; flex-direction: column; gap: 8px; }
.fp-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .88rem;
}
.fp-stat-item span:first-child { width: 100px; font-weight: 600; color: var(--gray-600); }
.fp-stat-bar {
    flex: 1;
    height: 20px;
    background: var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
}
.fp-stat-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    transition: width .5s ease;
    min-width: 10px;
}
.fp-stat-item span:last-child {
    width: 80px;
    text-align: right;
    color: var(--gray-500);
    font-size: .82rem;
}

/* ========== 页脚 ========== */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--gray-400);
    font-size: .82rem;
    background: var(--gray-800);
    border-top: 1px solid var(--gray-700);
}

/* ========== 客服按钮 ========== */
.service-btn {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 56px;
    height: 56px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(7,193,96,.25), 0 2px 8px rgba(0,0,0,.08);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid #10b981;
    animation: pulse-ring 2.5s ease infinite;
}
.service-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(7,193,96,.35), 0 4px 12px rgba(0,0,0,.1);
}
.service-btn span {
    font-size: 10px;
    font-weight: 700;
    color: #10b981;
    line-height: 1;
}
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(7,193,96,.35); }
    70%  { box-shadow: 0 0 0 14px rgba(7,193,96,0); }
    100% { box-shadow: 0 0 0 0 rgba(7,193,96,0); }
}

/* ========== 加载动画 ========== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   响应式 — 手机 H5 优化
   ================================================================ */
@media (max-width: 768px) {
    /* 导航栏 — 汉堡菜单 */
    .nav-container {
        height: 52px;
        padding: 0 14px;
        position: relative;
    }
    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 52px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255,255,255,.98);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 8px 14px 14px;
        gap: 2px;
        display: none;
        box-shadow: var(--shadow-lg);
    }
    .nav-links.active { display: flex; }
    .nav-links a {
        width: 100%;
        padding: 10px 14px;
        font-size: .9rem;
        border-radius: var(--radius-sm);
        text-align: left;
    }
    #userStatus {
        margin-left: 0;
        margin-top: 4px;
        width: 100%;
    }
    #userStatus .btn {
        width: 100%;
        padding: 10px 14px;
        font-size: .9rem;
    }

    /* 主容器 */
    .main-container { padding: 14px 12px; }

    /* Hero */
    .hero { padding: 36px 12px 28px; }
    .hero h1 { font-size: 1.55rem; }
    .hero .subtitle { font-size: .9rem; }
    .hero .hero-desc { font-size: .82rem; }
    .hero-actions { flex-direction: column; gap: 10px; }
    .hero-actions .btn { width: 100%; }

    /* 特性卡片 */
    .features { grid-template-columns: 1fr 1fr; gap: 10px; }
    .feature-card { padding: 18px 12px; border-radius: var(--radius); }
    .feature-icon { font-size: 1.6rem; }
    .feature-card h3 { font-size: .88rem; }
    .feature-card p { font-size: .76rem; }

    /* 表单 */
    .analysis-container h2,
    .match-container h2,
    .reports-container h2 { font-size: 1.3rem; }
    .analysis-form { padding: 18px 14px; border-radius: var(--radius-lg); }
    .form-row { flex-direction: column; gap: 10px; margin-bottom: 10px; }
    .form-group { min-width: 100%; }
    .form-group input,
    .form-group select { padding: 10px 12px; font-size: .88rem; }
    .form-actions { flex-direction: column; gap: 8px; padding-top: 14px; margin-top: 16px; }
    .form-actions .btn { width: 100%; }

    /* 可选模块 */
    .optional-header { padding: 10px 14px; font-size: .84rem; }
    .optional-content { padding: 14px; }

    /* 指纹 */
    .fingerprint-grid, .palm-grid { gap: 12px; }
    .fingerprint-grid .hand-group,
    .palm-grid .hand-group { min-width: 100%; padding: 14px; }
    .finger-row { gap: 6px; }
    .finger-row label { width: 44px; font-size: .8rem; }
    .finger-row select { font-size: .8rem; padding: 6px 8px; }

    /* 示例图片 */
    .example-img-item img { width: 64px; height: 64px; }
    .example-img-item span { font-size: .68rem; }

    /* 结果 */
    .result-container { padding: 18px 14px; margin-top: 18px; }
    .result-section h3 { font-size: .95rem; }
    .result-table { font-size: .7rem; }
    .result-table th, .result-table td { padding: 6px 5px; }

    /* 匹配 */
    .match-form-dual { flex-direction: column; gap: 12px; }
    .match-person { min-width: 100%; padding: 16px; }
    .match-heart { font-size: 2rem; }
    .match-score-large { font-size: 2rem; }

    /* 模态框 */
    .modal-content { padding: 24px 16px; width: 94%; border-radius: var(--radius-lg); }
    .knowledge-content,
    .pattern-content { padding: 20px 16px !important; }

    /* 客服 */
    .service-btn {
        bottom: 60px;
        right: 14px;
        width: 48px;
        height: 48px;
    }
    .service-btn span { font-size: 8px; }

    /* 页脚 */
    .footer { padding: 16px 12px; font-size: .72rem; }

    /* 表格横向滚动 */
    .result-table { display: block; overflow-x: auto; white-space: nowrap; }

    /* 图解弹窗网格 */
    .pattern-guide-grid { grid-template-columns: 1fr; }
}

/* ========== 小屏手机 (≤ 375px) ========== */
@media (max-width: 375px) {
    .features { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.35rem; }
    .nav-logo { font-size: .9rem; }
}
