* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.comparison-wrapper {
    display: flex;
    align-items: stretch;
    min-height: 80vh;
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 10px;
}

.panel:first-child {
    padding-left: 0;
}

.panel:last-child {
    padding-right: 0;
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-input {
    display: flex;
    gap: 10px;
}

.filename-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.file-btn {
    padding: 8px 12px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.file-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.file-btn:active {
    transform: translateY(0);
}

.text-area {
    flex: 1;    
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    font-family: 'Courier New', Courier, monospace;    
    overflow-x: auto;
    white-space: nowrap;
    word-wrap: normal;
}

pre{
    white-space: nowrap;
    word-wrap: normal;
    overflow-x: auto;
    resize: none;
}

.diff-display {
    /* flex: 1;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'Courier New', Courier, monospace;
    background-color: #fff;
    overflow-y: auto;
    overflow-x: auto;
    height: 100%;
    white-space: nowrap;
    word-wrap: normal; */
    flex: 1;    
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    font-family: 'Courier New', Courier, monospace;    
    overflow-x: auto;
    white-space: nowrap;
    word-wrap: normal;
}

.text-area:focus, .filename-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 0 20px 0;
}

/* Inline diff styles */
.deletion-inline {
    text-decoration: line-through;
    color: #ff0000;
    background-color: #ffe6e6;
}

.addition-inline {
    color: #008000;
    background-color: #e6ffe6;
}

/* Diff highlighting styles */
.addition {
    background-color: #e6ffe6;
}

.deletion {
    background-color: #ffe6e6;
}

.modification {
    background-color: #fff3cd;
}

.action-btn, .save-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.action-btn {
    background-color: #007bff;
    color: white;
    width: 120px;
}

.save-btn {
    background-color: #28a745;
    color: white;
}

.action-btn:hover, .save-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.action-btn:active, .save-btn:active {
    transform: translateY(0);
}


@media (max-width: 768px) {
    .comparison-wrapper {
        flex-direction: column;
    }

    .controls {
        flex-direction: row;
        justify-content: center;
    }

    .text-area {
        min-height: 300px;
    }
}