/* ======================================================
   IMAGE COMPRESSOR
   OneToolBox Professional UI
====================================================== */

:root{

--primary:#2563eb;
--success:#16a34a;
--danger:#dc2626;
--warning:#f59e0b;

}

/* ======================================================
   HERO
====================================================== */

.tool-hero{

padding:70px 0 40px;

text-align:center;

background:
linear-gradient(
135deg,
#2563eb,
#4f46e5);

color:#fff;

}

.tool-title{

max-width:900px;

margin:auto;

}

.tool-title h1{

font-size:48px;

font-weight:700;

margin-bottom:15px;

}

.tool-title p{

font-size:18px;

opacity:.9;

line-height:1.8;

}

/* ======================================================
   GRID
====================================================== */

.compressor-grid{

display:grid;

grid-template-columns:

420px
1fr;

gap:30px;

align-items:start;

}

/* ======================================================
   PANEL
====================================================== */

.left-panel,
.right-panel{

display:flex;

flex-direction:column;

gap:25px;

}

/* ======================================================
   CARD
====================================================== */

.card{

background:#fff;

border-radius:18px;

padding:25px;

box-shadow:

0 10px 35px
rgba(0,0,0,.08);

border:

1px solid #e5e7eb;

}

.card h2{

font-size:22px;

margin-bottom:20px;

}

/* ======================================================
   UPLOAD BOX
====================================================== */

.upload-box{

padding:60px 30px;

border:

3px dashed
#3b82f6;

border-radius:20px;

text-align:center;

cursor:pointer;

transition:.35s;

background:

linear-gradient(
180deg,
#f8fbff,
#eef6ff);

}

.upload-box:hover{

transform:

translateY(-4px);

box-shadow:

0 15px 35px
rgba(37,99,235,.15);

}

.upload-box i{

font-size:70px;

color:#2563eb;

margin-bottom:20px;

display:block;

}

.upload-box h2{

margin-bottom:10px;

}

.upload-box p{

margin:15px 0;

color:#666;

}

.upload-box .small{

font-size:13px;

opacity:.7;

margin-top:20px;

}
/* ======================================================
   IMAGE QUEUE
====================================================== */

.queue-container{

display:flex;

flex-direction:column;

gap:15px;

}

#imageQueue{

display:flex;

flex-direction:column;

gap:12px;

max-height:420px;

overflow-y:auto;

padding-right:6px;

}

.queue-item{

display:flex;

align-items:center;

gap:12px;

padding:12px;

border:1px solid #e5e7eb;

border-radius:12px;

background:#fafafa;

transition:.25s;

}

.queue-item:hover{

background:#f3f4f6;

}

.queue-thumb{

width:65px;

height:65px;

border-radius:10px;

object-fit:cover;

background:#eee;

}

.queue-info{

flex:1;

overflow:hidden;

}

.queue-name{

font-weight:600;

white-space:nowrap;

overflow:hidden;

text-overflow:ellipsis;

}

.queue-size{

font-size:13px;

color:#6b7280;

margin-top:4px;

}

.queue-remove{

border:none;

background:none;

font-size:18px;

cursor:pointer;

color:#dc2626;

}

/* ======================================================
   OPTION GROUP
====================================================== */

.option-group{

margin-bottom:20px;

display:flex;

flex-direction:column;

gap:8px;

}

.option-group label{

font-weight:600;

font-size:15px;

color:#374151;

}

.option-group input,

.option-group select{

width:100%;

padding:12px 15px;

border:1px solid #d1d5db;

border-radius:10px;

font-size:15px;

background:#fff;

outline:none;

transition:.25s;

}

.option-group input:focus,

.option-group select:focus{

border-color:#2563eb;

box-shadow:0 0 0 4px rgba(37,99,235,.12);

}

/* ======================================================
   TARGET SIZE
====================================================== */

.target-size{

display:grid;

grid-template-columns:1fr 110px;

gap:10px;

}

/* ======================================================
   RESIZE GRID
====================================================== */

.resize-grid{

display:grid;

grid-template-columns:1fr 1fr;

gap:15px;

margin-bottom:15px;

}

/* ======================================================
   CHECKBOX
====================================================== */

.checkbox{

display:flex;

align-items:center;

gap:10px;

margin:12px 0;

cursor:pointer;

font-size:15px;

}

.checkbox input{

width:18px;

height:18px;

accent-color:#2563eb;

}

/* ======================================================
   BUTTONS
====================================================== */

.action-buttons{

display:grid;

grid-template-columns:1fr 1fr;

gap:15px;

margin-top:25px;

}

.btn-lg{

padding:15px;

font-size:16px;

font-weight:600;

}

/* ======================================================
   PROGRESS
====================================================== */

.progress-box{

display:flex;

flex-direction:column;

gap:12px;

}

.progress-bar{

height:12px;

background:#e5e7eb;

border-radius:999px;

overflow:hidden;

}

#progressFill{

width:0%;

height:100%;

background:linear-gradient(
90deg,
#2563eb,
#06b6d4);

transition:width .35s ease;

}

#progressText{

font-size:14px;

font-weight:600;

color:#4b5563;

text-align:center;

}
/* ======================================================
   RESULTS
====================================================== */

#resultsContainer{

display:grid;

grid-template-columns:repeat(auto-fill,minmax(320px,1fr));

gap:20px;

margin-top:20px;

}

.result-card{

background:#fff;

border:1px solid #e5e7eb;

border-radius:16px;

overflow:hidden;

box-shadow:0 8px 20px rgba(0,0,0,.05);

transition:.3s;

}

.result-card:hover{

transform:translateY(-4px);

}

.result-preview{

width:100%;

height:220px;

background:#f3f4f6;

display:flex;

align-items:center;

justify-content:center;

overflow:hidden;

}

.result-preview img{

max-width:100%;

max-height:100%;

object-fit:contain;

}

.result-body{

padding:18px;

}

.result-title{

font-size:16px;

font-weight:600;

margin-bottom:12px;

word-break:break-word;

}

.result-stats{

display:grid;

grid-template-columns:1fr 1fr;

gap:10px;

margin-bottom:15px;

}

.result-stat{

padding:10px;

border-radius:10px;

background:#f9fafb;

text-align:center;

}

.result-stat label{

display:block;

font-size:12px;

color:#6b7280;

margin-bottom:4px;

}

.result-stat strong{

font-size:15px;

color:#111827;

}

/* ======================================================
   BEFORE / AFTER
====================================================== */

.compare-wrapper{

display:grid;

grid-template-columns:1fr 1fr;

gap:25px;

}

.compare-box{

text-align:center;

}

.compare-box h3{

margin-bottom:15px;

}

.compare-box img{

width:100%;

height:350px;

object-fit:contain;

border:1px solid #e5e7eb;

border-radius:14px;

background:#f8fafc;

padding:15px;

}

/* ======================================================
   IMAGE INFO
====================================================== */

.info-grid{

display:grid;

grid-template-columns:repeat(3,1fr);

gap:15px;

}

.info-item{

padding:18px;

border:1px solid #e5e7eb;

border-radius:12px;

background:#fafafa;

}

.info-item label{

display:block;

font-size:13px;

color:#6b7280;

margin-bottom:8px;

}

.info-item strong{

font-size:18px;

}

/* ======================================================
   DOWNLOAD
====================================================== */

.download-actions{

display:flex;

gap:15px;

margin-top:25px;

}

.download-actions .btn{

flex:1;

}

/* ======================================================
   LOADING
====================================================== */

.loading-overlay{

position:fixed;

inset:0;

display:flex;

flex-direction:column;

align-items:center;

justify-content:center;

background:rgba(255,255,255,.9);

backdrop-filter:blur(6px);

z-index:9999;

}

.loading-overlay.hidden{

display:none;

}

.loader{

width:70px;

height:70px;

border:6px solid #e5e7eb;

border-top:6px solid #2563eb;

border-radius:50%;

animation:spin 1s linear infinite;

margin-bottom:20px;

}

@keyframes spin{

to{

transform:rotate(360deg);

}

}

/* ======================================================
   RESPONSIVE
====================================================== */

@media(max-width:1100px){

.compressor-grid{

grid-template-columns:1fr;

}

.compare-wrapper{

grid-template-columns:1fr;

}

.info-grid{

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

}

}

@media(max-width:768px){

.resize-grid,

.target-size,

.action-buttons,

.download-actions{

grid-template-columns:1fr;

display:grid;

}

.info-grid{

grid-template-columns:1fr;

}

.tool-title h1{

font-size:34px;

}

.upload-box{

padding:40px 20px;

}

.compare-box img{

height:250px;

}

.result-preview{

height:180px;

}

}

@media(max-width:480px){

.card{

padding:18px;

}

.upload-box i{

font-size:50px;

}

.option-group input,

.option-group select{

font-size:14px;

padding:10px 12px;

}

}

/* ======================================================
   DARK MODE
====================================================== */

.dark .card,

.dark .result-card{

background:#1f2937;

border-color:#374151;

}

.dark .upload-box{

background:#111827;

}

.dark .upload-box:hover{

background:#1e3a8a22;

}

.dark .option-group input,

.dark .option-group select{

background:#111827;

color:#fff;

border-color:#374151;

}

.dark .result-stat,

.dark .info-item{

background:#111827;

border-color:#374151;

}

.dark .compare-box img{

background:#111827;

border-color:#374151;

}

.dark .loading-overlay{

background:rgba(17,24,39,.92);

color:#fff;

}