/* 老陈AI创业实测 - 商业诊断H5 样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --orange: #f97316;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-gradient: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #e0e7ff 100%);
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-gradient);
    position: relative;
    overflow-x: hidden;
}

/* 页面切换 */
.page {
    display: none;
    padding: 20px;
    min-height: 100vh;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 首页 ========== */
.hero-section {
    text-align: center;
    padding: 40px 20px 30px;
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.logo-icon {
    font-size: 18px;
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-large {
    padding: 16px 32px;
    font-size: 17px;
    border-radius: var(--radius-lg);
}

.btn-arrow {
    font-size: 20px;
    transition: transform 0.2s;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-outline {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:active {
    background: var(--primary-light);
}

.btn-add {
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
    margin-top: 12px;
}

.add-icon {
    font-size: 18px;
    font-weight: bold;
}

.btn-icon {
    font-size: 18px;
}

/* 特性卡片 */
.features-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--card-bg);
    padding: 18px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.feature-card:active {
    transform: scale(0.99);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.icon-blue { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.icon-green { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); }
.icon-orange { background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%); }
.icon-purple { background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%); }

.feature-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.feature-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 隐私声明 */
.privacy-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
    padding: 16px;
    text-align: center;
}

.lock-icon {
    font-size: 14px;
}

/* ========== 表单页 ========== */
.form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-top: 8px;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.back-arrow {
    font-size: 20px;
    color: var(--text-primary);
    font-weight: bold;
}

.step-info {
    flex: 1;
}

.step-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.step-count {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.6);
    border-radius: 3px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--purple) 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* 表单步骤 */
.form-step {
    display: none;
    animation: slideIn 0.3s ease;
}

.form-step.active {
    display: block;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.step-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.form-label.required::after {
    content: ' *';
    color: var(--danger);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-primary);
    background: white;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
}

/* 单选/多选组 */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.radio-item,
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
    min-width: calc(50% - 5px);
}

.radio-item input,
.checkbox-item input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.radio-item:has(input:checked),
.checkbox-item:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* 项目列表 */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-item {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.project-header span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.remove-project {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.remove-project:active {
    background: #fee2e2;
}

.project-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-fields .form-input {
    padding: 10px 12px;
    font-size: 13px;
    flex: 1;
    min-width: calc(50% - 5px);
}

.project-fields .full {
    min-width: 100%;
}

.project-fields select {
    padding: 10px 12px;
    font-size: 13px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    flex: 1;
    min-width: 100%;
}

/* 表单底部按钮 */
.form-footer {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-bottom: 20px;
}

.form-footer .btn {
    flex: 1;
}

/* ========== 加载页 ========== */
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
}

.ai-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(37, 99, 235, 0); }
}

.loading-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.loading-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ========== 报告页 ========== */
.report-header {
    text-align: center;
    margin-bottom: 24px;
    padding-top: 20px;
}

.report-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.report-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.report-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.report-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.report-section h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.problem-item {
    padding: 12px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.problem-item:last-child {
    margin-bottom: 0;
}

.problem-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.severity {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.severity.high { background: #fee2e2; color: #dc2626; }
.severity.mid { background: #fef3c7; color: #d97706; }
.severity.low { background: #d1fae5; color: #059669; }

.problem-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.model-main,
.model-sub {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.model-main .label,
.model-sub .label {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 60px;
    font-weight: 500;
}

.model-main .value {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.model-sub .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.model-reason {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 12px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    margin-top: 12px;
}

.plan-stage {
    padding: 14px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
}

.plan-stage:last-child {
    margin-bottom: 0;
}

.stage-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stage-tasks ul {
    padding-left: 18px;
    margin-bottom: 8px;
}

.stage-tasks li {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.5;
}

.stage-goal {
    font-size: 13px;
    color: var(--success);
    font-weight: 600;
}

.revenue-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.revenue-row:last-of-type {
    margin-bottom: 0;
}

.revenue-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 60px;
}

.revenue-values {
    display: flex;
    gap: 8px;
    flex: 1;
}

.revenue-item {
    flex: 1;
    text-align: center;
}

.rv-label {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.rv-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.revenue-structure {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 10px;
    background: #f0fdf4;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    line-height: 1.5;
}

.report-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 30px;
}

/* ========== 弹窗 ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-light);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:active {
    background: #f1f5f9;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.qrcode-container {
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qrcode-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qrcode-placeholder {
    font-size: 14px;
    color: var(--text-light);
}

.modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.wechat-id {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
    padding: 10px 16px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: inline-block;
}

.wechat-id span {
    color: var(--primary);
}

/* 响应式适配 */
@media (max-width: 360px) {
    .hero-title {
        font-size: 26px;
    }
    
    .radio-item,
    .checkbox-item {
        min-width: 100%;
    }
    
    .project-fields .form-input {
        min-width: 100%;
    }
}
