/* ============================================================
   "明鉴"一下 —— 网站样式文件
   配色：墨绿 #1e5a4a + 米白 #faf7f2 + 珊瑚橙点缀
   版本: 0.2 接入AI报告页
   ============================================================ */

/* ---------- 全局基础 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: #2d3436;
    background: #faf7f2;
    line-height: 1.6;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 顶部导航栏 ---------- */
.navbar {
    background: #ffffff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    color: #1e5a4a;
}

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

.nav-links a {
    margin-left: 24px;
    text-decoration: none;
    color: #555;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #1e5a4a;
}

/* ---------- 主视觉区 ---------- */
.hero {
    background: linear-gradient(160deg, #eef5f1 0%, #faf7f2 60%);
    padding: 90px 0 70px;
    text-align: center;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.35;
    color: #1f2d28;
    margin-bottom: 16px;
}

.highlight {
    color: #1e5a4a;
    font-style: italic;
}

.hero-subtitle {
    font-size: 17px;
    color: #5a6b64;
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 搜索框 */
.search-box {
    display: flex;
    max-width: 560px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 50px;
    box-shadow: 0 6px 24px rgba(30, 90, 74, 0.12);
    padding: 6px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 22px;
    font-size: 16px;
    background: transparent;
    border-radius: 50px;
    color: #2d3436;
}

.search-box button {
    background: #1e5a4a;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background: #17493d;
}

.hero-hint {
    margin-top: 18px;
    font-size: 13px;
    color: #8a9a93;
}

.hero-hint .text-link {
    color: #1e5a4a;
    text-decoration: none;
    border-bottom: 1px solid #1e5a4a;
    margin-left: 4px;
}

.hero-hint .text-link:hover {
    color: #17493d;
}

/* ---------- 快捷功能入口 ---------- */
.quick-links {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(30, 90, 74, 0.15);
    border-radius: 50px;
    padding: 10px 20px;
    text-decoration: none;
    color: #1e5a4a;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.quick-link:hover {
    background: #ffffff;
    border-color: #1e5a4a;
    box-shadow: 0 4px 12px rgba(30, 90, 74, 0.1);
    transform: translateY(-2px);
}

.quick-icon {
    font-size: 18px;
}

/* ---------- 文案粘贴页 ---------- */
.text-input {
    width: 100%;
    min-height: 180px;
    padding: 18px 20px;
    font-size: 16px;
    line-height: 1.7;
    border: 1px solid #d0ddd7;
    border-radius: 14px;
    background: #ffffff;
    color: #2d3436;
    resize: vertical;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.text-input:focus {
    border-color: #1e5a4a;
    box-shadow: 0 0 0 3px rgba(30, 90, 74, 0.1);
}

.text-submit {
    width: 100%;
    margin-top: 16px;
    background: #1e5a4a;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.text-submit:hover {
    background: #17493d;
}

/* ---------- 通用小节标题 ---------- */
.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: #1f2d28;
    margin-bottom: 40px;
}

/* ---------- 功能卡片 ---------- */
.features {
    padding: 70px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.feature-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: 18px;
    color: #1f2d28;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: #6b7a73;
}

/* ---------- 调研数据区 ---------- */
.data-section {
    background: #1e5a4a;
    padding: 70px 0;
}

.data-section .section-title {
    color: #ffffff;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.data-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
}

.data-number {
    font-size: 38px;
    font-weight: 800;
    color: #ffb703;
    margin-bottom: 8px;
}

.data-label {
    font-size: 14px;
    color: #d5e5de;
}

/* ---------- 报告页 ---------- */
.report-page {
    padding: 60px 0;
    text-align: center;
    min-height: 60vh;
}

.report-title {
    font-size: 32px;
    color: #1f2d28;
    margin-bottom: 14px;
}

/* 报告元信息：风险徽章 + 模式标签 */
.report-meta {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.risk-badge {
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.risk-低 { background: #3ba776; }
.risk-中 { background: #e8923c; }
.risk-高 { background: #e0504c; }

.mode-tag {
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

.demo-tag {
    background: #fff3e0;
    color: #b07020;
    border: 1px solid #f0c878;
}

.ai-tag {
    background: #e6f4ea;
    color: #1e6b3a;
    border: 1px solid #9ad8ae;
}

/* 演示模式提示横幅 */
.demo-banner {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #8a6a1a;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 30px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* 错误提示横幅 */
.error-banner {
    background: #fdecea;
    border: 1px solid #f5b5b0;
    color: #a03030;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 30px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* 分析模块卡片 */
.report-sections {
    display: grid;
    gap: 20px;
    max-width: 720px;
    margin: 0 auto 30px;
    text-align: left;
}

.report-section-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 28px 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

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

.section-head h3 {
    font-size: 18px;
    color: #1e5a4a;
}

.section-content {
    font-size: 16px;
    color: #4a5853;
    line-height: 1.85;
}

.section-content strong {
    color: #1f2d28;
    font-weight: 700;
}

/* 命中关键词标签行 */
.tag-row {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #fdebe3;
    color: #c05030;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 14px;
    border: 1px solid #f5c8b8;
}

/* 总评框 */
.report-summary {
    background: #1e5a4a;
    color: #ffffff;
    border-radius: 14px;
    padding: 28px 30px;
    max-width: 720px;
    margin: 0 auto 30px;
    text-align: left;
}

.report-summary h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.report-summary p {
    font-size: 16px;
    line-height: 1.85;
    color: #d5e5de;
}

.report-summary p strong {
    color: #ffffff;
    font-weight: 700;
}

.back-link {
    display: inline-block;
    color: #1e5a4a;
    text-decoration: none;
    font-weight: 600;
    margin-top: 10px;
}

.back-link:hover {
    text-decoration: underline;
}

/* ---------- 页脚 ---------- */
.footer {
    background: #22312c;
    color: #b8c7c0;
    padding: 40px 0;
    text-align: center;
    font-size: 14px;
}

.footer p {
    margin-bottom: 6px;
}

.footer-note {
    margin-top: 12px;
    color: #7d9a8f;
}

/* ---------- 加载动画 ---------- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(250, 247, 242, 0.92);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #d0ddd7;
    border-top-color: #1e5a4a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    margin-top: 18px;
    font-size: 15px;
    color: #5a6b64;
    font-weight: 500;
}

/* ---------- 手机适配 ---------- */
@media (max-width: 640px) {
    .hero-title {
        font-size: 30px;
    }
    .search-box {
        flex-direction: column;
        border-radius: 20px;
    }
    .search-box button {
        border-radius: 14px;
        margin-top: 4px;
    }
    .nav-links {
        display: none;
    }
    .report-title {
        font-size: 24px;
    }
    .scan-summary {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .scan-stat {
        padding: 20px 10px !important;
    }
    .scan-stat-num {
        font-size: 28px !important;
    }
}

/* ---------- 成分百科 / 成分表识别页 ---------- */
.ingredient-list {
    display: grid;
    gap: 16px;
    max-width: 760px;
    margin: 0 auto;
    text-align: left;
}

.ingredient-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 26px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #ccc;
}

.ingredient-card.risk-高 {
    border-left-color: #e0504c;
}

.ingredient-card.risk-中 {
    border-left-color: #e8923c;
}

.ingredient-card.risk-低 {
    border-left-color: #3ba776;
}

.ingredient-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ingredient-name {
    font-size: 18px;
    color: #1f2d28;
    font-weight: 700;
}

.risk-tag {
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.risk-tag.risk-高 { background: #e0504c; }
.risk-tag.risk-中 { background: #e8923c; }
.risk-tag.risk-低 { background: #3ba776; }

.ingredient-category {
    font-size: 14px;
    color: #8a9a93;
    margin-bottom: 10px;
}

.ingredient-desc {
    font-size: 16px;
    color: #4a5853;
    line-height: 1.75;
}

.ingredient-detail {
    margin-top: 12px;
}

.ingredient-detail summary {
    cursor: pointer;
    color: #1e5a4a;
    font-size: 14px;
    font-weight: 600;
    user-select: none;
}

.ingredient-detail p {
    margin-top: 8px;
    font-size: 15px;
    color: #5a6b64;
    line-height: 1.75;
}

.common-products {
    font-size: 14px !important;
    color: #8a9a93 !important;
}

.no-result {
    text-align: center;
    padding: 60px 20px;
    color: #5a6b64;
    font-size: 16px;
}

/* ---------- 成分表识别结果页 ---------- */
.scan-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 30px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.scan-stat {
    background: #ffffff;
    border-radius: 14px;
    padding: 28px 16px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.scan-stat-num {
    font-size: 36px;
    font-weight: 800;
    color: #1e5a4a;
}

.scan-stat-label {
    font-size: 14px;
    color: #8a9a93;
}

.scan-stat-high .scan-stat-num {
    color: #e0504c;
}

.scan-stat-mid .scan-stat-num {
    color: #e8923c;
}

/* ============================================================
   D5 新增样式：三步使用、数据可视化、使用场景、入场动画
   ============================================================ */

/* ---------- 平滑滚动 ---------- */
html {
    scroll-behavior: smooth;
}

/* ---------- 入场动画（reveal） ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* 交错延迟：同组内逐个出现 */
.feature-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.feature-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.feature-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

.scenario-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.scenario-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

.bar-chart .reveal:nth-child(2) { transition-delay: 0.08s; }
.bar-chart .reveal:nth-child(3) { transition-delay: 0.16s; }
.bar-chart .reveal:nth-child(4) { transition-delay: 0.24s; }

/* ---------- 三步使用流程 ---------- */
.how-it-works {
    padding: 70px 0;
    background: #faf7f2;
}

.steps {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.step-card {
    flex: 1;
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.step-number {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    line-height: 32px;
    background: #1e5a4a;
    color: #fff;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 700;
}

.step-icon {
    font-size: 34px;
    margin-top: 10px;
    margin-bottom: 12px;
}

.step-card h3 {
    font-size: 18px;
    color: #1f2d28;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 15px;
    color: #6b7a73;
    line-height: 1.7;
}

.step-arrow {
    display: flex;
    align-items: center;
    font-size: 24px;
    color: #1e5a4a;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---------- 数据可视化：柱状图 ---------- */
.data-intro {
    text-align: center;
    color: #b8c7c0;
    font-size: 15px;
    margin-top: -28px;
    margin-bottom: 40px;
}

.bar-chart {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.bar-label {
    flex-shrink: 0;
    width: 200px;
    font-size: 15px;
    color: #d5e5de;
    text-align: right;
}

.bar-track {
    flex: 1;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ffb703, #ff9a3c);
    border-radius: 50px;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-value {
    flex-shrink: 0;
    width: 72px;
    font-size: 20px;
    font-weight: 800;
    color: #ffb703;
    text-align: left;
}

/* ---------- 使用场景 ---------- */
.scenarios {
    padding: 70px 0;
    background: #faf7f2;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.scenario-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.scenario-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.scenario-icon {
    font-size: 36px;
    margin-bottom: 14px;
}

.scenario-card h3 {
    font-size: 18px;
    color: #1f2d28;
    margin-bottom: 10px;
}

.scenario-card p {
    font-size: 15px;
    color: #6b7a73;
    line-height: 1.7;
    margin-bottom: 16px;
}

.scenario-link {
    display: inline-block;
    color: #1e5a4a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    border: 1px solid #1e5a4a;
    border-radius: 50px;
    transition: all 0.2s;
}

.scenario-link:hover {
    background: #1e5a4a;
    color: #fff;
}

/* ---------- D5 手机适配（D5 新增元素） ---------- */
@media (max-width: 640px) {
    .steps {
        flex-direction: column;
        gap: 8px;
    }

    .step-arrow {
        transform: rotate(90deg);
        font-size: 20px;
    }

    .bar-label {
        width: 110px;
        font-size: 13px;
    }

    .bar-value {
        font-size: 16px;
        width: 60px;
    }

    .bar-track {
        height: 22px;
    }
}

/* ============================================================
   D8 新功能样式：产品对比 / 冲突警告 / 慎用人群 / 过敏原 /
   我的档案 / 我的记录 / 收藏按钮
   ============================================================ */

/* ---------- 产品对比页 ---------- */
.compare-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compare-inputs .text-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #dce5e0;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    background: #fff;
    color: #2d3436;
    transition: border-color 0.2s;
}

.compare-inputs .text-input:focus {
    border-color: #1e5a4a;
}

.compare-vs {
    font-weight: 800;
    font-size: 18px;
    color: #e8923c;
    flex-shrink: 0;
}

.compare-badges {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.compare-badge {
    background: #fff;
    border-radius: 12px;
    padding: 14px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(30, 90, 74, 0.08);
    min-width: 200px;
}

.compare-badge-name {
    font-weight: 700;
    font-size: 16px;
    color: #1f2d28;
}

/* ---------- 成分冲突警告 ---------- */
.conflict-panel {
    background: #fff7e8;
    border: 1px solid #f5d9a0;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 24px;
}

.conflict-title {
    color: #8a5a00;
    font-size: 17px;
    margin-bottom: 6px;
}

.conflict-hint {
    font-size: 13px;
    color: #8a7a5a;
    margin-bottom: 12px;
}

.conflict-item {
    background: #fff;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-left: 4px solid #e8923c;
}

.conflict-item.conflict-高 {
    border-left-color: #d9534f;
}

.conflict-pair {
    font-size: 15px;
    color: #4a3a1a;
    margin-bottom: 4px;
}

.conflict-level-tag {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 20px;
    background: #fde8d8;
    color: #b26000;
    margin-left: 8px;
    font-weight: 600;
}

.conflict-item.conflict-高 .conflict-level-tag {
    background: #fde2e2;
    color: #c0392b;
}

.conflict-reason {
    font-size: 13px;
    color: #6a5a3a;
    line-height: 1.7;
}

/* ---------- 慎用人群提醒 ---------- */
.precaution-panel {
    background: #fdf3f3;
    border: 1px solid #f0c4c4;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 24px;
}

.precaution-title {
    color: #a03030;
    font-size: 17px;
    margin-bottom: 6px;
}

.precaution-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.precaution-item {
    background: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #4a2a2a;
    border: 1px solid #eed4d4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.precaution-tag {
    background: #fde2e2;
    color: #c0392b;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* ---------- 过敏原高亮 ---------- */
.ingredient-card.allergen-hit {
    border: 2px solid #e74c3c !important;
    background: #fff5f4 !important;
}

.allergen-banner {
    background: #e74c3c;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 12px;
}

.allergen-summary {
    background: #e74c3c;
    color: #fff;
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 24px;
    font-size: 15px;
}

/* ---------- 收藏按钮 ---------- */
.fav-btn {
    background: #fff;
    border: 1.5px solid #d4a54a;
    color: #a8812f;
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 12px;
    vertical-align: middle;
}

.fav-btn:hover {
    background: #fff8e1;
}

.fav-btn.fav-active {
    background: #d4a54a;
    color: #fff;
    border-color: #d4a54a;
}

/* ---------- 我的档案页 ---------- */
.profile-label {
    font-size: 16px;
    color: #1f2d28;
    margin-bottom: 12px;
}

.profile-hint {
    font-size: 13px;
    color: #8a9a93;
    margin: 6px 0 10px;
}

.skin-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skin-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 2px solid #e2e8e5;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #4a5a54;
    transition: all 0.2s;
    background: #fff;
}

.skin-option:hover {
    border-color: #1e5a4a;
}

.skin-option input {
    display: none;
}

.skin-option:has(input:checked) {
    border-color: #1e5a4a;
    background: #eef5f1;
    color: #1e5a4a;
    font-weight: 600;
}

.allergen-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.allergen-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1.5px solid #e2e8e5;
    border-radius: 50px;
    padding: 7px 14px;
    cursor: pointer;
    font-size: 13px;
    color: #5a6b64;
    transition: all 0.2s;
    background: #fff;
    user-select: none;
}

.allergen-option:hover {
    border-color: #1e5a4a;
}

.allergen-option input {
    display: none;
}

.allergen-option:has(input:checked) {
    border-color: #e74c3c;
    background: #fdf3f3;
    color: #c0392b;
    font-weight: 600;
}

.save-toast {
    background: #1e5a4a;
    color: #fff;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    margin-top: 16px;
    font-size: 15px;
}

/* ---------- 我的记录页 ---------- */
.library-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.library-tab {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: #ececec;
    color: #555;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.library-tab.active {
    background: #1e5a4a;
    color: #fff;
}

.library-panel {
    min-height: 200px;
}

.library-empty {
    text-align: center;
    color: #8a9a93;
    padding: 60px 0;
    line-height: 2;
}

.library-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(30, 90, 74, 0.06);
}

.library-item-icon {
    font-size: 22px;
}

.library-item-body {
    flex: 1;
    min-width: 0;
}

.library-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2d28;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-item-meta {
    font-size: 12px;
    color: #8a9a93;
    margin-top: 2px;
}

.library-item-link {
    font-size: 13px;
    color: #1e5a4a;
    text-decoration: none;
    white-space: nowrap;
}

.library-item-link:hover {
    text-decoration: underline;
}

.library-item-del {
    border: none;
    background: none;
    color: #bbb;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.library-item-del:hover {
    color: #e74c3c;
    background: #fdf3f3;
}

.library-clear {
    border: 1px solid #ddd;
    background: #fff;
    color: #888;
    border-radius: 50px;
    padding: 8px 24px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.library-clear:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}

/* ---------- D8 手机适配 ---------- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .compare-inputs {
        flex-direction: column;
        gap: 8px;
    }
    .compare-vs {
        font-size: 14px;
    }
    .compare-badge {
        min-width: 140px;
        padding: 10px 14px;
    }
}

/* ============================================================
   D9 新功能样式：媒体鉴真（图片/视频 美颜·滤镜·剪辑识别）
   ============================================================ */

/* ---------- 模式切换 Tab ---------- */
.media-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.media-tab {
    padding: 10px 26px;
    border: 2px solid #dce5e0;
    background: #fff;
    color: #5a6b64;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.media-tab:hover {
    border-color: #1e5a4a;
}

.media-tab.active {
    background: #1e5a4a;
    border-color: #1e5a4a;
    color: #fff;
}

/* ---------- 上传区域 ---------- */
.media-uploader {
    max-width: 620px;
    margin: 0 auto;
}

.upload-zone {
    border: 2px dashed #c8d8d0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-zone:hover {
    border-color: #1e5a4a;
    background: #fff;
}

.upload-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

.upload-main {
    font-size: 16px;
    color: #1f2d28;
    font-weight: 600;
}

.upload-hint {
    font-size: 13px;
    color: #8a9a93;
    margin-top: 6px;
}

/* ---------- 预览缩略图 ---------- */
.media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.media-thumb {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #dce5e0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(30, 90, 74, 0.08);
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-thumb-del {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.media-thumb-del:hover {
    background: #e74c3c;
}
