.ts-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ts-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ts-section {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.ts-section h3 {
    font-size: 0.95em;
    color: #2c3e50;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ts-section h3 i {
    color: #3498db;
}

/* 上传区 */
.ts-upload {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.ts-upload:hover,
.ts-upload.dragover {
    border-color: #3498db;
    background: #f0f7ff;
}

.ts-upload i {
    font-size: 1.8em;
    color: #3498db;
    margin-bottom: 8px;
}

.ts-upload p {
    color: #666;
    font-size: 0.85em;
    margin: 0 0 4px;
}

.ts-hint {
    color: #999;
    font-size: 0.75em;
}

/* 文件信息 */
.ts-file-info {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ts-file-name {
    font-size: 0.85em;
    font-weight: 600;
    color: #2c3e50;
    word-break: break-all;
}

.ts-file-size {
    font-size: 0.8em;
    color: #718096;
}

/* 拆分模式标签 */
.ts-mode-tabs {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
}

.ts-mode-tab {
    flex: 1;
    padding: 8px 4px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 0.8em;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.ts-mode-tab:hover:not(:disabled) {
    color: #334155;
}

.ts-mode-tab.active {
    background: #fff;
    color: #3498db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ts-mode-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 模式面板 */
.ts-mode-panel {
    display: none;
    margin-top: 12px;
}

.ts-mode-panel.active {
    display: block;
}

/* 表单 */
.ts-form-row {
    margin-bottom: 14px;
}

.ts-form-row label {
    display: block;
    font-size: 0.85em;
    color: #555;
    margin-bottom: 6px;
    font-weight: 500;
}

.ts-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ts-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    outline: none;
    transition: border-color 0.2s;
}

.ts-input:focus {
    border-color: #3498db;
}

.ts-input-unit {
    font-size: 0.85em;
    color: #666;
    font-weight: 600;
}

.ts-input-desc {
    font-size: 0.75em;
    color: #94a3b8;
    margin-top: 4px;
    margin-bottom: 0;
}

.ts-form-row input[type="range"] {
    width: 100%;
    margin-top: 4px;
}

/* 按钮 */
.ts-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ts-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.ts-btn-primary {
    background: #3498db;
    color: #fff;
}

.ts-btn-primary:hover:not(:disabled) {
    background: #2980b9;
}

.ts-btn-success {
    background: #27ae60;
    color: #fff;
}

.ts-btn-success:hover:not(:disabled) {
    background: #219a52;
}

.ts-btn-outline {
    background: #fff;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.ts-btn-outline:hover:not(:disabled) {
    background: #fef2f2;
}

.ts-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 使用次数信息 */
.ts-usage-info {
    background: #e8f4fd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85em;
    color: #2c3e50;
    text-align: center;
}

.ts-usage-info i {
    color: #3498db;
    margin-right: 4px;
}

/* VIP遮罩 */
.ts-vip-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(0,0,0,0.75);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    backdrop-filter: blur(2px);
}

.ts-vip-mask-inner {
    text-align: center;
    color: #fff;
    padding: 30px;
}

.ts-vip-mask-icon {
    font-size: 3em;
    margin-bottom: 12px;
}

.ts-vip-mask-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 8px;
}

.ts-vip-mask-desc {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 20px;
}

.ts-vip-mask-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.ts-vip-btn {
    background: #3498db;
    color: #fff;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.ts-vip-btn:hover {
    background: #2980b9;
}

.ts-vip-btn-single {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.ts-vip-btn-single:hover {
    background: #c0392b;
}

/* 主区域 */
.ts-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

/* 结果区域 */
.ts-result-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ts-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.ts-placeholder i {
    font-size: 3em;
    margin-bottom: 12px;
    color: #bdc3c7;
}

.ts-placeholder p {
    margin: 0;
}

/* 结果头部 */
.ts-result-header {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ts-result-title {
    font-size: 1em;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ts-result-count {
    background: #3498db;
    color: #fff;
    font-size: 0.75em;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 700;
}

/* 结果列表 */
.ts-result-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ts-result-item {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    align-items: center;
    transition: all 0.2s;
}

.ts-result-item:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.ts-result-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ts-result-name {
    font-size: 0.9em;
    font-weight: 600;
    color: #2c3e50;
    word-break: break-all;
}

.ts-result-meta {
    font-size: 0.8em;
    color: #718096;
}

.ts-result-lines {
    background: #e8f4fd;
    color: #1e40af;
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
    width: fit-content;
}

.ts-result-actions {
    display: flex;
    gap: 6px;
}

.ts-result-actions .ts-btn {
    padding: 6px 12px;
    font-size: 0.8em;
    min-width: auto;
}

/* 预览内容 */
.ts-preview {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 10px;
    margin-top: 8px;
    font-family: monospace;
    font-size: 0.8em;
    color: #555;
    max-height: 120px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
}

/* 进度条 */
.ts-progress {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.ts-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
    transition: width 0.3s;
}

.ts-progress-text {
    font-size: 0.75em;
    color: #3498db;
    margin-top: 2px;
}

/* 状态标签 */
.ts-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8em;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.ts-status-pending {
    background: #f1f5f9;
    color: #64748b;
}

.ts-status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.ts-status-done {
    background: #d1fae5;
    color: #065f46;
}

.ts-status-error {
    background: #fee2e2;
    color: #991b1b;
}

/* 使用提示 */
.ts-tips {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.ts-tips h4 {
    font-size: 1em;
    color: #2c3e50;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ts-tips h4 i {
    color: #f39c12;
}

.ts-tip-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.ts-tip-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid #3498db;
}

.ts-tip-item strong {
    display: block;
    font-size: 0.9em;
    color: #2c3e50;
    margin-bottom: 4px;
}

.ts-tip-item p {
    font-size: 0.8em;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.ts-toast{position:fixed;top:20px;left:50%;transform:translateX(-50%) translateY(-20px);background:#333;color:#fff;padding:10px 20px;border-radius:8px;font-size:0.9em;z-index:9999;opacity:0;transition:all 0.3s ease;pointer-events:none;}.ts-toast.show{opacity:1;transform:translateX(-50%) translateY(0);}.ts-toast.success{background:#27ae60;}.ts-toast.error{background:#e74c3c;}.ts-toast.info{background:#3498db;}
/* 响应式 */
@media (max-width: 768px) {
    .ts-container {
        grid-template-columns: 1fr;
    }
    .ts-tip-grid {
        grid-template-columns: 1fr;
    }
    .ts-result-item {
        grid-template-columns: 1fr;
    }
    .ts-result-actions {
        justify-content: flex-end;
    }
}
