@charset "UTF-8";

.image-tool-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px;
  border: 1px solid #e9edf3;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.upload-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.upload-dropzone {
  display: block;
  width: 100%;
  border: 2px dashed #d8dee8;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f6fb 100%);
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: #9fb7ff;
  background: linear-gradient(180deg, #f4f8ff 0%, #eef4ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.08);
}

.upload-dropzone-inner {
  min-height: 160px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.upload-main-text {
  margin: 0;
  color: #1f2937;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.5;
}

.upload-desktop-text {
  display: block;
}

.upload-mobile-text {
  display: none;
}

.upload-file-chip,
.upload-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #6d7df6;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(109, 125, 246, 0.22);
}

.upload-file-chip {
  padding: 8px 16px;
  margin-left: 6px;
  font-size: 14px;
}

.upload-file-btn {
  min-width: 164px;
  padding: 13px 20px;
  font-size: 15px;
}

.upload-sub-text {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.7;
}

.notice-strip {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  background: #f8fafc;
  color: #5b6472;
  font-size: 14px;
  line-height: 1.75;
}

.notice-strip strong {
  color: #111827;
  white-space: nowrap;
}

.image-tool-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: start;
}

.image-tool-sidebar,
.image-tool-main {
  min-width: 0;
}

.image-tool-sidebar {
  padding: 22px;
  border: 1px solid #e9edf3;
  border-radius: 22px;
  background: #fbfcfe;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.range-row input[type="range"] {
  flex: 1;
  accent-color: #6d7df6;
}

.range-row span {
  min-width: 58px;
  text-align: right;
  font-size: 14px;
  font-weight: 800;
  color: #374151;
}

.toggle-box {
  margin-top: 4px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid #e8edf4;
  border-radius: 18px;
  background: #ffffff;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #6d7df6;
  flex-shrink: 0;
}

.toggle-help {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: #6b7280;
}

.image-tool-btn-row {
  margin-top: 0;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.preview-card {
  padding: 20px;
  border: 1px solid #e9edf3;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.preview-card h3 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
  color: #111827;
}

.preview-image-wrap {
  position: relative;
  height: 320px;
  border: 1px solid #e5eaf1;
  border-radius: 18px;
  background: #f7f9fc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checker-bg {
  background-image:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-color: #ffffff;
}

.preview-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.preview-empty {
  padding: 20px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.7;
}

.preview-meta {
  margin-top: 12px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.8;
  word-break: keep-all;
}

.preview-download {
  width: 100%;
  margin-top: 14px;
  text-align: center;
  text-decoration: none;
}

#resultBox.utility-result-box {
  margin-top: 0;
  border-radius: 18px;
  border: 1px solid #e7ecf3;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f8fc 100%);
  color: #334155;
  line-height: 1.8;
  box-shadow: none;
}

.image-tool-sidebar .utility-field-label {
  margin-bottom: 8px;
  color: #374151;
  font-weight: 800;
}

.image-tool-sidebar .utility-input {
  margin-bottom: 18px;
  border-radius: 14px;
  border: 1px solid #dde4ee;
  background: #ffffff;
  min-height: 48px;
}

.image-tool-sidebar .utility-input:focus {
  border-color: #9db2ff;
  box-shadow: 0 0 0 4px rgba(109, 125, 246, 0.10);
  outline: none;
}

.image-tool-sidebar select.utility-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.image-tool-sidebar .utility-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.image-tool-sidebar .utility-btn {
  flex: 1 1 0;
  min-width: 120px;
  min-height: 48px;
  border-radius: 14px;
}

.image-tool-sidebar .utility-btn-primary,
.preview-download.utility-btn-primary {
  background: linear-gradient(135deg, #6d7df6 0%, #5b6df0 100%);
  border: none;
  color: #fff;
  box-shadow: 0 10px 24px rgba(109, 125, 246, 0.22);
}

.image-tool-sidebar .utility-btn-primary:hover,
.preview-download.utility-btn-primary:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

@media (max-width: 960px) {
  .image-tool-card {
    padding: 22px;
  }

  .image-tool-grid {
    grid-template-columns: 1fr;
  }

  .image-tool-sidebar {
    padding: 20px;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .preview-image-wrap {
    height: 260px;
  }
}

@media (max-width: 768px) {
  .image-tool-card {
    padding: 18px;
    border-radius: 20px;
  }

  .upload-dropzone {
    border-style: solid;
    border-width: 1px;
    border-radius: 20px;
  }

  .upload-desktop-text {
    display: none;
  }

  .upload-mobile-text {
    display: block;
  }

  .upload-dropzone-inner {
    min-height: 124px;
    padding: 22px 16px;
  }

  .upload-main-text {
    font-size: 18px;
  }

  .upload-sub-text {
    font-size: 13px;
  }

  .notice-strip {
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
  }

  .image-tool-sidebar {
    padding: 18px;
    border-radius: 18px;
  }

  .preview-card {
    padding: 16px;
    border-radius: 18px;
  }

  .preview-image-wrap {
    height: 220px;
    border-radius: 14px;
  }

  .image-tool-sidebar .utility-btn {
    width: 100%;
    flex: 1 1 100%;
  }
}