/* =====================================
   IMAGE COMPRESSOR
   STYLE.CSS - PART 1
===================================== */

/* Google Font */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Reset */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{

    min-height:100vh;

    background:
    linear-gradient(
        135deg,
        #2563eb,
        #4f46e5,
        #06b6d4
    );

    color:#fff;

    padding:40px;

}

/* Container */

.container{

    width:100%;
    max-width:1350px;

    margin:auto;

    padding:35px;

    border-radius:24px;

    background:
    rgba(255,255,255,.10);

    border:
    1px solid
    rgba(255,255,255,.20);

    backdrop-filter:
    blur(20px);

    -webkit-backdrop-filter:
    blur(20px);

    box-shadow:

    0 20px 60px
    rgba(0,0,0,.25);

}

/* Header */

header{

    text-align:center;

    margin-bottom:35px;

}

header h1{

    font-size:42px;

    font-weight:700;

    margin-bottom:12px;

}

header p{

    color:#eef4ff;

    font-size:17px;

}

/* Upload Area */

.drop-area{

    border:3px dashed
    rgba(255,255,255,.45);

    border-radius:24px;

    padding:60px 30px;

    text-align:center;

    cursor:pointer;

    transition:.35s;

    position:relative;

    overflow:hidden;

}

.drop-area:hover{

    background:
    rgba(255,255,255,.08);

    transform:
    translateY(-4px);

}

.drop-area.dragover{

    border-color:#fff;

    background:
    rgba(255,255,255,.16);

    animation:
    pulse .8s infinite;

}

.upload-icon{

    font-size:70px;

    margin-bottom:20px;

}

.drop-area h2{

    font-size:30px;

    margin-bottom:10px;

}

.drop-area p{

    margin:16px 0;

    opacity:.95;

}

/* Browse Button */

#browseBtn{

    border:none;

    padding:14px 28px;

    border-radius:12px;

    cursor:pointer;

    color:white;

    font-size:16px;

    font-weight:600;

    background:

    linear-gradient(
    45deg,
    #2563eb,
    #06b6d4
    );

    transition:.30s;

}

#browseBtn:hover{

    transform:
    translateY(-3px);

    box-shadow:

    0 10px 25px
    rgba(0,0,0,.25);

}

/* Controls */

.controls{

    margin:35px 0;

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:30px;

    flex-wrap:wrap;

}

.quality-box{

    flex:1;

}

.quality-box label{

    display:flex;

    justify-content:space-between;

    margin-bottom:12px;

    font-weight:600;

}

#qualitySlider{

    width:100%;

    appearance:none;

    height:8px;

    border-radius:20px;

    background:
    rgba(255,255,255,.30);

    outline:none;

}

#qualitySlider::-webkit-slider-thumb{

    appearance:none;

    width:20px;

    height:20px;

    border-radius:50%;

    background:white;

    cursor:pointer;

}

/* Buttons */

.buttons{

    display:flex;

    gap:15px;

    flex-wrap:wrap;

}

.buttons button{

    border:none;

    padding:13px 24px;

    border-radius:12px;

    cursor:pointer;

    color:white;

    font-size:15px;

    font-weight:600;

    transition:.30s;

}

.buttons button:hover{

    transform:
    translateY(-3px);

}

#compressBtn{

    background:

    linear-gradient(
    45deg,
    #16a34a,
    #22c55e
    );

}

#downloadZipBtn{

    background:

    linear-gradient(
    45deg,
    #7c3aed,
    #9333ea
    );

}

#clearBtn{

    background:

    linear-gradient(
    45deg,
    #ef4444,
    #dc2626
    );

}
/* =====================================
   IMAGE COMPRESSOR
   STYLE.CSS - PART 2
===================================== */

/* ==========================
   PROGRESS BAR
========================== */

.progress-wrapper{

    margin:35px 0;

}

.progress{

    width:100%;

    height:14px;

    background:rgba(255,255,255,.18);

    border-radius:50px;

    overflow:hidden;

    box-shadow:
    inset 0 2px 8px rgba(0,0,0,.15);

}

#progressBar{

    width:0%;

    height:100%;

    border-radius:50px;

    background:
    linear-gradient(
    90deg,
    #22c55e,
    #06b6d4,
    #2563eb
    );

    transition:width .35s ease;

}

/* ==========================
   STATS
========================== */

.stats{

    display:grid;

    grid-template-columns:
    repeat(4,1fr);

    gap:22px;

    margin:40px 0;

}

.stat-card{

    background:
    rgba(255,255,255,.12);

    backdrop-filter:blur(18px);

    border:
    1px solid rgba(255,255,255,.18);

    border-radius:18px;

    padding:25px;

    text-align:center;

    transition:.35s;

}

.stat-card:hover{

    transform:
    translateY(-8px);

    box-shadow:
    0 15px 35px rgba(0,0,0,.18);

}

.stat-card h3{

    font-size:17px;

    margin-bottom:12px;

    color:#f3f8ff;

}

.stat-card span{

    display:block;

    font-size:30px;

    font-weight:700;

}

/* ==========================
   IMAGE GRID
========================== */

.image-grid{

    display:grid;

    grid-template-columns:
    repeat(auto-fill,minmax(330px,1fr));

    gap:28px;

    margin-top:30px;

}

/* ==========================
   IMAGE CARD
========================== */

.image-card{

    background:
    rgba(255,255,255,.12);

    backdrop-filter:blur(18px);

    border:
    1px solid rgba(255,255,255,.18);

    border-radius:20px;

    overflow:hidden;

    transition:.35s;

    animation:fadeIn .5s ease;

}

.image-card:hover{

    transform:
    translateY(-8px);

    box-shadow:
    0 18px 45px rgba(0,0,0,.22);

}

.preview{

    width:100%;

    height:230px;

    object-fit:contain;

    background:white;

    padding:18px;

}

.filename{

    padding:18px 18px 10px;

    font-size:18px;

    word-break:break-word;

}

/* ==========================
   SIZE DETAILS
========================== */

.sizes{

    padding:0 18px 18px;

}

.sizes div{

    display:flex;

    justify-content:space-between;

    margin:10px 0;

    font-size:14px;

    color:#eef4ff;

}

.sizes span{

    font-weight:600;

}

/* ==========================
   CARD BUTTONS
========================== */

.card-buttons{

    display:flex;

    gap:12px;

    padding:20px;

}

.card-buttons button{

    flex:1;

    border:none;

    border-radius:12px;

    padding:11px;

    cursor:pointer;

    color:white;

    font-weight:600;

    transition:.3s;

}

.card-buttons button:hover{

    transform:
    translateY(-2px);

}

.compress{

    background:
    linear-gradient(
    45deg,
    #16a34a,
    #22c55e
    );

}

.download{

    background:
    linear-gradient(
    45deg,
    #2563eb,
    #3b82f6
    );

}

.remove{

    background:
    linear-gradient(
    45deg,
    #ef4444,
    #dc2626
    );

}

.download:disabled{

    background:#7b7b7b;

    cursor:not-allowed;

    opacity:.6;

}

/* ==========================
   SEO CONTENT
========================== */

.seo{

    margin-top:70px;

    background:
    rgba(255,255,255,.10);

    border:
    1px solid rgba(255,255,255,.18);

    border-radius:20px;

    padding:35px;

    backdrop-filter:blur(18px);

}

.seo h2{

    margin-bottom:15px;

    margin-top:25px;

}

.seo p{

    color:#eef4ff;

    line-height:1.8;

}

.seo ul{

    margin-top:15px;

    padding-left:22px;

}

.seo li{

    margin:10px 0;

    color:#eef4ff;

}

/* ==========================
   ANIMATIONS
========================== */

@keyframes pulse{

    0%{

        transform:scale(1);

    }

    50%{

        transform:scale(1.02);

    }

    100%{

        transform:scale(1);

    }

}

@keyframes fadeIn{

    from{

        opacity:0;

        transform:
        translateY(20px);

    }

    to{

        opacity:1;

        transform:
        translateY(0);

    }

}
/* =====================================
   IMAGE COMPRESSOR
   STYLE.CSS - PART 3
===================================== */


/* ==========================
   CUSTOM SCROLLBAR
========================== */

::-webkit-scrollbar{

    width:10px;

}

::-webkit-scrollbar-track{

    background:#eef2ff;

}

::-webkit-scrollbar-thumb{

    background:linear-gradient(
        180deg,
        #2563eb,
        #06b6d4
    );

    border-radius:20px;

}

::-webkit-scrollbar-thumb:hover{

    background:linear-gradient(
        180deg,
        #1d4ed8,
        #0891b2
    );

}

/* ==========================
   FLOATING BACKGROUND
========================== */

body::before{

    content:"";

    position:fixed;

    top:-180px;

    left:-180px;

    width:420px;

    height:420px;

    border-radius:50%;

    background:rgba(255,255,255,.10);

    filter:blur(90px);

    pointer-events:none;

    z-index:-1;

    animation:float1 8s infinite alternate;

}

body::after{

    content:"";

    position:fixed;

    bottom:-200px;

    right:-180px;

    width:450px;

    height:450px;

    border-radius:50%;

    background:rgba(255,255,255,.08);

    filter:blur(100px);

    pointer-events:none;

    z-index:-1;

    animation:float2 10s infinite alternate;

}

/* ==========================
   BUTTON RIPPLE EFFECT
========================== */

button{

    position:relative;

    overflow:hidden;

}

button::after{

    content:"";

    position:absolute;

    width:12px;

    height:12px;

    background:rgba(255,255,255,.45);

    border-radius:50%;

    transform:scale(0);

    opacity:0;

    pointer-events:none;

}

button:active::after{

    left:50%;

    top:50%;

    transform:translate(-50%,-50%) scale(14);

    opacity:1;

    transition:.45s;

}

/* ==========================
   BUTTON LOADING STATE
========================== */

.loading{

    opacity:.65;

    cursor:not-allowed !important;

    pointer-events:none;

}

/* ==========================
   IMAGE HOVER
========================== */

.preview{

    transition:.35s;

}

.image-card:hover .preview{

    transform:scale(1.04);

}

/* ==========================
   CARD SHADOW
========================== */

.image-card{

    box-shadow:

    0 8px 25px rgba(0,0,0,.12);

}

.image-card:hover{

    box-shadow:

    0 20px 45px rgba(0,0,0,.28);

}

/* ==========================
   EMPTY GRID
========================== */

.image-grid:empty{

    display:flex;

    justify-content:center;

    align-items:center;

    min-height:220px;

    border:2px dashed rgba(255,255,255,.25);

    border-radius:18px;

}

.image-grid:empty::after{

    content:"Upload images to start compressing";

    font-size:20px;

    opacity:.75;

}

/* ==========================
   RESPONSIVE
========================== */

@media(max-width:1200px){

.stats{

grid-template-columns:repeat(2,1fr);

}

.image-grid{

grid-template-columns:repeat(auto-fill,minmax(300px,1fr));

}

}

@media(max-width:992px){

.container{

padding:25px;

}

header h1{

font-size:36px;

}

.controls{

flex-direction:column;

align-items:stretch;

}

.buttons{

width:100%;

justify-content:center;

}

.buttons button{

flex:1;

}

}

@media(max-width:768px){

body{

padding:15px;

}

.container{

padding:18px;

}

header h1{

font-size:30px;

}

header p{

font-size:15px;

}

.drop-area{

padding:45px 20px;

}

.drop-area h2{

font-size:24px;

}

.upload-icon{

font-size:55px;

}

.stats{

grid-template-columns:1fr;

}

.image-grid{

grid-template-columns:1fr;

}

.card-buttons{

flex-direction:column;

}

.preview{

height:200px;

}

}

@media(max-width:480px){

body{

padding:10px;

}

header h1{

font-size:26px;

}

.drop-area{

padding:35px 18px;

}

.drop-area h2{

font-size:21px;

}

.buttons{

flex-direction:column;

}

.buttons button{

width:100%;

}

#browseBtn{

width:100%;

}

.preview{

height:170px;

}

.filename{

font-size:16px;

}

.stat-card span{

font-size:24px;

}

}

/* ==========================
   DARK MODE
========================== */

@media(prefers-color-scheme:dark){

body{

background:

linear-gradient(

135deg,

#0f172a,

#1e293b,

#0f172a

);

}

.container{

background:

rgba(15,23,42,.60);

}

.stat-card,

.image-card,

.seo{

background:

rgba(30,41,59,.55);

}

.progress{

background:

rgba(255,255,255,.12);

}

}

/* ==========================
   ANIMATIONS
========================== */

@keyframes float1{

0%{

transform:translateY(0) translateX(0);

}

100%{

transform:translateY(60px) translateX(40px);

}

}

@keyframes float2{

0%{

transform:translateY(0) translateX(0);

}

100%{

transform:translateY(-50px) translateX(-30px);

}

}