 :root {
        --primary: #2563EB;
        --primary-dark: #1E40AF;
        --primary-light: #DBEAFE;
       
        --bg-body: #F8FAFC;
        --bg-card: #FFFFFF;
        --text-main: #0F172A;
        --text-muted: #64748B;
        --border-color: #E2E8F0;
        --success: #10B981;
        --danger: #EF4444;
        --radius: 12px;
        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
        --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    }


    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: 'Inter', sans-serif;
        background-color: var(--bg-body);
        color: var(--text-main);
        line-height: 1.6;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    /* =========================================
       HEADER & NAVIGATION
       ========================================= */
    .site-header {
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .header-container {
        max-width: 1280px;
        margin: 0 auto;
        padding: 0 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 70px;
    }

    .logo {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        text-decoration: none;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
    }

    .logo-text {
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--text-main);
    }

    .logo-text span {
        color: var(--primary);
    }

    .main-nav ul {
        display: flex;
        list-style: none;
        gap: 0.5rem;
    }

    .main-nav a {
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.95rem;
        font-weight: 500;
        padding: 0.5rem 1rem;
        border-radius: 6px;
        transition: all 0.2s;
    }

    .main-nav a:hover {
        color: var(--text-main);
        background: var(--bg-body);
    }

    /* Mobile Menu Toggle */
    .mobile-menu-btn {
        display: none;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
    }

    /* =========================================
       MAIN LAYOUT
       ========================================= */
    .main-layout {
        max-width: 1280px;
        margin: 0 auto;
        padding: .3rem 0.3rem;
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 2.5rem;
        flex: 1;
        width: 100%;
    }

    /* =========================================
       TOOL CONTENT AREA
       ========================================= */
    .tool-container {
        background: var(--bg-card);
        border-radius: 16px;
        box-shadow: var(--shadow-lg);
        padding: 2.5rem;
        border: 1px solid var(--border-color);
    }

    /* Hero Section inside container */
    .tool-hero {
        text-align: center;
        margin-bottom: 2rem;
    }

    .tool-hero h1 {
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 2rem;
        font-weight: 800;
        color: var(--text-main);
        margin-bottom: 0.75rem;
        letter-spacing: -0.02em;
        line-height: 1.2;
    }

    .tool-hero h1 span {
        color: var(--primary);
    }

    .tool-hero p {
        font-size: 1.1rem;
        color: var(--text-muted);
        max-width: 600px;
        margin: 0 auto;
    }

    /* Upload Area Styling */
    .upload-zone-wrapper {
        margin: 2rem auto;
        max-width: 600px;
    }

    label[for='uploadJpg'] {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 250px;
        border: 2px dashed var(--primary);
        border-radius: 16px;
        background: linear-gradient(180deg, #F8FAFC 0%, #EFF6FF 100%);
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    label[for='uploadJpg']:hover {
        border-color: var(--primary-dark);
        background: #EFF6FF;
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .upload-icon {
        margin-bottom: 1rem;
        opacity: 0.8;
    }

    .upload-icon svg {
        stroke: var(--primary);
    }

    .selimgsbtn {
        background: var(--primary);
        color: white;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        font-weight: 600;
        font-size: 1rem;
        margin: 1rem 0 0.5rem;
        box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
        transition: background 0.2s;
    }

    label[for='uploadJpg']:hover .selimgsbtn {
        background: var(--primary-dark);
    }

    .helptxt {
        color: var(--text-muted);
        font-size: 0.9rem;
    }

    /* Settings & Buttons */
    .settings-area {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-top: 1.5rem;
    }
.custom-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-left: 10px; /* fixes right-side closeness */
    cursor: pointer;
    color: var(--text-main);
}

#sizeseting {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}
    
	
	
	
	

    .sizeseet {
        background: var(--bg-body);
        padding: 1.5rem;
        border-radius: 12px;
        border: 1px solid var(--border-color);
        text-align: center;
        width: 100%;
        max-width: 400px;
    }

    .size-input-group {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin: 1rem 0;
    }

    .size-input-group input {
        width: 80px;
        padding: 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-size: 1rem;
        text-align: center;
        font-weight: 600;
    }

    .size-input-group input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

.inpsizewrapper input {
    width: 60px;          /* small width for compact look */
    padding: 5px 8px;     /* inner spacing */
    font-size: 1rem;      /* readable text */
    border: 1px solid #ccc; /* subtle border */
    border-radius: 5px;   /* rounded corners */
    text-align: center;   /* center the number */
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
}

.inpsizewrapper input:focus {
    border-color: var(--primary); /* highlight border on focus */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
    .cmpbtnx {
    background: var(--primary);
    color: white;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.1s, box-shadow 0.2s, background 0.2s;
}

.cmpbtnx:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #000080; /* Slightly darker shade of primary */
}

    .cmpbtnx:active {
        transform: translateY(0);
    }

    /* Results Area */
    .downclbtns {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin: 1.5rem auto;
        max-width: 600px;
    }

    #Download_all, #clear_all {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        border-radius: 6px;
        font-weight: 600;
        font-size: 0.9rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    #clear_all {
        background: transparent;
        border: 1px solid var(--border-color);
        color: var(--text-muted);
    }

    #clear_all:hover {
        background: #FEF2F2;
        color: var(--danger);
        border-color: var(--danger);
    }

    #Download_all {
        background: var(--success);
        color: white;
        border: 1px solid var(--success);
    }

    #Download_all:hover {
        background: #059669;
    }

    .showImages {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        background: #FAFAFA;
        border-radius: 12px;
        border: 1px solid var(--border-color);
        padding: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        max-height: 400px;
        overflow-y: auto;
    }
	
	
	
	

    /* Content Writings */
    .content-info {
        margin-top: 3rem;
        padding-top: 2rem;
        border-top: 1px solid var(--border-color);
    }

    .content-info h2 {
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 1.5rem;
        margin-bottom: 1rem;
        color: var(--text-main);
    }

    .content-info h3 {
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 1.2rem;
        margin: 1.5rem 0 0.75rem;
        color: var(--text-main);
    }

    .content-info p {
        color: var(--text-muted);
        margin-bottom: 1rem;
        line-height: 1.7;
    }

    .content-info ul, .content-info ol {
        padding-left: 1.5rem;
        color: var(--text-muted);
        margin-bottom: 1rem;
    }

    .content-info li {
        margin-bottom: 0.5rem;
    }

    /* =========================================
       SIDEBAR
       ========================================= */
    .sidebar {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .sidebar-widget {
        background: var(--bg-card);
        border-radius: 12px;
        border: 1px solid var(--border-color);
        overflow: hidden;
    }

    .widget-header {
        background: #F1F5F9;
        padding: 0.75rem 1.25rem;
        border-bottom: 1px solid var(--border-color);
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-weight: 700;
        font-size: 0.9rem;
        color: var(--text-main);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .tool-list {
        padding: 0.75rem;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .tool-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem;
        text-decoration: none;
        color: var(--text-muted);
        border-radius: 8px;
        transition: all 0.2s;
        font-size: 0.9rem;
        font-weight: 500;
    }

    .tool-link:hover {
        background: #EFF6FF;
        color: var(--primary);
    }

    .tool-link svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
    }

    .quick-links {
        padding: 0.75rem;
    }

    .quick-links a {
        display: block;
        padding: 0.5rem 0.75rem;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.9rem;
        border-radius: 4px;
        transition: all 0.2s;
    }

    .quick-links a:hover {
        color: var(--primary);
        background: #EFF6FF;
    }

    /* =========================================
       FOOTER
       ========================================= */
    .site-footer {
        background: #0F172A;
        color: #CBD5E1;
        margin-top: auto;
    }

    .footer-main {
        max-width: 1280px;
        margin: 0 auto;
        padding: 4rem 1.5rem 2rem;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
    }

    .footer-col h4 {
        color: white;
        font-family: 'Plus Jakarta Sans', sans-serif;
        margin-bottom: 1.5rem;
        font-size: 1rem;
    }

    .footer-col ul {
        list-style: none;
    }

    .footer-col ul li {
        margin-bottom: 0.75rem;
    }

    .footer-col ul li a {
        color: #94A3B8;
        text-decoration: none;
        font-size: 0.9rem;
        transition: color 0.2s;
    }

    .footer-col ul li a:hover {
        color: white;
    }

    .footer-bottom {
        border-top: 1px solid #1E293B;
        padding: 1.5rem;
        text-align: center;
        font-size: 0.85rem;
        color: #64748B;
    }

    /* =========================================
       UTILITIES & EXISTING
       ========================================= */
    .hide { display: none !important; }

    .DragArea, .loaderWrap {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(4px);
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        z-index: 9999;
        color: var(--text-main);
    }

    .DragArea b { font-size: 1.5rem; margin-bottom: 0.5rem; }
    .DragArea p { color: var(--text-muted); }

    /* Loader Animation */
    .loader {
        position: relative;
        width: 3em;
        height: 3em;
        transform: rotate(165deg) scale(2);
    }
    .loader:before, .loader:after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        display: block;
        width: 0.5em;
        height: 0.5em;
        border-radius: 0.25em;
        transform: translate(-50%, -50%);
    }
    .loader:before {
        animation: before 2s infinite;
    }
    .loader:after {
        animation: after 2s infinite;
    }

    @keyframes before {
        0% { width: 0.5em; box-shadow: 1em -0.5em var(--primary), -1em 0.5em var(--accent); }
        35% { width: 3em; box-shadow: 0 -0.5em var(--primary), 0 0.5em var(--accent); }
        70% { width: 0.5em; box-shadow: -1em -0.5em var(--primary), 1em 0.5em var(--accent); }
        100% { box-shadow: 1em -0.5em var(--primary), -1em 0.5em var(--accent); }
    }

    @keyframes after {
        0% { height: 0.5em; box-shadow: 0.5em 1em var(--primary), -0.5em -1em var(--accent); }
        35% { height: 3em; box-shadow: 0.5em 0 var(--primary), -0.5em 0 var(--accent); }
        70% { height: 0.5em; box-shadow: 0.5em -1em var(--primary), -0.5em 1em var(--accent); }
        100% { box-shadow: 0.5em 1em var(--primary), -0.5em -1em var(--accent); }
    }

    
	
 


 .scrollbar::-webkit-scrollbar-track {
     -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
     border-radius: 5px;
     background-color: #F5F5F5
 }

 .scrollbar::-webkit-scrollbar {
     width: 9px;
     background-color: #F5F5F5
 }

 .scrollbar::-webkit-scrollbar-thumb {
     border-radius: 5px;
     -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
     background-color: #b1b1b1
 }

 .showImages .img_wr_cont {
     width: 1%;
     display: flex;
     align-items: center;
     justify-content: space-between;
     padding: 5px;
     border-radius: 4px;
     box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
     transition: 0.5s all;
     white-space: nowrap;
     overflow: hidden;
     min-height: 52px;
     margin-bottom: 12px;
     background: white
 }

 .downbtn {
     text-decoration: none;
     border: 2px solid;
     color: var(--cl4);
     padding: 6px;
     border-radius: 4px;
     font-weight: bold;
     margin-right: 5px
 }

 .sucscol {
     color: green;
     font-weight: bold
 }

 .lodaicon {
     animation: rotation 1s infinite linear
 }

 .flexcentr {
     display: flex;
     align-items: center
 }

 @keyframes rotation {
     from {
         transform: rotate(0deg)
     }

     to {
         transform: rotate(359deg)
     }
 }

 .mg_lblwrap img {
     max-width: 50px;
     max-height: 50px
 }

 .mg_lblwrap {
     width: 35%
 }

 .img_label {
     overflow: hidden;
     white-space: nowrap;
     text-overflow: ellipsis;
     max-width: 100%
 }

 .hide {
     display: none !important
 }

 
 
 
 
 .loaderWrap {
     background: rgb(255 255 255 / 67%)
 }

 .loader {
     position: relative;
     width: 2.5em;
     height: 2.5em;
     transform: rotate(165deg) scale(1.5)
 }

 .loader:before,
 .loader:after {
     content: "";
     position: absolute;
     top: 50%;
     left: 50%;
     display: block;
     width: 0.5em;
     height: 0.5em;
     border-radius: 0.25em;
     transform: translate(-50%, -50%)
 }

 .loader:before {
     animation: before 2s infinite
 }

 .loader:after {
     animation: after 2s infinite
 }

 @keyframes before {
     0% {
         width: 0.5em;
         box-shadow: 1em -0.5em var(--tcolor), -1em 0.5em var(--scolor)
     }

     35% {
         width: 2.5em;
         box-shadow: 0 -0.5em var(--tcolor), 0 0.5em var(--scolor)
     }

     70% {
         width: 0.5em;
         box-shadow: -1em -0.5em var(--tcolor), 1em 0.5em var(--scolor)
     }

     100% {
         box-shadow: 1em -0.5em var(--tcolor), -1em 0.5em var(--scolor)
     }
 }

 @keyframes after {
     0% {
         height: 0.5em;
         box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75)
     }

     35% {
         height: 2.5em;
         box-shadow: 0.5em 0 rgba(61, 184, 143, 0.75), -0.5em 0 rgba(233, 169, 32, 0.75)
     }

     70% {
         height: 0.5em;
         box-shadow: 0.5em -1em rgba(61, 184, 143, 0.75), -0.5em 1em rgba(233, 169, 32, 0.75)
     }

     100% {
         box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75)
     }
 }

 @media only screen and (max-width: 750px) {
  .contentsec {
    width: 100%;
  }
  #sidebarsecx {
    display: none;
  }
  .img_wr_cont {
    flex-direction: column;
  }
  nav ul {
    display: none;
  }
  .img_wr_cont > span {
    margin-top: 10px;
  }
  .mg_lblwrap {
    width: 93%;
  }
  .img_wr_cont > span:last-child {
    margin: 22px 0;
  }
  .labelxupl {
    width: 80% !important;
  }
  .inpsizewrapper .kbspan {
    top: 0;
  }
  .showImages {
    display: block;
    max-height: 70vh;
  }
  footer {
    flex-direction: column;
  }
  footer > div {
    max-width: 98%;
    padding: 1%;
  }
  iframe {
    height: 190px;
  }
}








/* =========================================
   RESPONSIVE (MERGED + OPTIMIZED)
   ========================================= */

/* ===== Tablets (≤1024px) ===== */
@media (max-width: 1024px) {
  
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

}

/* ===== Mobile & Small Tablets (≤768px) ===== */
@media (max-width: 768px) {

  /* Navigation */
  .main-nav,
  nav ul {
    display: none;
  }

  .mobile-menu-btn,
  .mencontainer {
    display: block;
  }

  /* Layout */
  .contentsec {
    width: 100%;
    padding: 10px;
  }

  #sidebarsecx {
    display: none;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .tool-container {
    padding: 1.5rem;
  }

  /* Hero */
  .tool-hero h1 {
    font-size: 1.8rem;
  }

  /* Image Section */
  .showImages {
    display: block;
    max-height: 70vh;
  }

  .img_wr_cont {
    flex-direction: column;
    align-items: flex-start;
  }

  .img_wr_cont > span {
    margin-top: 8px;
  }

  .img_wr_cont > span:last-child {
    margin: 12px 0;
  }

  .mg_lblwrap {
    width: 100%;
  }

  /* Upload */
  .labelxupl {
    width: 85% !important;
  }

  /* Inputs */
  .inpsizewrapper .kbspan {
    top: 0;
  }

  /* Footer */
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  footer {
    flex-direction: column;
  }

  footer > div {
    max-width: 100%;
    padding: 10px;
  }

  /* Media */
  iframe {
    height: 190px;
  }

}

/* ===== Small Mobile (≤480px) ===== */
@media (max-width: 480px) {

  .tool-hero h1 {
    font-size: 1.5rem;
  }

  .labelxupl {
    width: 95% !important;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }

  iframe {
    height: 160px;
  }

}