/* =============================================
   爱情文案 - love_statements.css
   玫瑰粉主题：温柔浪漫的粉紫色调
   暗黑模式以 body.dark 为父级选择器前缀
   ============================================= */

/* ========== CSS 变量 ========== */
:root {
    --ls-primary:        #be185d;
    --ls-primary-light:  #db2777;
    --ls-accent:         #ec4899;
    --ls-accent-light:   #f9a8d4;
    --ls-bg:             #fff0f6;
    --ls-panel-bg:       #ffffff;
    --ls-border:         #fce7f3;
    --ls-text:           #3b1a2e;
    --ls-text-sub:       #7c3d5f;
    --ls-text-muted:     #b07090;
    --ls-heart-color:    #ec4899;
    --ls-tag-bg:         #fdf2f8;
    --ls-tag-border:     #fbcfe8;
    --ls-tag-hover-bg:   #fce7f3;
}

/* ========== 主容器 ========== */
.ls-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: var(--ls-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(190, 24, 93, 0.1);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.ls-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;
}

/* ========== 顶部工具栏 ========== */
.ls-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #9d174d 0%, #db2777 60%, #ec4899 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(157, 23, 77, 0.4);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* 工具栏装饰心形背景 */
.ls-toolbar::before {
    content: '❤ ♡ ❤ ♡ ❤ ♡ ❤ ♡ ❤ ♡';
    position: absolute;
    top: 0; right: 0;
    font-size: 16px;
    color: rgba(255,255,255,0.06);
    letter-spacing: 8px;
    pointer-events: none;
    white-space: nowrap;
    padding: 4px 8px;
}

.toolbar-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.5px;
    margin-right: 6px;
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 28px;
    position: relative;
    z-index: 1;
}

.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: #9d174d;
    transition: all 0.2s;
    white-space: nowrap;
}

.toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.toolbar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* 主操作按钮 - AI生成 */
.toolbar-btn-primary {
    background: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.45);
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #fb7185 0%, #f472b6 100%);
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.55);
    color: #fff;
}

.toolbar-btn-primary:disabled {
    background: rgba(244, 63, 94, 0.35);
    color: rgba(255, 255, 255, 0.5);
    box-shadow: none;
}

/* 取消按钮 */
.toolbar-btn-cancel {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.toolbar-btn-cancel:hover:not(:disabled) {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: #fff;
}

/* ========== 主内容区：三栏 ========== */
.ls-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: var(--ls-bg);
}

/* ========== 左栏：历史记录 ========== */
.ls-history-panel {
    width: 210px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid var(--ls-border);
    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, #fff5f9 0%, #fce7f3 100%);
    border-bottom: 1px solid var(--ls-border);
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ls-primary);
}

.history-count {
    font-size: 11px;
    color: var(--ls-text-muted);
    font-weight: 400;
}

.history-clear-btn {
    background: #fff3f8;
    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 var(--ls-border);
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--ls-border);
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: var(--ls-text);
    background: #fff;
}

.history-search input:focus {
    border-color: var(--ls-accent);
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.1);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.history-empty {
    text-align: center;
    color: var(--ls-text-muted);
    font-size: 12px;
    padding: 24px 12px;
    line-height: 1.6;
}

/* 历史条目 */
.history-item {
    display: flex;
    flex-direction: column;
    padding: 9px 11px;
    margin-bottom: 4px;
    background: #fff5f9;
    border: 1px solid #fce7f3;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: ls-fadeIn 0.2s ease;
}

@keyframes ls-fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.history-item:hover {
    background: #fce7f3;
    border-color: var(--ls-accent-light);
    transform: translateX(2px);
}

.history-item.active {
    background: linear-gradient(to right, #fde7f4 0%, #fdf2f8 100%);
    border-color: var(--ls-accent);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.22);
}

.history-item-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #fff0f0;
    color: #ef4444;
    border-radius: 3px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.history-item-delete:hover {
    background: #ef4444;
    color: #fff;
}

.history-item-scene {
    font-size: 11px;
    font-weight: 600;
    color: var(--ls-accent);
    margin-bottom: 2px;
    padding-right: 20px;
}

.history-item-title {
    font-size: 12px;
    color: var(--ls-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 20px;
    margin-bottom: 3px;
    line-height: 1.4;
}

.history-item-meta {
    font-size: 11px;
    color: var(--ls-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== 中栏：输入面板 ========== */
.ls-input-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid var(--ls-border);
    overflow: hidden;
    min-width: 320px;
}

/* ========== 右栏：结果面板 ========== */
.ls-result-panel {
    width: 42%;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
    min-width: 280px;
}

/* ========== 面板公共 Header ========== */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #fff5f9 0%, #fce7f3 100%);
    border-bottom: 1px solid var(--ls-border);
    flex-shrink: 0;
    gap: 10px;
}

.panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ls-primary);
    white-space: nowrap;
}

.panel-tip {
    font-size: 11px;
    color: var(--ls-text-muted);
    flex: 1;
    text-align: right;
}

/* 结果 Meta 信息 */
.result-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.result-meta-scene {
    font-size: 12px;
    font-weight: 600;
    color: var(--ls-primary);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-style-badge {
    font-size: 10px;
    padding: 1px 7px;
    background: #fdf2f8;
    color: var(--ls-accent);
    border-radius: 8px;
    border: 1px solid var(--ls-accent-light);
    white-space: nowrap;
}

.result-time {
    font-size: 11px;
    color: var(--ls-text-muted);
}

/* ========== 输入面板内容 ========== */
.ls-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ls-text-sub);
    margin-bottom: 5px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.form-group-half {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.required-mark {
    color: var(--ls-accent);
    margin-left: 2px;
}

.label-tip {
    font-size: 11px;
    color: var(--ls-text-muted);
    font-weight: 400;
    margin-left: 4px;
}

/* 输入框 */
.ls-input {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--ls-border);
    border-radius: 5px;
    font-size: 13px;
    color: var(--ls-text);
    background: #fff;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.ls-input:focus {
    border-color: var(--ls-accent);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.ls-input:hover:not(:focus) {
    border-color: var(--ls-tag-border);
}

.ls-input.shake {
    animation: shake 0.45s ease-in-out;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%, 55%, 85% { transform: translateX(-5px); }
    35%, 70% { transform: translateX(5px); }
}

/* 下拉框 */
.ls-select {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--ls-border);
    border-radius: 5px;
    font-size: 13px;
    color: var(--ls-text);
    background: #fff;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    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='%23b07090' 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;
}

.ls-select:focus {
    border-color: var(--ls-accent);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.ls-select:hover:not(:focus) {
    border-color: var(--ls-tag-border);
}

/* 文本区域 */
.ls-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ls-border);
    border-radius: 5px;
    font-size: 13px;
    color: var(--ls-text);
    background: #fff;
    outline: none;
    resize: vertical;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.7;
    min-height: 130px;
}

.ls-textarea:focus {
    border-color: var(--ls-accent);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.ls-textarea:hover:not(:focus) {
    border-color: var(--ls-tag-border);
}

.ls-textarea.shake {
    animation: shake 0.45s ease-in-out;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.ls-textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.ls-textarea-hint {
    font-size: 11px;
    color: var(--ls-text-muted);
}

.feelings-char-count {
    font-size: 11px;
    color: var(--ls-text-muted);
}

/* ========== 心情标签 ========== */
.tag-label {
    margin-bottom: 7px !important;
}

.mood-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mood-tag {
    padding: 4px 10px;
    background: var(--ls-tag-bg);
    border: 1px solid var(--ls-tag-border);
    border-radius: 12px;
    font-size: 12px;
    color: var(--ls-primary-light);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.mood-tag:hover {
    background: var(--ls-tag-hover-bg);
    border-color: var(--ls-accent-light);
    color: var(--ls-primary);
    transform: scale(1.04);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.2);
}

.mood-tag:active {
    transform: scale(1);
}

/* ========== 结果面板内容 ========== */
.ls-result-body {
    flex: 1;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* 初始占位 */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    color: var(--ls-text-muted);
    flex: 1;
    margin: auto;
}

.placeholder-icon {
    font-size: 60px;
    margin-bottom: 16px;
    opacity: 0.55;
    animation: heartFloat 3s ease-in-out infinite;
}

@keyframes heartFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-10px) scale(1.08); }
}

.placeholder-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ls-text-sub);
    margin: 0 0 8px 0;
}

.placeholder-desc {
    font-size: 12px;
    color: var(--ls-text-muted);
    margin: 4px 0 0 0;
    line-height: 1.6;
}

/* 加载中 */
.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 1;
    margin: auto;
    padding: 40px 24px;
}

.loading-heart-anim {
    font-size: 50px;
    animation: heartBeat 1.2s ease-in-out infinite;
    display: block;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    20%       { transform: scale(1.18); }
    40%       { transform: scale(0.95); }
    60%       { transform: scale(1.12); }
    80%       { transform: scale(0.98); }
}

.loading-dots {
    display: flex;
    gap: 6px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ls-accent);
    animation: dots 1.2s infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dots {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
    40%            { transform: scale(1.1); opacity: 1; }
}

.loading-text {
    font-size: 13px;
    color: var(--ls-text-muted);
    margin: 0;
}

/* 结果内容 */
.result-content {
    padding: 16px 20px 24px;
    flex: 1;
}

/* 单条文案卡片 */
.statement-card {
    position: relative;
    padding: 14px 48px 14px 18px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff5f9 0%, #fff8fb 100%);
    border: 1px solid #fce7f3;
    border-left: 4px solid var(--ls-accent-light);
    border-radius: 0 10px 10px 0;
    transition: all 0.25s;
    box-shadow: 0 1px 4px rgba(236, 72, 153, 0.06);
}

.statement-card:hover {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border-left-color: var(--ls-accent);
    box-shadow: 0 3px 14px rgba(236, 72, 153, 0.14);
    transform: translateX(3px);
}

.statement-card-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--ls-accent);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.statement-card-num::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--ls-accent-light), transparent);
}

.statement-card-text {
    font-size: 14px;
    line-height: 1.85;
    color: var(--ls-text);
    word-break: break-word;
    white-space: pre-line;
}

.statement-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--ls-border);
    border-radius: 4px;
    font-size: 11px;
    color: var(--ls-text-muted);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
}

.statement-card:hover .statement-copy-btn {
    opacity: 1;
}

.statement-copy-btn:hover {
    background: #fff;
    color: var(--ls-accent);
    border-color: var(--ls-accent-light);
}

/* 结果内容入场动效 */
@keyframes lsResultEnter {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-content.result-enter-anim {
    animation: lsResultEnter 0.35s ease-out both;
}

/* ========== 错误块 ========== */
.result-error-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    flex: 1;
    margin: auto;
}

.result-error-icon {
    font-size: 42px;
    margin-bottom: 12px;
    opacity: 0.85;
}

.result-error-msg {
    font-size: 13px;
    color: #9d174d;
    margin: 0 0 18px 0;
    line-height: 1.65;
    max-width: 260px;
}

.result-error-retry {
    padding: 7px 20px;
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(219, 39, 119, 0.3);
}

.result-error-retry:hover {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.35);
}

/* ========== 自定义滚动条 ========== */
.history-list::-webkit-scrollbar,
.ls-input-body::-webkit-scrollbar,
.ls-result-body::-webkit-scrollbar,
.ls-modal-body::-webkit-scrollbar { width: 4px; }

.history-list::-webkit-scrollbar-track,
.ls-input-body::-webkit-scrollbar-track,
.ls-result-body::-webkit-scrollbar-track,
.ls-modal-body::-webkit-scrollbar-track { background: transparent; }

.history-list::-webkit-scrollbar-thumb,
.ls-input-body::-webkit-scrollbar-thumb,
.ls-result-body::-webkit-scrollbar-thumb,
.ls-modal-body::-webkit-scrollbar-thumb {
    background: rgba(236, 72, 153, 0.2);
    border-radius: 2px;
}

.history-list::-webkit-scrollbar-thumb:hover,
.ls-input-body::-webkit-scrollbar-thumb:hover,
.ls-result-body::-webkit-scrollbar-thumb:hover,
.ls-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(236, 72, 153, 0.42);
}

/* ========== 模态框 ========== */
.ls-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(60, 10, 40, 0.35);
    z-index: 100000;
    backdrop-filter: blur(2px);
}

/* 模态框内容容器：作为 flex 子项填满 ls-modal，并作为 flex 父项约束 header/body 的高度分配 */
.ls-modal-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.ls-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    width: 700px;
    max-width: 92vw;
    max-height: 82vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(157, 23, 77, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: lsModalIn 0.22s ease-out;
}

@keyframes lsModalIn {
    from { opacity: 0; transform: translate(-50%, -55%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

.ls-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(to bottom, #fff5f9 0%, #fce7f3 100%);
    border-bottom: 1px solid var(--ls-border);
    flex-shrink: 0;
}

.ls-modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ls-primary);
}

.ls-modal-close {
    width: 28px; height: 28px;
    background: #fff;
    border: 1px solid var(--ls-border);
    color: var(--ls-text-muted);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ls-modal-close:hover {
    background: #fde8e8;
    color: #ef4444;
    border-color: #fca5a5;
}

.ls-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;
}

/* 示例卡片 */
.example-card {
    padding: 12px 14px;
    border: 1px solid var(--ls-border);
    border-radius: 8px;
    background: #fff5f9;
    cursor: pointer;
    transition: all 0.18s;
}

.example-card:hover {
    border-color: var(--ls-accent);
    background: #fdf2f8;
    box-shadow: 0 3px 10px rgba(236, 72, 153, 0.12);
    transform: translateY(-1px);
}

.example-card:active {
    transform: scale(0.98);
    box-shadow: none;
}

.example-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.example-card-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.example-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ls-text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.example-card-badge {
    font-size: 10px;
    padding: 1px 7px;
    background: #fdf2f8;
    color: var(--ls-accent);
    border-radius: 8px;
    border: 1px solid var(--ls-accent-light);
    white-space: nowrap;
}

.example-card-desc {
    font-size: 12px;
    color: var(--ls-text-muted);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ========== Toast 提示 ========== */
.ls-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(60, 10, 40, 0.85);
    color: #fff;
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 200000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.ls-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.ls-toast.success { background: rgba(22, 101, 52, 0.9); }
.ls-toast.error   { background: rgba(153, 27, 27, 0.9); }
.ls-toast.info    { background: rgba(88, 28, 135, 0.88); }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .ls-result-panel { width: 38%; }
}

@media (max-width: 768px) {
    .ls-main-content { flex-direction: column; }
    .ls-history-panel { width: 100%; height: 140px; border-right: none; border-bottom: 1px solid var(--ls-border); }
    .ls-result-panel  { width: 100%; min-width: unset; }
    .ls-input-panel   { min-width: unset; }
    .form-row         { flex-direction: column; gap: 0; }
    .form-group-half  { flex: none; width: 100%; margin-bottom: 12px; }
    .ls-toolbar       { gap: 4px; }
    .toolbar-title    { display: none; }
    .mood-tags        { gap: 5px; }
    .history-item-delete { opacity: 1 !important; } /* 移动端强制显示删除按钮 */
}

/* 触屏设备：复制、删除按钮始终显示（无 hover 状态） */
@media (hover: none) {
    .statement-copy-btn { opacity: 1; }
    .history-item-delete { opacity: 1; }
}

/* ========== 暗黑模式 ========== */
body.dark {
    --ls-bg:            #1a0a12;
    --ls-panel-bg:      #210d18;
    --ls-border:        rgba(236, 72, 153, 0.18);
    --ls-text:          #f0d0e0;
    --ls-text-sub:      #d080a8;
    --ls-text-muted:    #8c5070;
    --ls-tag-bg:        rgba(236, 72, 153, 0.1);
    --ls-tag-border:    rgba(236, 72, 153, 0.22);
    --ls-tag-hover-bg:  rgba(236, 72, 153, 0.18);
    /* 暗黑模式覆盖亮色调，避免浅色值在深色背景下过于刺眼或对比度不足 */
    --ls-primary:       #ec4899;
    --ls-primary-light: #f472b6;
    --ls-accent-light:  rgba(236, 72, 153, 0.5);
}

body.dark .ls-container {
    background: var(--ls-bg);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

body.dark .ls-toolbar {
    background: linear-gradient(135deg, #5a0d2a 0%, #880833 60%, #a8195a 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

body.dark .toolbar-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #f0d0e0;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

body.dark .toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

body.dark .toolbar-btn-primary {
    background: linear-gradient(135deg, #be185d 0%, #9d174d 100%);
    color: #fff;
    border: none;
}

body.dark .toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%);
}

body.dark .ls-history-panel {
    background: #180910;
    border-right-color: var(--ls-border);
}

body.dark .history-panel-header {
    background: linear-gradient(to bottom, #210d18 0%, #1a0a12 100%);
    border-bottom-color: var(--ls-border);
}

body.dark .history-item {
    background: rgba(236, 72, 153, 0.07);
    border-color: rgba(236, 72, 153, 0.18);
}

body.dark .history-item:hover {
    background: rgba(236, 72, 153, 0.14);
}

body.dark .history-item.active {
    background: linear-gradient(to right, rgba(236, 72, 153, 0.28) 0%, rgba(236, 72, 153, 0.16) 100%);
    border-color: var(--ls-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* 删除按钮 暗黑模式 */
body.dark .history-item-delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

body.dark .history-item-delete:hover {
    background: rgba(239, 68, 68, 0.5);
    color: #fff;
}

body.dark .history-search input {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--ls-border);
    color: var(--ls-text);
}

body.dark .history-search input:focus {
    border-color: var(--ls-accent);
}

body.dark .ls-input-panel,
body.dark .ls-result-panel {
    background: #1d0c16;
    border-right-color: var(--ls-border);
}

body.dark .panel-header {
    background: linear-gradient(to bottom, #210d18 0%, #1a0a12 100%);
    border-bottom-color: var(--ls-border);
}

body.dark .ls-input,
body.dark .ls-select,
body.dark .ls-textarea {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--ls-border);
    color: var(--ls-text);
}

body.dark .ls-input:focus,
body.dark .ls-select:focus,
body.dark .ls-textarea:focus {
    border-color: var(--ls-accent);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}

body.dark .ls-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='%23d080a8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    color-scheme: dark; /* 确保下拉选项在暗色主题中正确渲染背景和文字颜色 */
}

body.dark .ls-select option {
    background: #2a0f1e;
    color: var(--ls-text);
}

body.dark .mood-tag {
    background: var(--ls-tag-bg);
    border-color: var(--ls-tag-border);
    color: var(--ls-accent);
}

body.dark .mood-tag:hover {
    background: #3a1522;
    color: #f472b6;
    transform: scale(1.04);
}

body.dark .statement-card {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.09) 0%, rgba(236, 72, 153, 0.04) 100%);
    border-color: rgba(236, 72, 153, 0.22);
}

body.dark .statement-card:hover {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.18) 0%, rgba(236, 72, 153, 0.1) 100%);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.3);
}

body.dark .statement-card-text {
    color: var(--ls-text);
}

body.dark .statement-copy-btn {
    background: rgba(30, 10, 25, 0.9);
    border-color: rgba(236, 72, 153, 0.25);
    color: var(--ls-text-muted);
}

body.dark .statement-copy-btn:hover {
    background: rgba(236, 72, 153, 0.2);
    color: var(--ls-accent);
}

body.dark .ls-modal {
    background: #1d0c16;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

body.dark .ls-modal-header {
    background: linear-gradient(to bottom, #210d18 0%, #1a0a12 100%);
    border-bottom-color: var(--ls-border);
}

body.dark .ls-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--ls-border);
    color: var(--ls-text-muted);
}

body.dark .ls-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

body.dark .example-card {
    background: rgba(236, 72, 153, 0.07);
    border-color: rgba(236, 72, 153, 0.2);
}

body.dark .example-card:hover {
    background: rgba(236, 72, 153, 0.14);
    border-color: var(--ls-accent);
}

body.dark .example-card-title {
    color: var(--ls-text);
}

/* 历史清空按钮 暗黑模式 */
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);
}

/* 错误信息 暗黑模式 */
body.dark .result-error-msg {
    color: #f9a8d4;
}

/* 风格标签、示例卡片标签 暗黑模式 */
body.dark .result-style-badge {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.3);
    color: #f472b6;
}

body.dark .example-card-badge {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.3);
    color: #f472b6;
}

/* 加载文本 暗黑模式 */
body.dark .loading-text {
    color: var(--ls-text-sub);
}
