/* ==========================================================
   TEXT COMPARISON TOOL
========================================================== */

*{
    box-sizing:border-box;
}

/* ==========================================================
   Workspace
========================================================== */

.workspace-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:24px;

}

@media (max-width:900px){

.workspace-grid{

    grid-template-columns:1fr;

}

}

/* ==========================================
   EDITOR LAYOUT
========================================== */

.editor-layout{

    display:grid;

    grid-template-columns:1fr 260px 1fr;

    gap:24px;

    align-items:start;

}

@media (max-width:1100px){

    .editor-layout{
        display:flex !important;
        flex-direction:column !important;
    }

    .input-panel{
        order:1 !important;
    }

    .options-panel{
        order:2 !important;
    }

    .result-panel{
        order:3 !important;
    }

}

.comparison-options{

    display:flex;

    flex-direction:column;

    gap:16px;

    justify-content:center;

    align-self:stretch;

}

.comparison-options h2{

    margin-bottom:8px;

}

.comparison-options .btn{

    width:100%;

}

/* ==========================================================
   Textareas
========================================================== */

/* ==========================================
   CODE EDITOR
========================================== */

.editor{

    display:grid;

    grid-template-columns:60px 1fr;

    border:1px solid #333;

    border-radius:10px;

    overflow:hidden;

    background:#181818;

    height:320px;

}

.line-numbers{

    background:#111;

    color:#777;

    border-right:1px solid #333;

    text-align:right;

    user-select:none;

    overflow:hidden;

    padding:16px 10px;

    font-family:Consolas, Monaco, monospace;

    font-size:14px;

    line-height:1.6;
    letter-spacing:0;
    tab-size:4;

}

.line-number-content{

    will-change:transform;

}

.editor textarea{

    width:100%;

    height:100%;

    border:none;

    border-radius:0;

    resize:none;

    background:#181818;

    color:#fff;

    padding:16px;

    overflow:auto;
    white-space:pre;

    font-family:Consolas,Monaco,monospace;

    font-size:14px;

    line-height:1.6;
    letter-spacing:0;
    tab-size:4;
    margin:0;

}

.editor textarea:focus{

    outline:none;

    box-shadow:none;

}

textarea:focus{

    outline:none;

    border-color:#4f46e5;

    box-shadow:0 0 0 3px rgba(79,70,229,.18);

}

/* ==========================================================
   Upload
========================================================== */

.upload-area{

    margin-top:16px;

    display:flex;

    justify-content:flex-end;

}

/* ==========================================================
   Diff Viewer
========================================================== */

.diff-view{

    background:#111;

    border:1px solid #2d2d2d;

    border-radius:10px;

    overflow:auto;

    max-height:400px;

}

.diff-container{

    display:flex;

    flex-direction:column;

}

/* ==========================================================
   Diff Rows
========================================================== */

.diff-row{

    display:grid;

    grid-template-columns:1fr 1fr;

    border-bottom:1px solid #252525;

    align-items:stretch;

}

/* ==========================================================
   Equal
========================================================== */

.diff-row.equal{

    background:#181818;

}

.diff-row.equal .diff-left,
.diff-row.equal .diff-right{

    color:#bbbbbb;

}

/* ==========================================================
   Added
========================================================== */

.diff-row.added{

    background:#112d1c;

}

.diff-row.added .diff-right{

    background:#1f7a3a;

    color:#ffffff;

}

/* ==========================================================
   Removed
========================================================== */

.diff-row.removed{

    background:#2d1719;

}

.diff-row.removed .diff-left{

    background:#9a2836;

    color:#ffffff;

}

/* ==========================================================
   Modified
========================================================== */

.diff-row.modified{

    background:#2e2812;

}

.diff-row.modified .diff-left{

    background:#8d6a13;

    color:#ffffff;

}

.diff-row.modified .diff-right{

    background:#b38b1d;

    color:#111111;

}

/* ==========================================================
   Word Highlight
========================================================== */

.word-added{

    background:#2ea043;

    color:#fff;

    padding:0 3px;

    border-radius:3px;

}

.word-removed{

    background:#dc3545;

    color:#fff;

    padding:0 3px;
    border-radius:3px;

    text-decoration:line-through;

}

/* ==========================================================
   Character Highlight
========================================================== */

.char-added{

    background:#3fb950;

    color:#fff;

}

.char-removed{

    background:#f85149;

    color:#fff;

}

.char-added,
.char-removed{

    padding:0;

}

/* ==========================================================
   Placeholder
========================================================== */

.placeholder{

    padding:120px 30px;

    text-align:center;

    color:#777;

}

/* ==========================================================
   Stats
========================================================== */

.stats-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));

    gap:14px;

}

.stats-row{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:14px;

    background:#181818;

    border:1px solid #2b2b2b;

    border-radius:10px;

}

.stats-row span{

    color:#bbb;

}

.stats-row strong{

    color:#fff;

}

/* ===========================================
   DIFF LINE NUMBERS
=========================================== */

.diff-side{

    display:grid;
    grid-template-columns:60px 1fr;

}

.diff-number{

    background:#151515;

    color:#777;

    border-right:1px solid #2b2b2b;

    padding:4px 10px;

    text-align:right;

    user-select:none;

    font-family:Consolas, Monaco, monospace;

    font-size:14px;

    line-height:1.6;

}

.diff-left,
.diff-right{

    margin:0;

    padding:4px 12px;

    overflow-x:auto;

    overflow-y:hidden;

    white-space:pre;

    font-family:Consolas, Monaco, monospace;

    font-size:14px;

    line-height:1.6;

    tab-size:4;

}

.option-checkbox{

    display:flex;

    align-items:center;

    gap:12px;

    cursor:pointer;

    color:#ddd;

    font-size:15px;

    font-weight:500;

    user-select:none;

}

.option-checkbox input{

    width:18px;

    height:18px;

    margin:0;

    accent-color:#4f46e5;

    cursor:pointer;

}

.option-checkbox:hover{

    color:#fff;

}

.compare-options{

    display:flex;

    align-items:center;

    justify-content:center;

    height:100%;

}

.option-panel{

    width:100%;

    display:flex;

    flex-direction:column;

    gap:18px;

}

.btn-group.vertical{

    display:flex;

    flex-direction:column;

    gap:12px;

    margin-top:10px;

}

.btn-group.vertical .btn{

    width:100%;

}

.section-description{
    font-size:12px;
    color:#6b7280;
    margin-bottom:12px;
    line-height:1.5;
}