* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f7f9fc;
    color: #172033;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* =========================
   CONTAINER
========================= */

.container {
    width: min(1050px, 92%);
    margin: 0 auto;
    padding: 50px 0;
}

/* =========================
   HERO
========================= */

.hero {
    text-align: center;
    margin-bottom: 32px;
}

.hero h1 {
    margin: 0 0 10px;
    color: #111827;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -0.7px;
}

.hero p {
    margin: 0 auto;
    max-width: 650px;
    color: #667085;
    font-size: 15px;
    line-height: 1.6;
}

/* =========================
   CARD
========================= */

.card {
    background: #ffffff;
    border: 1px solid #e4e8ef;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 18px rgba(16, 24, 40, 0.04);
}

/* =========================
   UPLOAD GRID
========================= */

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

/* =========================
   UPLOAD BOX
========================= */

.upload {
    position: relative;
    min-height: 175px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border: 1.5px dashed #cbd3df;
    border-radius: 14px;
    padding: 28px 22px;

    text-align: center;
    background: #fbfcfe;

    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.upload:hover {
    border-color: #6ea8fe;
    background: #f8fbff;
    box-shadow: 0 5px 18px rgba(37, 99, 235, 0.07);
    transform: translateY(-1px);
}

.upload:active {
    transform: translateY(0);
}

.upload.has-file {
    border-style: solid;
    border-color: #36b37e;
    background: #f6fffa;
}

.upload input {
    display: none;
}

/* Optional upload icon */

.upload-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 12px;

    border-radius: 12px;
    background: #edf4ff;
    color: #3578e5;

    font-size: 22px;
}

.upload-title {
    display: block;
    color: #1d2939;
    font-size: 15px;
    font-weight: 650;
}

.file-label-text {
    display: block;
    margin-top: 7px;
    max-width: 100%;

    color: #667085;
    font-size: 13px;
    line-height: 1.45;

    word-break: break-word;
}

/* =========================
   ACTIONS
========================= */

.actions {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 22px;
}

/* =========================
   BUTTON
========================= */

.btn {
    min-width: 145px;

    border: 0;
    border-radius: 10px;

    padding: 12px 20px;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    background: #3578e5;
    color: #ffffff;

    box-shadow: 0 4px 10px rgba(53, 120, 229, 0.18);

    transition:
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.btn:hover:not(:disabled) {
    background: #2868d3;
    box-shadow: 0 6px 15px rgba(53, 120, 229, 0.23);
    transform: translateY(-1px);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* =========================
   TABS
========================= */

.tabs {
    display: flex;
    align-items: center;
    gap: 4px;

    border-bottom: 1px solid #e4e8ef;
    margin-bottom: 18px;

    flex-wrap: wrap;
}

.tab-btn {
    position: relative;

    background: transparent;
    color: #667085;

    border: 0;

    padding: 11px 15px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: color 0.2s ease;
}

.tab-btn:hover {
    color: #3578e5;
}

.tab-btn.active {
    color: #3578e5;
}

.tab-btn.active::after {
    content: "";

    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -1px;

    height: 2px;

    border-radius: 2px;

    background: #3578e5;
}

.tab {
    display: none;
}

/* =========================
   LIST
========================= */

ul {
    margin: 0;
    padding-left: 20px;
}

li {
    padding: 7px 0;
    color: #475467;
    line-height: 1.55;
    font-size: 14px;
}

/* =========================
   FILE / STATUS
========================= */

.binary-file {
    color: #b54708;
}

.btn-view-diff,
.btn-view-diff-again {
    margin-left: 8px;

    border: 1px solid #d0d5dd;
    background: #ffffff;
    color: #344054;

    border-radius: 7px;

    padding: 5px 10px;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;
}

.btn-view-diff:hover {
    border-color: #98a2b3;
    background: #f9fafb;
}

.btn-view-diff-again {
    border-color: #36b37e;
    color: #16845b;
    background: #f6fffa;
}

.btn-view-diff-again:hover {
    background: #ecfdf3;
}

.btn-error {
    color: #d92d20 !important;
}

/* =========================
   MODAL BACKDROP
========================= */

.modal-backdrop-custom {
    position: fixed;
    inset: 0;

    background: rgba(16, 24, 40, 0.55);

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 1000;

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-backdrop-custom.show {
    display: flex;
}

/* =========================
   MODAL
========================= */

.modal {
    width: min(1000px, 96vw);
    max-height: 90vh;

    overflow: auto;

    background: #ffffff;

    border: 1px solid #e4e8ef;
    border-radius: 16px;

    box-shadow: 0 20px 60px rgba(16, 24, 40, 0.18);

    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================
   MODAL HEADER
========================= */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 16px 20px;

    border-bottom: 1px solid #e4e8ef;
}

.modal-header h2,
.modal-header h3 {
    margin: 0;

    color: #172033;
    font-size: 17px;
    font-weight: 700;
}

/* =========================
   MODAL BODY
========================= */

.modal-body {
    padding: 20px;
}

/* =========================
   CLOSE BUTTON
========================= */

.close {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;

    border: 0;
    border-radius: 8px;

    color: #667085;

    font-size: 24px;
    cursor: pointer;

    transition: all 0.2s ease;
}

.close:hover {
    background: #f2f4f7;
    color: #1d2939;
}

/* =========================
   PROGRESS
========================= */

.progress {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    color: #667085;

    font-size: 13px;

    background: #f8f9fb;

    border: 1px solid #eaecf0;

    border-radius: 8px;

    padding: 10px 12px;
}

/* =========================
   DIFF COLORS
========================= */

.zip1Style {
    background: #fff1f2;
    color: #c01048;
}

.zip2Style {
    background: #ecfdf3;
    color: #087443;
}

.normal {
    color: #344054;
}

/* =========================
   DIFF CONTENT
========================= */

.diff-content {
    white-space: pre-wrap;
    word-break: break-word;

    background: #f8f9fb;

    border: 1px solid #e4e8ef;
    border-radius: 10px;

    padding: 16px;

    color: #344054;

    font-family: ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: 13px;
    line-height: 1.6;

    overflow-x: auto;
}

/* =========================
   EMPTY MESSAGE
========================= */

.empty-msg {
    color: #98a2b3;
    padding: 12px 0;
    font-size: 14px;
}

/* =========================
   FOCUS ACCESSIBILITY
========================= */

button:focus-visible,
.upload:focus-within {
    outline: 3px solid rgba(53, 120, 229, 0.18);
    outline-offset: 2px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .container {
        width: min(94%, 1050px);
        padding: 30px 0;
    }

    .hero {
        margin-bottom: 24px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 14px;
    }

    .card {
        padding: 16px;
        border-radius: 14px;
    }

    .upload-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .upload {
        min-height: 150px;
        padding: 22px 16px;
    }

    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .tab-btn {
        white-space: nowrap;
        padding: 10px 12px;
    }

    .modal-backdrop-custom {
        padding: 12px;
    }

    .modal {
        width: 100%;
        max-height: 92vh;
        border-radius: 14px;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* =========================
   VERY SMALL DEVICES
========================= */

@media (max-width: 400px) {

    .container {
        width: 94%;
    }

    .hero h1 {
        font-size: 25px;
    }

    .card {
        padding: 14px;
    }

    .upload {
        min-height: 140px;
    }
}