.tool-main-section {
  padding: 120px 0 60px;
  min-height: 80vh;
}

.tool-header {
  text-align: center;
  margin-bottom: 30px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 15px;
}

.tool-card-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 40px 20px;
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.upload-area {
  border: 2px dashed #2563eb;
  border-radius: 12px;
  padding: 40px 20px;
  background: #f0f7ff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-area:hover {
  background: #e0f0ff;
}

.upload-area h3 {
  color: #1e293b !important;
  margin: 10px 0 5px;
  font-size: 1.1rem;
}

.upload-area p {
  color: #64748b !important;
  margin: 0;
  font-size: 0.9rem;
}

.upload-icon {
  font-size: 3.5rem;
  color: #2563eb;
  margin-bottom: 10px;
}

.status-msg {
  margin-top: 20px;
  font-weight: 600;
  color: #0284c7;
}

.result-box {
  margin-top: 30px;
  display: none;
  text-align: center;
}

.download-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #475569;
  color: #ffffff;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-secondary:hover {
  background: #334155;
}

.result-box h3 {
  color: #1e293b;
}

.image-preview {
  margin: 20px 0;
  display: inline-block;
}

.image-preview img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background-image:
    linear-gradient(45deg, #ccc 25%, transparent 25%),
    linear-gradient(-45deg, #ccc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ccc 75%),
    linear-gradient(-45deg, transparent 75%, #ccc 75%);
  background-size: 20px 20px;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0px;
}
/* Styling Loading Spinner (Buffering) */
.loading-spinner {
  margin: 30px auto;
  text-align: center;
}

.spinner {
  width: 55px;
  height: 55px;
  border: 5px solid #e2e8f0;
  border-top: 5px solid #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#statusText {
  font-weight: 600;
  color: #475569;
  font-size: 0.95rem;
}
/* Editor & Canvas Manual Styling */
.editor-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  background: #f8fafc;
  padding: 12px 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  border: 1px solid #e2e8f0;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-tool.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.btn-tool:hover:not(.active) {
  background: #f1f5f9;
}

.canvas-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px 0;
  overflow: auto;
  background-image: repeating-conic-gradient(#f1f5f9 0% 25%, #ffffff 0% 50%);
  background-size: 20px 20px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  padding: 10px;
}

#editorCanvas {
  max-width: 100%;
  height: auto;
  cursor: crosshair;
}
