/* ========================================================
   心灵驿站 soul_station.css
   配色：柔和紫罗兰 + 薄荷绿渐变，营造宁静治愈氛围
   ======================================================== */

/* ====== CSS 变量 ====== */
:root {
    --ss-primary:       #7c6fcd;
    --ss-primary-light: #a08ee8;
    --ss-primary-dark:  #5a4fa8;
    --ss-accent:        #5bbcad;
    --ss-accent-light:  #7fd6c9;
    --ss-bg:            #f4f2fb;
    --ss-surface:       #ffffff;
    --ss-border:        #e0dcf4;
    --ss-text:          #3d3559;
    --ss-text-muted:    #8b83b3;
    --ss-toolbar-grad:  linear-gradient(135deg, #7c6fcd 0%, #5bbcad 100%);
    --ss-shadow:        0 2px 12px rgba(124, 111, 205, 0.15);
    --ss-radius:        10px;
}

/* ====== 主容器 ====== */
.ss-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 560px;
    background: var(--ss-bg);
    border-radius: var(--ss-radius);
    overflow: hidden;
    box-shadow: var(--ss-shadow);
    transition: all 0.3s ease;
}

.ss-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ====== 工具栏 ====== */
.ss-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: var(--ss-toolbar-grad);
    color: #fff;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(124, 111, 205, 0.35);
    flex-shrink: 0;
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 28px;
}

.toolbar-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    margin-right: 4px;
    letter-spacing: 0.5px;
}

.ss-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;
}

.ss-toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.ss-toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.ss-toolbar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ss-toolbar-btn--primary {
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.55);
    font-weight: 600;
}

.ss-toolbar-btn--primary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.42);
}

/* ====== 主内容三栏 ====== */
.ss-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: var(--ss-bg);
}

/* ====== 左栏：历史记录 ====== */
.ss-history-panel {
    width: 200px;
    background: var(--ss-surface);
    border-right: 1px solid var(--ss-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.ss-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #f8f6ff, #f2eff9);
    border-bottom: 1px solid var(--ss-border);
    flex-shrink: 0;
}

.ss-history-header h3 {
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ss-text);
    background: none;
    border: none;
    padding: 0;
}

.history-count {
    font-size: 11px;
    color: var(--ss-text-muted);
    margin-left: 4px;
}

.history-clear-btn {
    background: #fff0f0;
    border: none;
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    padding: 3px 7px;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.history-clear-btn:hover {
    background: #fde8e8;
}

.history-search {
    padding: 8px 10px;
    border-bottom: 1px solid var(--ss-border);
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid var(--ss-border);
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: var(--ss-text);
    background: #faf8ff;
}

.history-search input:focus {
    border-color: var(--ss-primary-light);
    box-shadow: 0 0 0 2px rgba(124, 111, 205, 0.12);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    background: var(--ss-surface);
}

.history-list::-webkit-scrollbar {
    width: 5px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
    background: #d4cef5;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #b8b0e8;
}

.history-item {
    display: flex;
    flex-direction: column;
    padding: 9px 10px;
    margin: 3px 2px;
    background: #faf9ff;
    border: 1px solid #ede9fa;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: ss-fadeIn 0.2s ease;
}

.history-item:hover {
    background: #f2eeff;
    border-color: #c7bee8;
    transform: translateX(2px);
}

.history-item.active {
    background: #ede8fb;
    border-color: var(--ss-primary-light);
    box-shadow: inset 3px 0 0 #3b82f6;
}

.history-item-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--ss-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.history-item-meta {
    font-size: 10.5px;
    color: var(--ss-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-time {
    font-size: 10px;
    color: #c0b8e0;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 17px;
    height: 17px;
    background: #fde8e8;
    color: #ef4444;
    border: none;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.history-empty {
    text-align: center;
    color: #b0a8d8;
    font-size: 12px;
    padding: 28px 10px;
    line-height: 1.8;
}

@keyframes ss-fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ====== 中栏：表单输入 ====== */
.ss-input-panel {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--ss-border);
    background: var(--ss-surface);
    overflow: hidden;
}

.ss-panel-header {
    padding: 11px 18px;
    border-bottom: 1px solid var(--ss-border);
    background: linear-gradient(to bottom, #faf8ff, #f5f2fe);
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 46px;
}

.ss-panel-header h3 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ss-text);
    background: none;
    border: none;
    padding: 0;
    white-space: nowrap;
}

.ss-panel-tip {
    font-size: 11.5px;
    color: var(--ss-text-muted);
    text-align: right;
    flex-shrink: 1;
}

.ss-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ss-input-body::-webkit-scrollbar { width: 5px; }
.ss-input-body::-webkit-scrollbar-track { background: transparent; }
.ss-input-body::-webkit-scrollbar-thumb { background: #d4cef5; border-radius: 3px; }
.ss-input-body::-webkit-scrollbar-thumb:hover { background: #b8b0e8; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ss-text);
}

.label-tip {
    font-size: 11px;
    font-weight: 400;
    color: var(--ss-text-muted);
}

.required-mark {
    color: #ef4444;
    margin-left: 2px;
}

/* 情绪快选标签 */
.mood-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2px;
}

.mood-tag {
    padding: 4px 10px;
    border: 1px solid #d4cef5;
    border-radius: 20px;
    background: #f5f2fe;
    color: var(--ss-primary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.mood-tag:hover {
    background: #ede8fb;
    border-color: var(--ss-primary-light);
    transform: translateY(-1px);
}

.mood-tag.selected {
    background: var(--ss-primary);
    color: #fff;
    border-color: var(--ss-primary);
    box-shadow: 0 2px 6px rgba(124, 111, 205, 0.35);
}

/* 文本输入框 */
.ss-input {
    padding: 8px 12px;
    border: 1px solid var(--ss-border);
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    color: var(--ss-text);
    background: #faf8ff;
}

.ss-input:focus {
    border-color: var(--ss-primary-light);
    box-shadow: 0 0 0 3px rgba(124, 111, 205, 0.12);
    background: #fff;
}

/* 文本域 */
.ss-textarea {
    padding: 10px 12px;
    border: 1px solid var(--ss-border);
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.65;
    outline: none;
    resize: vertical;
    transition: all 0.2s;
    color: var(--ss-text);
    background: #faf8ff;
    min-height: 120px;
    font-family: inherit;
}

.ss-textarea:focus {
    border-color: var(--ss-primary-light);
    box-shadow: 0 0 0 3px rgba(124, 111, 205, 0.12);
    background: #fff;
}

.ss-textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.ss-textarea-hint {
    font-size: 11px;
    color: #b0a8d8;
}

.concern-char-count {
    font-size: 11px;
    color: var(--ss-text-muted);
}

/* 两列 */
.form-row {
    display: flex;
    gap: 12px;
}

.form-group-half {
    flex: 1;
    min-width: 0;
}

/* 下拉框 */
.ss-select {
    padding: 7px 10px;
    border: 1px solid var(--ss-border);
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    color: var(--ss-text);
    background: #faf8ff;
    cursor: pointer;
    width: 100%;
}

.ss-select:focus {
    border-color: var(--ss-primary-light);
    box-shadow: 0 0 0 3px rgba(124, 111, 205, 0.12);
}

/* 中栏嵌入操作按钮（规范：中栏必须提供核心操作入口） */
.ss-action-bar {
    padding: 12px 18px;
    border-top: 1px solid var(--ss-border);
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    background: var(--ss-surface);
}

.ss-action-btn {
    padding: 10px 0;
    width: 100%;
    max-width: 300px;
    background: var(--ss-toolbar-grad);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(124, 111, 205, 0.35);
    letter-spacing: 0.5px;
}

.ss-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(124, 111, 205, 0.45);
}

.ss-action-btn:active:not(:disabled) {
    transform: translateY(0);
}

.ss-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ====== 右栏：结果 ====== */
.ss-result-panel {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    background: var(--ss-surface);
    overflow: hidden;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.result-meta-mood {
    font-size: 11px;
    background: #ede8fb;
    color: var(--ss-primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.result-char-count, .result-time {
    font-size: 11px;
    color: var(--ss-text-muted);
}

.ss-result-body {
    flex: 1;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.ss-result-body::-webkit-scrollbar { width: 5px; }
.ss-result-body::-webkit-scrollbar-track { background: transparent; }
.ss-result-body::-webkit-scrollbar-thumb { background: #d4cef5; border-radius: 3px; }
.ss-result-body::-webkit-scrollbar-thumb:hover { background: #b8b0e8; }

/* 占位区 */
.ss-result-placeholder {
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(160deg, #f9f7ff 0%, #f0faf8 100%);
    position: relative;
    overflow: hidden;
}

/* 花瓣装饰 */
.placeholder-decor {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.petal {
    position: absolute;
    border-radius: 50% 0 50% 0;
    opacity: 0.12;
    animation: petalFloat 6s ease-in-out infinite;
}

.petal-1 {
    width: 50px; height: 50px;
    background: var(--ss-primary);
    top: 15%; left: 10%;
    animation-delay: 0s;
}

.petal-2 {
    width: 35px; height: 35px;
    background: var(--ss-accent);
    top: 60%; right: 12%;
    animation-delay: 2s;
}

.petal-3 {
    width: 42px; height: 42px;
    background: var(--ss-primary-light);
    bottom: 20%; left: 20%;
    animation-delay: 4s;
}

@keyframes petalFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33%       { transform: translate(8px, -10px) rotate(15deg); }
    66%       { transform: translate(-5px, 5px) rotate(-10deg); }
}

.placeholder-icon {
    font-size: 44px;
    margin-bottom: 12px;
    animation: breathe 4s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.07); }
}

.placeholder-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ss-text);
    margin: 0 0 8px;
    position: relative;
    z-index: 1;
}

.placeholder-desc {
    font-size: 12.5px;
    color: var(--ss-text-muted);
    margin: 0 0 4px;
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

/* 加载中 */
.ss-result-loading {
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #f9f7ff 0%, #f0faf8 100%);
}

.loading-petals {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.loading-petals span {
    width: 10px;
    height: 10px;
    background: var(--ss-primary);
    border-radius: 50%;
    animation: petalPulse 1.2s ease-in-out infinite;
}

.loading-petals span:nth-child(2) {
    background: var(--ss-accent);
    animation-delay: 0.2s;
}

.loading-petals span:nth-child(3) {
    background: var(--ss-primary-light);
    animation-delay: 0.4s;
}

.loading-petals span:nth-child(4) {
    background: var(--ss-accent-light);
    animation-delay: 0.6s;
}

@keyframes petalPulse {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.6; }
    40%            { transform: scale(1.2); opacity: 1; }
}

.loading-text {
    font-size: 13px;
    color: var(--ss-text-muted);
    margin: 0;
    transition: opacity 0.3s ease;
}

/* 结果内容 */
.ss-result-content {
    flex: 1;
    padding: 22px 26px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--ss-text);
    white-space: pre-wrap;
    word-break: break-word;
    background: linear-gradient(180deg, #fdfbff 0%, #f9f7fe 100%);
}

/* 结果淡入动画类（独立，由JS动态添加以触发重播） */
.ss-result-enter {
    animation: ss-resultFadeIn 0.35s ease-out forwards;
}

@keyframes ss-resultFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ss-result-content strong { font-weight: 600; color: var(--ss-primary-dark); }
.ss-result-content em     { font-style: italic; color: var(--ss-primary); }

/* 【段落标题】高亮 */
.ss-result-content .section-label {
    display: block;
    background: linear-gradient(90deg, var(--ss-primary), var(--ss-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    margin-top: 6px;
}

/* li marker颜色 */
.ss-result-content li::marker {
    color: var(--ss-primary);
}

/* Markdown 基础标签样式（标题/代码块/引用/列表等） */
.ss-result-content h3,
.ss-result-content h4,
.ss-result-content h5 {
    font-weight: 600;
    color: var(--ss-primary-dark);
    margin: 14px 0 6px;
    line-height: 1.5;
}
.ss-result-content code {
    font-family: 'Consolas', 'Monaco', monospace;
    background: rgba(124, 111, 205, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12.5px;
    -webkit-text-fill-color: inherit;
}
.ss-result-content pre {
    font-family: 'Consolas', 'Monaco', monospace;
    background: rgba(124, 111, 205, 0.08);
    padding: 12px 16px;
    border-radius: 6px;
    margin: 10px 0;
    overflow-x: auto;
    font-size: 12.5px;
    line-height: 1.6;
    white-space: pre;
}
.ss-result-content blockquote {
    border-left: 3px solid var(--ss-primary);
    padding: 8px 14px;
    margin: 10px 0;
    color: var(--ss-text-muted);
    background: rgba(124, 111, 205, 0.05);
    border-radius: 0 6px 6px 0;
}
.ss-result-content ul,
.ss-result-content ol {
    padding-left: 20px;
    margin: 6px 0;
}
.ss-result-content a {
    color: var(--ss-primary);
    text-decoration: underline;
}

/* 错误状态区域（与 placeholder/loading 保持 flex 居中一致） */
.ss-result-error {
    flex: 1;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: var(--ss-surface);
}

.ss-result-error .error-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1.4;
}

/* 错误消息内层：flex水平布局 + border-left 醒目边框 */
.error-inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.05);
    border-left: 3px solid #ef4444;
    border-radius: 0 8px 8px 0;
    max-width: 320px;
    width: 100%;
}

.error-inner .error-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1.4;
}

.error-inner .error-msg {
    font-size: 13px;
    color: #ef4444;
    line-height: 1.6;
    margin: 0;
}

.retry-btn {
    margin-top: 2px;
    padding: 6px 18px;
    background: var(--ss-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.retry-btn:hover {
    background: var(--ss-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(124, 111, 205, 0.3);
}

/* 输入框抖动动画 */
@keyframes ss-shake {
    0%,100% { transform: translateX(0); }
    20%     { transform: translateX(-5px); }
    40%     { transform: translateX(5px); }
    60%     { transform: translateX(-4px); }
    80%     { transform: translateX(3px); }
}

.ss-textarea.shake {
    animation: ss-shake 0.45s ease;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* ====== 模态框 ====== */
.ss-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(61, 53, 89, 0.4);
    backdrop-filter: blur(3px);
    z-index: 10000;
}

.ss-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 680px;
    max-width: 95vw;
    max-height: 80vh;
    z-index: 10001;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(124, 111, 205, 0.28);
}

.ss-modal-content {
    background: var(--ss-surface);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.ss-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--ss-toolbar-grad);
    color: #fff;
    flex-shrink: 0;
}

.ss-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    background: none;
    border: none;
    padding: 0;
    color: #fff;
}

.ss-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ss-modal-close:hover {
    background: rgba(255,255,255,0.35);
}

.ss-modal-body {
    padding: 16px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.ss-modal-body::-webkit-scrollbar { width: 5px; }
.ss-modal-body::-webkit-scrollbar-track { background: transparent; }
.ss-modal-body::-webkit-scrollbar-thumb { background: #d4cef5; border-radius: 3px; }
.ss-modal-body::-webkit-scrollbar-thumb:hover { background: #b8b0e8; }

/* 示例卡片 */
.example-card {
    background: #faf8ff;
    border: 1px solid var(--ss-border);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.example-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--ss-toolbar-grad);
    border-radius: 10px 0 0 10px;
}

.example-card:hover {
    background: #f0ecff;
    border-color: var(--ss-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(124, 111, 205, 0.18);
}

.example-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.example-card-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.example-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ss-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.example-card-badge {
    font-size: 10.5px;
    background: #ede8fb;
    color: var(--ss-primary);
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.example-card-desc {
    font-size: 11.5px;
    color: var(--ss-text-muted);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ====== 响应式 ====== */
@media (max-width: 900px) {
    .ss-history-panel { display: none; }
    .form-row { flex-direction: column; }
}

@media (max-width: 600px) {
    .ss-main-content { flex-direction: column; }
    .ss-input-panel, .ss-result-panel { min-width: 100%; }
    .ss-result-panel { border-top: 1px solid var(--ss-border); border-right: none; }
    .ss-modal-body { grid-template-columns: 1fr; }
}

/* ====================================================
   暗黑模式 - 以 body.dark 为父级选择器前缀
   ==================================================== */
body.dark .ss-container {
    background: #1a1730;
}

body.dark .ss-toolbar {
    background: linear-gradient(135deg, #4a3e9a 0%, #2d8a7e 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

body.dark .ss-main-content {
    background: #1a1730;
}

/* 历史面板 */
body.dark .ss-history-panel {
    background: #1e1b33;
    border-right-color: #2d2a4a;
}

body.dark .ss-history-header {
    background: linear-gradient(to bottom, #221e3a, #1e1b33);
    border-bottom-color: #2d2a4a;
}

body.dark .ss-history-header h3 {
    color: #c4b8f0;
}

body.dark .history-count {
    color: #6b5fa0;
}

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 .history-search {
    border-bottom-color: #2d2a4a;
}

body.dark .history-search input {
    background: #2a2545;
    border-color: #3a3560;
    color: #c4b8f0;
}

body.dark .history-search input:focus {
    border-color: #7c6fcd;
    box-shadow: 0 0 0 2px rgba(124, 111, 205, 0.2);
}

body.dark .history-search input::placeholder {
    color: #4d4570;
}

body.dark .history-list {
    background: #1e1b33;
}

body.dark .history-list::-webkit-scrollbar-thumb {
    background: #3a3560;
}

body.dark .history-list::-webkit-scrollbar-thumb:hover {
    background: #524d80;
}

body.dark .history-item {
    background: #242042;
    border-color: #2d2a4a;
}

body.dark .history-item:hover {
    background: #2a2545;
    border-color: #4a3e9a;
}

body.dark .history-item.active {
    background: #2a2545;
    border-color: #7c6fcd;
    box-shadow: inset 3px 0 0 #3b82f6;
}

body.dark .history-item-title {
    color: #c4b8f0;
}

body.dark .history-item-meta {
    color: #6b5fa0;
}

body.dark .history-item-time {
    color: #4a4575;
}

body.dark .history-item-delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

body.dark .history-empty {
    color: #6b819a;
}

/* 输入面板 */
body.dark .ss-input-panel {
    background: #1e1b33;
    border-right-color: #2d2a4a;
}

body.dark .ss-panel-header {
    background: linear-gradient(to bottom, #221e3a, #1e1b33);
    border-bottom-color: #2d2a4a;
}

body.dark .ss-panel-header h3 {
    color: #c4b8f0;
}

body.dark .ss-panel-tip {
    color: #6b5fa0;
}

body.dark .ss-input-body::-webkit-scrollbar-thumb {
    background: #3a3560;
}

body.dark .ss-input-body::-webkit-scrollbar-thumb:hover {
    background: #524d80;
}

body.dark .form-group label {
    color: #c4b8f0;
}

body.dark .label-tip {
    color: #6b5fa0;
}

body.dark .mood-tag {
    background: #2a2545;
    border-color: #3a3560;
    color: #a08ee8;
}

body.dark .mood-tag:hover {
    background: #332d58;
    border-color: #7c6fcd;
}

body.dark .mood-tag.selected {
    background: #4a3e9a;
    color: #fff;
    border-color: #7c6fcd;
}

body.dark .ss-input {
    background: #2a2545;
    border-color: #3a3560;
    color: #c4b8f0;
}

body.dark .ss-input:focus {
    border-color: #7c6fcd;
    box-shadow: 0 0 0 3px rgba(124, 111, 205, 0.2);
    background: #2d2848;
}

body.dark .ss-input::placeholder {
    color: #4d4570;
}

body.dark .ss-textarea {
    background: #2a2545;
    border-color: #3a3560;
    color: #c4b8f0;
}

body.dark .ss-textarea:focus {
    border-color: #7c6fcd;
    box-shadow: 0 0 0 3px rgba(124, 111, 205, 0.2);
    background: #2d2848;
}

body.dark .ss-textarea::placeholder {
    color: #4d4570;
}

body.dark .ss-textarea-hint {
    color: #5a5490;
}

body.dark .concern-char-count {
    color: #6b5fa0;
}

body.dark .ss-select {
    background: #2a2545;
    border-color: #3a3560;
    color: #c4b8f0;
}

body.dark .ss-select:focus {
    border-color: #7c6fcd;
    box-shadow: 0 0 0 3px rgba(124, 111, 205, 0.2);
}

body.dark .ss-action-bar {
    border-top-color: #2d2a4a;
    background: #1e1b33;
}

body.dark .ss-action-btn {
    background: linear-gradient(135deg, #4a3e9a 0%, #2d8a7e 100%);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* 结果面板 */
body.dark .ss-result-panel {
    background: #1e1b33;
}

body.dark .ss-result-body::-webkit-scrollbar-thumb {
    background: #3a3560;
}

body.dark .ss-result-body::-webkit-scrollbar-thumb:hover {
    background: #524d80;
}

body.dark .result-meta-mood {
    background: #2a2545;
    color: #a08ee8;
}

body.dark .result-char-count,
body.dark .result-time {
    color: #6b5fa0;
}

body.dark .ss-result-placeholder,
body.dark .ss-result-loading {
    background: linear-gradient(160deg, #1e1b33 0%, #1a2b2a 100%);
}

body.dark .placeholder-title {
    color: #c4b8f0;
}

body.dark .placeholder-desc {
    color: #4a7290;
}

body.dark .loading-text {
    color: #6b5fa0;
}

body.dark .ss-result-content {
    background: linear-gradient(180deg, #1f1c36 0%, #1c1930 100%);
    color: #c4b8f0;
}

body.dark .ss-result-content strong {
    color: #a08ee8;
}

body.dark .ss-result-content em {
    color: #7c6fcd;
}

body.dark .ss-result-content li::marker {
    color: var(--ss-primary);
}

body.dark .ss-result-content h3,
body.dark .ss-result-content h4,
body.dark .ss-result-content h5 {
    color: #a08ee8;
}

body.dark .ss-result-content code,
body.dark .ss-result-content pre {
    background: rgba(160, 142, 232, 0.12);
}

body.dark .ss-result-content blockquote {
    border-left-color: #7c6fcd;
    color: #8b83b3;
    background: rgba(124, 111, 205, 0.1);
}

body.dark .ss-result-content a {
    color: #a08ee8;
}

body.dark .ss-result-content .section-label {
    background: linear-gradient(90deg, #c4b8f0, #7fd6c9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 错误状态暗黑模式 */
body.dark .ss-result-error {
    background: #1e1b33;
}

body.dark .error-inner {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: #f87171;
}

body.dark .error-inner .error-msg {
    color: #f87171;
}

body.dark .retry-btn {
    background: #4a3e9a;
}

body.dark .retry-btn:hover {
    background: #5a4fba;
}

/* 模态框 */
body.dark .ss-modal-overlay {
    background: rgba(10, 8, 30, 0.6);
}

body.dark .ss-modal-content {
    background: #1e1b33;
}

body.dark .ss-modal-header {
    background: linear-gradient(135deg, #4a3e9a 0%, #2d8a7e 100%);
}

body.dark .ss-modal-body::-webkit-scrollbar-thumb {
    background: #3a3560;
}

body.dark .ss-modal-body::-webkit-scrollbar-thumb:hover {
    background: #524d80;
}

body.dark .example-card {
    background: #242042;
    border-color: #2d2a4a;
}

body.dark .example-card:hover {
    background: #2a2545;
    border-color: #7c6fcd;
}

body.dark .example-card-title {
    color: #c4b8f0;
}

body.dark .example-card-badge {
    background: #2a2545;
    color: #a08ee8;
}

body.dark .example-card-desc {
    color: #6b5fa0;
}
