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


:root {
    --bg: #080b12;
    --bg-soft: #0d111a;
    --card: #111722;
    --card-hover: #151c29;
    --border: #202a3a;
    --text: #f2f5f9;
    --muted: #8e9aaa;
    --accent: #6c8cff;
    --accent-hover: #819cff;
    --success: #35d48a;
    --danger: #ff5f6d;
}


body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at top,
            #111a2c 0%,
            var(--bg) 45%
        );

    color: var(--text);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.5;
}


button,
input {
    font: inherit;
}


button {
    cursor: pointer;
}


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

.site-header {
    width: 100%;

    min-height: 70px;

    padding:
        14px
        5%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom:
        1px solid
        var(--border);

    background:
        rgba(8, 11, 18, 0.85);

    backdrop-filter:
        blur(14px);

    position: sticky;

    top: 0;

    z-index: 20;
}


.brand {
    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 18px;

    font-weight: 700;
}


.brand-icon {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 36px;

    height: 36px;

    border-radius: 10px;

    background:
        rgba(108, 140, 255, 0.12);

    border:
        1px solid
        rgba(108, 140, 255, 0.25);
}


.back-button {
    border: 1px solid var(--border);

    background: var(--card);

    color: var(--text);

    padding:
        9px
        14px;

    border-radius: 10px;

    transition:
        0.2s ease;
}


.back-button:hover {
    background:
        var(--card-hover);

    border-color:
        var(--accent);
}


/* =========================
   MAIN
========================= */

main {
    width: min(
        100% - 30px,
        950px
    );

    margin:
        0 auto;

    padding:
        45px 0
        70px;
}


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

.hero {
    text-align: center;

    margin-bottom: 35px;
}


.hero-icon {
    width: 74px;

    height: 74px;

    margin:
        0 auto
        18px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 22px;

    background:
        rgba(108, 140, 255, 0.1);

    border:
        1px solid
        rgba(108, 140, 255, 0.25);

    font-size: 36px;
}


.hero h1 {
    font-size:
        clamp(
            30px,
            6vw,
            48px
        );

    line-height: 1.1;

    margin-bottom: 12px;
}


.hero p {
    max-width: 650px;

    margin:
        0 auto 18px;

    color: var(--muted);

    font-size: 16px;
}


.privacy-note {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding:
        8px 13px;

    border-radius: 999px;

    background:
        rgba(53, 212, 138, 0.08);

    border:
        1px solid
        rgba(53, 212, 138, 0.2);

    color:
        #8ee8bd;

    font-size: 13px;
}


/* =========================
   CARDS
========================= */

.tool-card {
    background:
        rgba(17, 23, 34, 0.92);

    border:
        1px solid
        var(--border);

    border-radius: 18px;

    padding: 22px;

    margin-bottom: 20px;

    box-shadow:
        0 15px 45px
        rgba(0, 0, 0, 0.2);
}


/* =========================
   DROP AREA
========================= */

.drop-area {
    min-height: 300px;

    border:
        2px dashed
        #29354a;

    border-radius: 16px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 35px 20px;

    transition:
        0.2s ease;
}


.drop-area:hover,
.drop-area.dragover {
    border-color:
        var(--accent);

    background:
        rgba(108, 140, 255, 0.05);
}


.upload-icon {
    font-size: 46px;

    margin-bottom: 12px;
}


.drop-area h2 {
    font-size: 22px;

    margin-bottom: 6px;
}


.drop-area p {
    color: var(--muted);

    margin-bottom: 20px;
}


/* =========================
   BUTTONS
========================= */

.primary-button,
.secondary-button,
.danger-button {
    border-radius: 11px;

    padding:
        11px 17px;

    border: 1px solid;

    font-weight: 650;

    transition:
        0.2s ease;
}


.primary-button {
    background:
        var(--accent);

    color: white;

    border-color:
        var(--accent);
}


.primary-button:hover:not(:disabled) {
    background:
        var(--accent-hover);

    transform:
        translateY(-1px);
}


.primary-button:disabled {
    opacity: 0.45;

    cursor:
        not-allowed;
}


.secondary-button {
    background:
        var(--card);

    color:
        var(--text);

    border-color:
        var(--border);
}


.secondary-button:hover {
    border-color:
        var(--accent);

    background:
        var(--card-hover);
}


.danger-button {
    background:
        rgba(255, 95, 109, 0.08);

    color:
        #ff8992;

    border-color:
        rgba(255, 95, 109, 0.2);
}


.danger-button:hover {
    background:
        rgba(255, 95, 109, 0.15);
}


/* =========================
   SECTION HEADER
========================= */

.section-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;
}


.section-header h2 {
    font-size: 21px;

    margin-bottom: 3px;
}


.section-header p {
    color:
        var(--muted);

    font-size: 13px;
}


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

.pdf-list {
    display: flex;

    flex-direction: column;

    gap: 10px;
}


.pdf-item {
    display: grid;

    grid-template-columns:
        auto
        1fr
        auto;

    align-items: center;

    gap: 14px;

    padding: 13px;

    background:
        var(--bg-soft);

    border:
        1px solid
        var(--border);

    border-radius: 13px;

    transition:
        0.2s ease;
}


.pdf-item:hover {
    border-color:
        #34445e;
}


.pdf-number {
    width: 34px;

    height: 34px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 9px;

    background:
        rgba(108, 140, 255, 0.1);

    color:
        #a9b9ff;

    font-weight: 700;

    flex-shrink: 0;
}


.pdf-info {
    min-width: 0;
}


.pdf-name {
    font-weight: 650;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}


.pdf-meta {
    color:
        var(--muted);

    font-size: 12px;

    margin-top: 2px;
}


.pdf-actions {
    display: flex;

    gap: 6px;
}


.pdf-actions button {
    width: 36px;

    height: 36px;

    border-radius: 9px;

    border:
        1px solid
        var(--border);

    background:
        var(--card);

    color:
        var(--text);

    transition:
        0.2s ease;
}


.pdf-actions button:hover {
    border-color:
        var(--accent);

    background:
        var(--card-hover);
}


.pdf-actions .remove-button:hover {
    border-color:
        var(--danger);

    color:
        #ff8992;
}


/* =========================
   ACTION AREA
========================= */

.action-area {
    display: flex;

    justify-content: center;

    margin-top: 22px;
}


.merge-button {
    min-width: 210px;
}


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

.progress-container {
    margin-top: 24px;

    padding: 15px;

    border-radius: 12px;

    background:
        var(--bg-soft);

    border:
        1px solid
        var(--border);
}


.progress-header {
    display: flex;

    justify-content: space-between;

    margin-bottom: 9px;

    font-size: 13px;

    color:
        var(--muted);
}


.progress-track {
    width: 100%;

    height: 9px;

    overflow: hidden;

    border-radius: 999px;

    background:
        #1a2230;
}


.progress-bar {
    width: 0%;

    height: 100%;

    border-radius: inherit;

    background:
        var(--accent);

    transition:
        width 0.2s ease;
}


/* =========================
   RESULT
========================= */

.result-area {
    margin-top: 24px;

    padding:
        28px 20px;

    text-align: center;

    border-radius: 15px;

    background:
        rgba(53, 212, 138, 0.06);

    border:
        1px solid
        rgba(53, 212, 138, 0.2);
}


.success-icon {
    width: 52px;

    height: 52px;

    margin:
        0 auto 12px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background:
        rgba(53, 212, 138, 0.12);

    color:
        var(--success);

    font-size: 27px;

    font-weight: 800;
}


.result-area h3 {
    font-size: 20px;

    margin-bottom: 5px;
}


.result-area p {
    color:
        var(--muted);

    font-size: 14px;

    margin-bottom: 18px;
}


/* =========================
   FOOTER
========================= */

footer {
    border-top:
        1px solid
        var(--border);

    padding:
        25px 20px;

    text-align: center;

    color:
        var(--muted);

    font-size: 13px;
}


footer p + p {
    margin-top: 4px;
}


/* =========================
   RESPONSIVE
========================= */

@media (
    max-width: 650px
) {

    .site-header {
        padding:
            12px 15px;
    }


    .brand {
        font-size: 16px;
    }


    .brand-icon {
        width: 32px;

        height: 32px;
    }


    main {
        width:
            min(
                100% - 20px,
                950px
            );

        padding:
            30px 0
            50px;
    }


    .tool-card {
        padding:
            15px;

        border-radius:
            15px;
    }


    .drop-area {
        min-height:
            260px;

        padding:
            25px 15px;
    }


    .section-header {
        align-items:
            flex-start;
    }


    .pdf-item {
        grid-template-columns:
            auto
            1fr;
    }


    .pdf-actions {
        grid-column:
            2;

        justify-content:
            flex-start;
    }


    .merge-button {
        width: 100%;
    }
}


@media (
    max-width: 420px
) {

    .back-button {
        padding:
            8px 10px;

        font-size:
            13px;
    }


    .brand {
        gap: 6px;

        font-size: 14px;
    }


    .hero {
        margin-bottom:
            25px;
    }


    .hero-icon {
        width: 62px;

        height: 62px;

        font-size: 30px;
    }


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


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


    .privacy-note {
        font-size: 11px;
    }


    .section-header h2 {
        font-size: 18px;
    }


    .section-header {
        flex-direction:
            column;
    }


    .section-header .secondary-button {
        width: 100%;
    }


    .pdf-name {
        font-size: 14px;
    }
}