/* :root {
    --primary: #6c5ce7;
    --primary-dark: #5747d5;

    --text: #101828;
    --muted: #667085;

    --border: #eaecf0;
    --light-bg: #f8f9fc;
    --white: #ffffff;

    --success: #12b76a;

    --shadow-sm:
        0 1px 3px rgba(16, 24, 40, 0.06);

    --shadow-md:
        0 10px 30px rgba(16, 24, 40, 0.08);

    --shadow-lg:
        0 20px 50px rgba(16, 24, 40, 0.10);

    --radius: 16px;
} */

.page-hero-title {
    font-weight: 800;
    display: block;
    font-family: 'Bricolage Grotesque', 'DM Sans', sans-serif;
    font-size: clamp(2.2rem, 5.5vw, 3.75rem);
    background: linear-gradient(to right, #a3c43a, #a866ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}


/* ================================
   Global
================================ */

* {
    box-sizing: border-box;
}



button,
input,
select {
    font-family: inherit;
}

.tool-wrapper {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}



/* ================================
   Main Converter Card
================================ */

.converter-card {

    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
}


/* ================================
   Upload Area
================================ */

.upload-area {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 45px 25px;
    text-align: center;
    border: 2px dashed #d0d5dd;
    border-radius: 20px;
    cursor: pointer;
    transition: .2s ease;
    outline: none;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.upload-area:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}


.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.04);
    transform: scale(1.01);
}

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

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

    margin-bottom: 20px;

    border-radius: 22px;

    background: rgba(108, 92, 231, 0.10);
    color: var(--primary);

    font-size: 34px;
}

.upload-area h3 {
    margin-bottom: 8px;

    font-size: 23px;
    font-weight: 700;
}

.upload-area p {
    margin-bottom: 22px;
    color: var(--muted);
}

.upload-area small {
    display: block;

    margin-top: 18px;

    color: var(--muted);
    font-size: 13px;
}

.browse-btn {
    padding: 11px 24px;

    border: none;
    border-radius: 10px;

    background: var(--primary);

    font-weight: 600;

    transition: all 0.2s ease;
}

.browse-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}


/* ================================
   Editor
================================ */

.editor-section {
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

}


/* ================================
   Image Info
================================ */

.image-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;

}

.info-item {
    flex: 1;
    min-width: 180px;

    display: flex;
    flex-direction: column;

    gap: 4px;
}

.info-label {
    color: var(--muted);
    font-size: 12px;
}

.info-item strong {
    font-size: 14px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ================================
   Preview Grid
================================ */

.preview-grid {
    display: grid;

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

    gap: 20px;
}

.preview-card {
    overflow: hidden;

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

    background: var(--white);
}

.preview-header {
    min-height: 56px;

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

    padding: 0 17px;

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

    font-size: 14px;
    font-weight: 650;
}

.preview-badge {
    padding: 5px 9px;

    border-radius: 6px;

    background: #f2f4f7;

    color: var(--muted);

    font-size: 11px;
    font-weight: 600;
}

.result-badge {
    background: rgba(108, 92, 231, 0.10);
    color: var(--primary);
}

.image-container {
    width: 100%;
    height: 380px;

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

    padding: 20px;

    background:
        linear-gradient(45deg, #f5f5f5 25%, transparent 25%),
        linear-gradient(-45deg, #f5f5f5 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f5f5f5 75%),
        linear-gradient(-45deg, transparent 75%, #f5f5f5 75%);

    background-size: 24px 24px;
    background-position:
        0 0,
        0 12px,
        12px -12px,
        -12px 0;
}

.image-container img,
.image-container canvas {
    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    display: block;

    object-fit: contain;

    border-radius: 6px;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.08);
}

.preview-placeholder {
    display: none;

    flex-direction: column;
    align-items: center;

    gap: 10px;

    max-width: 200px;

    text-align: center;

    color: var(--muted);
    font-size: 14px;
}

.preview-placeholder i {
    font-size: 38px;
}


/* ================================
   Controls
================================ */

.controls-card {
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.controls-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 28px;
}

.controls-header h4 {
    margin-bottom: 5px;

    font-size: 18px;
    font-weight: 700;
}

.controls-header p {
    margin: 0;

    color: var(--muted);
    font-size: 13px;
}

.reset-btn {
    white-space: nowrap;

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

    font-size: 13px;
    font-weight: 600;
}


/* ================================
   Range Controls
================================ */

.range-control {
    margin-bottom: 28px;
}

.range-label {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 10px;
}

.range-label label {
    font-size: 14px;
    font-weight: 650;
}

.range-label span {
    min-width: 48px;

    padding: 4px 8px;

    border-radius: 6px;

    background: rgba(108, 92, 231, 0.08);

    color: var(--primary);

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

    text-align: center;
}

.form-range {
    cursor: pointer;
}

.form-range::-webkit-slider-thumb {
    background: var(--primary);
}

.form-range::-moz-range-thumb {
    background: var(--primary);
    border: none;
}

.range-hints {
    display: flex;
    justify-content: space-between;

    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;
}


/* ================================
   Output Settings
================================ */

.output-settings {
    padding-top: 8px;

    margin-top: 10px;
    margin-bottom: 25px;

    padding-bottom: 5px;

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

.output-settings .row {
    padding-top: 22px;
}

.form-label {
    margin-bottom: 8px;

    font-size: 13px;
    font-weight: 650;
}

.form-select {
    min-height: 44px;
    border-color: var(--border);
    border-radius: 9px;
    background: var(--bg);
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow:
        0 0 0 3px rgba(108, 92, 231, 0.12);
}

.quality-value {
    float: right;

    color: var(--primary);
}


/* ================================
   Buttons
================================ */

.action-buttons {
    display: flex;
    justify-content: space-between;

    gap: 12px;

    padding-top: 5px;
}

.action-buttons .btn {
    min-height: 46px;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 650;
}

.download-btn {
    padding-left: 24px;
    padding-right: 24px;

    border: none;

    background: var(--primary);
}

.download-btn:hover {
    background: var(--primary-dark);
}


/* ================================
   Section Heading
================================ */

.section-heading {
    max-width: 700px;

    margin: 100px auto 45px;
}

.section-tag {
    display: inline-block;

    margin-bottom: 12px;

    color: var(--primary);

    font-size: 12px;
    font-weight: 750;
    letter-spacing: 1px;
}

.section-heading h2 {
    margin-bottom: 12px;

    font-size: clamp(26px, 4vw, 34px);
    font-weight: 750;
    letter-spacing: -0.8px;
}

.section-heading p {
    margin: 0;

    color: var(--muted);
}


/* ================================
   Feature Cards
================================ */

.feature-card {
    height: 100%;

    padding: 26px;

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

    background: var(--white);

    box-shadow: var(--shadow-sm);

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

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

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

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

    margin-bottom: 20px;

    border-radius: 12px;

    background: rgba(108, 92, 231, 0.10);

    color: var(--primary);

    font-size: 22px;
}

.feature-card h4 {
    margin-bottom: 10px;

    font-size: 17px;
    font-weight: 700;
}

.feature-card p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
    line-height: 1.7;
}


/* ================================
   How To Section
================================ */

.how-section {
    padding-bottom: 20px;
}

.steps-container {
    display: flex;
    align-items: flex-start;

    gap: 15px;

    max-width: 1100px;

    margin: 0 auto;
    margin-bottom: 50px;
}

.step {
    flex: 1;

    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;

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

    margin: 0 auto 18px;

    border-radius: 50%;

    background: var(--primary);

    color: var(--dark);

    font-weight: 750;
}

.step h4 {
    margin-bottom: 8px;

    font-size: 16px;
    font-weight: 700;
}

.step p {
    margin: 0;

    color: var(--muted);

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

.step-line {
    width: 70px;
    height: 1px;

    margin-top: 24px;

    background: var(--border);
}


/* ================================
   Responsive
================================ */

@media (max-width: 991px) {

    .tool-wrapper {
        padding-top: 45px;
    }

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

    .image-container {
        height: 350px;
    }

    .steps-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .step {
        flex: 0 0 calc(50% - 20px);
    }

    .step-line {
        display: none;
    }

}


@media (max-width: 767px) {

    .tool-wrapper {
        padding: 35px 15px 60px;
    }

    .tool-header {
        margin-bottom: 30px;
    }

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

    .tool-header p {
        font-size: 15px;
    }

    .converter-card {
        padding: 15px;
        border-radius: 18px;
    }

    .upload-area {
        min-height: 310px;
        padding: 30px 15px;
    }

    .upload-area h3 {
        font-size: 20px;
    }

    .image-container {
        height: 300px;
    }

    .controls-card {
        padding: 18px;
    }

    .controls-header {
        align-items: center;
    }

    .action-buttons {
        flex-direction: column-reverse;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .section-heading {
        margin-top: 70px;
        margin-bottom: 30px;
    }

    .step {
        flex: 0 0 100%;
    }

}


@media (max-width: 480px) {

    .tool-header h1 {
        font-size: 28px;
        letter-spacing: -0.8px;
    }

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

        font-size: 27px;
    }

    .image-info {
        flex-direction: column;
    }

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

    .preview-header {
        font-size: 13px;
    }

    .image-container {
        height: 260px;
    }

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

    .reset-btn {
        width: 100%;
    }

}


