 :root {
     --panel: var(--light-bg);
     --panel-2: var(--light-bg);
     --border: #2a2f3a;
     --accent: #6c5ce7;
     --accent-2: var(--primary);
     /* --text: #e8eaf0; */
     /* --text-dim: #8a90a2; */
     --danger: #ff5c72;
 }

 * {
     box-sizing: border-box;
 }

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

 /* body {
     background: radial-gradient(1200px 600px at 10% -10%, #1c2030 0%, var(--bg) 55%);
     color: var(--text);
     font-family: 'Inter', system-ui, sans-serif;
     min-height: 100vh;
 } */

 .upload-orb {
     width: 66px;
     height: 66px;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     border-radius: 21px;
     color: var(--primary);
     /* background: #dbeafe; */
     font-size: 1.65rem;
 }


 .panel {
     /* background: var(--light-bg); */
     border: 1px solid var(--border);
     border-radius: 16px;
 }

 .panel-header {
     padding: 14px 18px;
     border-bottom: 1px solid var(--border);
     font-weight: 700;
     font-size: .85rem;
     text-transform: uppercase;
     letter-spacing: .6px;
     color: var(--text-dim);
     display: flex;
     align-items: center;
     gap: 8px;
 }

 .panel-body {
     padding: 18px;
 }

 .dropzone {
     border: 2px dashed var(--border);
     border-radius: 16px;
     padding: 60px 20px;
     text-align: center;
     cursor: pointer;
     transition: .2s;
     /* background: var(--light-bg); */
 }

 .dropzone:hover,
 .dropzone.dragover {
     border-color: var(--primary);
     /* background: #edf4ff; */
     box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
 }

 .dropzone i {
     font-size: 2.6rem;
     background: linear-gradient(135deg, var(--accent), var(--accent-2));
     -webkit-background-clip: text;
     background-clip: text;
     color: transparent;
 }

 .stage-wrap {
     background:
         linear-gradient(45deg, #20242e 25%, transparent 25%),
         linear-gradient(-45deg, #20242e 25%, transparent 25%),
         linear-gradient(45deg, transparent 75%, #20242e 75%),
         linear-gradient(-45deg, transparent 75%, #20242e 75%);
     background-size: 20px 20px;
     background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
     background-color: #15171d;
     border-radius: 14px;
     display: flex;
     align-items: center;
     justify-content: center;
     overflow: hidden;
     position: relative;
     min-height: 420px;
     max-height: 65vh;
     touch-action: none;
     user-select: none;
 }

 #cropCanvasArea {
     position: relative;
     line-height: 0;
 }

 #sourceImg {
     display: block;
     max-width: 100%;
     pointer-events: none;
 }

 .crop-box {
     position: absolute;
     border: 2px solid var(--accent-2);
     box-shadow: 0 0 0 9999px rgba(10, 11, 15, .55);
     cursor: move;
 }

 .crop-box .grid-line {
     position: absolute;
     background: rgba(255, 255, 255, .35);
 }

 .grid-v1 {
     left: 33.333%;
     top: 0;
     bottom: 0;
     width: 1px;
 }

 .grid-v2 {
     left: 66.666%;
     top: 0;
     bottom: 0;
     width: 1px;
 }

 .grid-h1 {
     top: 33.333%;
     left: 0;
     right: 0;
     height: 1px;
 }

 .grid-h2 {
     top: 66.666%;
     left: 0;
     right: 0;
     height: 1px;
 }

 .handle {
     position: absolute;
     width: 14px;
     height: 14px;
     background: var(--accent-2);
     border: 2px solid #0f1115;
     border-radius: 50%;
     z-index: 5;
 }

 .handle.nw {
     top: -8px;
     left: -8px;
     cursor: nwse-resize;
 }

 .handle.ne {
     top: -8px;
     right: -8px;
     cursor: nesw-resize;
 }

 .handle.sw {
     bottom: -8px;
     left: -8px;
     cursor: nesw-resize;
 }

 .handle.se {
     bottom: -8px;
     right: -8px;
     cursor: nwse-resize;
 }

 .handle.n {
     top: -8px;
     left: calc(50% - 7px);
     cursor: ns-resize;
 }

 .handle.s {
     bottom: -8px;
     left: calc(50% - 7px);
     cursor: ns-resize;
 }

 .handle.e {
     right: -8px;
     top: calc(50% - 7px);
     cursor: ew-resize;
 }

 .handle.w {
     left: -8px;
     top: calc(50% - 7px);
     cursor: ew-resize;
 }

 .form-label {
     font-size: .78rem;
     font-weight: 600;
     color: var(--text-dim);
     text-transform: uppercase;
     letter-spacing: .5px;
 }

 

 .form-select,
 .form-control {
    border: 1px solid var(--border);
    background: var(--dark);
    
 }


 .form-select:focus,
 .form-control:focus {
     /* color: var(--text); */
     border-color: var(--primary);
     box-shadow: 0 0 0 .2rem rgba(108, 92, 231, .25);
     background: var(--dark);
 }

 .form-control::placeholder {
     color: #5c6274;
 }

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

 .form-range::-moz-range-thumb {
     background: var(--accent-2);
 }

 .ratio-btn {
     /* background: var(--panel-2); */
     border: 1px solid var(--primary);
     color: var(--text);
     border-radius: 10px;
     font-size: .8rem;
     padding: 8px 6px;
     transition: .15s;
 }

 .ratio-btn:hover {
     border-color: var(--primary);
     color: var(--text);
 }

 .ratio-btn.active {
     background: var(--primary);
     border-color: transparent;
     color: #fff;
     font-weight: 600;
 }

 .btn-accent {
     background: linear-gradient(135deg, var(--accent), var(--accent-2));
     border: none;
     color: #fff;
     font-weight: 600;
 }

 .btn-accent:hover {
     filter: brightness(1.08);
     color: #fff;
     background: var(--primary);
 }

 .btn-outline-soft {
     /* background: var(--panel-2); */
     border: 1px solid var(--border);
     color: var(--text);
 }

 .btn-outline-soft:hover {
     border-color: var(--text);
     color: #fff;
     background: var(--primary);
 }

 .icon-btn {
     width: 40px;
     height: 40px;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     border-radius: 10px;
 }

 .dim-input-group {
     display: flex;
     align-items: center;
     gap: 8px;
 }

 .lock-btn {
     width: 40px;
     height: 40px;
     border-radius: 10px;
     flex-shrink: 0;
 }

 .lock-btn.active {
     background: linear-gradient(135deg, var(--accent), var(--accent-2));
     border-color: transparent;
     color: #fff;
 }

 .badge-soft {
     /* background: var(--panel-2); */
     border: 1px solid var(--border);
     color: var(--text-dim);
     font-weight: 500;
     font-size: .75rem;
     padding: 5px 10px;
 }

 footer {
     color: var(--text-dim);
     font-size: .85rem;
 }

 .section-divider {
     border-top: 1px solid var(--border);
     margin: 16px 0;
 }

 ::-webkit-scrollbar {
     width: 8px;
     height: 8px;
 }

 ::-webkit-scrollbar-thumb {
     background: var(--border);
     border-radius: 4px;
 }

 .format-quality-wrap {
     transition: .2s;
 }

 .empty-state-icon {
     width: 70px;
     height: 70px;
     border-radius: 50%;
     background: var(--panel-2);
     display: flex;
     align-items: center;
     justify-content: center;
     margin: 0 auto 16px;
     font-size: 1.8rem;
     color: var(--text-dim);
 }

 @media (max-width: 991px) {
     .stage-wrap {
         min-height: 320px;
         max-height: 50vh;
     }
 }
 
 /* ================================
   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 #eaecf0;
    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%;
    }

}


