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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #102a56;
    background: #f8fbff;
    line-height: 1.6;
}

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

button,
select {
    font-family: inherit;
}

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

/* HEADER */

.site-header {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e4edf8;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* LOGO SIZE */
.brand-logo-svg {
    width: 180px;
    height: 52px;
    display: block;
    flex-shrink: 0;
}

.main-nav {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
}

.nav-link {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #60748f;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #146ee9;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 3px;
    background: #146ee9;
    border-radius: 4px 4px 0 0;
}

/* HERO */

.converter-hero {
    padding: 55px 0 45px;
    text-align: center;
    background: linear-gradient(120deg, #edf7ff, #ffffff, #eef8ff);
    border-bottom: 1px solid #e4edf8;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 7px;
    color: #1269e5;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
}

.converter-hero h1 {
    color: #102a56;
    font-size: clamp(36px, 5vw, 52px);
    line-height: 1.1;
    margin-bottom: 12px;
}

.converter-hero p {
    max-width: 620px;
    margin: auto;
    color: #607897;
    font-size: 16px;
}

/* CONVERTER SECTION */

.converter-section {
    padding: 45px 0 70px;
}

/* UPLOAD */

.upload-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 30px;
    text-align: center;
    background: #ffffff;
    border: 2px dashed #bdd8f8;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(31, 88, 135, 0.06);
    transition: 0.2s ease;
}

.upload-card:hover {
    border-color: #5b9bea;
    background: #fbfdff;
}

.upload-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 15px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #2d8cff, #236de5);
    font-size: 27px;
    font-weight: 700;
}

.upload-card h2 {
    font-size: 23px;
    color: #102a56;
    margin-bottom: 5px;
}

.upload-card > p {
    color: #7186a1;
    font-size: 14px;
}

.choose-button {
    display: inline-flex;
    margin-top: 18px;
    padding: 12px 25px;
    border-radius: 9px;
    background: #146ee9;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 7px 18px rgba(20, 110, 233, 0.20);
    transition: 0.2s ease;
}

.choose-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 23px rgba(20, 110, 233, 0.28);
}

.drag-text {
    margin-top: 13px !important;
    color: #9aabc0 !important;
    font-size: 12px !important;
}

/* EDITOR */

.editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px minmax(0, 1fr);
    gap: 20px;
    margin-top: 25px;
    align-items: start;
}

.preview-card,
.settings-card {
    background: #ffffff;
    border: 1px solid #dce8f5;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(31, 88, 135, 0.05);
}

.preview-title {
    color: #102a56;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 13px;
}

.preview-box {
    height: 290px;
    border-radius: 10px;
    background: linear-gradient(
        45deg,
        #f2f6fa 25%,
        #ffffff 25%,
        #ffffff 50%,
        #f2f6fa 50%,
        #f2f6fa 75%,
        #ffffff 75%
    );
    background-size: 22px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e5edf6;
}

.preview-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.empty-message {
    color: #91a1b5;
    font-size: 12px;
    text-align: center;
    padding: 20px;
}

.image-info {
    min-height: 20px;
    margin-top: 11px;
    color: #7186a1;
    font-size: 12px;
}

/* SETTINGS */

.settings-card h2 {
    color: #102a56;
    font-size: 18px;
    margin-bottom: 20px;
}

.settings-card label {
    display: block;
    color: #4f6582;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 7px;
}

.settings-card select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbdced;
    border-radius: 8px;
    background: #ffffff;
    color: #243d5f;
    font-size: 13px;
    outline: none;
    margin-bottom: 18px;
}

.settings-card select:focus {
    border-color: #3985e9;
    box-shadow: 0 0 0 3px rgba(57, 133, 233, 0.10);
}

/* BUTTONS */

.primary-button,
.secondary-button,
.download-button {
    width: 100%;
    min-height: 43px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.primary-button {
    border: 0;
    background: #146ee9;
    color: #ffffff;
    box-shadow: 0 7px 18px rgba(20, 110, 233, 0.18);
}

.primary-button:hover {
    background: #0e5fd1;
    transform: translateY(-1px);
}

.primary-button:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.secondary-button {
    margin-top: 10px;
    border: 1px solid #d2dfed;
    background: #ffffff;
    color: #45617f;
}

.secondary-button:hover {
    border-color: #a9c8ea;
    background: #f7fbff;
}

.download-button {
    margin-top: 12px;
    background: #0ca678;
    color: #ffffff;
    box-shadow: 0 7px 18px rgba(12, 166, 120, 0.15);
}

.download-button:hover {
    background: #088d66;
    transform: translateY(-1px);
}

.download-button.disabled {
    pointer-events: none;
    background: #dce5ee;
    color: #91a1b5;
    box-shadow: none;
}

/* RESULT */

.result-message {
    min-height: 35px;
    margin-top: 15px;
    padding: 8px;
    color: #23704f;
    background: #effbf5;
    border-radius: 7px;
    font-size: 12px;
    text-align: center;
}

/* FOOTER */

.site-footer {
    background: #132a4b;
    color: #ffffff;
    padding: 22px 0;
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.site-footer strong {
    font-size: 16px;
}

.site-footer span {
    color: #b8c8dc;
    font-size: 11px;
}

/* RESPONSIVE */

@media (max-width: 1000px) {
    .header-inner {
        gap: 12px;
    }

    .main-nav {
        flex: 1;
    }

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

    .settings-card {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .preview-card {
        grid-row: 2;
    }
}

@media (max-width: 700px) {
    .site-header {
        height: auto;
    }

    .header-inner {
        flex-wrap: wrap;
        padding: 8px 0;
    }

    .main-nav {
        order: 3;
        width: 100%;
        height: 42px;
    }

    .nav-link {
        height: 42px;
        padding: 0 9px;
    }

    .converter-hero {
        padding: 42px 0 35px;
    }

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

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

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

    .settings-card {
        grid-column: auto;
        grid-row: auto;
    }

    .preview-card {
        grid-row: auto;
    }

    .preview-box {
        height: 260px;
    }

    .site-footer .container {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 450px) {
    .brand-logo-svg {
        width: 180px;
        height: 52px;
    }

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

    .upload-card h2 {
        font-size: 20px;
    }

    .converter-section {
        padding-top: 30px;
    }
}