/* ============================================================
   句子简化 - 专属样式
   主题色：清透蓝 #0891b2 (Cyan-600) / 天空蓝 #0ea5e9 (Sky-500)
   寓意：化繁为简、清晰明了的语言之美
   ============================================================ */

/* -------------------- 基础容器 -------------------- */
.ss-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    min-height: 520px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(8, 145, 178, 0.08);
    transition: all 0.3s ease;
}

.ss-container.ss-fullscreen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    min-height: unset;
    border-radius: 0;
    border: none;
    z-index: 9999;
}

/* -------------------- 工具栏 -------------------- */
.ss-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #e0f7ff 0%, #fff 60%, #f0f9ff 100%);
    border-bottom: 2px solid #bae6fd;
    min-height: 52px;
    flex-shrink: 0;
}

.ss-toolbar-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ss-toolbar-group + .ss-toolbar-group {
    margin-left: 6px;
    padding-left: 10px;
    border-left: 1px solid #bae6fd;
}

.ss-toolbar-title {
    font-size: 14px;
    font-weight: 700;
    color: #0891b2;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ss-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    outline: none;
}

.ss-toolbar-btn:hover {
    background: #e0f7ff;
    border-color: #7dd3fc;
    color: #0891b2;
}

.ss-toolbar-btn:active {
    transform: translateY(1px);
}

.ss-toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* -------------------- 防误选按鈕文字 -------------------- */
.ss-toolbar-btn, .ss-option-btn, .ss-generate-btn,
.ss-regen-btn, .ss-copy-btn, .ss-error-retry-btn,
.ss-clear-history-btn, .ss-history-item-del, .ss-modal-close {
    user-select: none;
    -webkit-user-select: none;
}

.ss-btn-primary {
    background: linear-gradient(135deg, #0891b2, #0ea5e9);
    color: #fff !important;
    border-color: transparent !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.3);
}

.ss-btn-primary:hover {
    background: linear-gradient(135deg, #0e7490, #0284c7) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.4);
    transform: translateY(-1px);
}

.ss-btn-primary.ss-btn-generating {
    background: linear-gradient(135deg, #94a3b8, #64748b) !important;
    box-shadow: none;
    cursor: wait;
}

.ss-btn-cancel {
    background: #fff7ed;
    color: #ea580c !important;
    border-color: #fed7aa !important;
}

.ss-btn-cancel:hover {
    background: #ffedd5 !important;
    color: #c2410c !important;
}

/* -------------------- 主内容区 -------------------- */
.ss-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* -------------------- 左栏：历史记录 -------------------- */
.ss-history-panel {
    width: 215px;
    min-width: 180px;
    max-width: 240px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    background: #fdfdfd;
    flex-shrink: 0;
}

.ss-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #e0f7ff, #f0f9ff);
    border-bottom: 1px solid #bae6fd;
    flex-shrink: 0;
}

.ss-history-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #0891b2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ss-history-count {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
    margin-left: 3px;
}

.ss-clear-history-btn {
    background: none;
    border: 1px solid #bae6fd;
    color: #0891b2;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 4px;
    transition: all 0.2s;
}

.ss-clear-history-btn:hover {
    background: #e0f7ff;
    border-color: #0891b2;
}

.ss-history-search {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.ss-history-search input {
    width: 100%;
    padding: 5px 10px;
    font-size: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    outline: none;
    color: #334155;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.ss-history-search input:focus {
    border-color: #7dd3fc;
    box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.2);
}

.ss-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.ss-history-list::-webkit-scrollbar { width: 4px; }
.ss-history-list::-webkit-scrollbar-track { background: transparent; }
.ss-history-list::-webkit-scrollbar-thumb { background: #bae6fd; border-radius: 2px; }
.ss-history-list::-webkit-scrollbar-thumb:hover { background: #7dd3fc; }

.ss-history-item {
    padding: 9px 28px 9px 13px;
    cursor: pointer;
    border-bottom: 1px solid #f8fafc;
    transition: all 0.15s;
    position: relative;
}

.ss-history-item:hover {
    background: #f0f9ff;
}

.ss-history-item.active {
    background: #e0f7ff;
    border-left: 3px solid #0891b2;
    padding-left: 10px;
    box-shadow: 0 1px 5px rgba(8, 145, 178, 0.1);
}

.ss-history-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.ss-history-item.active .ss-history-item-title {
    color: #0891b2;
}

.ss-history-item-meta {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-history-time {
    color: #cbd5e1;
    font-size: 10px;
}

.ss-history-empty {
    padding: 24px 16px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.8;
}

.ss-history-item-del {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: none;
    border: none;
    color: transparent;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s;
    flex-shrink: 0;
}

.ss-history-item:hover .ss-history-item-del {
    color: #94a3b8;
    background: #f1f5f9;
}

.ss-history-item:hover .ss-history-item-del:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* -------------------- 中栏：输入配置 -------------------- */
.ss-input-panel {
    width: 300px;
    min-width: 260px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    background: #fafcff;
    flex-shrink: 0;
}

.ss-panel-header {
    padding: 12px 16px 10px;
    background: linear-gradient(to bottom, #f0f9ff, #fafcff);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.ss-panel-header h3 {
    margin: 0 0 3px;
    font-size: 13px;
    font-weight: 600;
    color: #0891b2;
}

.ss-panel-tip {
    font-size: 11px;
    color: #94a3b8;
}

.ss-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px 16px;
}

.ss-input-body::-webkit-scrollbar { width: 4px; }
.ss-input-body::-webkit-scrollbar-track { background: transparent; }
.ss-input-body::-webkit-scrollbar-thumb { background: #bae6fd; border-radius: 2px; }
.ss-input-body::-webkit-scrollbar-thumb:hover { background: #7dd3fc; }

.ss-field-group {
    margin-bottom: 14px;
}

.ss-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 7px;
}

/* -------------------- 文本输入区 -------------------- */
.ss-textarea-wrap {
    position: relative;
}

.ss-textarea {
    width: 100%;
    padding: 10px 12px 26px;
    font-size: 13px;
    line-height: 1.7;
    color: #334155;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    min-height: 140px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.ss-textarea:focus {
    border-color: #7dd3fc;
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.2);
}

.ss-textarea::placeholder {
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.7;
}

.ss-char-counter {
    position: absolute;
    bottom: 7px;
    right: 10px;
    font-size: 11px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
}

.ss-char-counter.warn { color: #f59e0b; font-weight: 600; }
.ss-char-counter.danger { color: #ef4444; font-weight: 700; }

.ss-clear-input-btn {
    position: absolute;
    top: 8px;
    right: 9px;
    background: #f1f5f9;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.ss-clear-input-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

/* -------------------- 选项按钮 -------------------- */
.ss-option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ss-option-btn {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    white-space: nowrap;
}

.ss-option-btn:hover {
    border-color: #7dd3fc;
    color: #0891b2;
    background: #f0f9ff;
}

.ss-option-btn.active {
    background: #0891b2;
    border-color: #0891b2;
    color: #fff;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.25);
}

.ss-degree-hint {
    margin-top: 6px;
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
    min-height: 16px;
    padding: 0 2px;
    font-style: italic;
}

/* -------------------- 生成按钮 -------------------- */
.ss-generate-btn {
    width: 100%;
    padding: 11px;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0891b2, #0ea5e9);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 3px 10px rgba(8, 145, 178, 0.28);
    letter-spacing: 0.3px;
}

.ss-generate-btn:hover {
    background: linear-gradient(135deg, #0e7490, #0284c7);
    box-shadow: 0 5px 15px rgba(8, 145, 178, 0.38);
    transform: translateY(-1px);
}

.ss-generate-btn:active {
    transform: translateY(0);
}

.ss-generate-btn:disabled {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    box-shadow: none;
    cursor: wait;
}

/* -------------------- 使用说明 -------------------- */
.ss-tips-box {
    margin-top: 14px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 8px;
    font-size: 12px;
    color: #475569;
}

.ss-tips-box p {
    margin: 0 0 7px;
    font-weight: 600;
    color: #0891b2;
    font-size: 12px;
}

.ss-tips-box ul {
    margin: 0;
    padding-left: 16px;
    line-height: 1.9;
}

.ss-tips-box ul li::marker,
.ss-result-content li::marker {
    color: #ff9800;
}

.ss-tips-box kbd {
    display: inline-block;
    padding: 1px 5px;
    background: #fff;
    border: 1px solid #bae6fd;
    border-radius: 3px;
    font-size: 10px;
    font-family: monospace;
    color: #0891b2;
}

/* -------------------- 右栏：结果展示 -------------------- */
.ss-result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}

.ss-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: linear-gradient(to bottom, #f8fafc, #fff);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.ss-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.ss-result-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ss-regen-btn {
    padding: 4px 10px;
    font-size: 12px;
    color: #0891b2;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.ss-regen-btn:hover {
    background: #e0f7ff;
    border-color: #7dd3fc;
}

.ss-result-meta {
    font-size: 11px;
    color: #94a3b8;
    background: #f8fafc;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #f1f5f9;
}

.ss-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.ss-result-body::-webkit-scrollbar { width: 5px; }
.ss-result-body::-webkit-scrollbar-track { background: #f8fafc; }
.ss-result-body::-webkit-scrollbar-thumb { background: #bae6fd; border-radius: 3px; }
.ss-result-body::-webkit-scrollbar-thumb:hover { background: #7dd3fc; }

/* -------------------- 占位符 -------------------- */
.ss-result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    text-align: center;
    padding: 40px 20px;
}

.ss-placeholder-icon {
    font-size: 56px;
    margin-bottom: 18px;
    opacity: 0.6;
    animation: ss-float 3s ease-in-out infinite;
}

@keyframes ss-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.ss-placeholder-title {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 8px;
}

.ss-placeholder-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 4px;
}

.ss-placeholder-shortcut {
    font-size: 12px;
    color: #b0bec5;
    margin: 12px 0 0;
}

.ss-placeholder-shortcut kbd {
    padding: 2px 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    font-size: 11px;
    font-family: monospace;
    color: #64748b;
}

/* -------------------- 加载中 -------------------- */
.ss-result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    padding: 40px;
}

.ss-loading-icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: ss-float 1.5s ease-in-out infinite;
}

.ss-loading-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.ss-loading-dots span {
    width: 8px;
    height: 8px;
    background: #0891b2;
    border-radius: 50%;
    animation: ss-dot-bounce 1.4s infinite ease-in-out;
}

.ss-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.ss-loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes ss-dot-bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.ss-loading-text {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    text-align: center;
    transition: opacity 0.3s;
}

/* -------------------- 结果内容 -------------------- */
.ss-result-content {
    padding: 16px 18px;
}

@keyframes ss-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 结果列表 - 由AI生成的HTML */
.ss-result-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ss-result-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.18s;
    animation: ss-fade-in 0.35s ease both;
}

.ss-result-card:hover {
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.12);
    border-color: #bae6fd;
    transform: translateY(-1px);
}

.ss-result-list .ss-result-card:nth-child(2) { animation-delay: 0.08s; }
.ss-result-list .ss-result-card:nth-child(3) { animation-delay: 0.16s; }

.ss-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px 8px;
    background: linear-gradient(to right, #f0f9ff, #fafcff);
    border-bottom: 1px solid #e8f4fd;
}

.ss-card-badge {
    font-size: 12px;
    font-weight: 700;
    color: #0891b2;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ss-card-meta {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.ss-meta-tag {
    font-size: 10px;
    padding: 2px 7px;
    background: #e0f7ff;
    color: #0891b2;
    border-radius: 10px;
    border: 1px solid #bae6fd;
}

.ss-card-content {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.75;
    color: #1e293b;
    word-break: break-word;
    white-space: pre-wrap;
    border-bottom: 1px solid #f1f5f9;
}

.ss-card-analysis {
    padding: 10px 16px;
    background: #fafcff;
    border-bottom: 1px solid #f1f5f9;
}

.ss-analysis-title {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 5px;
}

.ss-analysis-text {
    font-size: 12px;
    color: #475569;
    line-height: 1.7;
}

.ss-card-actions {
    padding: 8px 14px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.ss-copy-btn {
    padding: 4px 12px;
    font-size: 12px;
    color: #0891b2;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.ss-copy-btn:hover {
    background: #e0f7ff;
    border-color: #0891b2;
}

/* -------------------- 错误提示 -------------------- */
.ss-result-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    padding: 40px 20px;
    text-align: center;
    gap: 12px;
}

.ss-error-icon {
    font-size: 36px;
}

.ss-error-msg {
    font-size: 13px;
    color: #64748b;
    max-width: 360px;
    line-height: 1.7;
}

.ss-error-retry-btn {
    padding: 7px 18px;
    font-size: 13px;
    color: #fff;
    background: #0891b2;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.ss-error-retry-btn:hover {
    background: #0e7490;
}

/* -------------------- Toast 通知 -------------------- */
.ss-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: #fff;
    padding: 9px 20px;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ss-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* -------------------- 遮罩层 -------------------- */
.ss-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.ss-modal-overlay.active {
    display: block;
}

/* -------------------- 示例导入弹窗 -------------------- */
.ss-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: min(680px, 94vw);
    max-height: 80vh;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    z-index: 10001;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0;
}

.ss-modal.active {
    display: flex;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.ss-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #e0f7ff, #f0f9ff);
    border-bottom: 1px solid #bae6fd;
    flex-shrink: 0;
}

.ss-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0891b2;
}

.ss-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.ss-modal-close:hover {
    background: #fef2f2;
    color: #ef4444;
}

.ss-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
}

.ss-modal-body::-webkit-scrollbar { width: 5px; }
.ss-modal-body::-webkit-scrollbar-track { background: transparent; }
.ss-modal-body::-webkit-scrollbar-thumb { background: #bae6fd; border-radius: 3px; }
.ss-modal-body::-webkit-scrollbar-thumb:hover { background: #7dd3fc; }

.ss-modal-desc {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.ss-example-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.ss-example-item {
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ss-example-item:hover {
    background: #e0f7ff;
    border-color: #7dd3fc;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.1);
}

.ss-example-title {
    font-size: 13px;
    font-weight: 600;
    color: #0891b2;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ss-example-tags {
    display: flex;
    gap: 5px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.ss-example-tag {
    font-size: 10px;
    padding: 2px 7px;
    background: #e0f7ff;
    color: #0891b2;
    border-radius: 10px;
}

.ss-example-preview {
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== 暗黑模式 ==================== */
body.dark .ss-container {
    background: #0f172a;
    border-color: #1e3a4a;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

body.dark .ss-toolbar {
    background: linear-gradient(135deg, #0f2235 0%, #0f172a 100%);
    border-bottom-color: #1e3a4a;
}

body.dark .ss-toolbar-group + .ss-toolbar-group {
    border-left-color: #1e3a4a;
}

body.dark .ss-toolbar-title {
    color: #38bdf8;
}

body.dark .ss-toolbar-btn {
    color: #94a3b8;
    background: #1e293b;
    border-color: #334155;
}

body.dark .ss-toolbar-btn:hover {
    background: #0c2333;
    border-color: #38bdf8;
    color: #38bdf8;
}

body.dark .ss-btn-primary {
    background: linear-gradient(135deg, #0e7490, #0284c7);
    color: #fff !important;
}

body.dark .ss-btn-primary:hover {
    background: linear-gradient(135deg, #0891b2, #0ea5e9) !important;
}

body.dark .ss-btn-cancel {
    background: #1c0e02;
    border-color: #7c3908 !important;
    color: #fb923c !important;
}

body.dark .ss-btn-cancel:hover {
    background: #2a1304 !important;
    color: #f97316 !important;
}

body.dark .ss-history-panel {
    background: #111827;
    border-right-color: #1e293b;
}

body.dark .ss-history-header {
    background: linear-gradient(to bottom, #0d1f2d, #111827);
    border-bottom-color: #1e3a4a;
}

body.dark .ss-history-header h3 {
    color: #38bdf8;
}

body.dark .ss-clear-history-btn {
    border-color: #1e3a4a;
    color: #38bdf8;
}

body.dark .ss-clear-history-btn:hover {
    background: #0c2333;
    border-color: #38bdf8;
}

body.dark .ss-history-search input {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark .ss-history-search input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

body.dark .ss-history-list::-webkit-scrollbar-thumb { background: #1e3a4a; }
body.dark .ss-history-list::-webkit-scrollbar-thumb:hover { background: #38bdf8; }

body.dark .ss-history-item:hover {
    background: #0c2333;
}

body.dark .ss-history-item.active {
    background: #0d1f2d;
    border-left-color: #38bdf8;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

body.dark .ss-history-item-title {
    color: #e2e8f0;
}

body.dark .ss-history-item.active .ss-history-item-title {
    color: #38bdf8;
}

body.dark .ss-history-item-meta { color: #475569; }
body.dark .ss-history-empty { color: #475569; }
body.dark .ss-history-search { border-bottom-color: #1e293b; }
body.dark .ss-history-item { border-bottom-color: #1e293b; }

body.dark .ss-history-item:hover .ss-history-item-del {
    color: #475569;
    background: #1e293b;
}

body.dark .ss-history-item:hover .ss-history-item-del:hover {
    color: #c62828;
    background: #260a0a;
}

body.dark .ss-input-panel {
    background: #0f172a;
    border-right-color: #1e293b;
}

body.dark .ss-panel-header {
    background: linear-gradient(to bottom, #0d1f2d, #0f172a);
    border-bottom-color: #1e293b;
}

body.dark .ss-panel-header h3 { color: #38bdf8; }
body.dark .ss-panel-tip { color: #475569; }

body.dark .ss-input-body::-webkit-scrollbar-thumb { background: #1e3a4a; }
body.dark .ss-input-body::-webkit-scrollbar-thumb:hover { background: #38bdf8; }

body.dark .ss-label { color: #94a3b8; }

body.dark .ss-textarea {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark .ss-textarea:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

body.dark .ss-textarea::placeholder { color: #334155; }

body.dark .ss-char-counter { color: #475569; }
body.dark .ss-char-counter.warn { color: #f59e0b; }
body.dark .ss-char-counter.danger { color: #ef4444; }

body.dark .ss-clear-input-btn {
    background: #334155;
    color: #94a3b8;
}

body.dark .ss-clear-input-btn:hover {
    background: #475569;
    color: #e2e8f0;
}

body.dark .ss-option-btn {
    color: #94a3b8;
    background: #1e293b;
    border-color: #334155;
}

body.dark .ss-option-btn:hover {
    border-color: #38bdf8;
    color: #38bdf8;
    background: #0c2333;
}

body.dark .ss-option-btn.active {
    background: #0e7490;
    border-color: #0891b2;
    color: #fff;
}

body.dark .ss-degree-hint { color: #475569; }

body.dark .ss-generate-btn {
    background: linear-gradient(135deg, #0e7490, #0284c7);
    box-shadow: 0 3px 10px rgba(14, 116, 144, 0.35);
}

body.dark .ss-generate-btn:hover {
    background: linear-gradient(135deg, #0891b2, #0ea5e9);
}

body.dark .ss-generate-btn:disabled {
    background: linear-gradient(135deg, #334155, #1e293b);
}

body.dark .ss-tips-box {
    background: linear-gradient(135deg, #0d1f2d, #0f172a);
    border-color: #1e3a4a;
    color: #94a3b8;
}

body.dark .ss-tips-box p { color: #38bdf8; }
body.dark .ss-tips-box ul { color: #94a3b8; }

body.dark .ss-tips-box kbd {
    background: #1e293b;
    border-color: #334155;
    color: #38bdf8;
}

body.dark .ss-result-panel { background: #0f172a; }

body.dark .ss-result-header {
    background: linear-gradient(to bottom, #111827, #0f172a);
    border-bottom-color: #1e293b;
}

body.dark .ss-result-header h3 { color: #e2e8f0; }

body.dark .ss-regen-btn {
    background: #1e293b;
    border-color: #334155;
    color: #38bdf8;
}

body.dark .ss-regen-btn:hover {
    background: #0c2333;
    border-color: #38bdf8;
}

body.dark .ss-result-meta {
    background: #1e293b;
    border-color: #334155;
    color: #475569;
}

body.dark .ss-result-body::-webkit-scrollbar-track { background: #0f172a; }
body.dark .ss-result-body::-webkit-scrollbar-thumb { background: #1e3a4a; }
body.dark .ss-result-body::-webkit-scrollbar-thumb:hover { background: #38bdf8; }

body.dark .ss-placeholder-title { color: #94a3b8; }
body.dark .ss-placeholder-desc { color: #475569; }
body.dark .ss-placeholder-shortcut { color: #334155; }
body.dark .ss-placeholder-shortcut kbd {
    background: #1e293b;
    border-color: #334155;
    color: #64748b;
}

body.dark .ss-loading-dots span { background: #38bdf8; }
body.dark .ss-loading-text { color: #475569; }

body.dark .ss-result-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark .ss-result-card:hover {
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.1);
}

body.dark .ss-card-header {
    background: linear-gradient(to right, #0d1f2d, #1e293b);
    border-bottom-color: #334155;
}

body.dark .ss-card-badge { color: #38bdf8; }

body.dark .ss-meta-tag {
    background: #0c2333;
    color: #38bdf8;
    border-color: #1e3a4a;
}

body.dark .ss-card-content {
    color: #e2e8f0;
    border-bottom-color: #334155;
}

body.dark .ss-card-analysis {
    background: #111827;
    border-bottom-color: #334155;
}

body.dark .ss-analysis-title { color: #64748b; }
body.dark .ss-analysis-text { color: #94a3b8; }

body.dark .ss-result-content em,
body.dark .ss-card-content em {
    color: #A1887F;
}

body.dark .ss-copy-btn {
    background: #1e293b;
    border-color: #334155;
    color: #38bdf8;
}

body.dark .ss-copy-btn:hover {
    background: #0c2333;
    border-color: #38bdf8;
}

body.dark .ss-error-msg { color: #94a3b8; }

body.dark .ss-error-retry-btn {
    background: #0e7490;
}

body.dark .ss-error-retry-btn:hover {
    background: #0891b2;
}

body.dark .ss-toast { background: #1e3a4a; }

body.dark .ss-modal {
    background: #1e293b;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.dark .ss-modal-header {
    background: linear-gradient(135deg, #0d1f2d, #1e293b);
    border-bottom-color: #334155;
}

body.dark .ss-modal-header h3 { color: #38bdf8; }
body.dark .ss-modal-close { color: #475569; }
body.dark .ss-modal-close:hover { background: #3d1515; color: #ef4444; }

body.dark .ss-modal-body::-webkit-scrollbar-thumb { background: #334155; }
body.dark .ss-modal-body::-webkit-scrollbar-thumb:hover { background: #38bdf8; }
body.dark .ss-modal-desc { color: #475569; border-bottom-color: #334155; }

body.dark .ss-example-item {
    background: #0f172a;
    border-color: #334155;
}

body.dark .ss-example-item:hover {
    background: #0c2333;
    border-color: #38bdf8;
}

body.dark .ss-example-title { color: #38bdf8; }

body.dark .ss-example-tag {
    background: #0c2333;
    color: #38bdf8;
}

body.dark .ss-example-preview { color: #475569; }

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
    .ss-container {
        height: calc(100vh - 100px);
        border-radius: 8px;
    }

    .ss-main-content {
        flex-direction: column;
    }

    .ss-history-panel {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        max-height: 160px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .ss-input-panel {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        max-height: 340px;
    }

    .ss-result-panel {
        min-height: 300px;
    }

    .ss-example-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .ss-history-panel {
        width: 180px;
    }

    .ss-input-panel {
        width: 260px;
    }
}

/* ==================== 响应式暗黑适配 ==================== */
@media (max-width: 768px) {
    body.dark .ss-history-panel { border-bottom-color: #1e293b; }
    body.dark .ss-input-panel  { border-bottom-color: #1e293b; }
}

/* ==================== 打印样式 ==================== */
@media print {
    .ss-toolbar, .ss-history-panel, .ss-input-panel {
        display: none !important;
    }

    .ss-result-panel {
        width: 100%;
    }

    .ss-result-body {
        overflow: visible;
    }
}
