/* =============================================
   鼓励自己 - self_encouragement.css
   温暖日出配色主题，三栏布局
   参考 feedback_generation / svg_editor 风格
   ============================================= */

/* ========== 主容器 ========== */
.se-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #fff9f5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(253, 160, 133, 0.15);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.se-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;
}

/* ========== 顶部工具栏 ========== */
.se-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 50%, #e96c8f 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(246, 211, 101, 0.45);
    flex-shrink: 0;
}

.se-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.12);
}

.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: #c05000;
    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, #e96c8f 0%, #c0416a 100%);
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(233, 108, 143, 0.45);
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #f07ca0 0%, #d05178 100%);
    box-shadow: 0 4px 14px rgba(233, 108, 143, 0.55);
    color: #fff !important;
}

/* ========== 表单校验抖动 ========== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 50%, 90% { transform: translateX(-5px); }
    30%, 70% { transform: translateX(5px); }
}

.se-input.shake,
.se-select.shake,
.se-textarea.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;
}

/* ========== 主内容区：三栏 ========== */
.se-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #fff9f5;
}

/* ========== 左栏：历史记录 ========== */
.se-history-panel {
    width: 210px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #fde8d8;
    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, #fff9f5 0%, #fff3ec 100%);
    border-bottom: 1px solid #fde8d8;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #7c3010;
}

.history-count {
    font-size: 11px;
    color: #fda085;
    font-weight: 400;
}

.history-limit-footer {
    flex-shrink: 0;
    padding: 5px 8px;
    text-align: center;
    font-size: 10px;
    color: #c9b9ae;
    border-top: 1px solid #fde8d8;
    background: #fff9f5;
    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 #fde8d8;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #fde8d8;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #374151;
}

.history-search input:focus {
    border-color: #fda085;
    box-shadow: 0 0 0 2px rgba(253, 160, 133, 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: #fff3ec; }
.history-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.history-list::-webkit-scrollbar-thumb:hover { background: rgba(196, 26, 26, 0.4); }

.history-empty {
    text-align: center;
    color: #fda085;
    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: #fff9f5;
    border: 1px solid #fde8d8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: hiFadeIn 0.2s ease;
}

.history-item:hover {
    background: #fff3ec;
    border-color: #fda085;
    transform: translateX(2px);
}

.history-item.active {
    background: #fff0e6;
    border-color: #f6d365;
    box-shadow: 0 1px 3px rgba(246, 211, 101, 0.35);
}

.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-mood {
    font-size: 12px;
    font-weight: 600;
    color: #c05000;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 20px;
}

.history-item-preview {
    font-size: 11px;
    color: #9ca3af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}

.history-item-time {
    font-size: 10px;
    color: #fda085;
}

/* ========== 中栏：表单输入 ========== */
.se-input-panel {
    width: 360px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #fde8d8;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========== 右栏：结果展示 ========== */
.se-result-panel {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 300px;
}

/* ========== 通用面板头部 ========== */
.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #fff9f5 0%, #fff3ec 100%);
    border-bottom: 1px solid #fde8d8;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #7c3010;
    white-space: nowrap;
}

.panel-tip {
    font-size: 11px;
    color: #fda085;
    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-mood-tag {
    font-size: 11px;
    color: #c05000;
    background: #fff0e6;
    padding: 2px 10px;
    border-radius: 10px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
}

.result-time {
    font-size: 11px;
    color: #fda085;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 结果区头部「🔁 换一批」按鈕（memory: bda81cb8） */
.result-regen-btn {
    flex-shrink: 0;
    padding: 3px 9px;
    background: rgba(246, 211, 101, 0.15);
    border: 1px solid rgba(246, 211, 101, 0.45);
    border-radius: 4px;
    color: #c05000;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.6;
}

.result-regen-btn:hover {
    background: rgba(246, 211, 101, 0.3);
    border-color: #f6c325;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(246, 211, 101, 0.3);
}

.result-regen-btn:active {
    transform: translateY(0);
    box-shadow: none;
}
.se-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.se-input-body::-webkit-scrollbar { width: 4px; }
.se-input-body::-webkit-scrollbar-track { background: transparent; }
.se-input-body:hover::-webkit-scrollbar-track { background: #fff3ec; }
.se-input-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.se-input-body::-webkit-scrollbar-thumb:hover { background: rgba(196, 26, 26, 0.4); }

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #7c3010;
    margin-bottom: 5px;
}

.required-mark {
    color: #ef4444;
    margin-left: 2px;
}

.label-tip {
    font-size: 11px;
    font-weight: 400;
    color: #9ca3af;
}

.se-input,
.se-select,
.se-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #fde8d8;
    border-radius: 5px;
    font-size: 13px;
    color: #374151;
    background: #fff9f5;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.se-input:focus,
.se-select:focus,
.se-textarea:focus {
    border-color: #fda085;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(253, 160, 133, 0.15);
}

.se-input:hover:not(:focus),
.se-select:hover:not(:focus),
.se-textarea:hover:not(:focus) {
    border-color: #fdcbac;
    background: #fff;
}

.se-input::placeholder,
.se-textarea::placeholder {
    color: #c9b9ae;
}

.se-textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.65;
}

.se-textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.se-textarea-hint {
    font-size: 11px;
    color: #c9b9ae;
    user-select: none;
}

#charCount {
    font-size: 11px;
    color: #c9b9ae;
    transition: color 0.2s;
}

#charCount.warn   { color: #f97316; font-weight: 600; }
#charCount.danger { color: #ef4444; font-weight: 600; }

.se-textarea::-webkit-scrollbar { width: 4px; }
.se-textarea::-webkit-scrollbar-track { background: transparent; }
.se-textarea:hover::-webkit-scrollbar-track { background: #fff3ec; }
.se-textarea::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.se-textarea::-webkit-scrollbar-thumb:hover { background: rgba(196, 26, 26, 0.4); }

.se-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fda085'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-group-half {
    flex: 1;
    min-width: 0;
}

/* ========== 结果区域 ========== */
.se-result-body {
    flex: 1;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.se-result-body::-webkit-scrollbar { width: 4px; }
.se-result-body::-webkit-scrollbar-track { background: transparent; }
.se-result-body:hover::-webkit-scrollbar-track { background: #fff3ec; }
.se-result-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.se-result-body::-webkit-scrollbar-thumb:hover { background: rgba(196, 26, 26, 0.4); }

/* 占位提示 */
.result-placeholder {
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    text-align: center;
    user-select: none;
}

/* 占位图标浮动动画（memory: 86268e7b）— 3s周期、上下偏移 ·8px */
@keyframes tdhFloat {
    0%, 100% { transform: translateY(0);    opacity: 0.85; }
    50%       { transform: translateY(-8px); opacity: 1;    }
}

.placeholder-icon {
    font-size: 54px;
    margin-bottom: 18px;
    animation: tdhFloat 3s ease-in-out infinite;
}

.placeholder-title {
    font-size: 16px;
    font-weight: 700;
    color: #c05000;
    margin: 0 0 10px;
}

.placeholder-desc {
    font-size: 13px;
    color: #fda085;
    margin: 4px 0;
    line-height: 1.65;
}

.placeholder-quote {
    margin-top: 26px;
    font-size: 13px;
    font-style: italic;
    color: #e96c8f;
    padding: 10px 20px;
    border-left: 3px solid #f6d365;
    text-align: left;
    background: linear-gradient(135deg, rgba(246, 211, 101, 0.08) 0%, rgba(233, 108, 143, 0.05) 100%);
    border-radius: 0 6px 6px 0;
    transition: border-left-color 0.3s;
    max-width: 340px;
}

/* 加载动画 —— 心形浮动 */
.result-loading {
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
}

@keyframes heartFloat {
    0%, 100% { transform: translateY(0)  scale(0.85); opacity: 0.6; }
    50%       { transform: translateY(-9px) scale(1.12); opacity: 1;   }
}

.loading-hearts {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 24px;
}

.loading-hearts span {
    animation: heartFloat 1.3s ease-in-out infinite;
}

.loading-hearts span:nth-child(2) { animation-delay: 0.22s; }
.loading-hearts span:nth-child(3) { animation-delay: 0.44s; }

.loading-text {
    font-size: 13px;
    color: #fda085;
    font-weight: 500;
    margin: 0;
}

/* 结果内容 */
@keyframes resultFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-content {
    flex: 1;
    min-height: 0;
    padding: 28px 32px;
    font-size: 15px;
    line-height: 2.0;
    color: #374151;
    word-break: break-word;
    overflow-wrap: break-word;
    animation: resultFadeIn 0.4s ease;
    border-left: 4px solid #D4AF37;
    background: linear-gradient(to bottom, #fffdf8 0%, #fff 100%);
    transition: border-left-color 0.3s;
}

.result-content.result-content--error {
    border-left: none;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #fff;
}

.result-error-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    flex: 1;
    min-height: 200px;
}

/* 段落化渲染：配合 JS formatResultContent，替代 pre-wrap */
.result-content p {
    margin: 0 0 1.2em;
    line-height: 2.0;
}

.result-content p:last-child {
    margin-bottom: 0;
}

/* 鼓励风格左边框色规范（memory: db7ba3b3） */
.result-content[data-style="温暖"] { border-left-color: #D4AF37; }
.result-content[data-style="激励"] { border-left-color: #E74C3C; }
.result-content[data-style="哲理"] { border-left-color: #3498DB; }
.result-content[data-style="幽默"] { border-left-color: #2ECC71; }

.result-error-icon {
    font-size: 40px;
    margin-bottom: 16px;
    color: #f87171;
    line-height: 1;
}

.result-error-title {
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
    margin: 0 0 8px;
}

.result-error-hint {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

/* 内联重试按钮 */
.se-retry-btn {
    margin-top: 18px;
    padding: 9px 24px;
    background: linear-gradient(135deg, #fda085 0%, #e96c8f 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(233, 108, 143, 0.3);
}

.se-retry-btn:hover {
    background: linear-gradient(135deg, #f07ca0 0%, #d05178 100%);
    box-shadow: 0 4px 14px rgba(233, 108, 143, 0.45);
    transform: translateY(-1px);
}

.se-retry-btn:active {
    transform: translateY(0);
}

/* 禁用态表单控件视觉反馈 */
.se-input:disabled,
.se-select:disabled,
.se-textarea:disabled {
    background: #f5f0ee !important;
    color: #b0a09a !important;
    cursor: not-allowed !important;
    opacity: 0.7;
    border-color: #f0e4dc !important;
    box-shadow: none !important;
}

.se-input:disabled::placeholder,
.se-textarea:disabled::placeholder {
    color: #c9b9ae;
}

.se-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100000;
    backdrop-filter: blur(2px);
}

.se-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    width: 90%;
    max-width: 740px;
    max-height: 82vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(233, 108, 143, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: seModalSlideIn 0.22s ease-out;
}

@keyframes seModalSlideIn {
    from { opacity: 0; transform: translate(-50%, calc(-50% - 16px)); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

.se-modal-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.se-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #fde8d8;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 50%, #e96c8f 100%);
    color: #fff;
}

.se-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.se-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.se-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.se-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    align-content: start;
}

.se-modal-body::-webkit-scrollbar { width: 4px; }
.se-modal-body::-webkit-scrollbar-track { background: transparent; }
.se-modal-body:hover::-webkit-scrollbar-track { background: #fff3ec; }
.se-modal-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.se-modal-body::-webkit-scrollbar-thumb:hover { background: rgba(196, 26, 26, 0.4); }

/* ========== 示例卡片 ========== */
.example-card {
    border: 1px solid #fde8d8;
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff9f5;
    position: relative;
    overflow: hidden;
}

.example-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: linear-gradient(to bottom, #f6d365 0%, #e96c8f 100%);
    opacity: 0;
    transition: opacity 0.2s;
}

.example-card:hover {
    border-color: #fda085;
    background: #fff3ec;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(253, 160, 133, 0.2);
}

.example-card:hover::before {
    opacity: 1;
}

.example-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #7c3010;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.example-card-badge {
    font-size: 10px;
    font-weight: 500;
    background: #fff0e6;
    color: #c05000;
    padding: 1px 6px;
    border-radius: 10px;
    white-space: nowrap;
}

.example-card-desc {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.55;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.example-card-import {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #c05000;
    background: #fff0e6;
    border: none;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.example-card-import:hover {
    background: #fda085;
    color: #fff;
}

/* ========== 响应式布局 ========== */
@media (max-width: 1024px) {
    .se-input-panel { width: 300px; }
    .panel-tip { display: none; }
}

@media (max-width: 768px) {
    .se-main-content { flex-direction: column; overflow-y: auto; }
    .se-history-panel { width: 100%; max-height: 160px; border-right: none; border-bottom: 1px solid #fde8d8; }
    .se-input-panel { width: 100%; border-right: none; border-bottom: 1px solid #fde8d8; max-height: 420px; }
    .se-result-panel { width: 100%; min-height: 300px; }
    .form-row { flex-direction: column; }
    .se-modal-body { grid-template-columns: 1fr; }
}

/* ========== 打印样式 ========== */
@media print {
    .se-toolbar,
    .se-history-panel,
    .se-input-panel,
    #resultPlaceholder,
    #resultLoading { display: none !important; }
    .se-container,
    .se-container.fullscreen { position: static !important; height: auto; box-shadow: none; }
    .se-main-content { display: block; }
    .se-result-panel { width: 100%; }
    .se-result-body { overflow: visible; }
    .result-content { padding: 0; }
}

/* ========== 暗黑模式（body.dark） ========== */
body.dark .se-container {
    background: #1a1820;
}

body.dark .se-main-content {
    background: #1a1820;
}

body.dark .se-history-panel,
body.dark .se-input-panel,
body.dark .se-result-panel {
    background: #1e1b26;
    border-color: rgba(253, 160, 133, 0.12);
}

body.dark .history-panel-header {
    background: linear-gradient(to bottom, #252030 0%, #1e1b26 100%);
    border-color: rgba(253, 160, 133, 0.1);
}

body.dark .history-panel-header h3 {
    color: #fda085;
}

body.dark .history-count {
    color: #8b6a50;
}

body.dark .history-limit-footer {
    color: #4a3a30;
    border-top-color: rgba(253, 160, 133, 0.1);
    background: #1e1b26;
}

body.dark .history-search {
    border-bottom-color: rgba(253, 160, 133, 0.1);
}

body.dark .history-search input {
    background: #1a1820;
    border-color: rgba(253, 160, 133, 0.18);
    color: #e8ddd8;
}

body.dark .history-search input::placeholder {
    color: #5a4a40;
}

body.dark .history-list {
    background: #1e1b26;
}

body.dark .history-item {
    background: #252030;
    border-color: rgba(253, 160, 133, 0.12);
}

body.dark .history-item:hover {
    background: #2e2838;
    border-color: #fda085;
}

body.dark .history-item.active {
    background: #2a2020;
    border-color: #f6d365;
    box-shadow: 0 1px 4px rgba(246, 211, 101, 0.2);
}

body.dark .history-item-del {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
}

body.dark .history-item-del:hover {
    background: #ef4444;
    color: #fff;
}

body.dark .history-item-mood { color: #fda085; }
body.dark .history-item-preview { color: #5a5068; }
body.dark .history-item-time { color: #8b6a50; }

body.dark .se-toolbar {
    background: linear-gradient(135deg, #7a5e10 0%, #8a3a10 50%, #6a1e38 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

body.dark .toolbar-btn {
    background: rgba(30, 27, 38, 0.88);
    color: #fda085;
    border: 1px solid rgba(253, 160, 133, 0.18);
}

body.dark .toolbar-btn:hover:not(:disabled) {
    background: #252030;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}

body.dark .toolbar-btn-primary {
    background: linear-gradient(135deg, #7a1e40 0%, #5a1030 100%);
    border-color: rgba(233, 108, 143, 0.3);
    color: #fda085 !important;
}

body.dark .toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #8c2850 0%, #6a1c3a 100%);
    color: #fda085 !important;
}

/* 暗黑模式按钮禁用态（memory: 1af4dd1c）— 显式声明 opacity 与 cursor */
body.dark .toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

body.dark .panel-header {
    background: linear-gradient(to bottom, #252030 0%, #1e1b26 100%);
    border-color: rgba(253, 160, 133, 0.1);
}

body.dark .panel-header h3 { color: #fda085; }
body.dark .panel-tip { color: #5a4a40; }

body.dark .result-mood-tag {
    color: #fda085;
    background: rgba(253, 160, 133, 0.12);
}

body.dark .result-time { color: #8b6a50; }

body.dark .result-regen-btn {
    background: rgba(246, 211, 101, 0.08);
    border-color: rgba(246, 211, 101, 0.18);
    color: #fda085;
}

body.dark .result-regen-btn:hover {
    background: rgba(246, 211, 101, 0.15);
    border-color: rgba(246, 211, 101, 0.35);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.dark .se-input-body { background: #1e1b26; }

body.dark .form-group label { color: #fda085; }

body.dark .se-input,
body.dark .se-select,
body.dark .se-textarea {
    background: #252030;
    border-color: rgba(253, 160, 133, 0.18);
    color: #e8ddd8;
}

body.dark .se-input:focus,
body.dark .se-select:focus,
body.dark .se-textarea:focus {
    border-color: #fda085;
    background: #2e2838;
    box-shadow: 0 0 0 3px rgba(253, 160, 133, 0.1);
}

body.dark .se-input::placeholder,
body.dark .se-textarea::placeholder {
    color: #4a3a30;
}

body.dark .se-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fda085'/%3E%3C/svg%3E");
}

body.dark .se-textarea-hint { color: #4a3a30; }

body.dark #charCount { color: #5a4a40; }

body.dark .se-result-body { background: #1e1b26; }

body.dark .se-result-body::-webkit-scrollbar-track { background: #1e1b26; }
body.dark .se-result-body:hover::-webkit-scrollbar-track { background: #252030; }

/* 暗黑模式各滚动容器轨道 */
body.dark .history-list::-webkit-scrollbar-track   { background: #1e1b26; }
body.dark .se-input-body::-webkit-scrollbar-track  { background: #1e1b26; }
body.dark .se-textarea::-webkit-scrollbar-track    { background: #252030; }
body.dark .se-modal-body::-webkit-scrollbar-track  { background: #1e1b26; }

/* 暗黑模式滚动条 thumb 基础色（memory: cc1769fd）— 所有容器必须显式定义，不可仅依赖 hover */
body.dark .history-list::-webkit-scrollbar-thumb,
body.dark .se-input-body::-webkit-scrollbar-thumb,
body.dark .se-result-body::-webkit-scrollbar-thumb,
body.dark .se-textarea::-webkit-scrollbar-thumb,
body.dark .se-modal-body::-webkit-scrollbar-thumb  { background: #5a3a1a; border-radius: 2px; }

body.dark .result-placeholder { background: #1e1b26; }
body.dark .placeholder-title { color: #fda085; }
body.dark .placeholder-desc { color: #5a4a40; }

body.dark .placeholder-quote {
    color: #e96c8f;
    border-left-color: #7a5e10;
    background: rgba(122, 94, 16, 0.12);
}

body.dark .loading-text { color: #fda085; }

/* 暗黑模式错误区域文字色 */
body.dark .result-error-icon  { color: #f87171; }
body.dark .result-error-title { color: #f87171; }
body.dark .result-error-hint  { color: #5a5068; }

body.dark .result-content {
    background: linear-gradient(to bottom, #201c2c 0%, #1e1b26 100%);
    color: #e8ddd8;
    border-left-color: #7a5e10;
}

/* 暗黑模式风格边框色同步规范（memory: db7ba3b3） */
body.dark .result-content[data-style="温暖"] { border-left-color: #8a6e10; }
body.dark .result-content[data-style="激励"] { border-left-color: #922b21; }
body.dark .result-content[data-style="哲理"] { border-left-color: #1565c0; }
body.dark .result-content[data-style="幽默"] { border-left-color: #1a7a45; }

body.dark .se-modal {
    background: #1e1b26;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

body.dark .se-modal-header {
    background: linear-gradient(135deg, #7a5e10 0%, #8a3a10 50%, #6a1e38 100%);
}

body.dark .se-modal-body { background: #1e1b26; }

body.dark .example-card {
    background: #252030;
    border-color: rgba(253, 160, 133, 0.12);
}

body.dark .example-card:hover {
    background: #2e2838;
    border-color: #fda085;
}

body.dark .example-card-title { color: #fda085; }

body.dark .example-card-badge {
    background: rgba(253, 160, 133, 0.12);
    color: #fda085;
}

body.dark .example-card-desc { color: #5a5068; }

body.dark .example-card-import {
    background: rgba(253, 160, 133, 0.12);
    color: #fda085;
}

body.dark .example-card-import:hover {
    background: #fda085;
    color: #1e1b26;
}

/* 暗黑模式禁用态输入框 */
body.dark .se-input:disabled,
body.dark .se-select:disabled,
body.dark .se-textarea:disabled {
    background: #1a1820 !important;
    color: #4a3a30 !important;
    border-color: rgba(253, 160, 133, 0.08) !important;
}

/* 暗黑模式内联重试按钮 */
body.dark .se-retry-btn {
    background: linear-gradient(135deg, #7a3a18 0%, #6a1e38 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    color: #fda085;
}

body.dark .se-retry-btn:hover {
    background: linear-gradient(135deg, #8a4a28 0%, #7a2848 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

body.dark .history-clear-btn {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

body.dark .history-clear-btn:hover {
    background: rgba(239, 68, 68, 0.22);
}
