/* Container */
.tool-container.image-resizer-converter {
  padding: 2rem;
  max-width: 960px;
  margin: auto;
  color: #eee;
  background-color: #1c1c1c;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  font-family: 'Segoe UI', sans-serif;
}
/* Header */
.tool-container.image-resizer-converter h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #fff;
}
.tool-container.image-resizer-converter .tool-subtitle {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: #bbb;
}
/* Upload Section */
.upload-section {
  border: 2px dashed #555;
  padding: 2rem;
  text-align: center;
  border-radius: 10px;
  background-color: #2a2a2a;
  transition: border-color 0.2s ease;
  cursor: pointer;
  margin-bottom: 1.5rem;
}
.upload-section.drag-over {
  border-color: #4caf50;
  background-color: #333;
}
.upload-section p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #ccc;
}
#uploadBtn {
  background-color: #4caf50;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  border-radius: 6px;
  cursor: pointer;
}
#uploadBtn:hover {
  background-color: #45a045;
}
/* Options Panel */
.options-panel {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.option-group label {
  font-weight: bold;
  color: #ccc;
}
.option-group select,
.option-group input[type="number"],
.option-group input[type="range"] {
  background-color: #2c2c2c;
  color: #fff;
  border: 1px solid #444;
  padding: 0.4rem 0.6rem;
  border-radius: 5px;
}
#resizeControls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
#resizeControls input {
  width: 100px;
}
.inline-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #ccc;
}
.inline-toggle label {
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
/* Slider */
#qualitySlider {
  width: 100%;
}
#qualityValue {
  font-size: 0.9rem;
  color: #aaa;
  margin-top: 0.2rem;
}
/* Buttons */
.primary-btn {
  background-color: #2196f3;
  color: #fff;
  border: none;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
}
.primary-btn:hover {
  background-color: #1976d2;
}
.download-zip-btn {
  background-color: #673ab7;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  margin-top: 1rem;
}
.download-zip-btn:hover {
  background-color: #5e35b1;
}
/* Preview Area */
.preview-area {
  margin-top: 2rem;
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.image-grid .preview-box {
  background-color: #2d2d2d;
  border: 1px solid #444;
  padding: 0.5rem;
  border-radius: 8px;
  text-align: center;
}
.preview-box img {
  max-width: 100%;
  max-height: 150px;
  border-radius: 4px;
  display: block;
  margin: 0 auto 0.5rem auto;
}
.preview-box .download-btn {
  display: inline-block;
  background-color: #009688;
  color: white;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
}
.preview-box .download-btn:hover {
  background-color: #00796b;
}
/* Responsive */
@media (max-width: 600px) {
  #resizeControls {
    flex-direction: column;
  }
}

#resizeControls input {
  width: 120px;
}
#resizeControls input::placeholder {
  color: #888;
  font-style: italic;
}
#resizeControls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #262626;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #444;
  margin-top: 0.5rem;
}

.preview-box small {
  display: block;
  word-break: break-word;
  line-height: 1.3;
}

.file-summary {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #aaa;
}
.secondary-btn {
  background-color: #555;
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 0.5rem;
}
.secondary-btn:hover {
  background-color: #444;
}
.preview-box {
  position: relative;
}
.remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #e53935;
  color: white;
  border: none;
  font-size: 0.8rem;
  padding: 0 6px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1.2;
}
.remove-btn:hover {
  background-color: #c62828;
}

.option-group label[for="qualitySlider"] {
  font-weight: bold;
  margin-bottom: 0.2rem;
  display: flex;
  justify-content: space-between;
  color: #ccc;
}
#qualityValue {
  margin-left: 1rem;
  font-weight: normal;
  font-size: 0.9rem;
  color: #aaa;
}

.zip-info {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #ccc;
  text-align: center;
}
.loading-spinner {
  margin-top: 0.5rem;
  color: #4caf50;
  font-weight: bold;
  font-size: 0.95rem;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%   { opacity: 0.3; }
  50%  { opacity: 1; }
  100% { opacity: 0.3; }
}


.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}
.preview-box {
  background-color: #2d2d2d;
  border: 1px solid #444;
  padding: 0.6rem;
  border-radius: 8px;
  text-align: center;
  font-size: 0.8rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.preview-box img {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.preview-area h2 {
  margin-bottom: 0.5rem;
}

.preview-status {
  margin: 0 0 1rem;
  color: #aaa;
  font-size: 0.95rem;
  text-align: center;
}
.preview-box {
  position: relative;
  background-color: #2d2d2d;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 0.6rem;
  text-align: center;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.preview-box img {
  max-height: 120px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.preview-box .remove-output {
  background-color: #e53935;
  color: white;
  font-size: 0.75rem;
  border: none;
  border-radius: 4px;
  margin-top: 0.5rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}
.preview-box .remove-output:hover {
  background-color: #c62828;
}

.smart-resize {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.smart-resize label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #ccc;
  font-size: 0.9rem;
}

.aspect-presets {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: #ccc;
}

.notice {
  background: #222;
  color: #ffc107;
  padding: 0.75rem 1rem;
  border-left: 4px solid #ffc107;
  margin-top: 1rem;
  font-size: 0.9rem;
  border-radius: 4px;
}

.tool-section.how-to-use {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #1a1a1a;
  border-radius: 12px;
  border: 1px solid #333;
  color: #ddd;
  font-size: 0.95rem;
  line-height: 1.6;
}
.tool-section.how-to-use h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: #fff;
  border-bottom: 1px solid #333;
  padding-bottom: 0.3rem;
}
.tool-section.how-to-use ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin: 0;
}
.tool-section.how-to-use li {
  margin-bottom: 0.7rem;
}
.tool-section.how-to-use strong {
  color: #fff;
}








.resize-inputs {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.resize-inputs input {
  background-color: #2c2c2c;
  color: #fff;
  border: 1px solid #444;
  padding: 0.5rem;
  border-radius: 6px;
  width: 120px;
}
.resize-inputs input::placeholder {
  color: #999;
  font-style: italic;
}
#aspectPresetGroup {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
#aspectPresetGroup label {
  font-weight: bold;
  color: #ccc;
}
#aspectPresetGroup select {
  background-color: #2c2c2c;
  color: #fff;
  border: 1px solid #444;
  padding: 0.4rem 0.6rem;
  border-radius: 5px;
  width: 120px;
}

#maintainAspect {
  margin-right: 0.5rem;
}

.smart-resize {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.smart-resize select,
.smart-resize input {
  background-color: #2c2c2c;
  color: #fff;
  border: 1px solid #444;
  padding: 0.4rem 0.6rem;
  border-radius: 5px;
}
.smart-resize input {
  width: 120px;
}
#bgFillColor {
  width: 60px;
  height: 32px;
  border: none;
  border-radius: 6px;
  padding: 0;
  background: none;
  cursor: pointer;
}
