:root {

    --bg: #07070a;

    --card: #101016;

    --card-hover: #15151d;

    --border: rgba(255,255,255,0.08);

    --border-hover: rgba(255,255,255,0.18);

    --text: #f5f5f7;

    --muted: #92929d;

    --accent: #3989ff;

    --accent-light: #8dc9ff;

    --max-width: 1050px;

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


* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}


body {

    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(130,70,255,0.14),
            transparent 40%
        ),
        var(--bg);

    color: var(--text);

    line-height: 1.6;

}


button,
select {

    font: inherit;

}


button {

    cursor: pointer;

}


a {

    color: inherit;

    text-decoration: none;

}



/* =========================
   NAVBAR
========================= */

.navbar {

    width:
        min(
            var(--max-width),
            calc(100% - 32px)
        );

    height: 76px;

    margin: auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

}


.brand {

    display: flex;

    align-items: center;

    gap: 11px;

}


.brand-symbol {

    width: 38px;

    height: 38px;

    display: grid;

    place-items: center;

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

    border-radius: 11px;

    background: rgba(255,255,255,0.03);

    color: var(--accent-light);

    font-size: 23px;

}


.brand-text {

    display: flex;

    flex-direction: column;

    line-height: 1;

}


.brand-main {

    font-size: 13px;

    font-weight: 800;

    letter-spacing: 1.8px;

}


.brand-sub {

    margin-top: 5px;

    color: var(--accent-light);

    font-size: 9px;

    letter-spacing: 3px;

}


.back-link {

    color: var(--muted);

    font-size: 13px;

}


.back-link:hover {

    color: var(--text);

}



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

.tool-hero {

    width:
        min(
            720px,
            calc(100% - 32px)
        );

    margin: 70px auto 50px;

    text-align: center;

}


.tool-badge {

    display: inline-block;

    padding: 6px 12px;

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

    border-radius: 50px;

    color: var(--accent-light);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 2px;

}


.tool-hero h1 {

    margin-top: 20px;

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

    line-height: 1.02;

    letter-spacing: -3px;

}


.tool-hero h1 span {

    color: var(--accent-light);

}


.tool-hero p {

    max-width: 570px;

    margin: 20px auto 0;

    color: var(--muted);

    font-size: 14px;

}



/* =========================
   CONVERTER
========================= */

.converter {

    width:
        min(
            var(--max-width),
            calc(100% - 32px)
        );

    margin: auto;

    display: grid;

    grid-template-columns: 1.25fr 0.75fr;

    gap: 14px;

}


.input-panel,
.settings-panel {

    padding: 25px;

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

    border-radius: 18px;

    background: var(--card);

}


.panel-heading {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 18px;

}


.section-label {

    color: var(--accent-light);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.8px;

}


.panel-heading h2 {

    margin-top: 2px;

    font-size: 20px;

}


.image-count {

    min-width: 32px;

    height: 32px;

    display: grid;

    place-items: center;

    border-radius: 9px;

    background:
        rgba(57,137,255,0.1);

    color: var(--accent-light);

    font-size: 11px;

    font-weight: 700;

}



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

.drop-area {

    min-height: 190px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 6px;

    border: 1px dashed rgba(255,255,255,0.13);

    border-radius: 13px;

    background: #0a0a0e;

    text-align: center;

    cursor: pointer;

    transition: 0.2s;

}


.drop-area:hover,
.drop-area.dragging {

    border-color:
        rgba(57,137,255,0.65);

    background:
        rgba(57,137,255,0.05);

}


.drop-icon {

    margin-bottom: 3px;

    color: var(--accent-light);

    font-size: 36px;

}


.drop-area strong {

    font-size: 14px;

}


.drop-area > span:not(.select-button) {

    color: var(--muted);

    font-size: 10px;

}


.select-button {

    margin-top: 10px;

    padding: 8px 13px;

    border-radius: 8px;

    background:
        rgba(57,137,255,0.12);

    color: var(--accent-light);

    font-size: 11px;

    font-weight: 700;

}



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

.image-list {

    display: flex;

    flex-direction: column;

    gap: 8px;

    margin-top: 12px;

}


.image-item {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 8px;

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

    border-radius: 11px;

    background: #0c0c11;

}


.image-preview {

    width: 52px;

    height: 52px;

    flex-shrink: 0;

    object-fit: cover;

    border-radius: 7px;

    background: #07070a;

}


.image-details {

    min-width: 0;

    flex: 1;

}


.image-name {

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    font-size: 11px;

}


.image-size {

    margin-top: 2px;

    color: var(--muted);

    font-size: 9px;

}


.image-actions {

    display: flex;

    gap: 3px;

}


.image-actions button {

    width: 29px;

    height: 29px;

    border: 0;

    border-radius: 7px;

    background: rgba(255,255,255,0.04);

    color: var(--muted);

    font-size: 12px;

}


.image-actions button:hover {

    background:
        rgba(57,137,255,0.1);

    color: var(--text);

}


.image-actions .remove:hover {

    color: #ff7777;

}



/* =========================
   SETTINGS
========================= */

.setting {

    margin-bottom: 18px;

}


.setting > label {

    display: block;

    margin-bottom: 7px;

    color: var(--accent-light);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.5px;

}


select {

    width: 100%;

    height: 43px;

    padding: 0 12px;

    outline: none;

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

    border-radius: 10px;

    background: #0a0a0e;

    color: var(--text);

    font-size: 12px;

}


select:focus {

    border-color:
        rgba(57,137,255,0.5);

}



/* =========================
   SEGMENTED
========================= */

.segmented {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 5px;

    padding: 4px;

    border-radius: 11px;

    background: #0a0a0e;

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

}


.orientation {

    height: 34px;

    border: 0;

    border-radius: 7px;

    background: transparent;

    color: var(--muted);

    font-size: 11px;

}


.orientation.active {

    background:
        rgba(57,137,255,0.14);

    color: var(--accent-light);

}



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

.convert-button {

    width: 100%;

    height: 48px;

    margin-top: 7px;

    border: 0;

    border-radius: 11px;

    background: var(--accent);

    color: white;

    font-size: 13px;

    font-weight: 700;

    transition: 0.2s;

}


.convert-button:hover:not(:disabled) {

    background: var(--accent-light);

    transform: translateY(-1px);

}


.convert-button:disabled {

    opacity: 0.35;

    cursor: not-allowed;

}


.convert-button span {

    margin-left: 7px;

}


.clear-button {

    width: 100%;

    margin-top: 8px;

    padding: 10px;

    border: 0;

    background: transparent;

    color: var(--muted);

    font-size: 12px;

}


.clear-button:hover {

    color: var(--text);

}


.privacy-note {

    margin-top: 17px;

    padding-top: 14px;

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

    color: var(--muted);

    font-size: 9px;

    line-height: 1.5;

}


.privacy-note span {

    margin-right: 5px;

    color: var(--accent-light);

}



/* =========================
   INFO
========================= */

.info-section {

    width:
        min(
            var(--max-width),
            calc(100% - 32px)
        );

    margin: 70px auto;

    display: grid;

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

    gap: 12px;

}


.info-card {

    display: flex;

    gap: 13px;

    padding: 18px;

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

    border-radius: 14px;

    background:
        rgba(255,255,255,0.02);

}


.info-icon {

    color: var(--accent-light);

    font-size: 19px;

}


.info-card h3 {

    font-size: 13px;

}


.info-card p {

    margin-top: 3px;

    color: var(--muted);

    font-size: 10px;

    line-height: 1.5;

}



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

footer {

    width:
        min(
            var(--max-width),
            calc(100% - 32px)
        );

    margin: auto;

    padding: 25px 0 35px;

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

    display: flex;

    justify-content: space-between;

    color: var(--muted);

    font-size: 10px;

}



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

@media (max-width: 800px) {

    .converter {

        grid-template-columns: 1fr;

    }


    .tool-hero {

        margin-top: 60px;

    }


    .info-section {

        grid-template-columns: 1fr;

    }

}


@media (max-width: 500px) {

    .input-panel,
    .settings-panel {

        padding: 20px;

    }


    .image-actions button {

        width: 27px;

        height: 27px;

    }


    footer {

        flex-direction: column;

        gap: 7px;

    }

}