:root {
    --primary-color: #2d5016;
    --secondary-color: #6a8c3c;
    --accent-color: #d4a574;
    --light-color: #f8f5e9;
    --dark-color: #1a2c0d;
    --text-color: #333;
    --text-light: #666;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #f44336;
    --info-color: #2196F3;
    --border-radius: 8px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--text-color);
    line-height: 1.6;
}

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

/* 头部样式 */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

/* ========== Logo 图片（替换原 FontAwesome 图标 + 文字） ========== */
.site-logo {
    height: 45px;          /* 限制在 40-50px 之间 */
    width: auto;           /* 自动适应比例 */
    vertical-align: middle;
    display: block;        /* flex 容器里 block 即可 */
    object-fit: contain;
    border-radius: 6px;    /* 轻微圆角更柔和 */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08)); /* 轻微投影提升质感 */
    transition: transform .2s ease;
}
.site-logo:hover {
    transform: scale(1.03);
}

/* ========== 隐藏 GCN 图谱图标（三个方块+连线） ========== */
i.fa-project-diagram,
.fas.fa-project-diagram {
    display: none !important;
}

/* 原 FontAwesome 图标（保留以备其他页面用） */
.logo i {
    color: var(--accent-color);
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
    background-color: rgba(45, 80, 22, 0.05);
}

.user-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    transition: var(--transition);
}

.user-profile:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a7532;
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background-color: rgba(45, 80, 22, 0.05);
}

.btn-icon {
    padding: 8px 12px;
    font-size: 1rem;
}

/* 主内容区 */
main {
    min-height: calc(100vh - 180px);
    padding: 30px 0;
}

.page-header {
    margin-bottom: 40px;
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.05) 0%, rgba(212, 165, 116, 0.05) 100%);
    border-radius: var(--border-radius);
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 20px;
}

/* 模块区域 */
.module-section {
    margin-bottom: 50px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.section-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: var(--accent-color);
}

.section-body {
    padding: 30px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th, .data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: var(--dark-color);
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background-color: rgba(255, 152, 0, 0.1);
    color: var(--warning-color);
}

.badge-info {
    background-color: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

/* AI推荐区域 */
.taste-preference {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.taste-item {
    flex: 1;
    min-width: 150px;
}

.range-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.range-value {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 20px;
    text-align: center;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #eee;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

/* 配方卡片 */
.recipe-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.recipe-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.recipe-header {
    padding: 20px;
    background-color: rgba(45, 80, 22, 0.05);
    border-bottom: 1px solid #eee;
}

.recipe-header h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.recipe-body {
    padding: 20px;
}

.recipe-ingredients {
    margin: 15px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
}

.ingredient-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.ingredient-row:last-child {
    border-bottom: none;
}

.recipe-footer {
    padding: 15px 20px;
    background-color: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

/* 社区帖子 */
.forum-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.forum-post {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.forum-post:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-content h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.post-tags {
    display: flex;
    gap: 8px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: rgba(45, 80, 22, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.post-actions {
    display: flex;
    gap: 20px;
}

.post-actions a {
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.post-actions a:hover {
    color: var(--primary-color);
}

.post-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 图表容器 */
.chart-container {
    width: 100%;
    height: 400px;
    margin-top: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

/* 评论样式 */
.comment-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.comment-form {
    margin-bottom: 20px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-item {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
}

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

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-content {
    margin-left: 45px;
}

/* 页脚 */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 30px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

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

.modal-header h3 {
    color: var(--dark-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    padding: 20px;
}

/* 加载动画 */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .nav-links {
        gap: 15px;
    }
    
    .recipe-cards {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* API测试区域 - 已删除 */

/* 添加卡片样式 */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background-color: rgba(45, 80, 22, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-icon i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.card-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-link:hover {
    gap: 10px;
}

/* 富文本编辑器样式 */
.ql-toolbar {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    border-color: #ddd !important;
}

.ql-container {
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    border-color: #ddd !important;
    min-height: 200px;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.ql-container.ql-snow {
    border-top: none !important;
}

.post-content-preview {
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 15px;
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
    background-color: #f9f9f9;
    margin-top: 15px;
}

.post-content-preview img {
    max-width: 100%;
    height: auto;
}

/* 富文本编辑器模态框特定样式 */
#newPostModal .modal {
    max-width: 900px;
}

/* AI模型管理区域 */
.ai-model-controls {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.model-status {
    padding: 10px 15px;
    border-radius: var(--border-radius);
    background-color: #f5f5f5;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.model-status.active {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.model-status.training {
    background-color: rgba(255, 152, 0, 0.1);
    color: var(--warning-color);
}

.model-status.offline {
    background-color: rgba(158, 158, 158, 0.1);
    color: #9e9e9e;
}

.rule-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background-color: rgba(33, 150, 243, 0.1);
    color: var(--info-color);
    border-radius: 4px;
    font-size: 0.85rem;
    margin-left: 10px;
}

.ml-recommendation {
    border-left: 4px solid var(--accent-color);
    background-color: rgba(212, 165, 116, 0.05);
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.ml-recommendation h4 {
    color: var(--dark-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ml-recommendation h4 i {
    color: var(--accent-color);
}

.ml-confidence {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.9rem;
}

.confidence-bar {
    flex: 1;
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background-color: var(--success-color);
    border-radius: 4px;
}

/* 规则引擎说明 */
.rule-explanation {
    background-color: rgba(33, 150, 243, 0.05);
    border-radius: var(--border-radius);
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid var(--info-color);
}

.rule-list {
    list-style-type: none;
    margin: 10px 0;
}

.rule-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rule-list li:last-child {
    border-bottom: none;
}

.rule-icon {
    color: var(--info-color);
    font-size: 1rem;
}

/* 表格单位标注样式 */
.unit-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: normal;
}

/* 新增的样式：响应式表格容器 */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

/* 新增的样式：扩展的数据表格 */
.extended-table {
    min-width: 1000px;
}

/* 删除按钮样式 */
.btn-danger {
    background-color: var(--danger-color);
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-danger-outline:hover {
    background-color: rgba(244, 67, 54, 0.05);
}

/* 操作按钮组样式 */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
}
/* ============================================
   GCN 风味推荐结果（最小补充样式，复用现有组件）
============================================ */
.gcn-wrap {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}
.gcn-side {
    background: #fafaf7;
    border: 1px solid #ecebe5;
    border-radius: 12px;
    padding: 20px;
    position: sticky; top: 24px;
}
.gcn-side-head {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: #eef6f0;
    border-radius: 8px;
    margin-bottom: 16px;
}
.gcn-side-title {
    font-size: 13px; font-weight: 600; color: #3b7554;
}
.status-dot {
    width: 8px; height: 8px;
    background: #3b7554;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(59,117,84,0.22);
    animation: gcnPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes gcnPulse {
    0%,100% { box-shadow: 0 0 0 3px rgba(59,117,84,0.22); }
    50%      { box-shadow: 0 0 0 6px rgba(59,117,84,0.08); }
}
.gcn-sec-title {
    font-size: 11.5px; font-weight: 700;
    color: #9aa7a0; letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
/* 特征进度条 */
.gcn-features { display: flex; flex-direction: column; gap: 12px; }
.gcn-feature-row { display: flex; flex-direction: column; gap: 5px; }
.gcn-feature-label {
    display: flex; justify-content: space-between;
    font-size: 13px; color: #56665d; font-weight: 500;
}
.gcn-feature-val { color: #3b7554; font-weight: 700; font-variant-numeric: tabular-nums; }
.gcn-bar {
    height: 8px; background: #ecebe5;
    border-radius: 4px; overflow: hidden;
}
.gcn-bar-fill {
    height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, #3b7554 0%, #4d8f6e 100%);
    transition: width 0.9s cubic-bezier(.4,.0,.2,1);
    width: 0;
}
/* 相邻节点 */
.gcn-nodes { display: flex; flex-direction: column; gap: 8px; }
.gcn-node {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px;
    background: #f6f6f1;
    border-radius: 8px;
    transition: background .2s, transform .2s;
}
.gcn-node:hover { background: #f0f2eb; transform: translateX(2px); }
.gcn-node-left { display: flex; align-items: center; gap: 10px; }
.gcn-node-dot { width: 8px; height: 8px; background: #b89968; border-radius: 50%; }
.gcn-node-name { font-size: 13px; font-weight: 600; color: #1f2c24; }
.gcn-node-sim { font-size: 12px; font-weight: 700; color: #3b7554; font-variant-numeric: tabular-nums; }
/* 重新计算按钮 */
.gcn-recalc {
    width: 100%; margin-top: 18px;
    background: linear-gradient(135deg, #3b7554, #2e5c43);
    border: none;
    box-shadow: 0 4px 14px rgba(59,117,84,0.3);
}
.gcn-recalc:hover { box-shadow: 0 6px 18px rgba(59,117,84,0.4); transform: translateY(-1px); }
.gcn-recalc.loading i { animation: fa-spin 0.7s linear infinite; }
/* GCN 配方卡片（在现有 recipe-card 基础上增强） */
.recipe-cards.gcn-recipes { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.recipe-card .gcn-recipe-head {
    padding: 18px 20px 10px;
}
.recipe-card .gcn-recipe-head h3 {
    font-size: 16px; font-weight: 700;
    color: #1f2c24; margin-bottom: 6px;
}
.recipe-card .gcn-meta {
    display: flex; gap: 12px;
    font-size: 12px; color: #9aa7a0;
}
.recipe-card .gcn-desc {
    margin: 0 20px;
    padding: 12px 14px;
    background: #eaf2ec;
    border-radius: 8px;
    font-size: 13px; color: #2e5c43; line-height: 1.55;
}
.recipe-card .gcn-graph {
    margin: 8px 20px 0;
    font-size: 11.5px; color: #b4b8b1;
}
.recipe-card .gcn-section {
    padding: 14px 20px;
}
.recipe-card .gcn-section h4 {
    font-size: 11.5px; font-weight: 700;
    color: #9aa7a0; letter-spacing: 0.6px;
    text-transform: uppercase; margin-bottom: 10px;
}
.recipe-card .gcn-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.recipe-card .gcn-chip {
    display: inline-flex; align-items: baseline; gap: 3px;
    padding: 5px 11px;
    background: #f7f7f0;
    border: 1px solid #ecebe5;
    border-radius: 20px;
    font-size: 12px; color: #56665d; font-weight: 500;
}
.recipe-card .gcn-chip .amt { color: #b89968; font-weight: 700; font-variant-numeric: tabular-nums; }
.recipe-card .gcn-steps { display: flex; flex-direction: column; gap: 9px; }
.recipe-card .gcn-step { display: flex; gap: 10px; font-size: 13px; color: #56665d; line-height: 1.55; }
.recipe-card .gcn-step-num {
    flex-shrink: 0; width: 22px; height: 22px;
    border-radius: 50%;
    background: #3b7554;
    color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.recipe-card .gcn-foot {
    padding: 14px 20px;
    border-top: 1px solid #ecebe5;
    background: #fcfcfa;
    border-radius: 0 0 12px 12px;
}
.recipe-card .gcn-foot-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; flex-wrap: wrap;
}
.recipe-card .badge-gcn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #3b7554, #2e5c43);
    color: #fff; border-radius: 20px;
    font-size: 11.5px; font-weight: 600;
}
.recipe-card .gcn-icon-btn {
    width: 30px; height: 30px;
    border-radius: 6px;
    border: 1px solid #ecebe5;
    background: #fff;
    color: #9aa7a0;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    display: inline-flex; align-items: center; justify-content: center;
}
.recipe-card .gcn-icon-btn:hover { background: #f3f5f2; color: #3b7554; border-color: #d9e1da; }
.recipe-card .gcn-icon-btn.fav.liked { color: #3b7554; background: #eaf2ec; border-color: #3b7554; }
.recipe-card .gcn-tags {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 10px; width: 100%;
}
.recipe-card .gcn-tag {
    padding: 3px 9px;
    background: #f7f4ec; color: #b89968;
    border: 1px solid #ece3cf; border-radius: 4px;
    font-size: 11px; font-weight: 500;
}
/* 卡片闪烁动画 */
.recipe-card.gcn-flash { animation: gcnFlash .55s ease; }
@keyframes gcnFlash {
    0%   { background: #fff; }
    35%  { background: #f0f6f1; }
    100% { background: #fff; }
}
/* 响应式 */
@media (max-width: 900px) {
    .gcn-wrap { grid-template-columns: 1fr; }
    .gcn-side { position: static; }
}

/* ============================================
   AI 推荐模块 — 茶主题滑动条 / 复选框 / 单选框 / 按钮
============================================ */

/* ---------- 1. 重构滑动条 ---------- */
.taste-preference {
    display: flex; flex-direction: column; gap: 22px;
}
.taste-item { width: 100%; }

/* 顶部标题行：名字 + 实时数值 */
.taste-title-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.taste-name {
    font-size: 13px; font-weight: 600; color: var(--text-color);
}
.taste-val {
    font-size: 14px; font-weight: 700; color: #3b7554;
    background: #eaf2ec;
    padding: 3px 10px; border-radius: 12px;
    font-variant-numeric: tabular-nums;
    min-width: 32px; text-align: center;
    transition: all .15s ease;
}

/* 滑轨容器 */
.range-wrap { padding: 6px 0; }
.range-track {
    position: relative;
    height: 28px;
    display: flex; align-items: center;
}

/* 原生 range 隐藏外观但保留交互 */
.tea-range {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px;
    background: transparent;
    position: relative; z-index: 2;
    margin: 0; padding: 0;
    cursor: pointer;
}
/* 滑轨底色（浅灰色） */
.tea-range::-webkit-slider-runnable-track {
    height: 6px;
    background: #ecebe5;
    border-radius: 3px;
}
.tea-range::-moz-range-track {
    height: 6px;
    background: #ecebe5;
    border-radius: 3px;
}
/* 主题填充（深绿） */
.range-fill {
    position: absolute;
    left: 0; top: 50%; transform: translateY(-50%);
    height: 6px;
    background: linear-gradient(90deg, #3b7554 0%, #4d8f6e 100%);
    border-radius: 3px;
    z-index: 1;
    pointer-events: none;
    transition: width .12s ease;
}

/* 滑块（主题深绿 + hover 放大） */
.tea-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #3b7554;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(59,117,84,0.4);
    cursor: pointer;
    margin-top: -6px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.tea-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(59,117,84,0.55);
}
.tea-range::-webkit-slider-thumb:active { transform: scale(1.15); }

.tea-range::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #3b7554;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(59,117,84,0.4);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}
.tea-range::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(59,117,84,0.55);
}
.tea-range::-moz-range-thumb:active { transform: scale(1.15); }

/* 两端提示文字 */
.range-hint {
    display: flex; justify-content: space-between;
    margin-top: 6px;
    font-size: 11.5px; color: #9aa7a0;
}

/* ---------- 2. 复选框（茶主题） ---------- */
.tea-check-row {
    display: flex; flex-wrap: wrap; gap: 14px 22px;
}
.tea-check {
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; user-select: none;
    padding: 6px 12px; border-radius: 8px;
    transition: background .15s;
}
.tea-check:hover { background: #f7f7f0; }
.tea-check input { position: absolute; opacity: 0; pointer-events: none; }
.tea-check-box {
    width: 18px; height: 18px; flex-shrink: 0;
    border: 1.5px solid #c8c6bf;
    border-radius: 4px;
    background: #fff;
    position: relative;
    transition: all .18s ease;
}
.tea-check-box::after {
    content: '';
    position: absolute; left: 5px; top: 1px;
    width: 5px; height: 10px;
    border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .18s ease;
}
.tea-check input:checked + .tea-check-box {
    background: #3b7554; border-color: #3b7554;
}
.tea-check input:checked + .tea-check-box::after {
    transform: rotate(45deg) scale(1);
}
.tea-check input:focus-visible + .tea-check-box {
    box-shadow: 0 0 0 3px rgba(59,117,84,0.25);
}
.tea-check-label {
    font-size: 13px; color: var(--text-color); font-weight: 500;
}

/* ---------- 3. 单选框（茶主题） ---------- */
.tea-radio-row {
    display: flex; flex-wrap: wrap; gap: 22px;
    margin-top: 6px;
}
.tea-radio {
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; user-select: none;
    padding: 6px 12px; border-radius: 8px;
    transition: background .15s;
}
.tea-radio:hover { background: #f7f7f0; }
.tea-radio input { position: absolute; opacity: 0; pointer-events: none; }
.tea-radio-dot {
    width: 18px; height: 18px; flex-shrink: 0;
    border: 1.5px solid #c8c6bf;
    border-radius: 50%;
    background: #fff;
    position: relative;
    transition: all .18s ease;
}
.tea-radio-dot::after {
    content: '';
    position: absolute; left: 50%; top: 50%;
    width: 8px; height: 8px;
    background: #fff; border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform .18s ease;
}
.tea-radio input:checked + .tea-radio-dot {
    background: #3b7554; border-color: #3b7554;
}
.tea-radio input:checked + .tea-radio-dot::after {
    transform: translate(-50%, -50%) scale(1);
}
.tea-radio input:focus-visible + .tea-radio-dot {
    box-shadow: 0 0 0 3px rgba(59,117,84,0.25);
}
.tea-radio-label {
    font-size: 13px; color: var(--text-color); font-weight: 500;
}

/* ---------- 4. 按钮视觉层级 ---------- */
.tea-actions {
    display: flex; gap: 12px;
    justify-content: flex-end;
    margin-top: 10px;
}
.tea-btn-primary {
    background: linear-gradient(135deg, #3b7554, #2e5c43) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 700 !important;
    padding: 11px 22px !important;
    box-shadow: 0 4px 14px rgba(59,117,84,0.3) !important;
    transition: all .2s ease !important;
    height: 42px;
}
.tea-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59,117,84,0.4) !important;
}
.tea-btn-secondary {
    background: #fff !important;
    border: 1.5px solid #3b7554 !important;
    color: #3b7554 !important;
    font-weight: 600 !important;
    padding: 11px 18px !important;
    height: 42px;
    min-width: 160px;
    transition: all .2s ease !important;
}
.tea-btn-secondary:hover {
    background: #eaf2ec !important;
    transform: translateY(-1px);
}

/* ============================================
   气泡 Popover 分享 + Tooltip + 心形收藏状态机
============================================ */

/* ---------- 分享气泡 Popover ---------- */
.share-popover {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    padding: 14px 10px 16px;
    width: 340px;
    max-width: calc(100vw - 24px);
    animation: popoverIn .18s ease-out;
}
@keyframes popoverIn {
    from { opacity: 0; transform: translateY(6px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 小三角箭头（朝上，气泡从按钮上方弹出） */
.share-popover-arrow {
    position: absolute;
    bottom: -6px;
    left: 50%; transform: translateX(-50%) rotate(45deg);
    width: 12px; height: 12px;
    background: #fff;
    box-shadow: 4px 4px 6px rgba(0,0,0,0.04);
}
/* 下方弹出时箭头改朝上 */
.share-popover-flip .share-popover-arrow {
    bottom: auto; top: -6px;
}

.share-popover-title {
    font-size: 13px; font-weight: 700; color: #333;
    text-align: center; margin-bottom: 12px;
}

/* 横向一排 5 个分享渠道 */
.share-grid {
    display: flex;
    align-items: stretch;
    gap: 6px;
}
.share-popover-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 9px 2px;
    border: 1px solid #e8e6e0;
    border-radius: 10px;
    background: #fafaf7;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
}
.share-popover-item:hover {
    background: #fff;
    border-color: #3b7554;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(59,117,84,0.12);
}
.share-popover-item.active {
    background: #eaf2ec;
    border-color: #3b7554;
}
.share-icon {
    font-size: 20px; line-height: 1;
    filter: grayscale(20%);
}
.share-label {
    font-size: 11px; color: #444; font-weight: 500;
    white-space: nowrap;
}

/* ---------- 二维码面板（展开后追加内容） ---------- */
.share-qr-panel {
    margin-top: 12px;
    padding: 12px 8px 8px;
    border-top: 1px dashed #e5e3dc;
    text-align: center;
    animation: qrExpand .2s ease-out;
}
@keyframes qrExpand {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.share-qr-title {
    font-size: 12px; color: #3b7554; font-weight: 600;
    margin-bottom: 10px;
}
.share-qr-box {
    width: 150px; height: 150px;
    margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}
.share-qr-panel canvas,
.share-qr-panel img {
    width: 150px !important;
    height: 150px !important;
    display: block;
    border-radius: 6px;
}
.share-qr-sub {
    margin-top: 8px; font-size: 11px; color: #999;
}
.share-qr-sub a {
    color: #3b7554; text-decoration: none; font-weight: 500;
}
.share-qr-sub a:hover { text-decoration: underline; }

/* ---------- Tooltip（心形/分享按钮 hover 提示） ---------- */
.tea-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%; transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 11px; font-weight: 500;
    padding: 4px 8px; border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    z-index: 9998;
}
.tea-tooltip::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%; transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #333;
}
[data-tooltip]:hover .tea-tooltip,
.tea-tooltip-wrap:hover .tea-tooltip,
.recipe-fav:hover .tea-tooltip,
.recipe-share:hover .tea-tooltip,
.fav-btn:hover .tea-tooltip,
.share-btn:hover .tea-tooltip,
.gcn-icon-btn:hover .tea-tooltip {
    opacity: 1;
}

/* ---------- 心形收藏按钮状态机（空心↔实心 + 灰↔绿） ---------- */
.fav-btn,
.recipe-fav,
.gcn-icon-btn.fav {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1.5px solid #d4d2cb;
    background: #fff;
    cursor: pointer;
    transition: all .2s ease;
    font-family: inherit;
    color: #aaa;
}
.fav-btn:hover,
.recipe-fav:hover,
.gcn-icon-btn.fav:hover {
    border-color: #3b7554;
    color: #3b7554;
    transform: scale(1.05);
}
/* 未收藏：空心心形（CSS 绘制） */
.fav-btn::before,
.recipe-fav::before,
.gcn-icon-btn.fav::before {
    content: '♡';
    font-size: 17px; line-height: 1;
    font-family: inherit;
}
/* 已收藏：实心绿色心形 */
.fav-btn.liked,
.recipe-fav.liked,
.gcn-icon-btn.fav.liked {
    background: #fff;
    border-color: #3b7554;
    color: #3b7554;
}
.fav-btn.liked::before,
.recipe-fav.liked::before,
.gcn-icon-btn.fav.liked::before {
    content: '♥';
}
.fav-btn.liked,
.recipe-fav.liked,
.gcn-icon-btn.fav.liked {
    animation: favPop .3s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes favPop {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.25); }
    60%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* ---------- 分享按钮（独立风格） ---------- */
.share-btn,
.recipe-share,
.gcn-icon-btn.share {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1.5px solid #d4d2cb;
    background: #fff;
    cursor: pointer;
    transition: all .2s ease;
    color: #666;
    font-family: inherit;
}
.share-btn:hover,
.recipe-share:hover,
.gcn-icon-btn.share:hover {
    border-color: #3b7554;
    color: #3b7554;
    transform: scale(1.05);
}
.share-btn::before,
.recipe-share::before,
.gcn-icon-btn.share::before {
    content: '↗';
    font-size: 15px; line-height: 1;
}

.share-popover-copy {
    background: #f3f7f4;
    border-color: #d9e6de;
}

.share-popover-item.active {
    background: #edf5ef;
    border-color: #2f6b4f;
    color: #2f6b4f;
    box-shadow: 0 3px 10px rgba(47, 107, 79, 0.12);
}
.share-popover-item.active .share-label {
    color: #2f6b4f;
    font-weight: 600;
}

/* ---------- 报告图片上传与配方复制 ---------- */
.image-dropzone {
    min-height: 180px;
    padding: 24px;
    border: 2px dashed #b9c9be;
    border-radius: 12px;
    background: #fafcf9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s, background-color .2s, transform .2s;
}
.image-dropzone:hover,
.image-dropzone:focus-visible,
.image-dropzone.dragover {
    border-color: #2f6b4f;
    background: #f0f6f1;
    outline: none;
}
.image-dropzone.dragover {
    transform: scale(1.01);
}
.image-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #6f7f74;
    text-align: center;
}
.image-upload-placeholder i {
    color: #2f6b4f;
    font-size: 38px;
}
.image-upload-placeholder strong {
    color: #344d3d;
    font-size: 16px;
}
.image-upload-placeholder span {
    color: #8a958d;
    font-size: 13px;
}
.image-preview {
    width: 100%;
}
.image-preview[hidden],
.image-upload-placeholder[hidden] {
    display: none;
}
.image-preview img {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    background: #f2f4ef;
}
.image-preview-meta {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.image-preview-meta > span {
    overflow: hidden;
    color: #647168;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.image-remove-btn {
    flex-shrink: 0;
    padding: 7px 12px;
    border: 1px solid #d8b8b3;
    border-radius: 6px;
    background: #fff;
    color: #a34c41;
    cursor: pointer;
}
.image-remove-btn:hover {
    background: #fff3f1;
}
.recipe-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid #b9c9be;
    border-radius: 6px;
    background: #fff;
    color: #2f6b4f;
    font-size: 12px;
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
}
.recipe-copy-btn:hover {
    border-color: #2f6b4f;
    background: #edf5ef;
}
.btn.is-loading {
    opacity: .75;
    cursor: wait;
}
@media (max-width: 600px) {
    .image-dropzone { padding: 16px; }
    .image-preview-meta { align-items: flex-start; }
}
