/* 文本对比工具样式 */

/* 工具头部 */
.tool-header {
    background-color: #16213e;
    padding: 40px 0;
    text-align: center;
}

.tool-header h1 {
    font-size: 2.2rem;
    color: #4cc9f0;
    margin-bottom: 10px;
}

.tool-header p {
    font-size: 1.1rem;
    color: #b0b0c0;
}

/* 工具内容区域 */
.tool-content {
    padding: 50px 0;
}

.diff-tool-container {
    background-color: #16213e;
    border-radius: 8px;
    padding: 30px;
}

.diff-options {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.diff-options h3 {
    font-size: 1.3rem;
    color: #4cc9f0;
    margin-right: 20px;
}

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

.option-group label {
    color: #e2e2e2;
}

.option-group select, .option-group input[type="checkbox"] {
    background-color: #1a1a2e;
    border: 1px solid #2a2a42;
    color: #e2e2e2;
    padding: 6px 10px;
    border-radius: 4px;
}

.diff-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.text-comparison {
    display: flex;
    gap: 30px;
    position: relative;
}

.text-input {
    flex: 1;
}

.text-input h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #e2e2e2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-input h4 .chars-count {
    font-size: 0.9rem;
    color: #b0b0c0;
    font-weight: normal;
}

.text-input textarea {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    background-color: #1a1a2e;
    border: 1px solid #2a2a42;
    border-radius: 5px;
    color: #e2e2e2;
    font-family: monospace;
    font-size: 1rem;
    resize: vertical;
    line-height: 1.5;
}

.compare-divider {
    position: relative;
    width: 2px;
    background-color: #2a2a42;
    align-self: stretch;
}

.compare-divider::after {
    content: "对比";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    background-color: #4361ee;
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.diff-results {
    margin-top: 30px;
    background-color: #1a1a2e;
    border-radius: 8px;
    padding: 20px;
}

.diff-results h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #4cc9f0;
}

.diff-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.diff-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e2e2;
}

.diff-stat-item .stat-indicator {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.inserted {
    background-color: rgba(34, 197, 94, 0.2);
    border-left: 3px solid #22c55e;
    padding: 0 5px;
}

.deleted {
    background-color: rgba(239, 68, 68, 0.2);
    border-left: 3px solid #ef4444;
    padding: 0 5px;
}

.modified {
    background-color: rgba(245, 158, 11, 0.2);
    border-left: 3px solid #f59e0b;
    padding: 0 5px;
}

.diff-content {
    background-color: #121212;
    border-radius: 5px;
    padding: 15px;
    overflow-x: auto;
    font-family: monospace;
    line-height: 1.5;
}

.diff-line {
    white-space: pre-wrap;
}

.line-number {
    display: inline-block;
    width: 40px;
    color: #6b7280;
    text-align: right;
    padding-right: 10px;
    border-right: 1px solid #2a2a42;
    margin-right: 10px;
}

.result-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .text-comparison {
        flex-direction: column;
    }
    
    .compare-divider {
        width: 100%;
        height: 2px;
        margin: 20px 0;
    }
    
    .compare-divider::after {
        transform: translate(-50%, -50%) rotate(0);
    }
    
    .diff-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .diff-actions {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
}
