/* ========== 生活窍门 - 主容器 ========== */
.lh-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #F1F8E9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(46, 125, 50, 0.12);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.lh-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========== 顶部工具栏 ========== */
.lh-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #388E3C 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(27, 94, 32, 0.45);
    flex-shrink: 0;
}

.lh-toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.lh-toolbar-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    margin-right: 4px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lh-toolbar-btn {
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    transition: all 0.2s;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.lh-toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.lh-toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.lh-toolbar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.lh-btn-primary {
    background: rgba(255, 255, 255, 0.95);
    color: #2E7D32;
    border-color: transparent;
    font-weight: 600;
}

.lh-btn-primary:hover:not(:disabled) {
    background: #fff;
    color: #1B5E20;
}

/* 生成中按钮的shimmer动画，使用独立选择器避免被body.dark高优先级样式覆盖 */
.lh-btn-primary.lh-btn-loading {
    background: linear-gradient(90deg, rgba(255,255,255,0.85) 25%, rgba(255,255,255,1) 50%, rgba(255,255,255,0.85) 75%);
    background-size: 200% 100%;
    animation: lhShimmer 1.5s infinite;
}

@keyframes lhShimmer {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.lh-btn-cancel {
    background: rgba(198, 40, 40, 0.85);
    border-color: rgba(198, 40, 40, 0.5);
}

.lh-btn-cancel:hover {
    background: rgba(198, 40, 40, 1);
}

/* ========== 主内容区（三栏） ========== */
.lh-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #F1F8E9;
}

/* ========== 左栏：历史记录 ========== */
.lh-history-panel {
    width: 200px;
    background: #E8F5E9;
    border-right: 1px solid #C8E6C9;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.lh-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #F1F8E9, #DCEDC8);
    border-bottom: 1px solid #C8E6C9;
    flex-shrink: 0;
}

.lh-history-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #2E7D32;
}

.lh-history-count {
    font-size: 11px;
    color: #558B2F;
    margin-left: 4px;
    font-weight: 400;
}

.lh-history-clear-btn {
    background: #FFF3E0;
    border: 1px solid #FFCC80;
    color: #E65100;
    font-size: 11px;
    cursor: pointer;
    padding: 3px 7px;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
}

.lh-history-clear-btn:hover {
    background: #FFE0B2;
    border-color: #E65100;
}

.lh-history-clear-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.lh-history-search {
    padding: 8px 10px;
    border-bottom: 1px solid #C8E6C9;
    flex-shrink: 0;
}

.lh-history-search input {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid #C8E6C9;
    border-radius: 5px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #F1F8E9;
    color: #1B5E20;
}

.lh-history-search input:focus {
    border-color: #388E3C;
    box-shadow: 0 0 0 2px rgba(56, 142, 60, 0.15);
}

.lh-history-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 6px;
}

.lh-history-empty {
    text-align: center;
    color: #81C784;
    font-size: 12px;
    padding: 24px 12px;
    line-height: 1.8;
}

.lh-history-item {
    padding: 9px 10px;
    margin: 3px 0;
    background: #F9FBF2;
    border: 1px solid #C8E6C9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: lhFadeInItem 0.2s ease;
}

@keyframes lhFadeInItem {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lh-history-item:hover {
    background: #DCEDC8;
    border-color: #AED581;
    transform: translateX(2px);
}

.lh-history-item.active {
    background: #C5E1A5;
    border-color: #388E3C;
    box-shadow: 0 1px 4px rgba(56, 142, 60, 0.2);
}

.lh-history-item-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: #FFEBEE;
    color: #C62828;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: all 0.2s;
    cursor: pointer;
    line-height: 1;
}

.lh-history-item:hover .lh-history-item-delete {
    opacity: 1;
}

.lh-history-item-delete:hover {
    background: #C62828;
    color: white;
}

.lh-history-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #1B5E20;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
    padding-right: 18px;
}

.lh-history-item-meta {
    font-size: 10px;
    color: #558B2F;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.lh-history-item-badge {
    background: #DCEDC8;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    color: #33691E;
}

.lh-history-item-time {
    font-size: 10px;
    color: #81C784;
    margin-top: 3px;
}

/* ========== 中栏：输入面板 ========== */
.lh-input-panel {
    width: 320px;
    min-width: 260px;
    background: #ffffff;
    border-right: 1px solid #C8E6C9;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.lh-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #F1F8E9, #DCEDC8);
    border-bottom: 1px solid #C8E6C9;
    flex-shrink: 0;
}

.lh-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #2E7D32;
}

.lh-panel-tip {
    font-size: 11px;
    color: #81C784;
}

.lh-input-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

/* 表单组 */
.lh-form-group {
    margin-bottom: 14px;
}

.lh-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.lh-form-half {
    flex: 1;
    margin-bottom: 0;
}

.lh-form-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #2E7D32;
    margin-bottom: 7px;
}

.lh-label-icon {
    font-size: 14px;
}

.lh-required {
    color: #C62828;
    font-size: 13px;
}

.lh-optional {
    color: #81C784;
    font-size: 11px;
    font-weight: 400;
}

/* 文本域 */
.lh-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #C8E6C9;
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #FAFFFE;
    color: #1B5E20;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.6;
}

.lh-textarea:focus {
    border-color: #388E3C;
    box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.12);
    background: #fff;
}

.lh-textarea::placeholder {
    color: #A5D6A7;
    font-size: 12px;
}

/* 抖动动画（模块前缀隔离，避免全局shake类冲突） */
@keyframes lhShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.lh-textarea.lh-shake {
    animation: lhShake 0.4s ease;
    border-color: #C62828 !important;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15) !important;
}

.lh-char-counter {
    text-align: right;
    font-size: 11px;
    color: #A5D6A7;
    margin-top: 4px;
    transition: color 0.2s;
}

.lh-count-warn  { color: #E65100; }
.lh-count-danger { color: #C62828; font-weight: 600; }

/* 文本输入 */
.lh-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #C8E6C9;
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #FAFFFE;
    color: #1B5E20;
    font-family: inherit;
}

.lh-input:focus {
    border-color: #388E3C;
    box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.12);
    background: #fff;
}

.lh-input::placeholder {
    color: #A5D6A7;
    font-size: 12px;
}

/* 下拉选择 */
.lh-select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #C8E6C9;
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    background: #FAFFFE;
    color: #1B5E20;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23388E3C' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    box-sizing: border-box;
}

.lh-select:focus {
    border-color: #388E3C;
    box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.12);
}

/* 条数选项 */
.lh-count-options {
    display: flex;
    gap: 6px;
}

.lh-count-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 4px;
    border: 1.5px solid #C8E6C9;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #558B2F;
    background: #FAFFFE;
    transition: all 0.2s;
}

.lh-count-option:hover {
    border-color: #388E3C;
    background: #E8F5E9;
    color: #2E7D32;
}

.lh-count-option.selected {
    border-color: #2E7D32;
    background: #C8E6C9;
    color: #1B5E20;
    box-shadow: 0 1px 5px rgba(46, 125, 50, 0.2);
}

/* 提示框 */
.lh-tips-box {
    background: linear-gradient(135deg, #F1F8E9, #E8F5E9);
    border: 1px solid #C8E6C9;
    border-left: 3px solid #4CAF50;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12px;
    color: #33691E;
}

.lh-tips-box p {
    margin: 0 0 8px;
    font-weight: 600;
    color: #2E7D32;
}

.lh-tips-box ul {
    margin: 0;
    padding-left: 16px;
    line-height: 2;
}

.lh-tips-box kbd {
    background: #DCEDC8;
    border: 1px solid #AED581;
    border-radius: 3px;
    padding: 0 5px;
    font-size: 11px;
    color: #33691E;
    font-family: inherit;
}

/* ========== 右栏：生成结果 ========== */
.lh-result-panel {
    flex: 1;
    min-width: 280px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lh-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #F1F8E9, #DCEDC8);
    border-bottom: 1px solid #C8E6C9;
    flex-shrink: 0;
}

.lh-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #2E7D32;
}

.lh-result-header-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.lh-category-badge {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 500;
    background: #DCEDC8;
    color: #33691E;
    border: 1px solid #AED581;
}

.lh-rewrite-btn {
    padding: 4px 10px;
    background: #F1F8E9;
    border: 1px solid #AED581;
    border-radius: 12px;
    color: #2E7D32;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.lh-rewrite-btn:hover {
    background: #DCEDC8;
    border-color: #388E3C;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(56, 142, 60, 0.2);
}

/* 结果主体（必须设置flex布局确保子元素flex:1正确生效） */
.lh-result-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* 占位提示 */
.lh-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #A5D6A7;
    min-height: 200px;
}

.lh-placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: lhBulbPulse 3s ease-in-out infinite;
    line-height: 1;
}

@keyframes lhBulbPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(255, 193, 7, 0)); }
    50%       { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.5)); }
}

.lh-placeholder-title {
    font-size: 16px;
    font-weight: 600;
    color: #81C784;
    margin: 0 0 10px;
}

.lh-placeholder-desc {
    font-size: 13px;
    color: #A5D6A7;
    margin: 3px 0;
}

/* 加载动画 */
.lh-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.lh-loading-dots {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.lh-loading-dots span {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #388E3C, #4CAF50);
    animation: lhDotBounce 1.4s ease-in-out infinite;
}

.lh-loading-dots span:nth-child(1) { animation-delay: 0s; }
.lh-loading-dots span:nth-child(2) { animation-delay: 0.18s; }
.lh-loading-dots span:nth-child(3) { animation-delay: 0.36s; }
.lh-loading-dots span:nth-child(4) { animation-delay: 0.54s; }
.lh-loading-dots span:nth-child(5) { animation-delay: 0.72s; }

@keyframes lhDotBounce {
    0%, 100% { transform: translateY(0) scale(0.8); opacity: 0.5; }
    50%       { transform: translateY(-10px) scale(1.1); opacity: 1; }
}

.lh-loading-text {
    font-size: 14px;
    color: #388E3C;
    font-weight: 500;
    margin: 0;
}

/* 结果内容区 */
.lh-result-content {
    flex: 1;
    min-height: 0;
    padding: 16px;
    overflow-y: auto;
    animation: lhResultFadeIn 0.4s ease;
    background: #FAFFFE;
}

@keyframes lhResultFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== 窍门卡片样式（AI生成HTML内容） ========== */
.lh-result-content .lh-result {
    display: flex;
    flex-direction: column;
    gap: 14px;
    counter-reset: hack-counter;
}

.lh-result-content .lh-hack-card {
    position: relative;
    counter-increment: hack-counter;
    background: #ffffff;
    border: 1px solid #C8E6C9;
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(56, 142, 60, 0.06);
    transition: all 0.2s;
    animation: lhCardIn 0.3s ease;
}

.lh-result-content .lh-hack-card::before {
    content: counter(hack-counter);
    position: absolute;
    top: 13px;
    right: 14px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #4CAF50, #81C784);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 22px;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.25);
}

@keyframes lhCardIn {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}

.lh-result-content .lh-hack-card:hover {
    box-shadow: 0 4px 14px rgba(56, 142, 60, 0.12);
    border-left-color: #2E7D32;
    transform: translateX(2px);
}

.lh-result-content .lh-hack-title {
    font-size: 15px;
    font-weight: 700;
    color: #1B5E20;
    margin-bottom: 12px;
    padding-bottom: 8px;
    padding-right: 36px;
    border-bottom: 1px dashed #C8E6C9;
}

.lh-result-content .lh-hack-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.lh-result-content .lh-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.lh-result-content .lh-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.lh-result-content .lh-step-text {
    font-size: 13px;
    color: #2E7D32;
    line-height: 1.6;
}

.lh-result-content .lh-materials {
    background: #FFF8E1;
    border: 1px solid #FFE082;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: #E65100;
    margin-bottom: 10px;
}

.lh-result-content .lh-materials-label {
    font-weight: 600;
    color: #BF360C;
}

.lh-result-content .lh-tip {
    background: #E8F5E9;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: #2E7D32;
    border-left: 3px solid #66BB6A;
    font-style: italic;
}

/* 错误提示 */
.lh-result-error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #C62828;
    min-height: 200px;
    font-size: 14px;
    gap: 12px;
}

.lh-result-error::before {
    content: '⚠️';
    font-size: 36px;
}

.lh-result-error-retry {
    margin-top: 6px;
    padding: 8px 22px;
    background: linear-gradient(135deg, #2E7D32, #558B2F);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.lh-result-error-retry:hover {
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.3);
}

/* ========== 示例模态框 ========== */
.lh-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(27, 94, 32, 0.35);
    z-index: 100001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
    backdrop-filter: blur(2px);
}

.lh-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.lh-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    background: #ffffff;
    border-radius: 12px;
    z-index: 100002;
    width: 90%;
    max-width: 680px;
    max-height: 78vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(27, 94, 32, 0.22);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lh-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.lh-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
    color: white;
    flex-shrink: 0;
}

.lh-modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.lh-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lh-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

.lh-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.lh-example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.lh-example-card {
    padding: 12px 14px;
    border: 1.5px solid #C8E6C9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #F9FFFE;
}

.lh-example-card:hover {
    border-color: #388E3C;
    background: #E8F5E9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 142, 60, 0.15);
}

.lh-example-card-label {
    font-size: 13px;
    font-weight: 700;
    color: #1B5E20;
    margin-bottom: 5px;
}

.lh-example-card-scene {
    font-size: 11px;
    color: #558B2F;
    line-height: 1.5;
    margin-bottom: 6px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.lh-example-card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.lh-example-card-tag {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 500;
    background: #DCEDC8;
    color: #33691E;
}

.example-loading {
    text-align: center;
    padding: 30px;
    color: #81C784;
    font-size: 14px;
}

.lh-example-empty {
    text-align: center;
    color: #81C784;
    padding: 20px;
    font-size: 13px;
    margin: 0;
}

/* ========== 浮动提示 ========== */
.lh-toast {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(27, 94, 32, 0.92);
    color: #DCEDC8;
    padding: 9px 20px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 200000;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* ========== 暗黑模式 ========== */
body.dark .lh-container {
    background: #1A2B1A;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

body.dark .lh-toolbar {
    background: linear-gradient(135deg, #0D1F0D 0%, #1B3A1B 50%, #22472A 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

body.dark .lh-main-content {
    background: #1A2B1A;
}

body.dark .lh-history-panel {
    background: #1A2B1A;
    border-right-color: #2D4A2D;
}

body.dark .lh-history-header {
    background: linear-gradient(to bottom, #1E331E, #253D25);
    border-bottom-color: #2D4A2D;
}

body.dark .lh-history-header h3 {
    color: #81C784;
}

body.dark .lh-history-clear-btn {
    background: #2D2010;
    border-color: #5D4037;
    color: #FFAB40;
}

body.dark .lh-history-clear-btn:hover {
    background: #3E2A15;
    border-color: #FFAB40;
}

body.dark .lh-history-clear-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

body.dark .lh-history-search input {
    background: #1A2B1A;
    border-color: #2D4A2D;
    color: #A5D6A7;
}

body.dark .lh-history-search input:focus {
    border-color: #66BB6A;
    box-shadow: 0 0 0 2px rgba(102, 187, 106, 0.2);
}

body.dark .lh-history-search input::placeholder {
    color: #3A6A3A;
}

body.dark .lh-history-empty {
    color: #4A7A4A;
}

body.dark .lh-history-item {
    background: #1E331E;
    border-color: #2D4A2D;
}

body.dark .lh-history-item:hover {
    background: #253D25;
    border-color: #4CAF50;
}

body.dark .lh-history-item.active {
    background: #2A4A2A;
    border-color: #66BB6A;
}

body.dark .lh-history-item-title {
    color: #A5D6A7;
}

body.dark .lh-history-item-badge {
    background: #253D25;
    color: #81C784;
}

body.dark .lh-history-item-time {
    color: #4A7A4A;
}

body.dark .lh-history-item-delete {
    background: #3A1A1A;
    color: #EF9A9A;
}

body.dark .lh-history-item-delete:hover {
    background: #C62828;
    color: #fff;
}

body.dark .lh-input-panel {
    background: #1E301E;
    border-right-color: #2D4A2D;
}

body.dark .lh-panel-header {
    background: linear-gradient(to bottom, #1E331E, #253D25);
    border-bottom-color: #2D4A2D;
}

body.dark .lh-panel-header h3 {
    color: #81C784;
}

body.dark .lh-panel-tip {
    color: #4A7A4A;
}

body.dark .lh-form-label {
    color: #81C784;
}

body.dark .lh-textarea,
body.dark .lh-input,
body.dark .lh-select {
    background: #1A2B1A;
    border-color: #2D4A2D;
    color: #C8E6C9;
}

body.dark .lh-textarea:focus,
body.dark .lh-input:focus,
body.dark .lh-select:focus {
    border-color: #66BB6A;
    box-shadow: 0 0 0 3px rgba(102, 187, 106, 0.2);
}

body.dark .lh-textarea::placeholder,
body.dark .lh-input::placeholder {
    color: #3A6A3A;
}

body.dark .lh-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2366BB6A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

body.dark .lh-count-option {
    background: #1A2B1A;
    border-color: #2D4A2D;
    color: #81C784;
}

body.dark .lh-count-option:hover {
    background: #253D25;
    border-color: #4CAF50;
    color: #A5D6A7;
}

body.dark .lh-count-option.selected {
    background: #2A4A2A;
    border-color: #66BB6A;
    color: #C8E6C9;
}

body.dark .lh-char-counter {
    color: #3A6A3A;
}

body.dark .lh-count-warn  { color: #FFAB40; }
body.dark .lh-count-danger { color: #EF9A9A; font-weight: 600; }

body.dark .lh-tips-box {
    background: linear-gradient(135deg, #1A2B1A, #1E301E);
    border-color: #2D4A2D;
    border-left-color: #4CAF50;
    color: #81C784;
}

body.dark .lh-tips-box p {
    color: #A5D6A7;
}

body.dark .lh-tips-box kbd {
    background: #253D25;
    border-color: #2D4A2D;
    color: #81C784;
}

body.dark .lh-result-panel {
    background: #1E301E;
}

body.dark .lh-result-header {
    background: linear-gradient(to bottom, #1E331E, #253D25);
    border-bottom-color: #2D4A2D;
}

body.dark .lh-result-header h3 {
    color: #81C784;
}

body.dark .lh-category-badge {
    background: #253D25;
    color: #81C784;
    border-color: #2D4A2D;
}

body.dark .lh-rewrite-btn {
    background: #1E301E;
    border-color: #2D4A2D;
    color: #81C784;
}

body.dark .lh-rewrite-btn:hover {
    background: #253D25;
    border-color: #66BB6A;
}

body.dark .lh-result-content {
    background: #1A2B1A;
}

body.dark .lh-result-content .lh-hack-card {
    background: #1E301E;
    border-color: #2D4A2D;
    border-left-color: #4CAF50;
}

body.dark .lh-result-content .lh-hack-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    border-left-color: #66BB6A;
}

body.dark .lh-result-content .lh-hack-card::before {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark .lh-result-content .lh-hack-title {
    color: #A5D6A7;
    border-bottom-color: #2D4A2D;
}

body.dark .lh-result-content .lh-step-text {
    color: #81C784;
}

body.dark .lh-result-content .lh-materials {
    background: #2A2010;
    border-color: #5D4037;
    color: #FFCC80;
}

body.dark .lh-result-content .lh-materials-label {
    color: #FFAB40;
}

body.dark .lh-result-content .lh-tip {
    background: #1A2B1A;
    border-left-color: #388E3C;
    color: #81C784;
}

body.dark .lh-placeholder-title {
    color: #4A7A4A;
}

body.dark .lh-placeholder-desc {
    color: #3A6A3A;
}

body.dark .lh-loading-text {
    color: #66BB6A;
}

body.dark .lh-loading-dots span {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
}

body.dark .lh-result-error {
    color: #EF9A9A;
}

/* 暗黑模式按钮禁用态 */
body.dark .lh-toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 暗黑模式生成按钮 */
body.dark .lh-btn-primary {
    background: rgba(255, 255, 255, 0.12);
    color: #A5D6A7;
    border-color: rgba(102, 187, 106, 0.3);
}

body.dark .lh-btn-primary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    color: #C8E6C9;
}

/* 暗黑模式下shimmer动画，使用独立选择器（避免被body.dark .lh-btn-primary覆盖） */
body.dark .lh-btn-primary.lh-btn-loading {
    background: linear-gradient(90deg, rgba(102,187,106,0.15) 25%, rgba(102,187,106,0.3) 50%, rgba(102,187,106,0.15) 75%);
    background-size: 200% 100%;
    animation: lhShimmer 1.5s infinite;
    color: #C8E6C9;
}

body.dark .lh-modal {
    background: #1E301E;
}

body.dark .lh-modal-header {
    background: linear-gradient(135deg, #0D1F0D, #1B3A1B);
}

body.dark .lh-modal-body {
    background: #1A2B1A;
}

body.dark .lh-example-card {
    background: #1E301E;
    border-color: #2D4A2D;
}

body.dark .lh-example-card:hover {
    background: #253D25;
    border-color: #66BB6A;
}

body.dark .lh-example-card-label {
    color: #A5D6A7;
}

body.dark .lh-example-card-scene {
    color: #4A7A4A;
}

body.dark .lh-example-card-tag {
    background: #253D25;
    color: #81C784;
}

body.dark .lh-result-error-retry {
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
}

/* ========== 响应式布局 ========== */
@media (max-width: 899px) {
    .lh-history-panel {
        display: none;
    }
}

@media (max-width: 639px) {
    .lh-main-content {
        flex-direction: column;
    }

    .lh-input-panel {
        width: 100%;
        min-width: unset;
        max-height: 40%;
        border-right: none;
        border-bottom: 1px solid #C8E6C9;
    }

    .lh-result-panel {
        flex: 1;
    }

    .lh-form-row {
        flex-direction: column;
    }

    .lh-form-half {
        flex: unset;
    }

    .lh-toolbar {
        gap: 4px;
        padding: 6px 10px;
    }

    .lh-toolbar-btn {
        padding: 5px 8px;
        font-size: 11px;
    }

    .lh-toolbar-title {
        display: none;
    }

    .lh-count-options {
        gap: 4px;
    }

    body.dark .lh-input-panel {
        border-bottom-color: #2D4A2D;
    }
}

/* ========== 自定义滚动条 ========== */
.lh-history-list::-webkit-scrollbar,
.lh-input-body::-webkit-scrollbar,
.lh-result-content::-webkit-scrollbar,
.lh-modal-body::-webkit-scrollbar { width: 5px; }

.lh-history-list::-webkit-scrollbar-track,
.lh-input-body::-webkit-scrollbar-track,
.lh-result-content::-webkit-scrollbar-track,
.lh-modal-body::-webkit-scrollbar-track { background: transparent; }

.lh-history-list::-webkit-scrollbar-thumb,
.lh-input-body::-webkit-scrollbar-thumb,
.lh-result-content::-webkit-scrollbar-thumb,
.lh-modal-body::-webkit-scrollbar-thumb {
    background: #C8E6C9;
    border-radius: 3px;
}

.lh-history-list::-webkit-scrollbar-thumb:hover,
.lh-input-body::-webkit-scrollbar-thumb:hover,
.lh-result-content::-webkit-scrollbar-thumb:hover,
.lh-modal-body::-webkit-scrollbar-thumb:hover { background: #81C784; }

body.dark .lh-history-list::-webkit-scrollbar-thumb,
body.dark .lh-input-body::-webkit-scrollbar-thumb,
body.dark .lh-result-content::-webkit-scrollbar-thumb,
body.dark .lh-modal-body::-webkit-scrollbar-thumb { background: #2D4A2D; }

body.dark .lh-history-list::-webkit-scrollbar-thumb:hover,
body.dark .lh-input-body::-webkit-scrollbar-thumb:hover,
body.dark .lh-result-content::-webkit-scrollbar-thumb:hover,
body.dark .lh-modal-body::-webkit-scrollbar-thumb:hover { background: #4CAF50; }
