/* =============================================
   减肥计划 - weight_loss_plan.css
   清新健康配色：绿色渐变主调 + 橙色点缀
   三栏布局，支持全屏与暗黑模式
   ============================================= */

/* ========== 主容器 ========== */
.wlp-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #f0fef4;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(20, 184, 97, 0.12);
    transition: all 0.3s ease;
}

body.wlp-fullscreen-active {
    overflow: hidden;
}

.wlp-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;
}

/* ========== 顶部工具栏 ========== */
.wlp-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
    flex-shrink: 0;
}

.wlp-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: #065f46;
    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, #f97316 0%, #ea580c 100%);
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.45);
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.55);
    color: #fff !important;
}

/* ========== 抖动动画 ========== */
@keyframes wlpShake {
    0%, 100% { transform: translateX(0); }
    10%, 50%, 90% { transform: translateX(-5px); }
    30%, 70% { transform: translateX(5px); }
}

.wlp-input.shake,
.wlp-select.shake,
.wlp-textarea.shake {
    animation: wlpShake 0.5s ease-in-out;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* 占位符图标浮动动画 */
@keyframes wlpFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.wlp-float-anim {
    animation: wlpFloat 3s ease-in-out infinite;
}

/* 结果淡入动效 */
@keyframes wlpResultFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wlp-result-enter {
    animation: wlpResultFadeIn 0.35s ease-out forwards;
}

/* ========== 主内容区：三栏 ========== */
.wlp-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f0fef4;
}

/* ========== 左栏：历史记录 ========== */
.wlp-history-panel {
    width: 200px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #a7f3d0;
    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, #f0fef4 0%, #d1fae5 100%);
    border-bottom: 1px solid #a7f3d0;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #064e3b;
}

.history-count {
    font-size: 11px;
    color: #10b981;
    font-weight: 400;
}

.history-limit-footer {
    flex-shrink: 0;
    padding: 5px 8px;
    text-align: center;
    font-size: 10px;
    color: #6ee7b7;
    border-top: 1px solid #a7f3d0;
    background: #f0fef4;
    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 10px;
    border-bottom: 1px solid #d1fae5;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #a7f3d0;
    border-radius: 4px;
    font-size: 12px;
    background: #f0fef4;
    color: #065f46;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.history-search input:focus {
    border-color: #10b981;
    background: #fff;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-track { background: #f0fef4; }
.history-list::-webkit-scrollbar-thumb { background: #a7f3d0; border-radius: 2px; }
.history-list::-webkit-scrollbar-thumb:hover { background: #6ee7b7; }

.history-empty {
    text-align: center;
    color: #a7f3d0;
    font-size: 12px;
    padding: 24px 12px;
}

.history-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0fef4;
    border-left: 3px solid transparent;
    transition: background 0.15s, border-left-color 0.15s;
    position: relative;
}

.history-item:hover {
    background: #ecfdf5;
}

.history-item.active {
    background: #d1fae5;
    border-left: 3px solid #10b981;
}

.history-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #065f46;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.history-item-meta {
    font-size: 11px;
    color: #6ee7b7;
    display: flex;
    justify-content: space-between;
}

.history-item-del {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fca5a5;
    font-size: 12px;
    cursor: pointer;
    display: none;
    padding: 2px 4px;
    border-radius: 3px;
    transition: color 0.15s;
}

.history-item:hover .history-item-del {
    display: block;
}

.history-item-del:hover {
    color: #ef4444;
}

/* ========== 中栏：输入表单 ========== */
.wlp-input-panel {
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #a7f3d0;
    overflow: hidden;
}

.panel-header {
    padding: 14px 16px 10px;
    background: linear-gradient(135deg, #f0fef4 0%, #ecfdf5 100%);
    border-bottom: 1px solid #d1fae5;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #064e3b;
}

.panel-tip {
    font-size: 11px;
    color: #34d399;
}

.wlp-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wlp-input-body::-webkit-scrollbar { width: 4px; }
.wlp-input-body::-webkit-scrollbar-track { background: #f0fef4; }
.wlp-input-body::-webkit-scrollbar-thumb { background: #a7f3d0; border-radius: 2px; }
.wlp-input-body::-webkit-scrollbar-thumb:hover { background: #6ee7b7; }

/* 表单分区 */
.form-section {
    background: #f8fffe;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    padding: 12px 14px;
}

.form-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #a7f3d0;
    letter-spacing: 0.5px;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group-half {
    flex: 1;
    min-width: 0;
}

.form-group-third {
    flex: 1;
    min-width: 0;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #047857;
    margin-bottom: 4px;
}

.required-mark {
    color: #ef4444;
    margin-left: 2px;
}

.label-tip {
    font-size: 11px;
    color: #6ee7b7;
    font-weight: 400;
}

.wlp-input,
.wlp-select,
.wlp-textarea {
    padding: 7px 10px;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.wlp-input:focus,
.wlp-select:focus,
.wlp-textarea:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.wlp-input::placeholder,
.wlp-textarea::placeholder {
    color: #b0a4d0;
}

.wlp-textarea {
    resize: vertical;
    min-height: 60px;
    line-height: 1.5;
    font-family: inherit;
}

.wlp-textarea-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.wlp-textarea-hint {
    font-size: 11px;
    color: #a7f3d0;
}

/* BMI 预览条 */
.bmi-preview {
    margin-top: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #ecfdf5, #f0fef4);
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    font-size: 12px;
    color: #059669;
    display: none;
    transition: border-color 0.2s, background 0.2s;
}

.bmi-preview.show { display: block; }

/* 警告状态（目标 ≥ 当前体重） */
.bmi-preview.wlp-bmi-warn {
    background: linear-gradient(135deg, #fff5f5, #ffe4e4);
    border-color: #fca5a5;
}

/* BMI 警告态：差值文字红色 */
.wlp-bmi-diff-warn {
    color: #ef4444;
}

/* validateForm 中 BMI 预览警告提示文字 */
.wlp-bmi-warn-msg {
    color: #ef4444;
    font-weight: 600;
}

body.dark .bmi-preview.wlp-bmi-warn {
    background: linear-gradient(135deg, #1a0808, #2d1010);
    border-color: #7f1d1d;
}

body.dark .wlp-bmi-diff-warn {
    color: #f87171;
}

body.dark .wlp-bmi-warn-msg {
    color: #f87171;
}

.bmi-value {
    font-weight: 700;
    font-size: 15px;
    color: #10b981;
}

.bmi-diff {
    font-size: 11px;
    color: #34d399;
    margin-top: 2px;
}

/* ========== 右栏：结果区 ========== */
.wlp-result-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

.wlp-result-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.result-tag {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.result-time {
    font-size: 11px;
    color: #a7f3d0;
}

.result-regen-btn {
    background: #f0fef4;
    border: 1px solid #a7f3d0;
    color: #059669;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.result-regen-btn:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
}

.wlp-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.wlp-result-body::-webkit-scrollbar { width: 5px; }
.wlp-result-body::-webkit-scrollbar-track { background: #f0fef4; }
.wlp-result-body::-webkit-scrollbar-thumb { background: #a7f3d0; border-radius: 3px; }
.wlp-result-body::-webkit-scrollbar-thumb:hover { background: #6ee7b7; }

/* 占位符 */
.result-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
    color: #a7f3d0;
    padding: 40px 20px;
}

.placeholder-icon {
    font-size: 54px;
    margin-bottom: 16px;
    display: block;
}

.placeholder-title {
    font-size: 16px;
    font-weight: 700;
    color: #10b981;
    margin: 0 0 8px;
}

.placeholder-desc {
    font-size: 13px;
    color: #6ee7b7;
    margin: 3px 0;
}

.placeholder-quote {
    margin-top: 16px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #f0fef4, #ecfdf5);
    border-left: 3px solid #10b981;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #059669;
    font-style: italic;
    max-width: 280px;
}

/* 加载动效 */
.result-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 40px;
}

.loading-icons {
    display: flex;
    gap: 16px;
    font-size: 32px;
    margin-bottom: 20px;
}

.loading-icons span {
    animation: wlpFloat 1.6s ease-in-out infinite;
}

.loading-icons span:nth-child(2) { animation-delay: 0.3s; }
.loading-icons span:nth-child(3) { animation-delay: 0.6s; }

.loading-text {
    font-size: 14px;
    color: #059669;
    font-weight: 500;
    text-align: center;
    margin-bottom: 16px;
}

.wlp-loading-bar {
    width: 200px;
    height: 4px;
    background: #d1fae5;
    border-radius: 2px;
    overflow: hidden;
}

.wlp-loading-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 2px;
    animation: wlpLoadingSlide 1.4s ease-in-out infinite;
}

@keyframes wlpLoadingSlide {
    0% { transform: translateX(-150%); }
    100% { transform: translateX(400%); }
}

/* 结果内容 */
.wlp-result-content {
    font-size: 14px;
    line-height: 1.75;
    color: #1f2937;
}

.wlp-result-content h1,
.wlp-result-content h2 {
    color: #047857;
    border-bottom: 2px solid #a7f3d0;
    padding-bottom: 6px;
    margin: 20px 0 10px;
}

.wlp-result-content h3 {
    color: #059669;
    margin: 16px 0 8px;
}

.wlp-result-content ul,
.wlp-result-content ol {
    padding-left: 22px;
    margin: 8px 0;
}

.wlp-result-content li {
    margin: 4px 0;
}

/* 列表标记符使用主题橙色 */
.wlp-result-content ul li::marker,
.wlp-result-content ol li::marker {
    color: #ff9800;
}

/* 结果内容首个元素去除顶部多余间距 */
.wlp-result-content > :first-child {
    margin-top: 0 !important;
}

.wlp-result-content strong {
    color: #065f46;
}

.wlp-result-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
}

.wlp-result-content th {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 8px 10px;
    text-align: left;
}

.wlp-result-content td {
    padding: 7px 10px;
    border: 1px solid #a7f3d0;
}

.wlp-result-content tr:nth-child(even) td {
    background: #f0fef4;
}

.wlp-result-content blockquote {
    margin: 10px 0;
    padding: 10px 16px;
    background: #ecfdf5;
    border-left: 4px solid #10b981;
    border-radius: 0 6px 6px 0;
    color: #047857;
    font-style: italic;
}

.wlp-result-content code {
    background: #f0fef4;
    color: #047857;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

/* 分割线（Markdown ---）*/
.wlp-result-content .wlp-divider {
    border: none;
    border-top: 1px dashed #a7f3d0;
    margin: 14px 0;
}

/* ========== 模式框 ========== */
.wlp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    animation: wlpOverlayFadeIn 0.2s ease;
}

.wlp-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    width: 640px;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.wlp-modal-content {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    animation: wlpModalFadeIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wlp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    flex-shrink: 0;
}

.wlp-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.wlp-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wlp-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.wlp-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.wlp-modal-body::-webkit-scrollbar { width: 4px; }
.wlp-modal-body::-webkit-scrollbar-track { background: #f0fef4; }
.wlp-modal-body::-webkit-scrollbar-thumb { background: #a7f3d0; border-radius: 2px; }
.wlp-modal-body::-webkit-scrollbar-thumb:hover { background: #6ee7b7; }

/* 示例卡片 */
.example-card {
    background: #f8fffe;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.example-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #10b981, #059669);
    transform: scaleY(0);
    transition: transform 0.2s;
}

.example-card:hover {
    border-color: #6ee7b7;
    background: #ecfdf5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.example-card:hover::before {
    transform: scaleY(1);
}

.example-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.example-icon {
    font-size: 20px;
}

.example-title {
    font-size: 13px;
    font-weight: 700;
    color: #065f46;
}

.example-tag {
    font-size: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: auto;
}

.example-desc {
    font-size: 11px;
    color: #6ee7b7;
    line-height: 1.5;
}

/* ========== 响应式 ========== */
@media (min-width: 900px) {
    .wlp-main-content { flex-direction: row; }
    .wlp-history-panel { display: flex; }
}

@media (min-width: 640px) and (max-width: 899px) {
    .wlp-history-panel { display: none; }
    .wlp-input-panel { width: 320px; }
    .wlp-main-content { flex-direction: row; }
}

@media (max-width: 639px) {
    .wlp-main-content { flex-direction: column; }
    .wlp-history-panel { display: none; }
    .wlp-input-panel { width: 100%; border-right: none; border-bottom: 1px solid #a7f3d0; max-height: 45vh; }
    .wlp-result-panel { flex: 1; }
    .wlp-modal-body { grid-template-columns: 1fr; }
}

@media print {
    .wlp-toolbar, .wlp-history-panel { display: none !important; }
}

/* ========== 暗黑模式 ========== */
body.dark .wlp-container {
    background: #0d1f18;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark .wlp-toolbar {
    background: linear-gradient(135deg, #065f46 0%, #047857 50%, #064e3b 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

body.dark .toolbar-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(110, 231, 183, 0.2);
}

body.dark .toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

body.dark .toolbar-btn-primary {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: #fff !important;
    border: none;
}

body.dark .toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

body.dark .toolbar-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

body.dark .toolbar-btn-primary:disabled {
    background: linear-gradient(135deg, #7c3b14 0%, #5a2a0a 100%) !important;
    opacity: 0.4;
    box-shadow: none;
}

body.dark .wlp-main-content {
    background: #0d1f18;
}

body.dark .wlp-history-panel {
    background: #102d20;
    border-right-color: #1a4032;
}

body.dark .history-panel-header {
    background: linear-gradient(to bottom, #102d20, #0d2519);
    border-bottom-color: #1a4032;
}

body.dark .history-panel-header h3 {
    color: #6ee7b7;
}

body.dark .history-limit-footer {
    background: #0d2519;
    border-top-color: #1a4032;
    color: #2d5c46;
}

body.dark .history-search {
    border-bottom-color: #1a4032;
}

body.dark .history-search input {
    background: #0d2519;
    border-color: #1a4032;
    color: #6ee7b7;
}

body.dark .history-search input:focus {
    border-color: #10b981;
    background: #102d20;
}

body.dark .history-search input::placeholder {
    color: #2d5c46;
}

body.dark .history-list {
    background: #102d20;
}

body.dark .history-list::-webkit-scrollbar-track { background: #0d1f18; }
body.dark .history-list::-webkit-scrollbar-thumb { background: #1a4032; }
body.dark .history-list::-webkit-scrollbar-thumb:hover { background: #2d6b50; }

body.dark .history-empty {
    color: #2d5c46;
}

body.dark .history-item {
    border-bottom-color: #0d1f18;
}

body.dark .history-item:hover {
    background: #142e22;
}

body.dark .history-item.active {
    background: #1a3d2c;
    border-left-color: #10b981;
}

body.dark .history-item-title {
    color: #6ee7b7;
}

body.dark .history-item-meta {
    color: #2d5c46;
}

body.dark .wlp-input-panel {
    background: #111f18;
    border-right-color: #1a4032;
}

body.dark .panel-header {
    background: linear-gradient(135deg, #102d20 0%, #0d2519 100%);
    border-bottom-color: #1a4032;
}

body.dark .panel-header h3 {
    color: #6ee7b7;
}

body.dark .panel-tip {
    color: #2d6b50;
}

body.dark .wlp-input-body::-webkit-scrollbar-track { background: #0d1f18; }
body.dark .wlp-input-body::-webkit-scrollbar-thumb { background: #1a4032; }
body.dark .wlp-input-body::-webkit-scrollbar-thumb:hover { background: #2d6b50; }

body.dark .form-section {
    background: #0d2519;
    border-color: #1a4032;
}

body.dark .form-section-title {
    color: #34d399;
    border-bottom-color: #1a4032;
}

body.dark .form-group label {
    color: #6ee7b7;
}

body.dark .label-tip {
    color: #2d6b50;
}

body.dark .wlp-input,
body.dark .wlp-select,
body.dark .wlp-textarea {
    background: #102d20;
    border-color: #1a4032;
    color: #d1fae5;
}

body.dark .wlp-select option {
    background: #102d20;
    color: #d1fae5;
}

body.dark .wlp-input:focus,
body.dark .wlp-select:focus,
body.dark .wlp-textarea:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

body.dark .wlp-input::placeholder,
body.dark .wlp-textarea::placeholder {
    color: #2d5c46;
}

body.dark .wlp-textarea-hint {
    color: #2d5c46;
}

body.dark .bmi-preview {
    background: linear-gradient(135deg, #0d2519, #102d20);
    border-color: #1a4032;
    color: #6ee7b7;
}

body.dark .bmi-value {
    color: #34d399;
}

body.dark .bmi-diff {
    color: #2d6b50;
}

body.dark .wlp-result-panel {
    background: #111f18;
}

body.dark .wlp-result-panel .panel-header {
    background: linear-gradient(135deg, #102d20, #0d2519);
    border-bottom-color: #1a4032;
}

body.dark .wlp-result-panel .panel-header h3 {
    color: #6ee7b7;
}

body.dark .result-regen-btn {
    background: #102d20;
    border-color: #1a4032;
    color: #6ee7b7;
}

body.dark .result-regen-btn:hover {
    background: #142e22;
}

body.dark .wlp-result-body {
    background: #111f18;
}

body.dark .wlp-result-body::-webkit-scrollbar-track { background: #0d1f18; }
body.dark .wlp-result-body::-webkit-scrollbar-thumb { background: #1a4032; }
body.dark .wlp-result-body::-webkit-scrollbar-thumb:hover { background: #2d6b50; }

body.dark .result-placeholder {
    color: #2d5c46;
}

body.dark .placeholder-title {
    color: #34d399;
}

body.dark .placeholder-desc {
    color: #2d6b50;
}

body.dark .placeholder-quote {
    background: linear-gradient(135deg, #0d2519, #102d20);
    border-left-color: #10b981;
    color: #6ee7b7;
}

body.dark .loading-text {
    color: #6ee7b7;
}

body.dark .wlp-loading-bar {
    background: #1a4032;
}

body.dark .wlp-result-content {
    color: #d1fae5;
}

body.dark .wlp-result-content h1,
body.dark .wlp-result-content h2 {
    color: #34d399;
    border-bottom-color: #1a4032;
}

body.dark .wlp-result-content h3 {
    color: #6ee7b7;
}

body.dark .wlp-result-content strong {
    color: #a7f3d0;
}

body.dark .wlp-result-content table th {
    background: linear-gradient(135deg, #065f46, #047857);
}

body.dark .wlp-result-content table td {
    border-color: #1a4032;
    color: #d1fae5;
}

body.dark .wlp-result-content tr:nth-child(even) td {
    background: #102d20;
}

body.dark .wlp-result-content blockquote {
    background: #0d2519;
    border-left-color: #10b981;
    color: #6ee7b7;
}

body.dark .wlp-result-content code {
    background: #0d2519;
    color: #6ee7b7;
}

body.dark .wlp-result-content .wlp-divider {
    border-top-color: #1a4032;
}

body.dark .wlp-modal-content {
    background: #111f18;
}

body.dark .wlp-modal-header {
    background: linear-gradient(135deg, #065f46, #047857);
}

body.dark .wlp-modal-body {
    background: #111f18;
}

body.dark .wlp-modal-body::-webkit-scrollbar-track { background: #0d1f18; }
body.dark .wlp-modal-body::-webkit-scrollbar-thumb { background: #1a4032; }
body.dark .wlp-modal-body::-webkit-scrollbar-thumb:hover { background: #2d6b50; }

body.dark .example-card {
    background: #0d2519;
    border-color: #1a4032;
}

body.dark .example-card:hover {
    background: #102d20;
    border-color: #2d6b50;
}

body.dark .example-title {
    color: #6ee7b7;
}

body.dark .example-desc {
    color: #2d6b50;
}

body.dark .history-clear-btn {
    background: #2d1515;
    color: #f87171;
}

body.dark .history-clear-btn:hover {
    background: #3d1a1a;
}

body.dark .result-tag {
    background: linear-gradient(135deg, #059669, #047857);
}

body.dark .result-time {
    color: #2d5c46;
}

/* ========== 模态框进场动效 ========== */
@keyframes wlpModalFadeIn {
    from { opacity: 0; transform: scale(0.94) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes wlpOverlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ========== 错误提示块 ========== */
.wlp-error-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    min-height: 200px;
}

.wlp-error-icon {
    font-size: 40px;
    margin-bottom: 14px;
    line-height: 1;
}

.wlp-error-msg {
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 18px;
    max-width: 280px;
    line-height: 1.6;
}

.wlp-error-retry {
    padding: 8px 22px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.wlp-error-retry:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.wlp-error-retry:active {
    transform: translateY(0);
}

body.dark .wlp-error-msg {
    color: #f87171;
}

body.dark .wlp-error-retry {
    background: linear-gradient(135deg, #065f46, #047857);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark .wlp-error-retry:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
