/* =============================================
   食物热量 - food_calories.css
   清新绿色 + 橙色能量配色主题，三栏布局
   暗黑模式以 body.dark 作为父级选择器前缀
   ============================================= */

/* ========== 主容器 ========== */
.fc-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #f6fdf0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(67, 160, 71, 0.12);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.fc-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
    min-height: unset;
}

/* ========== 顶部工具栏 ========== */
.fc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 40%, #66bb6a 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(46, 125, 50, 0.4);
    flex-shrink: 0;
}

.fc-toolbar .toolbar-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.5px;
    margin-right: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 28px;
}

.toolbar-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #2e7d32;
    transition: all 0.2s;
    white-space: nowrap;
}

.toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}

.toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.toolbar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* 主操作按钮（查询热量） */
.toolbar-btn-primary {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.45);
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
    box-shadow: 0 4px 14px rgba(255, 152, 0, 0.55);
    color: #fff !important;
}

/* ========== 表单校验抖动 ========== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 50%, 90% { transform: translateX(-5px); }
    30%, 70% { transform: translateX(5px); }
}

.fc-input.shake,
.fc-select.shake {
    animation: shake 0.5s ease-in-out;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* ========== 主内容区：三栏 ========== */
.fc-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f6fdf0;
}

/* ========== 左栏：历史记录 ========== */
.fc-history-panel {
    width: 210px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #c5e1a5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #f6fdf0 0%, #ecf7e0 100%);
    border-bottom: 1px solid #c5e1a5;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
}

.history-count {
    font-size: 11px;
    color: #66bb6a;
    font-weight: 400;
}

.history-limit-footer {
    flex-shrink: 0;
    padding: 5px 8px;
    text-align: center;
    font-size: 10px;
    color: #a5d6a7;
    border-top: 1px solid #c5e1a5;
    background: #f6fdf0;
    letter-spacing: 0.2px;
    user-select: none;
}

.history-clear-btn {
    background: #fff0f0;
    border: none;
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 3px;
    transition: background 0.2s;
    white-space: nowrap;
}

.history-clear-btn:hover {
    background: #fde8e8;
}

.history-search {
    padding: 8px;
    border-bottom: 1px solid #c5e1a5;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #c5e1a5;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #374151;
    background: #fafffe;
}

.history-search input:focus {
    border-color: #66bb6a;
    box-shadow: 0 0 0 2px rgba(102, 187, 106, 0.15);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-track { background: transparent; }
.history-list:hover::-webkit-scrollbar-track { background: #f1f8e9; }
.history-list::-webkit-scrollbar-thumb { background: #a5d6a7; border-radius: 2px; }
.history-list::-webkit-scrollbar-thumb:hover { background: #66bb6a; }

.history-empty {
    text-align: center;
    color: #a5d6a7;
    font-size: 12px;
    padding: 24px 8px;
    user-select: none;
}

@keyframes hiFadeIn {
    from { opacity: 0; transform: translateX(-4px); }
    to   { opacity: 1; transform: translateX(0); }
}

.history-item {
    display: flex;
    flex-direction: column;
    padding: 9px 11px;
    margin: 3px 0;
    background: #f9fce8;
    border: 1px solid #c5e1a5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: hiFadeIn 0.2s ease;
}

.history-item:hover {
    background: #f1f8e9;
    border-color: #66bb6a;
    transform: translateX(2px);
}

.history-item.active {
    background: #e8f5e9;
    border-color: #43a047;
    box-shadow: 0 1px 3px rgba(67, 160, 71, 0.25);
}

.history-item-del {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #fde8e8;
    color: #ef4444;
    border: none;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.history-item:hover .history-item-del {
    opacity: 1;
}

.history-item-del:hover {
    background: #ef4444;
    color: #fff;
}

.history-item-food {
    font-size: 12px;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 20px;
}

.history-item-amount {
    font-size: 11px;
    color: #9ca3af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}

.history-item-time {
    font-size: 10px;
    color: #66bb6a;
}

/* ========== 中栏：表单输入 ========== */
.fc-input-panel {
    width: 340px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #c5e1a5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fc-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
}

.fc-input-body::-webkit-scrollbar { width: 4px; }
.fc-input-body::-webkit-scrollbar-track { background: transparent; }
.fc-input-body::-webkit-scrollbar-thumb { background: #c5e1a5; border-radius: 2px; }

/* ========== 通用面板头部 ========== */
.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #f6fdf0 0%, #ecf7e0 100%);
    border-bottom: 1px solid #c5e1a5;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
    white-space: nowrap;
}

.panel-tip {
    font-size: 11px;
    color: #66bb6a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
}

.result-food-tag {
    font-size: 11px;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 2px 10px;
    border-radius: 10px;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
}

.result-time {
    font-size: 11px;
    color: #66bb6a;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 换一批按钮 */
.result-regen-btn {
    flex-shrink: 0;
    padding: 3px 10px;
    background: rgba(255, 152, 0, 0.08);
    border: 1px solid rgba(255, 152, 0, 0.35);
    border-radius: 4px;
    color: #e65100;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.result-regen-btn:hover {
    background: rgba(255, 152, 0, 0.16);
    border-color: #ff9800;
    color: #f57c00;
    transform: translateY(-1px);
}

/* ========== 表单通用样式 ========== */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.required-mark {
    color: #ef4444;
    margin-left: 3px;
}

.fc-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #c5e1a5;
    border-radius: 6px;
    font-size: 13px;
    color: #1f2937;
    background: #fafffe;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.fc-input:focus {
    border-color: #43a047;
    box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.12);
    background: #fff;
}

.fc-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #c5e1a5;
    border-radius: 6px;
    font-size: 13px;
    color: #1f2937;
    background: #fafffe;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    cursor: pointer;
}

.fc-select:focus {
    border-color: #43a047;
    box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.12);
}

/* 禁用态：加载中时输入框视觉反馈 */
.fc-input:disabled,
.fc-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f0f7f0;
    border-color: #dce8d4;
}

/* 数量+单位并排 */
.form-group-row {
    display: flex;
    gap: 10px;
}

.form-group-half {
    flex: 1;
    min-width: 0;
}

.form-group-half label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

/* ========== 分析模式卡片 ========== */
.fc-mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* 规范：base class 必须声明 position: relative */
.fc-mode-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 10px;
    border: 2px solid #c5e1a5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafffe;
    text-align: center;
    user-select: none;
}

.fc-mode-card:hover {
    border-color: #66bb6a;
    background: #f1f8e9;
    transform: translateY(-1px);
}

.fc-mode-card.selected {
    border-color: #43a047;
    background: #e8f5e9;
    box-shadow: 0 2px 8px rgba(67, 160, 71, 0.18);
}

.fc-mode-card.selected::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 8px;
    font-size: 11px;
    color: #43a047;
    font-weight: 700;
}

.fc-mode-icon {
    font-size: 22px;
    margin-bottom: 5px;
}

.fc-mode-name {
    font-size: 12px;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 3px;
}

.fc-mode-desc {
    font-size: 10px;
    color: #78909c;
    line-height: 1.4;
}

/* ========== 快捷食物按钮 ========== */
.fc-quick-foods {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 6px;
}

.fc-quick-btn {
    padding: 6px 4px;
    background: #f1f8e9;
    border: 1px solid #c5e1a5;
    border-radius: 6px;
    font-size: 11px;
    color: #2e7d32;
    cursor: pointer;
    transition: all 0.18s;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-quick-btn:hover {
    background: #e8f5e9;
    border-color: #43a047;
    color: #1b5e20;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(67, 160, 71, 0.18);
}

.fc-quick-btn:active {
    transform: translateY(0);
}

/* ========== 查询按钮区域 ========== */
.fc-query-action {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.fc-query-main-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 3px 12px rgba(255, 152, 0, 0.4);
    letter-spacing: 0.5px;
}

.fc-query-main-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
    box-shadow: 0 5px 18px rgba(255, 152, 0, 0.5);
    transform: translateY(-2px);
}

.fc-query-main-btn:active:not(:disabled) {
    transform: translateY(0);
}

.fc-query-main-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fc-shortcut-hint {
    margin: 0;
    font-size: 11px;
    color: #a5d6a7;
}

/* ========== 右栏：结果展示 ========== */
.fc-result-panel {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 280px;
}

.fc-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fdfffc;
    display: flex;
    flex-direction: column;
}

.fc-result-body::-webkit-scrollbar { width: 6px; }
.fc-result-body::-webkit-scrollbar-track { background: transparent; }
.fc-result-body::-webkit-scrollbar-thumb { background: #c5e1a5; border-radius: 3px; }
.fc-result-body::-webkit-scrollbar-thumb:hover { background: #66bb6a; }

/* ========== 初始占位 ========== */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 300px;
    text-align: center;
    padding: 30px;
}

.placeholder-emoji {
    font-size: 64px;
    margin-bottom: 16px;
    animation: floatAnim 3s ease-in-out infinite;
}

@keyframes floatAnim {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.placeholder-title {
    font-size: 18px;
    font-weight: 700;
    color: #2e7d32;
    margin: 0 0 8px;
}

.placeholder-desc {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 0 4px;
}

.placeholder-quote {
    margin-top: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f1f8e9, #e8f5e9);
    border-left: 3px solid #66bb6a;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #388e3c;
    font-style: italic;
}

/* ========== 加载中 ========== */
.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 300px;
    text-align: center;
    padding: 30px;
}

.loading-food-icons {
    font-size: 30px;
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
}

.loading-food-icons span {
    animation: bounceIcon 1s ease-in-out infinite;
    display: inline-block;
}

.loading-food-icons span:nth-child(2) { animation-delay: 0.2s; }
.loading-food-icons span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounceIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.loading-text {
    font-size: 14px;
    color: #66bb6a;
    margin: 0;
    font-weight: 500;
}

@keyframes fcResultFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 结果内容板块标题（替代内联样式，支持暗黑模式） */
.fc-section-title {
    display: block;
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    background: linear-gradient(90deg, #388e3c 0%, #66bb6a 100%);
    padding: 3px 12px;
    border-radius: 4px;
    margin-bottom: 5px;
    letter-spacing: 0.3px;
}

/* ========== 结果内容 ========== */
.result-content {
    font-size: 14px;
    line-height: 1.8;
    color: #1f2937;
    word-break: break-word;
    animation: fcResultFadeIn 0.35s ease;
}

.result-content p {
    margin: 0 0 14px;
}

.result-content p:last-child {
    margin-bottom: 0;
}

/* 错误状态 */
.result-content--error {
    background: #fff5f5;
    border: 1px solid #fde8e8;
    border-radius: 8px;
    padding: 20px;
    flex: 1;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-error-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.result-error-icon {
    font-size: 36px;
    color: #ef4444;
}

.result-error-title {
    font-size: 14px;
    color: #b91c1c;
    font-weight: 600;
    margin: 0;
}

.result-error-hint {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

.fc-retry-btn {
    margin-top: 8px;
    padding: 8px 20px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.fc-retry-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* ul/ol 列表项标记符统一使用主题橙色 */
.result-content ul li::marker,
.result-content ol li::marker {
    color: #ff9800;
}

/* ========== 示例模态框 ========== */
.fc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.fc-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(680px, 90vw);
    max-height: 75vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fc-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.fc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f6fdf0, #ecf7e0);
    border-bottom: 1px solid #c5e1a5;
    flex-shrink: 0;
}

.fc-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #2e7d32;
}

.fc-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.fc-modal-close:hover {
    background: #fde8e8;
    color: #ef4444;
}

.fc-modal-body {
    padding: 16px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-content: start;
}

.fc-modal-body::-webkit-scrollbar { width: 4px; }
.fc-modal-body::-webkit-scrollbar-thumb { background: #c5e1a5; border-radius: 2px; }

/* 示例卡片 */
.example-card {
    padding: 12px 14px;
    border: 1px solid #c5e1a5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafffe;
    position: relative;
}

.example-card:hover {
    border-color: #43a047;
    background: #f1f8e9;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(67, 160, 71, 0.15);
}

.example-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 5px;
}

.example-card-badge {
    font-size: 10px;
    color: #ff9800;
    background: #fff8e1;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.example-card-desc {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
    margin: 0 0 8px;
}

.example-card-import {
    font-size: 11px;
    color: #43a047;
    background: #e8f5e9;
    border: 1px solid #c5e1a5;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.example-card-import:hover {
    background: #c8e6c9;
    border-color: #66bb6a;
}

/* ========== 暗黑模式 (body.dark 前缀) ========== */
body.dark .fc-container {
    background: #1a2416;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark .fc-main-content {
    background: #1a2416;
}

body.dark .fc-toolbar {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

body.dark .fc-history-panel {
    background: #1e2a1a;
    border-right-color: #2d4a28;
}

body.dark .history-panel-header {
    background: linear-gradient(to bottom, #1e2a1a, #1a2416);
    border-bottom-color: #2d4a28;
}

body.dark .history-panel-header h3 {
    color: #a5d6a7;
}

body.dark .history-limit-footer {
    background: #1a2416;
    border-top-color: #2d4a28;
    color: #4a6741;
}

body.dark .history-search input {
    background: #243320;
    border-color: #2d4a28;
    color: #d4e8cf;
}

body.dark .history-search input:focus {
    border-color: #66bb6a;
}

body.dark .history-list:hover::-webkit-scrollbar-track { background: #1e2a1a; }
body.dark .history-list::-webkit-scrollbar-thumb { background: #3a5e35; }
body.dark .history-list::-webkit-scrollbar-thumb:hover { background: #66bb6a; }

body.dark .history-empty {
    color: #4a6741;
}

body.dark .history-item {
    background: #243320;
    border-color: #2d4a28;
}

body.dark .history-item:hover {
    background: #2d3d29;
    border-color: #43a047;
}

body.dark .history-item.active {
    background: #2a4025;
    border-color: #66bb6a;
}

body.dark .history-item-food {
    color: #a5d6a7;
}

body.dark .history-item-amount {
    color: #6b7280;
}

body.dark .history-item-time {
    color: #4a6741;
}

body.dark .history-clear-btn {
    background: #3a1a1a;
    color: #f87171;
}

body.dark .history-clear-btn:hover {
    background: #4a2020;
}

body.dark .history-item-del {
    background: #3a1a1a;
    color: #f87171;
}

body.dark .history-item-del:hover {
    background: #ef4444;
    color: #fff;
}

body.dark .fc-input-panel {
    background: #1e2a1a;
    border-right-color: #2d4a28;
}

body.dark .panel-header {
    background: linear-gradient(to bottom, #1e2a1a, #1a2416);
    border-bottom-color: #2d4a28;
}

body.dark .panel-header h3 {
    color: #a5d6a7;
}

body.dark .panel-tip {
    color: #4a6741;
}

body.dark .fc-input-body {
    background: #1e2a1a;
}

body.dark .fc-input-body::-webkit-scrollbar-thumb { background: #3a5e35; }

body.dark .form-group label {
    color: #9ca3af;
}

body.dark .fc-input {
    background: #243320;
    border-color: #2d4a28;
    color: #d4e8cf;
}

body.dark .fc-input:focus {
    border-color: #66bb6a;
    background: #2d3d29;
}

body.dark .fc-select {
    background: #243320;
    border-color: #2d4a28;
    color: #d4e8cf;
}

body.dark .fc-select:focus {
    border-color: #66bb6a;
}

body.dark .fc-input:disabled,
body.dark .fc-select:disabled {
    opacity: 0.4;
    background: #1a2416;
    border-color: #243320;
}

body.dark .fc-mode-card {
    background: #243320;
    border-color: #2d4a28;
}

body.dark .fc-mode-card:hover {
    background: #2d3d29;
    border-color: #66bb6a;
}

body.dark .fc-mode-card.selected {
    background: #2a4025;
    border-color: #43a047;
}

body.dark .fc-mode-name {
    color: #a5d6a7;
}

body.dark .fc-mode-desc {
    color: #6b7280;
}

body.dark .fc-quick-btn {
    background: #243320;
    border-color: #2d4a28;
    color: #a5d6a7;
}

body.dark .fc-quick-btn:hover {
    background: #2d3d29;
    border-color: #66bb6a;
    color: #c8e6c9;
}

body.dark .fc-shortcut-hint {
    color: #4a6741;
}

body.dark .fc-result-panel {
    background: #1e2a1a;
}

body.dark .fc-result-body {
    background: #1a2416;
}

body.dark .fc-result-body::-webkit-scrollbar-thumb { background: #3a5e35; }
body.dark .fc-result-body::-webkit-scrollbar-thumb:hover { background: #66bb6a; }

body.dark .result-placeholder {
    background: #1a2416;
}

body.dark .placeholder-title {
    color: #a5d6a7;
}

body.dark .placeholder-desc {
    color: #6b7280;
}

body.dark .placeholder-quote {
    background: linear-gradient(135deg, #1e2a1a, #243320);
    border-left-color: #43a047;
    color: #81c784;
}

body.dark .loading-text {
    color: #66bb6a;
}

body.dark .result-content {
    color: #d4e8cf;
}

body.dark .fc-section-title {
    background: linear-gradient(90deg, #1b5e20 0%, #2e7d32 100%);
    color: #c8e6c9;
}

body.dark .result-content--error {
    background: #2a1418;
    border-color: #4a2020;
}

body.dark .result-error-title {
    color: #f87171;
}

body.dark .result-error-hint {
    color: #6b7280;
}

body.dark .fc-retry-btn {
    background: #b91c1c;
}

body.dark .fc-retry-btn:hover {
    background: #991b1b;
}

body.dark .result-food-tag {
    color: #a5d6a7;
    background: #243320;
}

body.dark .result-time {
    color: #4a6741;
}

body.dark .result-regen-btn {
    background: rgba(255, 152, 0, 0.1);
    border-color: rgba(255, 152, 0, 0.3);
    color: #ffa726;
}

body.dark .result-regen-btn:hover {
    background: rgba(255, 152, 0, 0.2);
    border-color: #ffa726;
    color: #ffb74d;
}

body.dark .fc-modal-overlay {
    background: rgba(0, 0, 0, 0.65);
}

body.dark .fc-modal {
    background: #1e2a1a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.dark .fc-modal-header {
    background: linear-gradient(135deg, #1e2a1a, #243320);
    border-bottom-color: #2d4a28;
}

body.dark .fc-modal-header h3 {
    color: #a5d6a7;
}

body.dark .fc-modal-close {
    color: #6b7280;
}

body.dark .fc-modal-close:hover {
    background: #3a1f1f;
    color: #ef4444;
}

body.dark .fc-modal-body::-webkit-scrollbar-thumb { background: #3a5e35; }
body.dark .fc-modal-body::-webkit-scrollbar-thumb:hover { background: #66bb6a; }

body.dark .example-card {
    background: #243320;
    border-color: #2d4a28;
}

body.dark .example-card:hover {
    background: #2d3d29;
    border-color: #43a047;
}

body.dark .example-card-title {
    color: #a5d6a7;
}

body.dark .example-card-badge {
    background: #3a2e0a;
    color: #ffb74d;
}

body.dark .example-card-desc {
    color: #6b7280;
}

body.dark .example-card-import {
    background: #1e2a1a;
    border-color: #2d4a28;
    color: #81c784;
}

body.dark .example-card-import:hover {
    background: #2d3d29;
    border-color: #66bb6a;
}

body.dark .history-search {
    border-bottom-color: #2d4a28;
}

body.dark .history-search input::placeholder {
    color: #4a6741;
}

/* ========== 响应式适配 ========== */
@media (max-width: 1024px) {
    .fc-history-panel {
        width: 170px;
    }
    .fc-input-panel {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .fc-main-content {
        flex-direction: column;
    }
    .fc-history-panel {
        width: 100%;
        max-height: 180px;
        border-right: none;
        border-bottom: 1px solid #c5e1a5;
    }
    .fc-input-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #c5e1a5;
        flex-shrink: 0;
        max-height: 60vh;
    }
    .fc-result-panel {
        min-width: unset;
        min-height: 300px;
    }
    .fc-mode-grid {
        grid-template-columns: 1fr 1fr;
    }
    .fc-quick-foods {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
    .fc-modal-body {
        grid-template-columns: 1fr;
    }
    .fc-toolbar {
        padding: 6px 10px;
    }
    .toolbar-btn {
        padding: 5px 8px;
        font-size: 11px;
    }
    body.dark .fc-history-panel {
        border-right: none;
        border-bottom: 1px solid #2d4a28;
    }
    body.dark .fc-input-panel {
        border-right: none;
        border-bottom: 1px solid #2d4a28;
    }
}
