.text-diff-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.text-input-card {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    height: 100%;
}

.text-input-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.text-input-area {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.text-input-area:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.results-section {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    margin-top: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-toggle .btn {
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.view-toggle .btn:hover {
    border-color: var(--accent-primary);
}

.view-toggle .btn-primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.diff-view {
    margin-top: 1.5rem;
}

.diff-content {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    padding: 1rem;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.diff-panel {
    height: 100%;
    border-right: 1px solid var(--border-light);
}

.diff-panel:last-child {
    border-right: none;
}

.diff-panel-header {
    background: var(--accent-primary);
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.split-view .diff-panel:first-child .diff-panel-header {
    border-radius: var(--radius-md) 0 0 0;
}

.split-view .diff-panel:last-child .diff-panel-header {
    border-radius: 0 var(--radius-md) 0 0;
}

.split-view .diff-content {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    height: calc(600px - 45px);
}

.split-view .diff-panel:first-child .diff-content {
    border-radius: 0 0 0 var(--radius-md);
}

.split-view .diff-panel:last-child .diff-content {
    border-radius: 0 0 var(--radius-md) 0;
}

.diff-line {
    padding: 0.25rem 0.5rem;
    margin: 0.1rem 0;
    border-radius: 3px;
    display: block;
}

.diff-line.unchanged {
    background: transparent;
    color: #333;
}

.diff-line.deleted {
    background: #fee;
    color: #c33;
    border-left: 3px solid #f66;
}

.diff-line.inserted {
    background: #efe;
    color: #3c3;
    border-left: 3px solid #6f6;
}

.diff-line-number {
    display: inline-block;
    width: 50px;
    text-align: right;
    margin-right: 1rem;
    color: #999;
    font-size: 0.85rem;
    user-select: none;
}

.diff-line.deleted .diff-line-number {
    color: #c99;
}

.diff-line.inserted .diff-line-number {
    color: #9c9;
}

.diff-line-prefix {
    display: inline-block;
    width: 20px;
    font-weight: bold;
    margin-right: 0.5rem;
    user-select: none;
}

.diff-line.deleted .diff-line-prefix {
    color: #c33;
}

.diff-line.inserted .diff-line-prefix {
    color: #3c3;
}

.diff-word {
    display: inline;
}

.diff-word.deleted {
    background: #fcc;
    color: #c00;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
    text-decoration: line-through;
}

.diff-word.inserted {
    background: #cfc;
    color: #0c0;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
    font-weight: 500;
}

.diff-word.unchanged {
    background: transparent;
    color: inherit;
}

/* Scrollbar styling */
.diff-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.diff-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.diff-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.diff-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .text-input-card {
        padding: 1rem;
    }
    
    .text-input-area {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .view-toggle {
        width: 100%;
    }
    
    .view-toggle .btn {
        flex: 1;
    }
    
    .diff-content {
        font-size: 0.8rem;
        max-height: 400px;
    }
    
    .split-view .diff-content {
        height: calc(400px - 45px);
    }
    
    .diff-line-number {
        width: 40px;
        font-size: 0.75rem;
    }
    
    .diff-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        margin-bottom: 1rem;
    }
    
    .diff-panel:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
    
    .split-view .diff-panel .diff-panel-header {
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }
    
    .split-view .diff-panel .diff-content {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }
}

