*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  display: flex;
  justify-content: center;
  padding: 30px;
  background: #f2f2f2;
}

.container {
  width: 400px;
  text-align: center;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.upload-box {
  border: 2px dashed #999;
  padding: 30px;
  cursor: pointer;
  margin-top: 20px;
  border-radius: 10px;
}

.upload-box:hover {
  background-color: #f9f9f9;
}

#fileInput {
  margin-top: 10px;
}

#preview-box {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

#preview-box img {
  max-width: 120px;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ccc;
}


#preview {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.controls {
  /* margin-top: 30px; */
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.control-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.control-row label {
  display: flex;
  align-items: flex-start;
  flex: 1;
  flex-direction: column;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}


.control-row input[type="number"],
.control-row select {
  padding: 6px 10px;
  font-size: 14px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-top: 4px;
  box-shadow: 0px 1px 2px 0px #1F1E241F;
}

.control-row input[type="range"] {
  /* width: 120px; */
  margin-top: 4px;
}

#qualityValue {
  font-weight: 700;
  font-size: 13px;
  /* margin-left: 5px; */
  color: #1abc9c;
}


/* From Uiverse.io by satisshTechie */ 
.PB-range-slider {
  -webkit-appearance: none;
  width: 100%;
  /* flex: 1; */
  height: 5px;
  border-radius: 5px;
  margin: 10px 0;
  background: #D5DBE1;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

.PB-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: #000000;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.PB-range-slider::-webkit-slider-thumb:hover {
  box-shadow: 0px 0px 0px 8px rgba(0, 0, 0, 0.16);
  transition: 0.3s ease-in-out;
}

.PB-range-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: #000000;
  cursor: pointer;
}

.PB-range-slider-div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 1rem;
  /* padding: 1rem; */
  border-radius: 6px;
  /* border: 1px solid #C6CACE; */
  /* box-shadow: 0px 1px 2px 0px #1F1E241F; */
}
.PB-range-slider-div label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.PB-range-slidervalue {
  font-weight: 600;
}


.button-row {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

button {
  display: flex;
  align-items: center;
  gap: 8px;
}

#compressBtn {
  padding: 10px 20px;
  background-color: #1abc9c;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
}

#compressBtn:hover {
  background-color: #16a085;
}



#clearBtn {
  padding: 10px 20px;
  background-color: #e74c3c;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin: 10px 0px 0px;
}

#clearBtn:hover {
  background-color: #c0392b;
}


.modal {
  display: none;
  position: fixed;
  z-index: 10;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
}

#modalCaption {
  text-align: center;
  color: #fff;
  padding: 10px;
}

.close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}


.spinner {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.spinner[hidden] {
  display: none !important;
}


.btn-spinner {
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
}

.loader-small {
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top: 2px solid #16a085;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-spinner[hidden] {
  display: none;
}


.loader {
  width: 60px;
  height: 60px;
  border: 6px solid #fff;
  border-top: 6px solid #1abc9c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


#downloadAllBtn {
  padding: 10px 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#downloadAllBtn:hover {
  background-color: #2980b9;
}


/* notification  */
.notice_text{
    margin: 20px 10px;
    padding: 10px 20px;
    background-color: #f4ab36;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  
  #notificationContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
  }
  
  .notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 300px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f4ab36;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease-out;
    position: relative;
    overflow: hidden;
  }

  .processing{
    background-color: #f4ab36;
  }

  .success{
    background-color: #0dcb75;
  }

  .error{
    background-color: #f43636;
  }
  
  .notification .message {
    font-size: 14px;
    flex: 1;
  }
  
  .notification .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
  }
  
  .notification .progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.7);
    animation: progress 5s linear;
  }
  
  @keyframes slideIn {
    from {
      transform: translateX(100%);
    }
    to {
      transform: translateX(0);
    }
  }
@keyframes slideOut {
  from {
    transform: translateX(0%);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.notification.slide-out {
  animation: slideOut 0.4s ease forwards;
}


  
  @keyframes progress {
    from {
      width: 100%;
    }
    to {
      width: 0;
    }
  }

  footer{
    margin-top: 20px;
    font-size: 14px;
    color: #555;
    text-align: center;
    padding: 10px;
    position: absolute;
    bottom: 0;;
  }
