.section-box{
  background:#fafafa;
  border:1px solid #eee;
  border-radius:10px;
  padding:18px;
  margin-bottom:18px;
}

.label{
  display:block;
  font-size:14px;
  font-weight:600;
  margin-bottom:10px;
}

.input-box{
  width:100%;
  padding:12px;
  border:1px solid #ccc;
  border-radius:6px;
  box-sizing:border-box;
}

/* BUTTON */
.app{
  padding:12px 20px;
  background:linear-gradient(135deg,#0a3d62,#07517d);
  color:#fff;
  border:none;
  border-radius:4px;
  cursor:pointer;
}

.btns{
  display:flex;
  justify-content:flex-end;
  margin-top:15px;
}

/* GRID */
.grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:10px;
}

.thumb{
  aspect-ratio:1;
  border-radius:10px;
  overflow:hidden;
  border:1px solid #ddd;
  background:#f8f8f8;
  position:relative;
}

.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.add{
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px dashed #ccc;
  cursor:pointer;
  font-size:12px;
}

/* PROCESSING */
.processing{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.6);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:12px;
  z-index:5;
}

.dots span{
  animation:blink 1s infinite;
}

.dots span:nth-child(2){
  animation-delay:.2s;
}

.dots span:nth-child(3){
  animation-delay:.4s;
}

@keyframes blink{
  0%{opacity:.2;}
  50%{opacity:1;}
  100%{opacity:.2;}
}

.progress{
  width:80%;
  height:6px;
  background:#ffffff30;
  border-radius:20px;
  overflow:hidden;
  margin-top:10px;
}

.progress div{
  height:100%;
  width:0%;
  background:#00ff88;
  transition:.3s;
}

/* RESULT */
.result-box{
  display:none;
}

/* FILE CARDS */
.files{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:12px;
  margin-top:15px;
}

.file-card{
  border:1px solid #ddd;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  padding:8px;
}

.file-card img{
  width:100%;
  height:120px;
  object-fit:cover;
  border-radius:6px;
}

/* STATS */
.stats-box{
  margin-top:8px;
  padding:8px;
  background:#f4f4f4;
  border-radius:6px;
  font-size:11px;
  line-height:1.5;
}

.stats-box b{
  color:#0a3d62;
}

/* DOWNLOAD */
.download-btn{
  display:block;
  text-align:center;
  margin-top:8px;
  background:#0a3d62;
  color:#fff;
  text-decoration:none;
  padding:8px;
  border-radius:6px;
  font-size:12px;
}

/* FORMAT */
.format-box{
  display:flex;
  gap:10px;
  margin-top:10px;
  flex-wrap:wrap;
}

.format-btn{
  padding:8px 14px;
  border:1px solid #ccc;
  border-radius:6px;
  cursor:pointer;
  background:#fff;
}

.format-btn.active{
  background:#0a3d62;
  color:#fff;
  border-color:#0a3d62;
}

/* DOWNLOAD ALL */
.download-all{
  width:100%;
  margin-top:15px;
  padding:12px;
  border:none;
  border-radius:6px;
  background:#111;
  color:#fff;
  cursor:pointer;
}

@media(max-width:768px){

  .grid{
    grid-template-columns:repeat(3,1fr);
  }

}