:root {
    --primary: #3A4F82;
    --primary-dark: #2d3e68;

    --text: #172033;
    --muted: #697386;

    --background: #f6f8fc;
    --white: #ffffff;

    --border: #e5e9f2;

    --radius: 18px;
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    color: var(--text);

    background: var(--background);

    -webkit-font-smoothing: antialiased;
}


a {
    color: inherit;
    text-decoration: none;
}


.container {
    width: min(
        1100px,
        calc(100% - 40px)
    );

    margin: 0 auto;
}


/* HEADER */

.header {
    background: var(--white);

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


.header-inner {
    height: 76px;

    display: flex;

    align-items: center;
}


.brand {
    display: flex;

    align-items: center;

    gap: 12px;
}


.brand-logo {
    width: 40px;
    height: 40px;

    display: flex;

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

    border-radius: 11px;

    background: var(--primary);

    color: white;

    font-size: 20px;
    font-weight: 800;
}


.brand-name {
    font-size: 17px;

    font-weight: 750;

    line-height: 1.2;
}


.brand-tagline {
    color: var(--muted);

    font-size: 12px;

    margin-top: 2px;
}


/* HERO */

.hero {
    padding:
        80px
        0
        65px;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f6f8fc 100%
        );
}


.eyebrow {
    display: inline-block;

    margin-bottom: 18px;

    color: var(--primary);

    font-size: 13px;

    font-weight: 750;

    letter-spacing: 1.2px;
}


.hero h1 {
    max-width: 700px;

    margin: 0;

    font-size: clamp(
        42px,
        6vw,
        68px
    );

    line-height: 1.05;

    letter-spacing: -2.5px;
}


.hero p {
    max-width: 600px;

    margin:
        24px
        0
        0;

    color: var(--muted);

    font-size: 18px;

    line-height: 1.65;
}


/* TOOLS */

.tools-section {
    padding:
        20px
        0
        80px;
}


.section-heading {
    margin-bottom: 24px;
}


.section-heading h2 {
    margin: 0;

    font-size: 28px;

    letter-spacing: -0.5px;
}


.section-heading p {
    margin:
        8px
        0
        0;

    color: var(--muted);
}


.tools-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;
}


.tool-card {
    display: flex;

    gap: 20px;

    padding: 28px;

    background: var(--white);

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

    border-radius: var(--radius);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}


.tool-card:hover {
    transform:
        translateY(-3px);

    border-color:
        #ccd4e5;

    box-shadow:
        0 14px 35px
        rgba(30, 45, 75, .08);
}


.tool-icon {
    flex: 0 0 auto;

    width: 54px;
    height: 54px;

    display: flex;

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

    border-radius: 15px;

    background:
        #eef2f9;

    font-size: 25px;
}


.tool-content {
    min-width: 0;
}


.tool-content h3 {
    margin:
        2px
        0
        8px;

    font-size: 20px;
}


.tool-content p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;

    line-height: 1.6;
}


.tool-link {
    display: inline-block;

    margin-top: 18px;

    color: var(--primary);

    font-size: 14px;

    font-weight: 700;
}


/* FOOTER */

.footer {
    padding:
        30px
        0;

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

    background: var(--white);
}


.footer p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;
}


/* MOBILE */

@media (
    max-width: 700px
) {

    .container {
        width:
            min(
                100% - 28px,
                600px
            );
    }


    .header-inner {
        height: 68px;
    }


    .hero {
        padding:
            55px
            0
            45px;
    }


    .hero h1 {
        font-size: 43px;

        letter-spacing:
            -1.8px;
    }


    .hero p {
        font-size: 16px;

        margin-top: 20px;
    }


    .tools-section {
        padding-bottom: 55px;
    }


    .tools-grid {
        grid-template-columns: 1fr;

        gap: 14px;
    }


    .tool-card {
        padding: 22px;

        gap: 15px;
    }


    .tool-icon {
        width: 48px;
        height: 48px;

        font-size: 22px;
    }


    .tool-content h3 {
        font-size: 18px;
    }

}


@media (
    max-width: 420px
) {

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


    .tool-card {
        padding: 19px;
    }

}


/* =========================================
   TOOL PAGE
========================================= */

.tool-page {
    padding: 45px 0 80px;
}


.tool-container {
    max-width: 760px;
}


.back-link {
    display: inline-block;

    margin-bottom: 30px;

    color: var(--muted);

    font-size: 14px;

    font-weight: 600;
}


.back-link:hover {
    color: var(--primary);
}


.tool-page-header {
    display: flex;

    align-items: center;

    gap: 18px;

    margin-bottom: 30px;
}


.large-tool-icon {
    width: 62px;
    height: 62px;

    display: flex;

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

    border-radius: 17px;

    background: #eef2f9;

    font-size: 29px;

    flex: 0 0 auto;
}


.tool-page-header h1 {
    margin: 0 0 6px;

    font-size: 34px;

    letter-spacing: -1px;
}


.tool-page-header p {
    margin: 0;

    color: var(--muted);

    font-size: 15px;
}


/* UPLOAD */

.upload-card {
    background: var(--white);

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

    border-radius: 20px;

    padding: 25px;

    box-shadow:
        0 10px 30px
        rgba(30, 45, 75, .05);
}


.drop-zone {
    padding: 55px 20px;

    text-align: center;

    border:
        2px dashed #d7ddea;

    border-radius: 15px;

    transition:
        border-color .2s ease,
        background .2s ease;
}


.drop-zone.drag-over {
    border-color: var(--primary);

    background: #f4f6fb;
}


.upload-icon {
    width: 55px;
    height: 55px;

    margin: 0 auto 16px;

    display: flex;

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

    border-radius: 50%;

    background: #eef2f9;

    color: var(--primary);

    font-size: 26px;

    font-weight: 700;
}


.drop-zone h2 {
    margin: 0 0 8px;

    font-size: 20px;
}


.drop-zone p {
    margin: 0 0 20px;

    color: var(--muted);

    font-size: 14px;
}


.file-info {
    max-width: 100%;

    margin: 20px auto 0;

    padding: 12px 15px;

    border-radius: 10px;

    background: #f5f7fb;

    color: var(--text);

    font-size: 13px;

    text-align: left;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* BUTTON */

.primary-button,
.secondary-button {
    min-height: 48px;

    padding: 0 22px;

    border-radius: 11px;

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform .15s ease,
        opacity .15s ease,
        background .15s ease;
}


.primary-button {
    border: 0;

    background: var(--primary);

    color: white;
}


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

    transform: translateY(-1px);
}


.primary-button:disabled {
    opacity: .45;

    cursor: not-allowed;
}


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

    background: white;

    color: var(--text);
}


.secondary-button:hover {
    background: #f7f8fb;
}


.full-button {
    width: 100%;

    margin-top: 22px;
}


/* PRESETS */

.preset-section {
    margin-top: 28px;
}


.preset-section h3 {
    margin: 0;

    font-size: 16px;
}


.preset-description {
    margin:
        5px
        0
        15px;

    color: var(--muted);

    font-size: 13px;
}


.preset-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 10px;
}


.preset-option {
    position: relative;

    display: block;

    cursor: pointer;
}


.preset-option input {
    position: absolute;

    opacity: 0;
}


.preset-option span {
    display: flex;

    flex-direction: column;

    gap: 5px;

    min-height: 75px;

    padding: 14px;

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

    border-radius: 12px;

    background: white;

    transition:
        border-color .15s ease,
        background .15s ease;
}


.preset-option:hover span {
    border-color: #bcc6db;
}


.preset-option input:checked + span {
    border-color: var(--primary);

    background: #f2f5fb;
}


.preset-option strong {
    font-size: 14px;
}


.preset-option small {
    color: var(--muted);

    font-size: 11px;

    line-height: 1.3;
}


/* RESULT */

.result-card {
    padding: 40px 30px;

    text-align: center;

    background: white;

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

    border-radius: 20px;

    box-shadow:
        0 10px 30px
        rgba(30, 45, 75, .05);
}


.processing-icon,
.success-icon,
.error-icon {
    width: 62px;
    height: 62px;

    margin: 0 auto 18px;

    display: flex;

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

    border-radius: 50%;

    font-size: 27px;

    font-weight: 800;
}


.processing-icon {
    background: #eef2f9;

    color: var(--primary);

    animation:
        spin 1.5s linear infinite;
}


.success-icon {
    background: #eaf7ef;

    color: #23834b;
}


.error-icon {
    background: #fff0f0;

    color: #c63d3d;
}


.result-card h2 {
    margin: 0 0 8px;

    font-size: 24px;
}


.result-card > p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;

    line-height: 1.6;
}


/* PROGRESS */

.progress-wrapper {
    margin-top: 30px;

    text-align: left;
}


.progress-bar {
    height: 10px;

    overflow: hidden;

    border-radius: 10px;

    background: #edf0f5;
}


.progress-value {
    height: 100%;

    border-radius: inherit;

    background: var(--primary);

    transition:
        width .5s ease;
}


.progress-info {
    display: flex;

    justify-content: space-between;

    margin-top: 9px;

    color: var(--muted);

    font-size: 12px;
}


.progress-info strong {
    color: var(--text);
}


.job-status {
    display: flex;

    justify-content: space-between;

    margin-top: 22px;

    padding-top: 16px;

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

    font-size: 13px;
}


.job-status span {
    color: var(--muted);
}


.job-status strong {
    text-transform: capitalize;
}


/* SIZE */

.size-comparison {
    display: flex;

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

    gap: 15px;

    margin-top: 28px;
}


.size-box {
    min-width: 140px;

    padding: 18px;

    border-radius: 13px;

    background: #f6f8fc;
}


.size-box span {
    display: block;

    margin-bottom: 6px;

    color: var(--muted);

    font-size: 12px;
}


.size-box strong {
    font-size: 19px;
}


.size-arrow {
    color: var(--muted);

    font-size: 20px;
}


.saving-box {
    margin-top: 15px;

    padding: 15px;

    border-radius: 12px;

    background: #eef6f1;

    color: #2d6544;

    font-size: 13px;
}


.saving-box strong {
    margin-left: 5px;

    font-size: 16px;
}


.download-button {
    display: flex;

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


.tool-note {
    margin-top: 20px;

    padding: 15px 17px;

    border-radius: 12px;

    background: #f1f4f9;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.6;
}


.tool-note strong {
    color: var(--text);
}


.tool-note p {
    margin: 4px 0 0;
}


.hidden {
    display: none !important;
}


@keyframes spin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* MOBILE */

@media (
    max-width: 700px
) {

    .tool-page {
        padding:
            30px
            0
            55px;
    }


    .tool-page-header {
        align-items: flex-start;
    }


    .large-tool-icon {
        width: 52px;
        height: 52px;

        font-size: 24px;
    }


    .tool-page-header h1 {
        font-size: 28px;
    }


    .upload-card {
        padding: 15px;
    }


    .drop-zone {
        padding:
            40px
            15px;
    }


    .preset-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }


    .result-card {
        padding:
            35px
            18px;
    }


    .size-comparison {
        gap: 8px;
    }


    .size-box {
        min-width: 0;

        flex: 1;

        padding: 15px 10px;
    }


    .size-box strong {
        font-size: 16px;
    }

}


@media (
    max-width: 400px
) {

    .tool-page-header {
        gap: 12px;
    }


    .tool-page-header h1 {
        font-size: 25px;
    }


    .preset-grid {
        grid-template-columns: 1fr;
    }


    .size-comparison {
        flex-direction: column;
    }


    .size-box {
        width: 100%;
    }


    .size-arrow {
        transform: rotate(90deg);
    }

}

/* =========================================================
   UNIVERSAL PDF CONVERTER
   ========================================================= */

.tool-section {
    padding: 50px 20px;
}

.tool-card {
    max-width: 850px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
}

.drop-zone {
    border: 2px dashed #3A4F82;
    border-radius: 14px;
    padding: 50px 25px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
    background: #f5f7fb;
    border-color: #26385f;
}

.drop-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.drop-zone h2 {
    margin: 10px 0;
}

.drop-zone p {
    margin: 8px 0;
}

.supported {
    font-size: 14px;
    color: #777;
    margin-top: 15px !important;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    border: none;
    border-radius: 8px;
    padding: 12px 22px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 20px;
}

.btn-primary {
    background: #3A4F82;
    color: #ffffff;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: #eeeeee;
    color: #333333;
}

.file-info {
    margin-top: 25px;
    padding: 20px;
    background: #f7f8fa;
    border-radius: 10px;
}

.file-info > div {
    margin-bottom: 8px;
}

.file-info > div:last-child {
    margin-bottom: 0;
}

.progress-container {
    margin-top: 30px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #3A4F82;
    transition: width 0.2s ease;
}

.action-container,
.result-container,
.error-container {
    text-align: center;
    margin-top: 25px;
}

.result-container {
    padding: 30px;
    background: #f5f8f5;
    border-radius: 12px;
}

.success-icon {
    width: 55px;
    height: 55px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: #3A4F82;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.error-container {
    padding: 20px;
    background: #fff2f2;
    border-radius: 10px;
}

.error-container strong {
    display: block;
    margin-bottom: 8px;
}

.info-section {
    padding: 50px 20px;
}

.format-grid {
    max-width: 1000px;
    margin: 30px auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.format-card {
    padding: 25px 15px;
    background: #ffffff;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.format-icon {
    font-size: 35px;
    margin-bottom: 10px;
}

.format-card h3 {
    margin: 8px 0;
}

.format-card p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

@media (max-width: 768px) {

    .format-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-card {
        padding: 20px;
    }

}

@media (max-width: 480px) {

    .format-grid {
        grid-template-columns: 1fr;
    }

    .drop-zone {
        padding: 35px 15px;
    }

}


/* =========================================================
   MERGE FILE TOOL
========================================================= */

.merge-upload-card {
    background: var(--white);

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

    border-radius: 20px;

    padding: 25px;

    box-shadow:
        0 10px 30px
        rgba(30, 45, 75, .05);
}


.merge-drop-zone {
    padding: 55px 20px;

    text-align: center;

    border:
        2px dashed #d7ddea;

    border-radius: 15px;

    transition:
        border-color .2s ease,
        background .2s ease;
}


.merge-drop-zone:hover,
.merge-drop-zone.drag-over {
    border-color: var(--primary);

    background: #f4f6fb;
}


.merge-upload-icon {
    width: 58px;
    height: 58px;

    margin:
        0 auto
        16px;

    display: flex;

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

    border-radius: 50%;

    background: #eef2f9;

    font-size: 28px;
}


.merge-drop-zone h2 {
    margin:
        0 0 8px;

    font-size: 21px;
}


.merge-drop-zone p {
    margin:
        0 0 20px;

    color: var(--muted);

    font-size: 14px;
}


.merge-supported {
    max-width: 650px;

    margin:
        18px auto
        0;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.6;
}


/* FILE LIST */

.merge-file-section {
    margin-top: 28px;
}


.merge-section-heading {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 15px;
}


.merge-section-heading h2 {
    margin: 0;

    font-size: 20px;
}


.merge-section-heading p {
    margin:
        4px
        0
        0;

    color: var(--muted);

    font-size: 13px;
}


.merge-file-list {
    display: flex;

    flex-direction: column;

    gap: 10px;
}


.merge-file-item {
    display: flex;

    align-items: center;

    gap: 14px;

    padding:
        14px 16px;

    background: white;

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

    border-radius: 13px;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}


.merge-file-item:hover {
    border-color: #ccd4e5;

    box-shadow:
        0 5px 18px
        rgba(30, 45, 75, .05);
}


.merge-file-icon {
    width: 44px;
    height: 44px;

    flex: 0 0 auto;

    display: flex;

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

    border-radius: 11px;

    background: #eef2f9;

    font-size: 21px;
}


.merge-file-info {
    min-width: 0;

    flex: 1;
}


.merge-file-info strong {
    display: block;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 14px;
}


.merge-file-info span {
    display: block;

    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;
}


.merge-file-actions {
    display: flex;

    align-items: center;

    gap: 5px;

    flex: 0 0 auto;
}


.file-action-button {
    width: 34px;
    height: 34px;

    display: flex;

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

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

    border-radius: 8px;

    background: white;

    color: var(--text);

    font-family: inherit;

    font-size: 16px;

    cursor: pointer;

    transition:
        background .15s ease,
        border-color .15s ease;
}


.file-action-button:hover:not(:disabled) {
    background: #f5f7fb;

    border-color: #cbd3e3;
}


.file-action-button:disabled {
    opacity: .3;

    cursor: not-allowed;
}


.file-action-button.delete {
    color: #c63d3d;
}


.file-action-button.delete:hover:not(:disabled) {
    background: #fff3f3;

    border-color: #f0cccc;
}


/* RESULT */

.merge-result-info {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 10px;

    margin-top: 25px;
}


.merge-result-info > div {
    padding: 15px 10px;

    border-radius: 12px;

    background: #f6f8fc;
}


.merge-result-info span {
    display: block;

    margin-bottom: 5px;

    color: var(--muted);

    font-size: 11px;
}


.merge-result-info strong {
    font-size: 15px;
}


/* MOBILE */

@media (
    max-width: 700px
) {

    .merge-upload-card {
        padding: 15px;
    }


    .merge-drop-zone {
        padding:
            40px
            15px;
    }


    .merge-section-heading {
        align-items: flex-start;
    }


    .merge-file-item {
        padding:
            12px;
    }


    .merge-file-actions {
        gap: 3px;
    }


    .file-action-button {
        width: 31px;
        height: 31px;
    }


    .merge-result-info {
        grid-template-columns: 1fr;
    }

}

/* Member Login */
.header-inner {
    justify-content: space-between;
}

.member-login-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 9px;
    background: #eef2fa;
    color: #3A4F82;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.member-login-link:hover {
    background: #e2e8f5;
}

@media (max-width: 600px) {
    .member-login-link {
        font-size: 12px;
        padding: 8px 10px;
    }
}
