/* =============================================
   毒鸡汤生成器 - toxic_chicken_soup.css
   暗黑毒性主题，三栏布局，参考 feedback_generation 风格
   ============================================= */

/* ========== 主容器 ========== */
.tcs-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.tcs-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;
}

/* ========== 顶部工具栏（深邃毒性主题） ========== */
.tcs-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1040 50%, #0f0a25 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 12px rgba(13, 13, 26, 0.5);
    flex-shrink: 0;
    border-bottom: 1px solid rgba(167, 139, 250, 0.2);
}

.tcs-toolbar .toolbar-title {
    font-size: 13px;
    font-weight: 700;
    color: #a78bfa;
    letter-spacing: 0.8px;
    margin-right: 8px;
    text-shadow: 0 0 8px rgba(167, 139, 250, 0.4);
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 28px;
}

.toolbar-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #5b21b6;
    transition: all 0.2s;
    white-space: nowrap;
}

.toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 主操作按钮（生成毒鸡汤）- 毒性绿 */
.toolbar-btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.5);
    color: #fff;
}

/* 取消按钮 */
.toolbar-btn-cancel {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.toolbar-btn-cancel:hover:not(:disabled) {
    background: #ef4444;
    color: #fff;
}

/* ========== 抖动动画 ========== */
@keyframes tcs-shake {
    0%, 100% { transform: translateX(0); }
    10%, 50%, 90% { transform: translateX(-5px); }
    30%, 70% { transform: translateX(5px); }
}

.tcs-input.shake, .tcs-select.shake {
    animation: tcs-shake 0.5s ease-in-out;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* ========== 主内容区：三栏 ========== */
.tcs-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ========== 左栏：历史记录 ========== */
.tcs-history-panel {
    width: 200px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    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, #fafafa, #f5f5f5);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.history-count {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: #a78bfa;
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 5px;
    vertical-align: middle;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.history-clear-btn {
    background: #fff0f0;
    border: none;
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 3px;
    transition: background 0.2s;
}

.history-clear-btn:hover { background: #fde8e8; }

.history-search {
    padding: 8px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #374151;
    background: #fafafa;
}

.history-search input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.15);
    background: #fff;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-track { background: transparent; }
.history-list:hover::-webkit-scrollbar-track { background: #f3f0ff; }
.history-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.history-list::-webkit-scrollbar-thumb:hover { background: #a78bfa; }

.history-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 24px 8px;
    user-select: none;
}

.history-item {
    display: flex;
    flex-direction: column;
    padding: 9px 11px;
    margin: 3px 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: tcs-hi-fadein 0.2s ease;
}

@keyframes tcs-hi-fadein {
    from { opacity: 0; transform: translateX(-4px); }
    to   { opacity: 1; transform: translateX(0); }
}

.history-item:hover {
    background: #f3f0ff;
    border-color: #c4b5fd;
    transform: translateX(2px);
}

.history-item.active {
    background: #f3f0ff;
    border-color: #a78bfa;
    border-left-color: #7c3aed;
    box-shadow: 0 1px 3px rgba(124, 58, 237, 0.15);
}

/* 悬停金色导引线 */
.history-item::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 0;
    background: #f59e0b;
    border-radius: 2px 0 0 2px;
    transition: width 0.2s ease;
    pointer-events: none;
}
.history-item:hover::after {
    width: 3px;
}

.history-item-del {
    position: absolute;
    top: 4px; right: 4px;
    width: 18px; height: 18px;
    background: #fde8e8;
    color: #ef4444;
    border: none;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.history-item:hover .history-item-del { opacity: 1; }
.history-item-del:hover { background: #ef4444; color: #fff; }

.history-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 22px;
    margin-bottom: 2px;
}

.history-item-meta {
    font-size: 10px;
    color: #7c3aed;
    margin-bottom: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-time {
    font-size: 10px;
    color: #94a3b8;
}

/* ========== 中栏：表单输入 ========== */
.tcs-input-panel {
    width: 340px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========== 右栏：结果展示 ========== */
.tcs-result-panel {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 320px;
}

/* ========== 通用面板头部 ========== */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 12px 16px;
    min-height: 44px;
    background: linear-gradient(to bottom, #fafafa, #f5f5f5);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.panel-tip {
    font-size: 11px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 1;
    overflow: hidden;
}

.result-meta-badge {
    font-size: 11px;
    color: #7c3aed;
    background: #f3f0ff;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-count-badge {
    font-size: 11px;
    color: #16a34a;
    background: #f0fdf4;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.result-time {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========== 表单区域 ========== */
.tcs-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.tcs-input-body::-webkit-scrollbar { width: 4px; }
.tcs-input-body::-webkit-scrollbar-track { background: transparent; }
.tcs-input-body:hover::-webkit-scrollbar-track { background: #f3f0ff; }
.tcs-input-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.tcs-input-body::-webkit-scrollbar-thumb:hover { background: #a78bfa; }

.form-group { margin-bottom: 14px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.required-mark { color: #ef4444; margin-left: 2px; }
.label-tip { font-size: 11px; font-weight: 400; color: #9ca3af; }

.tcs-input, .tcs-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 13px;
    color: #374151;
    background: #fafafa;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.tcs-input:focus, .tcs-select:focus {
    border-color: #a78bfa;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.12);
}

.tcs-input:hover:not(:focus), .tcs-select:hover:not(:focus) {
    border-color: #c4b5fd;
    background: #fff;
}

.tcs-input::placeholder { color: #b0b7c3; }

.tcs-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239ca3af'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.form-row { display: flex; gap: 10px; }
.form-group-half { flex: 1; min-width: 0; }

/* 快速标签 */
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.theme-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f3f0ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.18s;
    user-select: none;
}

.theme-tag:hover {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

.theme-tag.active {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}

.shortcut-hint {
    font-size: 11px;
    color: #b0b7c3;
    text-align: center;
    padding: 8px 0 4px;
    border-top: 1px dashed #e5e7eb;
    margin-top: 8px;
    user-select: none;
}

/* ========== 结果内容区域 ========== */
.tcs-result-body {
    flex: 1;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.tcs-result-body::-webkit-scrollbar { width: 5px; }
.tcs-result-body::-webkit-scrollbar-track { background: transparent; }
.tcs-result-body:hover::-webkit-scrollbar-track { background: #f3f0ff; }
.tcs-result-body::-webkit-scrollbar-thumb { background: #c4b5fd; border-radius: 3px; }
.tcs-result-body::-webkit-scrollbar-thumb:hover { background: #7c3aed; }

/* ========== 占位提示 ========== */
.result-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    user-select: none;
}

.placeholder-icon {
    font-size: 52px;
    margin-bottom: 16px;
    opacity: 0.45;
    animation: tcs-float 3.5s ease-in-out infinite;
}

@keyframes tcs-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.placeholder-title {
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 8px;
}

.placeholder-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 4px 0;
    line-height: 1.6;
}

/* ========== 加载动画 ========== */
.result-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.loading-cauldron {
    font-size: 40px;
    margin-bottom: 14px;
    animation: tcs-cauldron 1.2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(124, 58, 237, 0.6));
}

@keyframes tcs-cauldron {
    0%, 100% { transform: scale(1) rotate(-5deg); }
    50% { transform: scale(1.15) rotate(5deg); }
}

.loading-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.loading-dots span {
    width: 9px; height: 9px;
    background: #7c3aed;
    border-radius: 50%;
    animation: tcs-dot-pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; background: #22c55e; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; background: #ef4444; }

@keyframes tcs-dot-pulse {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
    40% { transform: scale(1.1); opacity: 1; }
}

.loading-text {
    font-size: 13px;
    color: #7c3aed;
    margin: 0;
    font-weight: 500;
}

/* ========== 结果内容 ========== */
.result-content {
    flex: 1;
    padding: 16px;
    animation: tcs-result-fadein 0.4s ease;
    min-height: 0;
}

@keyframes tcs-result-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== 毒鸡汤 Quote 卡片 ========== */
.quote-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quote-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #7c3aed;
    border-radius: 8px;
    padding: 14px 16px;
    position: relative;
    transition: all 0.2s;
    animation: tcs-card-in 0.3s ease both;
    overflow: hidden; /* 裁剪装饰性引号不溢出 */
}

.quote-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10), 0 0 0 1px rgba(167, 139, 250, 0.15);
    transform: translateX(3px);
}

/* 装饰性大引号（背景水印） */
.quote-card::after {
    content: '\201D';
    position: absolute;
    bottom: -6px;
    right: 10px;
    font-size: 60px;
    font-family: Georgia, 'Times New Roman', serif;
    color: rgba(124, 58, 237, 0.06);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

@keyframes tcs-card-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 按序号设置动画延迟 */
.quote-card:nth-child(1) { animation-delay: 0.05s; }
.quote-card:nth-child(2) { animation-delay: 0.10s; }
.quote-card:nth-child(3) { animation-delay: 0.15s; }
.quote-card:nth-child(4) { animation-delay: 0.20s; }
.quote-card:nth-child(5)  { animation-delay: 0.25s; }
.quote-card:nth-child(6)  { animation-delay: 0.30s; }
.quote-card:nth-child(7)  { animation-delay: 0.35s; }
.quote-card:nth-child(8)  { animation-delay: 0.40s; }
.quote-card:nth-child(9)  { animation-delay: 0.45s; }
.quote-card:nth-child(10) { animation-delay: 0.50s; }
.quote-card:nth-child(n+11) { animation-delay: 0.55s; }

.quote-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.quote-index {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #7c3aed;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    padding: 0 5px;
    line-height: 1;
}

.quote-main-text {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.6;
    flex: 1;
    word-break: break-word;
}

.quote-annotation {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 10px;
    background: #faf5ff;
    border-radius: 5px;
    border: 1px solid #ede9fe;
    margin-top: 2px;
}

.annotation-icon {
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}

.annotation-text {
    font-size: 12px;
    color: #6d28d9;
    line-height: 1.6;
    flex: 1;
    font-style: italic;
}

.copy-quote-btn {
    position: absolute;
    top: 10px; right: 10px;
    width: 24px; height: 24px;
    background: #f3f0ff;
    border: 1px solid #ddd6fe;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
    color: #7c3aed;
    padding: 0;
}

.quote-card:hover .copy-quote-btn { opacity: 1; }
.copy-quote-btn:hover { background: #7c3aed; color: #fff; border-color: #7c3aed; }

/* 错误提示 */
.result-content.result-content--error {
    border-left: none;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.result-error-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    flex: 1;
}

.result-error-icon { font-size: 40px; margin-bottom: 14px; color: #f87171; }
.result-error-title { font-size: 14px; font-weight: 600; color: #dc2626; margin: 0 0 8px; }
.result-error-hint { font-size: 12px; color: #9ca3af; margin: 0 0 16px; }

.result-error-retry {
    padding: 8px 22px;
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.result-error-retry:hover {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.45);
    transform: translateY(-1px);
}

/* ========== 示例模态框 ========== */
.tcs-modal-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    backdrop-filter: blur(2px);
}

.tcs-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    width: 90%; max-width: 680px;
    max-height: 80vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: tcs-modal-in 0.22s ease-out;
}

@keyframes tcs-modal-in {
    from { opacity: 0; transform: translate(-50%, calc(-50% - 16px)); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

.tcs-modal-content { display: flex; flex-direction: column; flex: 1; overflow: hidden; }

.tcs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1040 100%);
    color: #fff;
}

.tcs-modal-header h3 { margin: 0; font-size: 15px; font-weight: 600; color: #a78bfa; }

.tcs-modal-close {
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.3);
    color: #a78bfa;
    width: 28px; height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}

.tcs-modal-close:hover { background: #7c3aed; color: #fff; border-color: #7c3aed; }

.tcs-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    align-content: start;
}

.tcs-modal-body::-webkit-scrollbar { width: 4px; }
.tcs-modal-body::-webkit-scrollbar-track { background: transparent; }
.tcs-modal-body:hover::-webkit-scrollbar-track { background: #f3f0ff; }
.tcs-modal-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.tcs-modal-body::-webkit-scrollbar-thumb:hover { background: #a78bfa; }

/* 示例卡片 */
.example-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.example-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: linear-gradient(135deg, #7c3aed, #22c55e);
    opacity: 0;
    transition: opacity 0.2s;
}

.example-card:hover {
    border-color: #a78bfa;
    background: #faf5ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.12);
}

.example-card:hover::before { opacity: 1; }

.example-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.example-card-badge {
    font-size: 10px;
    font-weight: 500;
    background: #f3f0ff;
    color: #7c3aed;
    padding: 1px 6px;
    border-radius: 10px;
    white-space: nowrap;
}

.example-card-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 10px;
}

.example-card-import {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #7c3aed;
    background: #f3f0ff;
    border: none;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.example-card-import:hover { background: #7c3aed; color: #fff; }

/* ========== 响应式布局 ========== */
@media (max-width: 1024px) {
    .tcs-input-panel { width: 280px; }
    .panel-tip { display: none; }
}

@media (max-width: 768px) {
    .tcs-main-content { flex-direction: column; overflow-y: auto; }
    .tcs-history-panel { width: 100%; max-height: 150px; border-right: none; border-bottom: 1px solid #e2e8f0; }
    .tcs-input-panel { width: 100%; border-right: none; border-bottom: 1px solid #e2e8f0; max-height: 380px; }
    .tcs-result-panel { width: 100%; min-height: 300px; }
    .form-row { flex-direction: column; }
    .tcs-modal-body { grid-template-columns: 1fr; }
}

/* ========== 暗黑模式（全部以 body.dark 为父级前缀） ========== */
body.dark .tcs-container { background: #0f172a; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }

body.dark .tcs-toolbar {
    background: linear-gradient(135deg, #050508 0%, #0d0820 50%, #050510 100%);
    border-bottom-color: rgba(124, 58, 237, 0.25);
}

body.dark .toolbar-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #a78bfa;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

body.dark .toolbar-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); color: #c4b5fd; }

body.dark .toolbar-btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    color: #fff;
    border: none;
}

body.dark .toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #fff;
}

body.dark .toolbar-btn-cancel {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

body.dark .tcs-history-panel { background: #1e293b; border-right-color: #334155; }

body.dark .history-panel-header {
    background: linear-gradient(to bottom, #253044, #1e293b);
    border-bottom-color: #334155;
}

body.dark .history-panel-header h3 { color: #94a3b8; }
body.dark .history-count { background: #5b21b6; color: #e9d5ff; }

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.25); }

body.dark .history-search { border-bottom-color: #334155; }
body.dark .history-search input {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}
body.dark .history-search input:focus {
    border-color: #7c3aed;
    background: #1e293b;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}
body.dark .history-search input::placeholder { color: #6e7681; }

body.dark .history-list::-webkit-scrollbar-track { background: #1e293b; }
body.dark .history-list:hover::-webkit-scrollbar-track { background: #1e293b; }
body.dark .history-list::-webkit-scrollbar-thumb { background: #334155; }
body.dark .history-list::-webkit-scrollbar-thumb:hover { background: #7c3aed; }

body.dark .history-empty { color: #475569; }
body.dark .history-item { background: #253044; border-color: #334155; border-left-color: transparent; }
body.dark .history-item:hover { background: #2d1f4e; border-color: #5b21b6; }
body.dark .history-item.active { background: #2d1f4e; border-color: #7c3aed; border-left-color: #7c3aed; }
body.dark .history-item-title { color: #e2e8f0; }
body.dark .history-item-meta { color: #a78bfa; }
body.dark .history-item-time { color: #64748b; }
body.dark .history-item-del { background: rgba(239, 68, 68, 0.15); color: #f87171; }
body.dark .history-item-del:hover { background: #ef4444; color: #fff; }

body.dark .tcs-input-panel { background: #1e293b; border-right-color: #334155; }
body.dark .tcs-result-panel { background: #1e293b; }

body.dark .panel-header {
    background: linear-gradient(to bottom, #253044, #1e293b);
    border-bottom-color: #334155;
}
body.dark .panel-header h3 { color: #94a3b8; }
body.dark .panel-tip { color: #475569; }

body.dark .result-meta-badge { background: #2d1f4e; color: #a78bfa; }
body.dark .result-count-badge { background: #14532d; color: #4ade80; }
body.dark .result-time { color: #64748b; }

body.dark .tcs-input-body::-webkit-scrollbar-track { background: #1e293b; }
body.dark .tcs-input-body:hover::-webkit-scrollbar-track { background: #1e293b; }
body.dark .tcs-input-body::-webkit-scrollbar-thumb { background: #334155; }
body.dark .tcs-input-body::-webkit-scrollbar-thumb:hover { background: #7c3aed; }

body.dark .form-group label { color: #94a3b8; }

body.dark .tcs-input,
body.dark .tcs-select {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark .tcs-input:focus, body.dark .tcs-select:focus {
    border-color: #7c3aed;
    background: #1e293b;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

body.dark .tcs-input:hover:not(:focus),
body.dark .tcs-select:hover:not(:focus) {
    border-color: #4c1d95;
    background: #1e293b;
}

body.dark .tcs-input::placeholder { color: #6e7681; }

body.dark .tcs-select option { background: #1e293b; color: #e2e8f0; }

body.dark .theme-tag { background: #1e1035; color: #a78bfa; border-color: #4c1d95; }
body.dark .theme-tag:hover, body.dark .theme-tag.active { background: #7c3aed; color: #fff; border-color: #7c3aed; }

body.dark .shortcut-hint { color: #475569; border-top-color: #334155; }

body.dark .tcs-result-body { background: #0f172a; }
body.dark .tcs-result-body::-webkit-scrollbar-track { background: #0f172a; }
body.dark .tcs-result-body:hover::-webkit-scrollbar-track { background: #0f172a; }
body.dark .tcs-result-body::-webkit-scrollbar-thumb { background: #334155; }
body.dark .tcs-result-body::-webkit-scrollbar-thumb:hover { background: #7c3aed; }

body.dark .placeholder-title { color: #475569; }
body.dark .placeholder-desc { color: #4b5563; }

body.dark .loading-text { color: #a78bfa; }

body.dark .result-content { background: transparent; }

body.dark .quote-card { background: #1e293b; border-color: #334155; }
body.dark .quote-card::after { color: rgba(167, 139, 250, 0.08); }
body.dark .quote-card:hover { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(124, 58, 237, 0.35); }
body.dark .quote-main-text { color: #f1f5f9; }
body.dark .quote-annotation { background: #1e1035; border-color: #4c1d95; }
body.dark .annotation-text { color: #c4b5fd; }
body.dark .copy-quote-btn { background: #1e1035; border-color: #4c1d95; color: #a78bfa; }
body.dark .copy-quote-btn:hover { background: #7c3aed; color: #fff; border-color: #7c3aed; }
body.dark .quote-index { background: #7c3aed; }

body.dark .result-error-title { color: #f87171; }
body.dark .result-error-hint { color: #64748b; }
body.dark .result-error-retry {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

body.dark .tcs-modal { background: #1e293b; }
body.dark .tcs-modal-header { background: linear-gradient(135deg, #050508, #0d0820); }
body.dark .tcs-modal-body::-webkit-scrollbar-track { background: #1e293b; }
body.dark .tcs-modal-body:hover::-webkit-scrollbar-track { background: #1e293b; }
body.dark .tcs-modal-body::-webkit-scrollbar-thumb { background: #334155; }
body.dark .tcs-modal-body::-webkit-scrollbar-thumb:hover { background: #7c3aed; }

body.dark .example-card { background: #253044; border-color: #334155; }
body.dark .example-card:hover { background: #2d1f4e; border-color: #7c3aed; }
body.dark .example-card-title { color: #f1f5f9; }
body.dark .example-card-badge { background: #2d1f4e; color: #a78bfa; }
body.dark .example-card-desc { color: #94a3b8; }
body.dark .example-card-import { background: #2d1f4e; color: #a78bfa; }
body.dark .example-card-import:hover { background: #7c3aed; color: #fff; }
