* {
    box-sizing: border-box;
}

       /* =====================================================
           WHATSAPP
        ===================================================== */

        #whatsapp-share {

            position: fixed;

            bottom: 20px;

            right: 20px;

            background: #25D366;

            color: #fff;

            border-radius: 50%;

            padding: 12px;

            z-index: 1000;

            display: flex;

            align-items: center;

            justify-content: center;

            box-shadow:
                0 4px 14px rgba(0, 0, 0, 0.25);

            transition:
                transform 0.2s ease,
                box-shadow 0.2s ease;
        }

        #whatsapp-share:hover {

            transform: scale(1.08);

            box-shadow:
                0 6px 18px rgba(0, 0, 0, 0.3);
        }

        #whatsapp-share img {

            display: block;
        }

/* =====================================================
   how to use info button
===================================================== */
/* Center the container and space the buttons */
.btn-container {
  display: flex;
  justify-content: center; /* Centers the buttons horizontally */
  gap: 20px;              /* Creates equal space between the buttons */
  padding: 20px;
}

/* Base button styling */
.btn.primary {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  color: #ffffff;
  background-color: #007bff; /* Primary blue color */
  border-radius: 5px;
  transition: all 0.3s ease; /* Smooth transition for the hover effect */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Hover effect */
.btn.primary:hover {
  background-color: #0056b3; /* Darker blue on hover */
  transform: translateY(-2px); /* Subtle lift effect */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Deeper shadow on hover */
}

/* =====================================================
   START NEW TASK BUTTON
===================================================== */
.start-NewTask {
    width: 100%;
    margin-top: 26px;
    padding: 14px 20px;

    border: 1px solid var(--primary);
    border-radius: 10px;

    background: rgb(213, 213, 233);
    color: #0a0116;

    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;

    cursor: pointer;
    text-align: center;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

.start-NewTask:hover {
    background: rgb(6, 233, 25);
    border-color: color-mix(in srgb, var(--primary) 88%, black);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.start-NewTask:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.start-NewTask:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 30%, transparent);
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .start-NewTask {
        padding: 13px 18px;
        font-size: 15px;
    }
}
/* =====================================================
   TOOLSHIVA GLOBAL LOADER
===================================================== */

#toolshiva-global-loader {

    position: fixed;

    inset: 0;

    display: none;

    align-items: center;

    justify-content: center;

    z-index: 999999;

    background: rgba(0, 0, 0, 0.55);

    backdrop-filter: blur(3px);

}


/* =====================================================
   SHOW
===================================================== */

#toolshiva-global-loader.show {

    display: flex;

}


/* =====================================================
   LOADER BOX
===================================================== */

.toolshiva-loader-box {

    width: min(90%, 360px);

    padding: 30px 25px;

    background: #ffffff;

    border-radius: 18px;

    text-align: center;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.30);

}


/* =====================================================
   LOGO
===================================================== */

.toolshiva-loader-logo {

    --loader-logo-size: 75px;

    width: var(--loader-logo-size);

    height: var(--loader-logo-size);

    display: block;

    margin: 0 auto 18px;

    object-fit: contain;

    border-radius: 50%;

    animation:
        toolshivaLogoRotate
        1.5s
        linear
        infinite;

}


/* =====================================================
   ROTATION
===================================================== */

@keyframes toolshivaLogoRotate {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* =====================================================
   TITLE
===================================================== */

.toolshiva-loader-title {

    font-size: 18px;

    font-weight: 700;

    color: #111827;

    margin-bottom: 7px;

}


/* =====================================================
   MESSAGE
===================================================== */

.toolshiva-loader-text {

    font-size: 14px;

    color: #6b7280;

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 600px) {

    .toolshiva-loader-box {

        width: 85%;

        padding: 25px 20px;

    }


    .toolshiva-loader-logo {

        --loader-logo-size: 60px;

    }

}

.loading-image {
    width: 70px;
    height: 70px;

    object-fit: contain;

    display: block;
    margin: 0 auto 15px;

    animation: loadingImageRotate 1.5s linear infinite;

    border-radius: 50%;
}


/* =====================================================
   LOADING IMAGE SIZE
   Change 70px to any size you want
   ===================================================== */

@keyframes loadingImageRotate {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}

body {

    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f4f7fb;

    min-height: 100vh;
}

.container {

    width: 95%;

    max-width: 1000px;

    margin: 40px auto;
}

/* =====================================================
           HEADER
           ===================================================== */

.header {

    text-align: center;

    margin-bottom: 30px;
}

.header h1 {

    margin: 0 0 10px;

    font-size: 34px;

    color: #1f2937;
}

.header p {

    color: #6b7280;

    font-size: 16px;

    margin: 0;
}

/* =====================================================
           CARD
           ===================================================== */

.card {

    background: white;

    border-radius: 18px;

    padding: 35px;

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.08);
}

/* =====================================================
           UPLOAD AREA
           ===================================================== */

.upload-area {

    border:
        2px dashed #2563eb;

    border-radius: 15px;

    padding: 50px 20px;

    text-align: center;

    background: #f8fbff;

    cursor: pointer;

    transition: 0.3s;

    outline: none;
}

.upload-area:hover {

    background: #eef5ff;

    border-color: #1d4ed8;
}

.upload-area.dragover {

    background: #eaf2ff;

    border-color: #1d4ed8;

    transform: scale(1.01);
}

.upload-icon {

    font-size: 60px;

    margin-bottom: 15px;
}

.upload-title {

    font-size: 22px;

    font-weight: bold;

    color: #1f2937;
}

.upload-text {

    margin-top: 10px;

    color: #6b7280;
}

#fileInput {

    display: none;
}

.formats {

    margin-top: 15px;

    font-size: 13px;

    color: #6b7280;
}

/* =====================================================
           SELECTED FILES
           ===================================================== */

.selected-files {

    margin-top: 25px;
}

.selected-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 15px;
}

.selected-files h3 {

    margin: 0;

    color: #1f2937;
}

.file-count {

    font-size: 13px;

    color: #6b7280;

    background: #f3f4f6;

    padding: 5px 10px;

    border-radius: 20px;
}

.file-item {

    display: flex;

    align-items: center;

    gap: 15px;

    padding: 12px;

    margin-bottom: 10px;

    background: #f8f9fa;

    border-radius: 10px;

    border:
        1px solid #e5e7eb;
}

.pdf-preview {

    width: 65px;

    height: 65px;

    border-radius: 8px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #fee2e2;

    color: #dc2626;

    font-size: 20px;

    font-weight: bold;

    border:
        1px solid #fecaca;

    flex-shrink: 0;
}

.file-info {

    flex: 1;

    min-width: 0;
}

.file-name {

    font-weight: bold;

    color: #374151;

    word-break: break-all;
}

.file-size {

    font-size: 13px;

    color: #6b7280;

    margin-top: 5px;
}

.remove-btn {

    border: none;

    background: #dc3545;

    color: white;

    border-radius: 7px;

    padding: 7px 12px;

    cursor: pointer;

    flex-shrink: 0;
}

.remove-btn:hover {

    background: #bb2d3b;
}

/* =====================================================
           COMPRESSION OPTIONS
           ===================================================== */

.compression-section {

    margin-top: 30px;
}

.compression-title {

    font-size: 18px;

    font-weight: bold;

    color: #1f2937;

    margin-bottom: 15px;
}

.compression-options {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;
}

.compression-option {

    position: relative;
}

.compression-option input {

    display: none;
}

.compression-card {

    display: block;

    padding: 20px;

    background: #f8f9fa;

    border:
        2px solid #e5e7eb;

    border-radius: 12px;

    cursor: pointer;

    height: 100%;

    transition: 0.3s;
}

.compression-card:hover {

    border-color: #93c5fd;

    background: #f8fbff;
}

.compression-option input:checked+.compression-card {

    border-color: #2563eb;

    background: #eff6ff;

    box-shadow:
        0 5px 15px rgba(37, 99, 235, 0.12);
}

.compression-icon {

    font-size: 30px;

    margin-bottom: 10px;
}

.compression-name {

    font-weight: bold;

    font-size: 16px;

    color: #1f2937;

    margin-bottom: 8px;
}

.compression-description {

    font-size: 13px;

    color: #6b7280;

    line-height: 1.5;
}

.recommended-badge {

    display: inline-block;

    margin-top: 10px;

    padding: 4px 8px;

    border-radius: 20px;

    background: #dbeafe;

    color: #1d4ed8;

    font-size: 11px;

    font-weight: bold;
}

/* =====================================================
           INFO BOX
           ===================================================== */

.info-box {

    margin-top: 20px;

    padding: 15px;

    border-radius: 10px;

    background: #f0fdf4;

    border:
        1px solid #bbf7d0;

    color: #166534;

    font-size: 14px;

    line-height: 1.5;
}

/* =====================================================
           BUTTON
           ===================================================== */

.convert-btn {

    width: 100%;

    margin-top: 30px;

    padding: 15px;

    border: none;

    border-radius: 10px;

    background: #2563eb;

    color: white;

    font-size: 18px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.3s;
}

.convert-btn:hover {

    background: #1d4ed8;
}

.convert-btn:disabled {

    background: #9ca3af;

    cursor: not-allowed;
}

/* =====================================================
           LOADING OVERLAY
           ===================================================== */

#loadingOverlay {

    display: none;

    position: fixed;

    inset: 0;

    background:
        rgba(0, 0, 0, 0.75);

    z-index: 99999;

    justify-content: center;

    align-items: center;

    padding: 20px;
}

.loading-box {

    width: 420px;

    max-width: 90%;

    background: white;

    border-radius: 18px;

    padding: 40px;

    text-align: center;
}

.spinner {

    width: 65px;

    height: 65px;

    margin:
        0 auto 20px;

    border:
        7px solid #e5e7eb;

    border-top:
        7px solid #2563eb;

    border-radius: 50%;

    animation:
        spin 1s linear infinite;
}

@keyframes spin {

    from {
        transform:
            rotate(0deg);
    }

    to {
        transform:
            rotate(360deg);
    }
}

.loading-title {

    font-size: 22px;

    font-weight: bold;

    color: #1f2937;
}

.loading-text {

    margin-top: 10px;

    color: #6b7280;

    line-height: 1.5;
}

/* =====================================================
           SUCCESS MESSAGE
           ===================================================== */

.success-message {

    display: none;

    margin-top: 20px;

    padding: 15px;

    border-radius: 10px;

    background: #ecfdf5;

    border:
        1px solid #a7f3d0;

    color: #047857;

    font-size: 14px;

    line-height: 1.5;
}

/* =====================================================
           MOBILE
           ===================================================== */

@media (max-width: 700px) {

    .compression-options {

        grid-template-columns:
            1fr;
    }

    .card {

        padding: 20px;
    }

    .header h1 {

        font-size: 27px;
    }

    .file-item {

        flex-wrap: wrap;
    }

    .remove-btn {

        margin-left: auto;
    }

    .upload-area {

        padding: 40px 15px;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:
        linear-gradient(135deg,
            #f5f7fb,
            #eef2ff);

    color: #222;
}


/* =====================================================
           HEADER
        ===================================================== 

.header {
    background:
        linear-gradient(135deg,
            #f15810,
            #1206ee);

    color: white;

    padding: 1px 20px 0;

    text-align: center;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.15);
}
*/
  /* =====================================================
           HEADER
        ====================================================== 

        .header {

            background:
                linear-gradient(135deg,
                    #f15810,
                    #1206ee);

            color: white;


            text-align: center;
            margin-bottom: 25px;
        }  

        .header {
            background: linear-gradient(90deg,
                    #f15810,
                    #1206ee,
                    #7c3aed,
                    #06b6d4,
                    #10b981,
                    #f15810);

            background-size: 500% 100%;

            color: #ffffff;
            text-align: center;
            margin-bottom: 25px;

            animation: gradientMove 18s ease-in-out infinite;
        }*/
/* हेडर का मुख्य बैकग्राउंड और एनीमेशन */
.header {
    background: linear-gradient(90deg,
            #0B1F3A,
            #2563A6,
            #E5E7EB,
            #1E3A5F,
            #F59E0B,
            #0B1F3A);

    background-size: 500% 100%;
    color: #ffffff;
    text-align: center;
    margin-bottom: 25px;
    animation: gradientMove 18s ease-in-out infinite;
}

/* लोगो और टेक्स्ट को एक सीधी लाइन में बिल्कुल सही अलाइन करने के लिए */
.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 0px;
    margin: 0;
    padding: 2px 0;
    flex-wrap: nowrap;
}

/* इमेज को पारदर्शी बनाने और ग्रिड डिब्बों को हटाने के लिए */
.brand-t-logo {
    height: 99px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    background: transparent;
    /* mix-blend-mode: screen; */
}

/* ब्रांड के अलग-अलग टेक्स्ट कलर्स */
.brand-ool {
    color: #ffffff;
    margin-top: 16px; 
}

.brand-shiva {
    color: #F59E0B; /* थीम का गोल्डन/पीला रंग */
    font-weight: 800;
}

.brand-com {
    color: #E5E7EB; /* हल्का ग्रे रंग */
}

/* हेडर बैकग्राउंड का एनीमेशन कीफ़्रेम */
@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}



.brand h1 {
    margin: 0;

    font-size: 34px;

    font-weight: 800;

    letter-spacing: 0.5px;

    color: white;
}


.header-title {
    margin-top: -13px;

    font-size: 21px;

    font-weight: 700;

    color: #c1f8f5;
}


.header-subtitle {
    margin: 8px 0 20px;

    font-size: 15px;

    color: white;

    opacity: 0.95;
}


/* =====================================================
           NAVIGATION
        ===================================================== */

.main-nav {
    width: 100%;

    background:
        rgba(0, 0, 0, 0.20);

    border-top:
        1px solid rgba(255, 255, 255, 0.25);
}


.nav-container {
    display: flex;

    justify-content: center;

    align-items: center;

    flex-wrap: wrap;

    gap: 0;
}


.nav-home {
    display: inline-block;

    color: white;

    text-decoration: none;

    padding: 14px 20px;

    font-size: 15px;

    font-weight: 600;

    transition:
        all 0.25s ease;
}


.nav-home:hover {
    background:
        rgba(255, 255, 255, 0.18);

    color: white;
}


.nav-dropdown {
    position: relative;

    display: inline-block;
}


.nav-button {
    background: transparent;

    border: none;

    color: white;

    padding: 14px 20px;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    transition:
        all 0.25s ease;
}


.nav-dropdown:hover>.nav-button {
    background:
        rgba(255, 255, 255, 0.18);

    color: white;
}


.dropdown-menu {
    display: none;

    position: absolute;

    top: 100%;

    left: 0;

    min-width: 230px;

    background: white;

    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.25);

    border-radius:
        0 0 8px 8px;

    z-index: 9999;

    overflow: hidden;

    text-align: left;
}


.nav-dropdown:hover .dropdown-menu {
    display: block;

    animation:
        dropdownFade 0.2s ease;
}


.dropdown-menu a {
    display: block;

    padding: 12px 16px;

    color: #333;

    text-decoration: none;

    font-size: 14px;

    transition:
        all 0.25s ease;
}


.dropdown-menu a:hover {
    background:
        linear-gradient(135deg,
            #f15810,
            #1206ee);

    color: white;

    padding-left: 23px;
}


@keyframes dropdownFade {

    from {
        opacity: 0;

        transform:
            translateY(-5px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }

}


/* =====================================================
           PAGE CONTAINER
        ===================================================== */

.page-container {
    width: 100%;

    max-width: 1200px;

    margin: 0 auto;

    padding:
        35px 20px 60px;
}





.tool-card::before {
    content: "";

    position: absolute;

    left: 0;

    top: 0;

    width: 100%;

    height: 4px;

    background:
        linear-gradient(90deg,
            #f15810,
            #1206ee);

    transform:
        scaleX(0);

    transform-origin:
        left;

    transition:
        transform 0.3s ease;
}


.tool-card:hover {
    transform:
        translateY(-8px);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.15);

    border-color:
        rgba(18, 6, 238, 0.25);
}


.tool-card:hover::before {
    transform:
        scaleX(1);
}


/* =====================================================
           ICON
        ===================================================== */

.tool-icon {
    width: 65px;

    height: 65px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 15px;

    font-size: 32px;

    background:
        linear-gradient(135deg,
            #fff0e8,
            #eeeeff);

    margin-bottom: 18px;

    transition:
        transform 0.3s ease;
}


.tool-card:hover .tool-icon {
    transform:
        scale(1.12) rotate(3deg);
}


/* =====================================================
           CARD CONTENT
        ===================================================== */

.tool-card h4 {
    margin:
        0 0 9px;

    font-size: 18px;

    color: #222;
}


.tool-card p {
    margin: 0;

    font-size: 14px;

    line-height: 1.6;

    color: #666;

    flex-grow: 1;
}


.tool-action {
    margin-top: 15px;

    font-size: 13px;

    font-weight: 700;

    color: #3125c9;

    transition:
        color 0.25s ease;
}


.tool-card:hover .tool-action {
    color: #f15810;
}


/* =====================================================
           NO RESULTS
        ===================================================== */

#noResults {
    display: none;

    text-align: center;

    padding: 40px;

    color: #777;

    font-size: 16px;
}


/* =====================================================
           FOOTER
        ===================================================== */

.footer {
    background: linear-gradient(135deg,
            #0B1F3A,
            #2563A6);

    color: white;
    text-align: center;
    padding: 25px 15px;
    font-size: 14px;
    line-height: 1.6;
}



.footer a {
    color: white;

    text-decoration: none;

    margin:
        0 7px;
}


.footer a:hover {
    color: #ff8a50;
}


/* =====================================================
           RESPONSIVE
        ===================================================== */

@media (max-width: 900px) {

    .tools-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 600px) {

    .brand h1 {
        font-size: 27px;
    }


    .header-title {
        font-size: 19px;
    }


    .tools-grid {
        grid-template-columns:
            1fr;
    }


    .page-container {
        padding:
            25px 15px 45px;
    }


    .page-intro h2 {
        font-size: 25px;
    }


    .nav-home,
    .nav-button {
        padding:
            12px 13px;

        font-size: 14px;
    }


    .dropdown-menu {
        position: fixed;

        left: 10px;

        right: 10px;

        top: auto;

        min-width: auto;
    }

}

.new {
    width: 100%;
    max-width: 1000px;
    margin: 30px auto;
    padding: 0px;
    box-sizing: border-box;
    text-align: center;
}

.new h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
}

.new p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7fb;
    min-height: 100vh;
    color: #1f2937;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 30px auto 60px;
}

.header {
    text-align: center;
    margin-bottom: 25px;
}

.header h1 {
    margin: 1 0 10px;
    font-size: 34px;
}


.header p {
    margin: 0px;
    color: #59f206;
    font-size: 19px;
}


.card {
    background: white;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
}

/* =====================================================
           UPLOAD
           ===================================================== */

.upload-area {
    border: 2px dashed #2563eb;
    border-radius: 15px;
    padding: 45px 20px;
    text-align: center;
    background: #f8fbff;
    cursor: pointer;
    transition: 0.3s;
}

.upload-area:hover {
    background: #eef5ff;
    border-color: #1d4ed8;
}

.upload-area.dragging {
    background: #dbeafe;
    border-color: #1d4ed8;
}

.upload-icon {
    font-size: 55px;
    margin-bottom: 12px;
}

.upload-title {
    font-size: 22px;
    font-weight: bold;
}

.upload-text {
    margin-top: 10px;
    color: #6b7280;
}

.formats {
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
}

#fileInput {
    display: none;
}

/* =====================================================
           FILE LIST
           ===================================================== */

.selected-files {
    margin-top: 25px;
}

.selected-files h3 {
    margin-bottom: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.file-item:hover {
    border-color: #93c5fd;
}

.file-item.active {
    border: 2px solid #2563eb;
    background: #eff6ff;
}

.thumbnail {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: contain;
    background: white;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: bold;
    word-break: break-all;
}

.file-size {
    color: #6b7280;
    font-size: 13px;
    margin-top: 5px;
}

.file-role {
    display: inline-block;
    margin-top: 7px;
    padding: 3px 8px;
    border-radius: 12px;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 11px;
    font-weight: bold;
}

.remove-btn {
    border: none;
    background: #dc3545;
    color: white;
    border-radius: 7px;
    padding: 8px 12px;
    cursor: pointer;
}

.remove-btn:hover {
    background: #bb2d3b;
}

/* =====================================================
           TOOL MODE
           ===================================================== */

.mode-section {
    margin-top: 30px;
}

.section-title {
    font-size: 19px;
    font-weight: bold;
    margin-bottom: 15px;
}

.mode-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.mode-button {
    padding: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    text-align: left;
    transition: 0.2s;
}

.mode-button:hover {
    border-color: #93c5fd;
}

.mode-button.active {
    border-color: #2563eb;
    background: #eff6ff;
}

.mode-icon {
    font-size: 28px;
    margin-bottom: 7px;
}

.mode-name {
    font-weight: bold;
    font-size: 16px;
}

.mode-description {
    margin-top: 5px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

/* =====================================================
           CONTROLS
           ===================================================== */

.controls {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.control-box {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    background: #fafafa;
}

.control-box h3 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 17px;
}

.field {
    margin-bottom: 15px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
    font-size: 14px;
}

.field input,
.field select {
    width: 100%;
    padding: 11px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.dimensions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 14px;
}

.checkbox-row input {
    width: auto;
}

/* =====================================================
           PRESETS
           ===================================================== */

.presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.preset-btn {
    border: 1px solid #cbd5e1;
    background: white;
    padding: 8px 11px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
}

.preset-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

/* =====================================================
           QUALITY
           ===================================================== */

.quality-value {
    font-weight: bold;
    color: #2563eb;
}

input[type="range"] {
    width: 100%;
}

/* =====================================================
           CROP
           ===================================================== */

.crop-section {
    margin-top: 30px;
    border: 1px solid #e5e7eb4b;
    border-radius: 14px;
    padding: 20px;
    background: #f6f6f727;
}

.crop-preview-wrapper {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    background: #e3e5e975;
    border-radius: 12px;
    padding: 15px;
    overflow: auto;
}

/*
            IMPORTANT

            The canvas itself is transparent.
            The actual uploaded image is drawn
            onto the canvas by JavaScript.
            image size fixed
        

        #cropCanvas {
            max-width: 100%;
            height: auto;
            display: block;
            cursor: crosshair;
            background: transparent;
            user-select: none;
            -webkit-user-select: none;
        }
        */

#cropCanvas {
    max-width: 100%;
    /* shrink to fit parent width */
    max-height: 500px;
    /* or whatever default max height you want */
    width: auto;
    /* let browser scale proportionally */
    height: auto;
    display: block;
    /* removes inline gap */
    margin: 0 auto;
    /* centers inside flex parent */
}


.crop-info {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

.crop-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}

.small-btn {
    border: none;
    padding: 9px 15px;
    border-radius: 8px;
    cursor: pointer;
    background: #2563eb;
    color: white;
}

.small-btn.secondary {
    background: #6b7280;
}

/* =====================================================
           COMBINATION
           ===================================================== */

#combineSection {
    display: none;
    margin-top: 30px;
    border: 2px solid #bfdbfe;
    border-radius: 15px;
    padding: 22px;
    background: #f8fbff;
}

.combine-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.combine-select {
    background: white;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 18px;
}

.combine-select h4 {
    margin-top: 0;
    margin-bottom: 12px;
}

.combine-select select {
    width: 100%;
    padding: 11px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
}

.combine-dimensions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.combine-dimensions input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.combine-preview-area {
    margin-top: 20px;
    text-align: center;
}

#combinedCanvas {
    max-width: 100%;
    max-height: 700px;
    border: 1px solid #d1d5db;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.combine-note {
    margin-top: 12px;
    padding: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    font-size: 13px;
    line-height: 1.5;
}

/* =====================================================
           MAIN BUTTON
           ===================================================== */

.resize-btn {
    width: 100%;
    margin-top: 30px;
    padding: 16px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.resize-btn:hover {
    background: #1d4ed8;
}

.resize-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* =====================================================
           INFO
           ===================================================== */

.info-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 14px;
    line-height: 1.6;
}

/* =====================================================
           LOADING
           ===================================================== */

#loadingOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.loading-box {
    width: 420px;
    max-width: 90%;
    padding: 40px;
    background: white;
    border-radius: 18px;
    text-align: center;
}

.spinner {
    width: 65px;
    height: 65px;
    margin: 0 auto 20px;
    border: 7px solid #e5e7eb;
    border-top: 7px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}

.loading-title {
    font-size: 21px;
    font-weight: bold;
}

.loading-text {
    margin-top: 10px;
    color: #6b7280;
    line-height: 1.5;
}

/* =====================================================
           ERROR
           ===================================================== */

#errorBox {
    display: none;
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* =====================================================
           RESPONSIVE
           ===================================================== */

@media(max-width:800px) {

    .controls,
    .combine-grid,
    .mode-buttons {
        grid-template-columns: 1fr;
    }

    .combine-dimensions {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    .header h1 {
        font-size: 27px;
    }

    * {
        box-sizing: border-box;
    }

    html {
        scroll-behavior: smooth;
    }

    body {
        margin: 0;
        padding: 0;
        font-family:
            Arial,
            Helvetica,
            sans-serif;

        background:
            linear-gradient(135deg,
                #f5f7fb,
                #eef2ff);

        color: #222;
    }


    /* =====================================================
           HEADER
        ===================================================== 

    .header {

        background:
            linear-gradient(135deg,
                #f15810,
                #1206ee);

        color: white;


        text-align: center;
        margin-bottom: 25px;
    } */
       /* =====================================================
           HEADER
        ====================================================== 

        .header {

            background:
                linear-gradient(135deg,
                    #f15810,
                    #1206ee);

            color: white;


            text-align: center;
            margin-bottom: 25px;
        }  */

        .header {
            background: linear-gradient(90deg,
                    #f15810,
                    #1206ee,
                    #7c3aed,
                    #06b6d4,
                    #10b981,
                    #f15810);

            background-size: 500% 100%;

            color: #ffffff;
            text-align: center;
            margin-bottom: 25px;

            animation: gradientMove 18s ease-in-out infinite;
        }

        @keyframes gradientMove {
            0% {
                background-position: 0% 50%;
            }

            50% {
                background-position: 100% 50%;
            }

            100% {
                background-position: 0% 50%;
            }
        }


    .header p {
        margin: 6px;
        color: #59f206;
        font-size: 19px;
    }


    .brand h1 {
        margin: 0;

        font-size: 36px;

        font-weight: 800;

        letter-spacing: 0.5px;

        color: white;
    }


    .header-title {
        margin-top: -13px;

        font-size: 22px;

        font-weight: 700;

        color: white;
    }


    .header-subtitle {
        margin: 8px 0 20px;

        font-size: 15px;

        color: white;

        opacity: 0.95;
    }


    /* =====================================================
           NAVIGATION
        ===================================================== */

    .main-nav {
        width: 100%;

        background:
            rgba(0, 0, 0, 0.20);

        border-top:
            1px solid rgba(255, 255, 255, 0.25);
    }


    .nav-container {
        display: flex;

        justify-content: center;

        align-items: center;

        flex-wrap: wrap;

        gap: 0;
    }


    .nav-home {
        display: inline-block;

        color: white;

        text-decoration: none;

        padding: 14px 20px;

        font-size: 15px;

        font-weight: 600;

        transition:
            all 0.25s ease;
    }


    .nav-home:hover {
        background:
            rgba(255, 255, 255, 0.18);

        color: white;
    }


    .nav-dropdown {
        position: relative;

        display: inline-block;
    }


    .nav-button {
        background: transparent;

        border: none;

        color: white;

        padding: 14px 20px;

        font-size: 15px;

        font-weight: 600;

        cursor: pointer;

        transition:
            all 0.25s ease;
    }


    .nav-dropdown:hover>.nav-button {
        background:
            rgba(255, 255, 255, 0.18);

        color: white;
    }


    .dropdown-menu {
        display: none;

        position: absolute;

        top: 100%;

        left: 0;

        min-width: 230px;

        background: white;

        box-shadow:
            0 6px 20px rgba(0, 0, 0, 0.25);

        border-radius:
            0 0 8px 8px;

        z-index: 9999;

        overflow: hidden;

        text-align: left;
    }


    .nav-dropdown:hover .dropdown-menu {
        display: block;

        animation:
            dropdownFade 0.2s ease;
    }


    .dropdown-menu a {
        display: block;

        padding: 12px 16px;

        color: #333;

        text-decoration: none;

        font-size: 14px;

        transition:
            all 0.25s ease;
    }


    .dropdown-menu a:hover {
        background:
            linear-gradient(135deg,
                #f15810,
                #1206ee);

        color: white;

        padding-left: 23px;
    }


    @keyframes dropdownFade {

        from {
            opacity: 0;

            transform:
                translateY(-5px);
        }

        to {
            opacity: 1;

            transform:
                translateY(0);
        }

    }


    /* =====================================================
           PAGE CONTAINER
        ===================================================== */

    .page-container {
        width: 100%;

        max-width: 1200px;

        margin: 0 auto;

        padding:
            35px 20px 60px;
    }





    .tool-card::before {
        content: "";

        position: absolute;

        left: 0;

        top: 0;

        width: 100%;

        height: 4px;

        background:
            linear-gradient(90deg,
                #f15810,
                #1206ee);

        transform:
            scaleX(0);

        transform-origin:
            left;

        transition:
            transform 0.3s ease;
    }


    .tool-card:hover {
        transform:
            translateY(-8px);

        box-shadow:
            0 15px 35px rgba(0, 0, 0, 0.15);

        border-color:
            rgba(18, 6, 238, 0.25);
    }


    .tool-card:hover::before {
        transform:
            scaleX(1);
    }


    /* =====================================================
           ICON
        ===================================================== */

    .tool-icon {
        width: 65px;

        height: 65px;

        display: flex;

        align-items: center;

        justify-content: center;

        border-radius: 15px;

        font-size: 32px;

        background:
            linear-gradient(135deg,
                #fff0e8,
                #eeeeff);

        margin-bottom: 18px;

        transition:
            transform 0.3s ease;
    }


    .tool-card:hover .tool-icon {
        transform:
            scale(1.12) rotate(3deg);
    }


    /* =====================================================
           CARD CONTENT
        ===================================================== */

    .tool-card h4 {
        margin:
            0 0 9px;

        font-size: 18px;

        color: #222;
    }


    .tool-card p {
        margin: 0;

        font-size: 14px;

        line-height: 1.6;

        color: #666;

        flex-grow: 1;
    }


    .tool-action {
        margin-top: 15px;

        font-size: 13px;

        font-weight: 700;

        color: #3125c9;

        transition:
            color 0.25s ease;
    }


    .tool-card:hover .tool-action {
        color: #f15810;
    }


    /* =====================================================
           NO RESULTS
        ===================================================== */

    #noResults {
        display: none;

        text-align: center;

        padding: 40px;

        color: #777;

        font-size: 16px;
    }


    /* =====================================================
           FOOTER
        ===================================================== */

    .footer {
        background: linear-gradient(135deg,
                #1206ee,
                #f15810);

        color: white;
        text-align: center;
        padding: 25px 15px;
        font-size: 14px;
        line-height: 1.6;
    }


    .footer a {
        color: white;

        text-decoration: none;

        margin:
            0 7px;
    }


    .footer a:hover {
        color: #ff8a50;
    }


    /* =====================================================
           RESPONSIVE
        ===================================================== */

    @media (max-width: 900px) {

        .tools-grid {
            grid-template-columns:
                repeat(2, 1fr);
        }

    }


    @media (max-width: 600px) {

        .brand h1 {
            font-size: 27px;
        }


        .header-title {
            font-size: 19px;
        }


        .tools-grid {
            grid-template-columns:
                1fr;
        }


        .page-container {
            padding:
                25px 15px 45px;
        }


        .page-intro h2 {
            font-size: 25px;
        }


        .nav-home,
        .nav-button {
            padding:
                12px 13px;

            font-size: 14px;
        }


        .dropdown-menu {
            position: fixed;

            left: 10px;

            right: 10px;

            top: auto;

            min-width: auto;
        }

    }

}