/* ===== 泽盛赋能 · 饮食记录中心 ===== */
:root {
    --primary: #2ecc71;
    --primary-dark: #27ae60;
    --primary-light: #a3e4b8;
    --accent: #3498db;
    --accent-dark: #2980b9;
    --dark: #2c3e50;
    --dark-light: #34495e;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg: #f8faf9;
    --bg-card: #fff;
    --border: #e8ede9;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-hover: 0 6px 24px rgba(46,204,113,0.12);
    --radius: 12px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
}

a { text-decoration: none; color: var(--primary-dark); }
a:hover { color: var(--primary); }

/* ===== Header ===== */
.header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}
.header-logo svg { width: 28px; height: 28px; }
.header-nav { display: flex; align-items: center; gap: 20px; }
.header-nav a {
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color .2s;
}
.header-nav a:hover { color: var(--primary-dark); }
.btn-nav {
    background: var(--primary);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background .2s;
}
.btn-nav:hover { background: var(--primary-dark); }

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 100px 24px 80px;
    background: linear-gradient(180deg, #f0faf3 0%, var(--bg) 100%);
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f8ed;
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 24px;
}
.hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 16px;
}
.hero p {
    font-size: 16px;
    color: var(--text-light);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.8;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; }
.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 12px 32px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-outline {
    background: #fff;
    color: var(--text);
    padding: 12px 32px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid var(--border);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-dark); }

/* ===== Sections ===== */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
}
.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}
.section-desc {
    text-align: center;
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 48px;
}

/* ===== Steps ===== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 60px; }
.step {
    text-align: center;
    padding: 24px;
}
.step-icon { font-size: 48px; margin-bottom: 16px; }
.step h3 { font-size: 18px; font-weight: 600; color: var(--dark); margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-light); }

/* ===== Data Stats ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--border);
}
.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}
.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

/* ===== Feature Cards ===== */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all .2s;
    display: block;
    color: var(--text);
}
.feature-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.feature-icon { font-size: 32px; margin-bottom: 12px; }
.feature-card h3 { font-size: 18px; font-weight: 600; color: var(--dark); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-light); line-height: 1.6; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.feature-tag {
    background: #e8f8ed;
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* ===== Nutrition Table ===== */
.nutrition-section { background: #f0faf3; border-radius: var(--radius); padding: 40px; margin-top: 40px; }
.nutrition-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.nutrition-table th {
    background: var(--primary);
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
}
.nutrition-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.nutrition-table tr:hover { background: #f8faf9; }

/* ===== Skill Detail Page ===== */
.page-header {
    text-align: center;
    padding: 60px 24px 40px;
    background: linear-gradient(180deg, #f0faf3 0%, var(--bg) 100%);
}
.page-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
}
.page-header p {
    font-size: 15px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
}
.back-link:hover { color: var(--primary-dark); }
.skill-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Tool Section ===== */
.tool-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 24px;
}
.tool-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
}
.tool-card h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}
.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
}
.tab-btn.active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
    font-weight: 600;
}
.tab-btn:hover { color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== Form ===== */
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    background: #fff;
    transition: border-color .2s;
    font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46,204,113,0.1);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.btn-submit {
    background: var(--primary);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all .2s;
    margin-top: 8px;
}
.btn-submit:hover { background: var(--primary-dark); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== Result Area ===== */
.result-area {
    margin-top: 24px;
    display: none;
}
.result-area.show { display: block; }
.result-box {
    background: var(--dark);
    color: #e8ede9;
    border-radius: var(--radius);
    overflow: hidden;
}
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--dark-light);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.result-header span {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-copy {
    background: rgba(255,255,255,0.1);
    color: #ccc;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
}
.btn-copy:hover { background: rgba(255,255,255,0.2); color: #fff; }
.result-content {
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.8;
}

/* ===== Markdown Rendering ===== */
.result-content h1 { font-size: 22px; font-weight: 700; color: #fff; margin: 20px 0 12px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; }
.result-content h2 { font-size: 18px; font-weight: 700; color: #a3e4b8; margin: 18px 0 10px; }
.result-content h3 { font-size: 16px; font-weight: 600; color: #7dd3a0; margin: 14px 0 8px; }
.result-content h4 { font-size: 15px; font-weight: 600; color: #6bc98e; margin: 12px 0 6px; }
.result-content p { margin: 8px 0; }
.result-content ul, .result-content ol { padding-left: 20px; margin: 8px 0; }
.result-content li { margin: 4px 0; }
.result-content strong { color: #fff; }
.result-content em { color: #a3e4b8; font-style: italic; }
.result-content table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.result-content th { background: rgba(46,204,113,0.2); color: #a3e4b8; padding: 8px 12px; text-align: left; font-size: 13px; }
.result-content td { padding: 6px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 13px; }
.result-content code { background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 3px; font-size: 13px; }
.result-content blockquote { border-left: 3px solid var(--primary); padding-left: 12px; margin: 10px 0; color: #a3e4b8; }
.result-content hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 16px 0; }

/* ===== Preference Tags ===== */
.pref-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pref-tag {
    background: #e8f8ed;
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .2s;
}
.pref-tag:hover { border-color: var(--primary); }
.pref-tag.selected { background: var(--primary); color: #fff; }

/* ===== Calorie Indicator ===== */
.calorie-bar {
    background: #e8ede9;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin: 12px 0;
}
.calorie-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transition: width .5s ease;
}
.calorie-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 32px 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
}

/* ===== Core Feature Grid ===== */
.core-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 32px; }
.core-feature {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
}
.core-feature h4 { font-size: 15px; font-weight: 600; color: var(--dark); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.core-feature p { font-size: 13px; color: var(--text-light); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 28px; }
    .steps { grid-template-columns: 1fr; gap: 16px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .features { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .core-features { grid-template-columns: 1fr; }
    .header-nav a:not(.btn-nav) { display: none; }
}
