:root {
    
    --color-red-light: rgba(255, 150, 150, 0.4);
    --color-red-lighter: rgba(255, 150, 150, 0.6);
    --color-red-hover: rgba(255, 150, 150, 0.7);
    --color-red-bg: rgba(255, 140, 140, 0.7);
    --color-red-bg-default: rgba(255, 184, 184, 0.5);
    --color-red-text: #8b0000;

    
    --color-blue-light: rgba(150, 200, 255, 0.4);
    --color-blue-lighter: rgba(150, 200, 255, 0.6);
    --color-blue-hover: rgba(150, 200, 255, 0.7);
    --color-blue-bg: rgba(140, 200, 255, 0.7);
    --color-blue-bg-default: rgba(184, 225, 255, 0.5);
    --color-blue-text: #004080;
    --color-blue-dark: #1a3a5a;

    
    --color-border: #e2e8f0;
    --color-border-input: #cbd5e0;
    --color-bg-white: #ffffff;
    --color-text-primary: #2d3748;
    --color-text-secondary: #718096;
    --color-text-muted: #a0aec0;
    --color-accent: #4a90e2;
    --color-accent-border: #3bb4f2;
    --color-focus-ring: rgba(59, 180, 242, 0.3);
}


*,
:after,
:before {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

html {
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    font-size: 10px;
    -webkit-tap-highlight-color: transparent;
}

body,
html {
    min-height: 100%;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    padding: 0;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f4f8 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Microsoft YaHei", "PingFang SC",
        "Hiragino Sans GB", sans-serif;
    font-weight: 400;
    line-height: 1.4;
    color: #333;
    font-size: 1.6rem;
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -moz-font-feature-settings: "liga", "kern";
}

button,
input,
select {
    color: inherit;
    font: inherit;
    margin: 0;
}

button {
    overflow: visible;
    -webkit-appearance: button;
    cursor: pointer;
}

button,
input {
    line-height: normal;
}

button,
select {
    text-transform: none;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
    border: 0;
    padding: 0;
}

button,
input:not([type="radio"]):not([type="checkbox"]),
select {
    vertical-align: middle;
}

label {
    display: inline-block;
    margin-bottom: 5px;
    font-weight: 700;
}

input[type="file"] {
    display: block;
}

input[type="file"]:focus {
    outline: thin dotted;
    outline: 1px auto -webkit-focus-ring-color;
    outline-offset: -2px;
}

p {
    margin: 0 0 1.6rem 0;
}

* + p {
    margin-top: 1.6rem;
}

h1 {
    margin: 0 0 1.6rem 0;
    font-weight: 600;
    font-size: 1.5em;
}

@media only screen and (max-width: 640px) {
    body {
        word-wrap: break-word;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        -moz-hyphens: auto;
        hyphens: auto;
    }
}




.am-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    padding: 8px 12px;
    vertical-align: middle;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    background-image: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    outline: 0;
    -webkit-appearance: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: all 0.2s ease;
    height: 36px;
}

.am-btn i {
    margin-right: 4px;
    font-size: 14px;
}

.am-btn:focus,
.am-btn:active {
    outline: none !important;
    box-shadow: none !important;
}

.am-btn-default {
    color: #2d3748;
    padding: 6px 10px;
    font-size: 13px;
    height: 36px;
}

.am-btn-danger {
    color: #fff;
    background-color: #dd514c;
    border-color: #dd514c;
}

.am-btn-danger:focus,
.am-btn-danger:hover {
    color: #fff;
    background-color: #d7342e;
    border-color: #c62b26;
}

.am-btn-danger:active {
    background-image: none;
    background-color: #be2924;
}

.am-btn-sm {
    font-size: 1.4rem;
}


.am-form select,
.am-form-field {
    display: block;
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    line-height: 1.2;
    color: #2d3748;
    vertical-align: middle;
    background-color: #fff;
    background-image: none;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    min-width: 90px;
    height: 36px;
    cursor: pointer;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: #fff
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' x='12px' y='0px' width='24px' height='3px' viewBox='0 0 6 3' enable-background='new 0 0 6 3' xml:space='preserve'%3E%3Cpolygon points='5.992,0 2.992,3 -0.008,0 '/%3E%3C/svg%3E")
        no-repeat 100% center;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.am-form-field:focus {
    border-color: #4a90e2;
    outline: none;
}

.am-form-group {
    margin-bottom: 1.5rem;
}

.am-form-file {
    position: relative;
    overflow: hidden;
}

.am-form-file input[type="file"] {
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    z-index: -1;
}

.am-form-group.am-form-file {
    position: relative;
    display: inline-block;
    margin: 0;
}

.am-form-group.am-form-file button {
    position: relative;
    z-index: 1;
    font-size: 13px;
}

@media only screen and (min-width: 641px) {
    .am-form-inline .am-form-group {
        display: inline-block;
        margin-bottom: 0;
        vertical-align: middle;
    }
    .am-form-inline .am-form-field {
        display: inline-block;
        width: auto;
        vertical-align: middle;
    }
}


.am-alert {
    margin-bottom: 1em;
    padding: .625em;
    background: #0e90d2;
    color: #fff;
    border: 1px solid #0c7cb5;
    border-radius: 0;
}

* + .am-alert {
    margin-top: 1em;
}

.am-alert-success {
    background-color: #5eb95e;
    border-color: #4bad4b;
    color: #fff;
}


[class*="am-icon-"] {
    display: inline-block;
    font-style: normal;
}

[class*="am-icon-"]:before {
    display: inline-block;
    font: normal normal normal 1.6rem/1 FontAwesome, sans-serif;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}

.am-icon-cloud-upload:before {
    content: "\f0ee";
}

.am-icon-spinner:before {
    content: "\f110";
}

.am-icon-spin {
    animation: spin 2s infinite linear;
}

.am-icon-spinner {
    font-size: 1.8rem;
    color: #3498db;
    margin-bottom: 10px;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


#header {
    margin: 0;
    padding: 24px 0 17px;
    text-align: center;
    line-height: 1.5;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 249, 250, 0.98) 100%
    );
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    box-shadow: 0 1px 15px rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 10;
}

#header::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(255, 184, 184, 0) 0%,
        rgba(255, 184, 184, 0.5) 50%,
        rgba(184, 225, 255, 0.5) 50%,
        rgba(184, 225, 255, 0) 100%
    );
}

#header h1 {
    margin: 0;
    color: #2c3e50;
    font-weight: 300;
    font-size: 3.4rem;
    letter-spacing: -0.5px;
    background: linear-gradient(120deg, #a0aec0, #718096, #4a5568);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

#header h2 {
    margin: 10px 0;
    color: #666;
    font-weight: 400;
    font-size: 125%;
}


#main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

#main .am-alert {
    margin: 0;
}


#instruction-banner {
    background: #e8f4fd;
    border: 1px solid #b6d8f2;
    border-radius: 5px;
    padding: 10px 15px;
    margin: 10px 0;
    color: #2c5282;
    font-size: 14px;
    text-align: center;
}


.file-upload-container {
    background: #fff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    width: 100%;
}


.pure-g {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    margin: 0;
}

.pure-u-1-2 {
    padding: 0 14px;
    width: 50%;
    flex: 1;
    box-sizing: border-box;
    min-width: 0;
}

.pure-u-1-2:first-child {
    border-right: 1px solid #e2e8f0;
    padding-right: 20px;
}

.pure-u-1-2:last-child {
    padding-left: 20px;
}


.file-select-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    height: 40px;
    min-width: 0;
}

.file-select-area label {
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
    white-space: nowrap;
    min-width: 100px;
    margin-top: 7px;
}

.encode-label {
    font-size: 16px;
    white-space: nowrap;
    margin-right: -60px;
}


.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin-left: auto;
}


.pure-u-1-2:first-child .am-btn-danger {
    background-color: rgba(255, 140, 140, 0.7) !important;
    color: rgba(0, 0, 0, 0.7) !important;
}

.pure-u-1-2:first-child .am-btn-default {
    background: rgba(255, 184, 184, 0.5);
}

.pure-u-1-2:first-child .am-btn-danger:hover,
.pure-u-1-2:first-child .am-btn-default:hover {
    background: rgba(255, 150, 150, 0.7);
}

.pure-u-1-2:last-child .am-btn-danger {
    background-color: rgba(140, 200, 255, 0.7) !important;
    color: #1a3a5a !important;
}

.pure-u-1-2:last-child .am-btn-default {
    background: rgba(184, 225, 255, 0.5);
}

.pure-u-1-2:last-child .am-btn-danger:hover,
.pure-u-1-2:last-child .am-btn-default:hover {
    background: rgba(150, 200, 255, 0.7);
}


#file-list1,
#file-list2 {
    display: block !important;
    margin: 5px 0 0 0;
    min-height: 24px;
    font-size: 12px;
    max-height: none;
    overflow: visible;
}


#main .am-badge {
    line-height: 1.2 !important;
    padding: 2px 8px !important;
    height: 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    font-size: 12px !important;
    vertical-align: middle !important;
    background: #4a90e2 !important;
    color: #fff !important;
    border-radius: 3px !important;
    margin: -2px 4px -4px 0 !important;
    position: relative;
    top: -1px;
}

#main .am-badge small {
    font-size: 10px !important;
    margin-left: 4px !important;
    opacity: 0.9 !important;
}


.am-badge.char-count-badge {
    background: #718096 !important;
    margin-left: 6px !important;
}


.am-badge.file-name-badge {
    
}


#diff-loading {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 30px 15px;
    text-align: center;
    margin-bottom: 15px;
}

#diff-loading p {
    color: #718096;
    font-size: 14px;
    margin-top: 8px;
}


#diff {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    min-height: 600px;
    width: 100%;
    margin-top: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#diff.drag-over {
    border-color: #4a90e2 !important;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}


.footer-info {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    color: #718096;
    font-size: 13px;
}

.footer-info p {
    margin: 6px 0;
}


#main .CodeMirror-lines {
    font-family: "Microsoft YaHei", "PingHei", "PingFang SC", "STHeitiSC-Light",
        "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
}

#main .CodeMirror,
#main .CodeMirror-gutters {
    font-size: 14px;
}

#main .mergely-c-rem {
    text-decoration: none;
}

#diff .CodeMirror {
    width: 50% !important;
}




#diff .CodeMirror-lines .mergely-c-rem,
#diff .CodeMirror-lines .mergely-d-mid {
    background-color: rgba(255, 150, 150, 0.4) !important;
    border-left: none !important;
    border-right: none !important;
    outline: none !important;
}


#diff .CodeMirror-lines .mergely-c-add,
#diff .CodeMirror-lines .mergely-a-mid,
#diff .CodeMirror-lines .mergely-a-end {
    background-color: rgba(150, 200, 255, 0.4) !important;
    border: none !important;
    outline: none !important;
}


#diff .mergely-c-start,
#diff .mergely-c-end,
#diff .mergely-a-start,
#diff .mergely-a-end,
#diff .mergely-d-start,
#diff .mergely-d-end {
    border-top: none !important;
    border-bottom: none !important;
}

#diff .mergely-a-start {
    background-color: rgba(140, 200, 255, 0.3) !important;
}


#diff .CodeMirror span.cm-merge-a,
#diff .CodeMirror span.cm-merge-b,
#diff .CodeMirror span.cm-add,
#diff .CodeMirror span.cm-rem {
    background-color: transparent !important;
}

#diff .CodeMirror span.cm-merge-a,
#diff .CodeMirror span.cm-add {
    background-color: rgba(150, 200, 255, 0.4) !important;
}

#diff .CodeMirror span.cm-merge-b,
#diff .CodeMirror span.cm-rem {
    background-color: rgba(255, 150, 150, 0.4) !important;
}


.CodeMirror-lines .CodeMirror-code div span.cm-s-mergely-c-rem,
.CodeMirror-lines .CodeMirror-code div span.cm-s-mergely-d-mid {
    background-color: rgba(255, 150, 150, 0.4) !important;
}

.CodeMirror-lines .CodeMirror-code div span.cm-s-mergely-c-add,
.CodeMirror-lines .CodeMirror-code div span.cm-s-mergely-a-mid {
    background-color: rgba(150, 200, 255, 0.4) !important;
}


#diff .mergely-m { background-color: #f0f0f0 !important; }
#diff .mergely-a { background-color: rgba(255, 150, 150, 0.6) !important; }
#diff .mergely-d { background-color: rgba(150, 200, 255, 0.6) !important; }
#diff .mergely-c { background-color: #f0f0f0 !important; }


.mergely-c-add,
.mergely-c-rem,
.mergely-a-mid,
.mergely-a-end,
.mergely-d-mid,
.mergely-d-end {
    opacity: 0.8;
    mix-blend-mode: multiply;
}


.CodeMirror-selected {
    background-color: rgba(0, 120, 215, 0.4) !important;
    z-index: 10 !important;
}


.CodeMirror-code span.cm-merge-a,
.CodeMirror-code span.cm-add {
    background-color: rgba(150, 200, 255, 0.6) !important;
    color: #004080 !important;
}

.CodeMirror-code span.cm-merge-b {
    background-color: rgba(255, 150, 150, 0.6) !important;
    color: #8b0000 !important;
}

.CodeMirror-code span.cm-rem {
    background-color: rgba(255, 150, 150, 0.6) !important;
    color: #8b0000 !important;
    text-decoration: line-through;
}


#scroll-to-diff {
    position: fixed;
    right: 100px;
    bottom: 120px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(
        135deg,
        rgba(255, 184, 184, 0.5),
        rgba(184, 225, 255, 0.5)
    );
    color: #555;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#scroll-to-diff:hover {
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

#scroll-to-diff:active {
    transform: scale(0.95) rotate(15deg);
}

#scroll-to-diff .highlight-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    border-radius: 50%;
    pointer-events: none;
}

#scroll-to-diff .glow-layer {
    position: absolute;
    width: 120%;
    height: 120%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 70%
    );
    top: -10%;
    left: -10%;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

#scroll-to-diff:hover .glow-layer {
    opacity: 1;
}




@media (max-width: 1100px) {
    .pure-g {
        flex-wrap: wrap;
    }

    .pure-u-1-2 {
        width: 100%;
        margin-bottom: 10px;
    }

    .pure-u-1-2:first-child {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-right: 5px;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .pure-u-1-2:last-child {
        padding-left: 5px;
    }

    .file-select-area {
        flex-wrap: wrap;
        gap: 6px;
        height: auto;
        min-height: 40px;
    }

    .control-group {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .encode-label {
        margin-right: -30px;
    }
}


@media (max-width: 768px) {
    #main {
        padding: 0 15px;
    }

    #header {
        padding: 20px 0 15px;
    }

    #header h1 {
        font-size: 2.2rem;
    }

    #instruction-banner {
        margin: 10px 0;
        padding: 8px 12px;
        font-size: 12px;
    }

    .file-upload-container {
        padding: 12px;
    }

    .file-select-area {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        height: auto;
    }

    .file-select-area label {
        min-width: auto;
        width: 100%;
    }

    .control-group {
        width: 100%;
        justify-content: space-between;
    }

    .encode-label {
        margin-right: 0;
    }
}


@media (max-width: 480px) {
    #header {
        padding: 18px 0 12px;
    }

    #header h1 {
        font-size: 1.8rem;
    }

    #instruction-banner {
        margin: 10px 0;
    }

    .file-select-area label {
        font-size: 13px;
        min-width: 85px;
    }

    .am-btn {
        padding: 6px 10px;
        font-size: 12px;
        height: 34px;
    }

    .am-form-field {
        min-width: 80px;
        height: 34px;
        font-size: 12px;
    }

    .am-btn-default {
        height: 34px;
    }

    .encode-label {
        margin-right: 0;
    }
}


@media print {
    *,
    :after,
    :before {
        background: 0 0 !important;
        color: #000 !important;
        -webkit-box-shadow: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    p {
        orphans: 3;
        widows: 3;
    }

    @page {
        margin: .5cm;
    }

    select {
        background: #fff !important;
    }
}
