.tool-fullwidth {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Tool shell */
.text-tool {
    max-width: 100%;
    margin: 0 auto;
}

.text-tool.editor-section,
.editor-section.text-tool {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.text-tool .card {
    border: 1px solid var(--color-border, #e5e7eb);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
    border-radius: var(--radius, 12px);
    background: var(--color-surface, #fff);
}

.text-tool .card-body {
    padding: 1.25rem 1.35rem;
}

.text-tool .card-title {
    color: var(--color-text, #1f2937);
    font-weight: 700;
    font-size: 1.05rem;
}

.text-tool .form-control,
.text-tool .form-select,
.text-tool .select-input,
.text-tool textarea {
    border-radius: 8px;
    border: 1px solid var(--color-border, #e5e7eb);
}

.text-tool .form-control:focus,
.text-tool .form-select:focus,
.text-tool textarea:focus {
    border-color: var(--color-primary, #0d9488);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.text-tool .btn-primary {
    background: var(--color-primary, #0d9488);
    border-color: var(--color-primary, #0d9488);
}

.text-tool .btn-primary:hover {
    background: var(--color-primary-hover, #0f766e);
    border-color: var(--color-primary-hover, #0f766e);
}

.text-tool .alert {
    border-radius: 10px;
}

[data-theme="dark"] .text-tool .card {
    background: var(--color-surface, #1f2937);
    border-color: var(--color-border, #374151);
}

[data-theme="dark"] .text-tool .card-title,
[data-theme="dark"] .text-tool .form-label,
[data-theme="dark"] .text-tool {
    color: var(--color-text, #f9fafb);
}

[data-theme="dark"] .text-tool .text-muted,
[data-theme="dark"] .text-tool .form-text {
    color: var(--color-text-secondary, #9ca3af) !important;
}

[data-theme="dark"] .text-tool .form-control,
[data-theme="dark"] .text-tool .form-select,
[data-theme="dark"] .text-tool textarea {
    background: #111827;
    color: var(--color-text, #f9fafb);
    border-color: var(--color-border, #374151);
}

/* --- tool: txt-merge --- */
/* TXT文本合并工具样式 */
.txt-merge-tool .upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.txt-merge-tool .upload-area:hover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}

.txt-merge-tool .upload-area.dragover {
    border-color: #0d6efd;
    background-color: #e7f3ff;
}

.txt-merge-tool .file-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.txt-merge-tool .file-item .file-info {
    display: flex;
    align-items: center;
}

.txt-merge-tool .file-item .file-info i {
    color: #6c757d;
    margin-right: 0.5rem;
}

.txt-merge-tool .result-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.txt-merge-tool .text-input-group {
    margin-bottom: 1rem;
}

.txt-merge-tool .text-input-group .input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.txt-merge-tool .text-input-group .remove-btn {
    color: #dc3545;
    cursor: pointer;
    font-size: 1.2rem;
}

.txt-merge-tool .text-input-group .remove-btn:hover {
    color: #b02a37;
}

.txt-merge-tool .progress-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.txt-merge-tool .progress-bar .progress-fill {
    height: 100%;
    background: #0d6efd;
    width: 0%;
    transition: width 0.3s ease;
}

.txt-merge-tool .alert {
    border-radius: 8px;
}

.txt-merge-tool .btn {
    border-radius: 6px;
    font-weight: 500;
}

.txt-merge-tool .card {
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.txt-merge-tool .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 10px 10px 0 0 !important;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .txt-merge-tool .upload-area {
        padding: 1rem;
    }
    
    .txt-merge-tool .result-box {
        max-height: 300px;
        font-size: 12px;
    }
    
    .txt-merge-tool .file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .txt-merge-tool .file-item .file-actions {
        margin-top: 0.5rem;
        width: 100%;
    }
}
