/* ==================== 移动优先设计 ==================== */
:root {
    --primary-color: #7CB342;      /* 明亮的草绿色 */
    --primary-dark: #558B2F;
    --primary-light: #AED581;
    --primary-soft: #F1F8E9;
    
    --text-primary: #1A2A3A;
    --text-secondary: #5A6B7A;
    --text-light: #8A9AA8;
    
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --bg-soft: #F0F7EA;
    
    --border-color: #E2E8F0;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
}

/* ==================== 布局容器 ==================== */
.container {
    width: 100%;
    padding: 0 16px;
    margin: 0 auto;
}

/* ==================== 导航栏 ==================== */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1002;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

/* 汉堡菜单按钮 */
.menu-toggle {
    width: 30px;
    height: 30px;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
    display: block;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: absolute;
    left: 3px;
    transition: all 0.3s;
    border-radius: 2px;
}

.menu-toggle span:nth-child(1) { top: 8px; }
.menu-toggle span:nth-child(2) { top: 14px; }
.menu-toggle span:nth-child(3) { top: 20px; }

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 14px;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 14px;
}

/* 导航菜单 - 移动端滑出 */
.nav-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    transition: left 0.3s ease;
    z-index: 1001;
    padding: 70px 20px 20px;
    overflow-y: auto;
}

.nav-menu.active {
    left: 0;
}

.nav-link {
    display: block;
    padding: 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-soft);
    color: var(--primary-color);
}

/* 移动端按钮组 */
.nav-actions-mobile {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* PC端按钮组 - 移动端隐藏 */
.nav-actions {
    display: none;
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 44px; /* 移动端最小点击区域 */
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.3);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-danger {
    background: #EF4444;
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-large {
    height: 52px;
    font-size: 16px;
}

/* ==================== 首页英雄区 ==================== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 48px 0;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 16px;
    opacity: 0.95;
}

.hero-desc {
    font-size: 15px;
    margin-bottom: 24px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

/* ==================== 特色卡片 ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.feature-card {
    background: var(--bg-white);
    padding: 20px 12px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-card p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== 套餐卡片 ==================== */
.section-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.packages-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.package-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s;
    position: relative;
}

.package-card.popular {
    border: 2px solid var(--primary-color);
}

.package-card.premium {
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--bg-white) 100%);
}

.package-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.package-header {
    padding: 24px 20px;
    text-align: center;
}

.package-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.package-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.price {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
}

.period {
    font-size: 14px;
    color: var(--text-secondary);
}

.package-body {
    padding: 0 20px;
}

.package-features {
    list-style: none;
}

.package-features li {
    padding: 12px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.package-features li:before {
    content: "✓";
    color: var(--primary-color);
    font-weight: 600;
    font-size: 16px;
}

.package-features li:last-child {
    border-bottom: none;
}

.package-footer {
    padding: 20px;
}

/* ==================== 模态框 ==================== */
.modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: flex-end;
    justify-content: center;
    z-index: 10000;
}

.modal.active {
    display: flex !important;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-body {
    padding: 20px;
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.1);
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-disclaimer {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
}

.footer-disclaimer h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #FFD700;
}

.footer-disclaimer p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 8px;
    opacity: 0.9;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    opacity: 0.8;
}

/* ==================== 平板适配 ==================== */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
        margin: 0 auto;
    }
    
    .nav-actions {
        display: flex;
        gap: 8px;
    }
    
    .menu-toggle,
    .nav-actions-mobile {
        display: none;
    }
    
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        box-shadow: none;
        padding: 0;
        display: flex;
        gap: 8px;
    }
    
    .nav-link {
        padding: 8px 16px;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .packages-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .modal {
        align-items: center;
    }
    
    .modal-content {
        width: 90%;
        max-width: 400px;
        border-radius: var(--radius-lg);
    }
}

/* ==================== 桌面适配 ==================== */
@media (min-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .packages-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hero-buttons {
        justify-content: flex-start;
    }
}

/* ==================== 辅助辨证样式 ==================== */
.steps-indicator {
    display: flex;
    justify-content: space-between;
    margin: 20px 0 30px;
    padding: 0 10px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -50%;
    top: 12px;
    width: 100%;
    height: 2px;
    background: var(--border-color);
}

.step-item.active:not(:last-child)::after {
    background: var(--primary-color);
}

.step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--border-color);
    margin-bottom: 8px;
    transition: all 0.3s;
}

.step-item.active .step-dot {
    background: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(124, 179, 66, 0.2);
}

.step-item.completed .step-dot {
    background: var(--primary-color);
}

.step-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.step-item.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.form-card, .result-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    background: var(--bg-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.hidden {
    display: none !important;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary-soft);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.result-body {
    padding: 20px;
    min-height: 200px;
}

.result-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.result-section:last-child {
    border-bottom: none;
}

.result-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.result-value {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
}

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

.tag {
    background: var(--primary-soft);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* ==================== 区域显示修复 ==================== */
.section {
    display: none !important;
    min-height: auto; /* 内容自适应高度，避免底部空白 */
    padding: 20px 0 40px;
}

.section.active {
    display: block !important;
}

/* 确保内容区域在切换时正确显示 */
#packages.section.active {
    display: block !important;
}

#diagnosis.section.active {
    display: block !important;
}

/* 修复滚动问题 */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 60px; /* 为固定导航栏留出空间 */
}

/* 确保每个区域都有足够的顶部边距 */
.section:target {
    scroll-margin-top: 60px;
}

/* 修复移动端显示 */
@media (max-width: 768px) and (orientation: portrait) {
    .section {
        min-height: auto;
        padding: 16px 0 30px;
    }
    
    html {
        scroll-padding-top: 56px;
    }
}

/* ==================== 文件上传样式 ==================== */
.file-upload-area {
    width: 100%;
    margin: 15px 0;
}

.file-upload-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
    border: 2px dashed var(--primary-color);
    border-radius: var(--radius-md);
    background: var(--primary-soft);
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-button:hover {
    background: var(--primary-light);
    border-color: var(--primary-dark);
}

.upload-icon {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.upload-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 11px;
    color: var(--text-secondary);
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 12px;
}

.file-preview-item .file-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.file-preview-item .file-size {
    color: var(--text-secondary);
    font-size: 10px;
}

.file-preview-item .file-remove {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.3s;
}

.file-preview-item .file-remove:hover {
    background: #c82333;
}

.file-preview-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* === 强制修复弹窗样式 === */
