/* ===== SPA页面切换 ===== */
.spa-page {
    display: none;
}

.spa-page.active {
    display: block;
}

/* ===== 五行页面专用样式 ===== */
.five-elements-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* 页面标题栏 */
.header-bar {
    background: linear-gradient(135deg, #2d5a3d 0%, #4a7c59 100%);
    color: white;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.header-title {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
}

/* 五行关系图卡片 */
.relation-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.relation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.relation-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #2d5a3d;
    text-align: center;
    margin-bottom: 20px;
}

/* 五行图例 */
.relation-legend {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.legend-item.generate {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
}

.legend-item.conquer {
    background: rgba(244, 67, 54, 0.1);
    color: #c62828;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.generate {
    background: #4caf50;
}

.legend-dot.conquer {
    background: #f44336;
}

/* 五行关系图容器 */
.relation-chart-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.relation-chart-container:hover {
    transform: scale(1.02);
}

.relation-chart {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 五行元素选择卡片 */
.elements-section {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

/* 五行元素卡片容器 */
.elements-container {
    display: flex;
    gap: 2px;
    margin-bottom: 20px;
    padding: 0 2px;
    box-sizing: border-box;
    width: 100%;
}

/* 五行元素卡片 */
.element-card {
    background: white;
    border-radius: 10px;
    padding: 2px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
}

.element-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: all 0.3s ease;
}

.element-card.wood::before { background: #4caf50; }
.element-card.fire::before { background: #f44336; }
.element-card.earth::before { background: #9e630bff; }
.element-card.metal::before { background: #fea62cff; }
.element-card.water::before { background: #00bcd4; }

.element-card:hover {
    transform: translateY(-6px);
}

.element-card.active {
    transform: translateY(-4px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 1) 100%);
}

.element-card.wood.active {
    border: 2px solid #4caf50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

.element-card.fire.active {
    border: 2px solid #f44336;
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.5);
}

.element-card.earth.active {
    border: 2px solid #9e630bff;
    box-shadow: 0 0 15px rgba(158, 99, 11, 0.5);
}

.element-card.metal.active {
    border: 2px solid #fea62cff;
    box-shadow: 0 0 15px rgba(254, 166, 44, 0.5);
}

.element-card.water.active {
    border: 2px solid #00bcd4;
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.5);
}

/* 五行元素符号 */
.element-symbol {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.element-card.wood .element-symbol { color: #4caf50; }
.element-card.fire .element-symbol { color: #f44336; }
.element-card.earth .element-symbol { color: #9e630bff; }
.element-card.metal .element-symbol { color: #fea62cff; }
.element-card.water .element-symbol { color: #00bcd4; }

.element-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.element-season {
    font-size: 0.75rem;
    color: #666;
}

/* 五行详细信息卡片 */
.element-detail-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
    transition: all 0.3s ease;
    display: none;
}

/* 五行页面减少底部空白 */
#theory-page .main-content {
    padding-bottom: 20px !important;
}

#theory-page .container {
    padding-bottom: 0;
}

.element-detail-card.visible {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.detail-icon {
    font-size: 2rem;
    font-weight: bold;
    margin-right: 16px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.detail-title {
    flex: 1;
}

.detail-element-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.detail-element-season {
    font-size: 1rem;
    color: #666;
    margin: 4px 0 0 0;
}

/* 详细信息网格 */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.detail-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

/* 放大模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: hidden;
    align-items: center;
    justify-content: center;
    cursor: move;
}

.modal-content {
    position: absolute;
    max-width: 95%;
    max-height: 95%;
    user-select: none;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.modal-content img {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    border-radius: 0.5rem;
    transform-origin: center center;
    transition: transform 0.1s ease;
}

/* 关闭按钮 */
.close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
}

.close:hover {
    color: #ccc;
    transform: rotate(90deg);
}

/* ===== 辨证页面专用样式 ===== */
:root {
    /* 主色调 - 中医绿色系 */
    --primary-50: #f0fdf4;
    --primary-100: #dcfce7;
    --primary-200: #bbf7d0;
    --primary-300: #86efac;
    --primary-400: #4ade80;
    --primary-500: #22c55e;
    --primary-600: #16a34a;
    --primary-700: #15803d;
    --primary-800: #166534;
    --primary-900: #14532d;
    
    /* 辅助色 */
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-orange: #f97316;
    --accent-pink: #ec4899;
    --accent-teal: #14b8a6;
    
    /* 中性色 */
    --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;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(22, 163, 74, 0.3);
    
    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* 动画 */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 功能选项卡 */
.function-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.375rem;
    flex-wrap: nowrap;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 诊断查询按钮样式 */
.diagnosis-btn {
    background: transparent;
    color: var(--gray-600);
    font-weight: 600;
    padding: 0.625rem 1.75rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    position: relative;
    overflow: hidden;
    min-width: 100px;
}

.diagnosis-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    opacity: 0;
    transition: opacity var(--transition-base);
    border-radius: var(--radius-full);
}

.diagnosis-btn:hover {
    color: var(--primary-700);
    transform: translateY(-1px);
}

.diagnosis-btn:hover::before {
    opacity: 0.1;
}

.diagnosis-btn.active {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: var(--shadow-md), 0 0 0 2px var(--primary-200);
    transform: translateY(-1px);
}

.diagnosis-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 0 3px var(--primary-200);
}

/* 诊断卡片样式 */
#diagnosis-page section {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

#diagnosis-page section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 诊断部分标题 */
#diagnosis-page section h2 {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    padding: 1.125rem 1.25rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#diagnosis-page section h2 .material-icons {
    color: white;
    margin-right: 0.75rem;
    font-size: clamp(1.5rem, 5vw, 1.75rem);
}

/* 不同诊断类型的标题渐变 */
#face-exam h2 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

#tongue-exam h2 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

#inquiry-exam h2 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

/* 问题标题 */
#diagnosis-page section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#diagnosis-page section h3::before {
    content: '';
    width: 4px;
    height: 1.25rem;
    background: linear-gradient(180deg, #22c55e, #16a34a);
    border-radius: 9999px;
}

/* 选项容器 */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
}

/* 选项包装器 */
.option-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 选项样式 */
.option-label {
    padding: 0.625rem 0.75rem;
    border: 2px solid #e0e7ff;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff, #f3f4f6);
    color: #4b5563;
    font-size: 0.8125rem;
    font-weight: 500;
    width: 100%;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1.3;
    position: relative;
    overflow: hidden;
}

/* 选项悬停效果 */
.option-label:hover {
    border-color: #6366f1;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* 选中状态 */
input[type="radio"]:checked + .option-label,
input[type="checkbox"]:checked + .option-label {
    border-color: #6366f1;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

/* 禁用状态 */
input[type="radio"]:disabled + .option-label,
input[type="checkbox"]:disabled + .option-label {
    border-color: #e2e8f0;
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* 禁用状态的悬停效果 */
input[type="radio"]:disabled + .option-label:hover,
input[type="checkbox"]:disabled + .option-label:hover {
    border-color: #e2e8f0;
    background: #f1f5f9;
    transform: none;
    box-shadow: none;
}

/* 隐藏单选和多选按钮 */
input[type="checkbox"],
input[type="radio"] {
    display: none;
}

/* 选项点击效果 */
.option-label:active {
    transform: translateY(0) scale(0.98);
}

/* 提交按钮和随机按钮样式 */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    justify-content: center;
    flex-wrap: nowrap;
    padding: 0 0.5rem;
}

#submit-btn, #random-diagnosis {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-weight: 700;
    padding: 0.875rem 1.5rem;
    border-radius: 1.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    min-width: 140px;
    font-size: clamp(0.875rem, 4vw, 1rem);
}

#submit-btn:hover, #random-diagnosis:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
}

#submit-btn:active, #random-diagnosis:active {
    transform: translateY(-1px);
}

/* 滑动容器样式 */
.swipe-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    cursor: pointer;
}

.swipe-content {
    position: relative;
    z-index: 10;
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    transition: transform 0.3s ease;
    transform: translateX(0);
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.swipe-content.swiped {
    transform: translateX(-160px);
}

.swipe-actions {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    z-index: 5;
    border-radius: 0 1rem 1rem 0;
}

.swipe-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 100%;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
}

.swipe-action-btn.rename-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.swipe-action-btn.delete-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* ===== 诊断结果页面样式 ===== */
#diagnosis-result {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    box-shadow: none;
    backdrop-filter: none;
}

/* 诊断结果卡片样式 */
.syndrome-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.syndrome-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.syndrome-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    display: block;
    text-align: left;
}

.syndrome-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* 主要表现标签 */
.symptoms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.symptom-tag {
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    color: #d97706;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.875rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.15);
    transition: all 0.3s ease;
}

.symptom-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 9px rgba(217, 119, 6, 0.25);
}

/* 辨证分析标题 */
.syndrome-card h3 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* 辨证分析内容 */
.syndrome-card p {
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* 健康建议标签 */
.syndrome-card h4 {
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.syndrome-card h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #4b5563;
}

/* 结果按钮样式 */
.result-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 0.5rem;
}

.result-buttons button {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: 700;
    padding: 0.875rem 1.5rem;
    border-radius: 1.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    min-width: 140px;
}

.result-buttons button:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* 辨证因子分析样式 */
.factor-analysis {
    margin: 2rem 0;
}

.factor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.factor-item {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0.75rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.factor-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.factor-score {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.factor-name {
    font-size: 1rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* 证型分类选项卡样式 */
.syndrome-tabs {
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.syndrome-tabs::-webkit-scrollbar {
    display: none;
}

.syndrome-tab {
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    flex: 1;
    text-align: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.syndrome-tab:active {
    transform: scale(0.95);
}

/* 证型卡片滑动容器 */
.syndrome-content {
    position: relative;
    touch-action: pan-y;
    overflow: hidden;
}

.syndrome-panels-wrapper {
    display: flex;
    transition: transform 0.3s ease-out, height 0.3s ease-out;
    will-change: transform, height;
    align-items: flex-start;
    width: 100%;
}

.syndrome-panel {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    animation: fadeIn 0.3s ease;
    height: auto;
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .elements-container {
        gap: 2px;
    }
    
    .element-card {
        padding: 2px;
    }
    
    .element-symbol {
        font-size: 1.5rem;
    }
    
    .element-name {
        font-size: 0.8rem;
    }
    
    .element-season {
        font-size: 0.65rem;
    }
    
    .detail-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .detail-item {
        padding: 12px 8px;
    }
    
    .detail-label {
        font-size: 0.75rem;
    }
    
    .detail-value {
        font-size: 0.9rem;
    }
    
    .options-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.375rem;
    }
    
    .option-label {
        padding: 0.5rem 0.5rem;
        font-size: 0.75rem;
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .detail-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .detail-item {
        padding: 10px 4px;
    }
    
    .detail-label {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }
    
    .detail-value {
        font-size: 0.85rem;
    }
    
    .relation-legend {
        flex-direction: column;
        align-items: center;
    }
    
    .legend-item {
        width: 100%;
        justify-content: center;
    }
    
    /* 证型分类选项卡小屏幕优化 */
    .syndrome-tabs {
        gap: 0.25rem;
        padding: 0.375rem;
    }
    
    .syndrome-tab {
        min-width: 0;
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
        flex: 1;
    }
    
    /* 辨证因子分析小屏幕优化 - 一行显示3个 */
    .factor-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .factor-item {
        padding: 0.75rem 0.5rem;
    }
    
    .factor-score {
        font-size: 1.5rem;
    }
    
    .factor-name {
        font-size: 0.75rem;
    }
}

/* ===== 我的页面样式 ===== */
.profile-container {
    padding-bottom: 0;
}

.profile-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* 用户信息卡片 */
.user-info-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #2d5a3d 0%, #4a7c59 100%);
    color: white;
}

.user-avatar-large {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.user-details {
    flex: 1;
}

.username {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.user-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.activated {
    background: #16a34a;
    color: white;
}

.status-badge.unactivated {
    background: #f59e0b;
    color: white;
}

.join-date {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* 卡片头部 */
.card-header-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title .icon {
    color: #2d5a3d;
}

/* 会员权益 */
.membership-benefits {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 10px;
}

.benefit-icon {
    width: 24px;
    height: 24px;
    background: #16a34a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.benefit-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.benefit-name {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.benefit-desc {
    font-size: 0.8rem;
    color: #6b7280;
}

/* 激活状态 - 仅未激活状态样式 */
.activation-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activation-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background: #fffbeb;
}

.status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    background: #f59e0b;
    color: white;
}

.status-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-title {
    font-weight: 600;
    font-size: 1rem;
    color: #d97706;
}

.status-desc {
    font-size: 0.85rem;
    color: #6b7280;
}

.activation-action {
    margin-top: 12px;
}

.activate-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2d5a3d 0%, #4a7c59 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.activate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 90, 61, 0.3);
}

/* 关于应用 */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-logo-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.about-logo-small {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.about-name {
    font-weight: 600;
    font-size: 1rem;
    color: #374151;
}

.about-version {
    font-size: 0.85rem;
    color: #6b7280;
}

.about-desc {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
    padding: 12px;
    background: #f9fafb;
    border-radius: 10px;
}

.about-copyright {
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
}

/* 退出登录 */
.logout-section {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.logout-btn {
    width: 100%;
    padding: 16px;
    background: white;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logout-btn:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.logout-btn .icon {
    color: #dc2626;
}

/* ===== AI配置卡片样式 ===== */
.ai-config-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.ai-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.ai-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ai-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 26px;
}

.ai-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ai-toggle input:checked + .ai-toggle-slider {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.ai-toggle input:checked + .ai-toggle-slider:before {
    transform: translateX(22px);
}

.ai-config-content {
    margin-top: 16px;
}

.ai-config-disabled {
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

.ai-model-select {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ai-api-key {
    margin-bottom: 16px;
}

.api-key-input-group {
    display: flex;
    gap: 8px;
}

.api-key-input-group .form-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
    transition: all 0.2s ease;
}

.api-key-input-group .form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.toggle-visibility-btn {
    padding: 8px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-visibility-btn:hover {
    background: #e5e7eb;
}

.toggle-visibility-btn svg {
    color: #6b7280;
}

.form-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
}

.ai-usage-stats {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
}

.usage-stat-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.usage-label {
    font-size: 0.8rem;
    color: #64748b;
}

.usage-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #3b82f6;
}

.usage-unit {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ===== 辨证页面AI增强开关 ===== */
.ai-enhance-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.ai-enhance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-enhance-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1e40af;
}

.ai-enhance-title svg {
    color: #3b82f6;
}

.ai-toggle-small {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.ai-toggle-small input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ai-toggle-slider-small {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.ai-toggle-slider-small:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ai-toggle-small input:checked + .ai-toggle-slider-small {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.ai-toggle-small input:checked + .ai-toggle-slider-small:before {
    transform: translateX(20px);
}

.ai-enhance-desc {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 8px;
    margin-bottom: 0;
}

.ai-enhance-warning {
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 8px;
    margin-bottom: 0;
}

.ai-enhance-section.disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* ===== AI对比分析卡片样式 ===== */
.ai-comparison-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
}

.ai-comparison-card h3 {
    color: #0369a1;
}

.ai-comparison-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.ai-comparison-result {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.ai-comparison-result.consistent {
    background: #f0fdf4;
}

.ai-comparison-result.inconsistent {
    background: #fffbeb;
}

.ai-comparison-result .comparison-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.ai-comparison-result.consistent .comparison-icon {
    background: #16a34a;
    color: white;
}

.ai-comparison-result.inconsistent .comparison-icon {
    background: #f59e0b;
    color: white;
}

.ai-comparison-result .comparison-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-comparison-result .comparison-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.ai-comparison-result.consistent .comparison-title {
    color: #16a34a;
}

.ai-comparison-result.inconsistent .comparison-title {
    color: #d97706;
}

.ai-comparison-result .comparison-desc {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.5;
}

.ai-differences {
    background: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.ai-differences ul {
    list-style-type: disc;
    margin-left: 1.25rem;
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.6;
}

.ai-differences li {
    margin-bottom: 4px;
}

.ai-final-conclusion {
    background: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.ai-final-conclusion p {
    font-size: 0.9rem;
    color: #374151;
    margin-bottom: 4px;
    line-height: 1.6;
}

.ai-pathology {
    background: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.ai-pathology p {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.7;
}

.ai-health-advice {
    background: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.ai-health-advice .advice-section {
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 8px;
    line-height: 1.6;
}

.ai-health-advice .advice-label {
    font-weight: 600;
    color: #0369a1;
}

.ai-usage-info {
    text-align: right;
    font-size: 0.75rem;
    color: #94a3b8;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

/* AI验证区域 */
.ai-verification {
    background: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.verification-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.verification-icon {
    font-size: 1.2rem;
}

.verification-title {
    font-weight: 600;
    color: #374151;
}

.verification-reason {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* 信任指示器 */
.ai-trust-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 600;
}

.ai-trust-indicator.trust-system {
    background: #f0fdf4;
    color: #16a34a;
}

.ai-trust-indicator.trust-ai {
    background: #eff6ff;
    color: #2563eb;
}

.ai-trust-indicator.trust-both {
    background: #fffbeb;
    color: #d97706;
}

.trust-icon {
    font-size: 1.2rem;
}

/* 信任理由 */
.ai-trust-reason {
    background: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 3px solid #3b82f6;
}

.ai-trust-reason p {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.7;
    margin: 0;
}

/* 最终结论样式 */
.ai-final-conclusion .main-syndrome-result {
    font-size: 1rem;
    margin-bottom: 12px;
}

.syndrome-highlight {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
}

/* 置信度进度条 */
.confidence-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.confidence-label {
    font-size: 0.8rem;
    color: #6b7280;
    min-width: 50px;
}

.confidence-track {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.confidence-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #3b82f6;
    min-width: 40px;
    text-align: right;
}

/* 推理文本 */
.reasoning-text {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.7;
    background: rgba(255, 255, 255, 0.5);
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
}

/* 症状辨证分析列表 */
.ai-symptom-analysis {
    margin-bottom: 16px;
}

.symptom-analysis-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.symptom-analysis-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 10px;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.symptom-analysis-item .symptom-name {
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 4px;
}

.symptom-analysis-item .symptom-meaning {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.symptom-analysis-item .meaning-tag {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.symptom-analysis-item .meaning-tag.baGang {
    background: #dbeafe;
    color: #1d4ed8;
}

.symptom-analysis-item .meaning-tag.zangFu {
    background: #fef3c7;
    color: #d97706;
}

.symptom-analysis-item .symptom-theory {
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
}

.more-symptoms {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    padding: 8px;
}

/* 八纲/脏腑辨证结论列表 */
.ai-bagang-conclusion,
.ai-zangfu-conclusion {
    margin-bottom: 16px;
}

.conclusion-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.conclusion-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
}

.conclusion-name {
    font-weight: 600;
    color: #374151;
}

.conclusion-organ {
    font-size: 0.8rem;
    color: #6b7280;
}

.conclusion-weight {
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.conclusion-symptoms {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-left: auto;
}

/* 复合证型识别 */
.ai-complex-syndrome {
    background: #fef3c7;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.ai-complex-syndrome h4 {
    color: #d97706;
}

.complex-reasoning {
    font-size: 0.85rem;
    color: #92400e;
    line-height: 1.6;
    margin: 0;
}

/* 验证结果样式 */
.verification-errors {
    background: #fef2f2;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #dc2626;
}

.verification-strengths {
    background: #f0fdf4;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #16a34a;
}

.verification-suggestion {
    background: #eff6ff;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #2563eb;
}

.error-label, .strength-label, .suggestion-label {
    font-weight: 600;
}

/* 置信度理由 */
.confidence-reason {
    color: #6b7280;
    margin-top: 4px;
}

/* 病机总结 */
.pathology-summary {
    background: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    line-height: 1.6;
}

/* 治则建议 */
.treatment-principle {
    background: #f0fdf4;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    color: #166534;
}

/* ===== 新版诊断结果页面样式 ===== */

/* 主要结论区域 */
.result-main-conclusion {
    margin-bottom: 20px;
}

.conclusion-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 16px;
}

.conclusion-card.ai-primary {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
}

.conclusion-card.algorithm-primary {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
}

.conclusion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.conclusion-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.conclusion-badge.ai {
    background: #3b82f6;
    color: white;
}

.conclusion-badge.algorithm {
    background: #22c55e;
    color: white;
}

.confidence-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    background: rgba(0,0,0,0.1);
    color: #374151;
}

.main-syndrome-display h2 {
    font-size: 1.5rem;
    color: #1e40af;
    margin-bottom: 8px;
}

.secondary-syndromes {
    color: #6b7280;
    font-size: 0.9rem;
}

.pathology-summary {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #374151;
}

/* 结论分解区域 */
.conclusion-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.breakdown-section {
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.breakdown-section h4 {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.breakdown-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 6px;
}

.breakdown-item.primary {
    background: #dbeafe;
}

.breakdown-item.secondary {
    background: #f0fdf4;
}

.item-label {
    font-size: 0.75rem;
    color: #6b7280;
    min-width: 60px;
}

.item-value {
    font-weight: 600;
    color: #1f2937;
    flex: 1;
}

.item-organ {
    font-size: 0.75rem;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* 复合证型 */
.breakdown-section.complex {
    background: #fef3c7;
}

.complex-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.complex-type-tag {
    background: #f59e0b;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.complex-mechanism {
    font-size: 0.85rem;
    color: #92400e;
    line-height: 1.5;
}

/* 详细分析区域 */
.result-detail-section {
    margin-bottom: 20px;
}

.detail-analysis-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.detail-analysis-card h3 {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

/* 症状检查 */
.symptom-check-section {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.symptom-check-section .success {
    color: #16a34a;
}

.symptom-check-section .warning {
    color: #dc2626;
}

/* 症状分析 */
.symptom-analysis-section {
    margin-bottom: 16px;
}

.symptom-analysis-section h4 {
    cursor: pointer;
    padding: 12px;
    background: #f0f9ff;
    border-radius: 8px;
    margin-bottom: 0;
}

.toggle-hint {
    font-weight: normal;
    color: #6b7280;
    font-size: 0.8rem;
}

.symptom-analysis-content {
    padding: 12px;
    background: #fafafa;
    border-radius: 0 0 8px 8px;
}

.symptom-analysis-content.collapsed {
    display: none;
}

.symptom-analysis-item {
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid #3b82f6;
}

.symptom-analysis-item .symptom-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.symptom-analysis-item .symptom-name {
    font-weight: 600;
    color: #1e40af;
}

.symptom-analysis-item .symptom-value {
    color: #6b7280;
    font-size: 0.9rem;
}

.symptom-analysis-item .symptom-details p {
    margin: 4px 0;
    font-size: 0.85rem;
    color: #374151;
}

.symptom-analysis-item .theory-ref {
    color: #6b7280;
    font-style: italic;
}

/* 算法验证 */
.algorithm-verification-section {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
}

.verification-result {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 600;
}

.verification-result.correct {
    background: #dcfce7;
    color: #166534;
}

.verification-result.incorrect {
    background: #fef3c7;
    color: #92400e;
}

.verification-strengths,
.verification-weaknesses,
.verification-suggestions {
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 0.85rem;
}

.verification-strengths {
    background: #f0fdf4;
    color: #166534;
}

.verification-weaknesses {
    background: #fef2f2;
    color: #dc2626;
}

.verification-suggestions {
    background: #eff6ff;
    color: #1d4ed8;
}

/* 权重条 */
.weight-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weight-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weight-label {
    min-width: 80px;
    font-size: 0.85rem;
    color: #374151;
}

.weight-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.weight-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 4px;
}

.weight-value {
    min-width: 40px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

/* 健康建议卡片 */
.health-advice-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0fdfa 100%);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.health-advice-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.health-advice-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.health-advice-icon svg {
    color: white;
}

.health-advice-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.health-advice-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.advice-item {
    background: white;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.advice-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.advice-diet {
    border-left: 3px solid #f59e0b;
}

.advice-lifestyle {
    border-left: 3px solid #3b82f6;
}

.advice-acupoint {
    border-left: 3px solid #8b5cf6;
}

.advice-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.advice-emoji {
    font-size: 1.25rem;
}

.advice-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
}

.advice-item-body {
    padding-left: 4px;
}

.advice-point {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.6;
}

.advice-point:last-child {
    margin-bottom: 0;
}

.advice-point::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.advice-diet .advice-point::before {
    background: #f59e0b;
}

.advice-lifestyle .advice-point::before {
    background: #3b82f6;
}

.advice-acupoint .advice-point::before {
    background: #8b5cf6;
}

.acupoint-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.acupoint-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    color: #7c3aed;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: all 0.2s ease;
}

.acupoint-tag:hover {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    transform: scale(1.02);
}

/* 操作按钮 */
.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.action-btn.primary {
    background: #22c55e;
    color: white;
}

.action-btn.primary:hover {
    background: #16a34a;
}

.action-btn.secondary {
    background: #3b82f6;
    color: white;
}

.action-btn.secondary:hover {
    background: #2563eb;
}

/* 算法提示 */
.algorithm-note {
    background: #fef3c7;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    margin-top: 16px;
}

.algorithm-note p {
    color: #92400e;
    margin: 0;
}

/* 计算步骤 */
.calculation-steps {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
}

.steps-intro {
    color: #6b7280;
    margin-bottom: 12px;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.step-item {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    font-size: 0.8rem;
}

.step-symptom {
    color: #3b82f6;
}

.step-target {
    color: #6b7280;
}

.step-calc {
    color: #16a34a;
    margin-left: auto;
}

.steps-more {
    text-align: center;
    color: #6b7280;
    padding: 8px;
}

/* 折叠功能 */
.collapsible-header {
    cursor: pointer;
    padding: 12px;
    background: #f0f9ff;
    border-radius: 8px;
    margin-bottom: 0;
    transition: background 0.2s;
}

.collapsible-header:hover {
    background: #e0f2fe;
}

.collapsed {
    display: none;
}

/* 系统算法参考 */
.algorithm-reference-section {
    margin-top: 16px;
    border-top: 1px dashed #e5e7eb;
    padding-top: 16px;
}

.algorithm-reference-content {
    padding: 12px;
    background: #f8fafc;
    border-radius: 0 0 8px 8px;
}

.reference-note {
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 12px;
    padding: 8px;
    background: #fffbeb;
    border-radius: 4px;
}

.reference-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reference-subsection {
    padding: 8px;
    background: white;
    border-radius: 4px;
    font-size: 0.9rem;
}

.reference-subsection .label {
    font-weight: 600;
    color: #374151;
}

/* 视图切换按钮 */
.view-switcher {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: #f1f5f9;
    border-radius: 12px;
    margin-bottom: 16px;
}

.view-switch-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    background: transparent;
    color: #64748b;
}

.view-switch-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    color: #475569;
}

.view-switch-btn.active {
    background: white;
    color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.view-switch-btn .material-icons {
    transition: transform 0.2s ease;
}

.view-switch-btn.active .material-icons {
    transform: scale(1.1);
}

/* 视图容器 */
.result-content-wrapper {
    position: relative;
}

.result-view {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.result-view.hidden {
    display: none;
}

.result-view:not(.hidden) {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
