/* =========================================================================
   dopic.app [change-bg] PC Desktop Workbench Styles
   Minimalist Linear / Apple Aesthetics
   ========================================================================= */

:root {
  --cb-primary: #ea580c;
  --cb-primary-hover: #c2410c;
  --cb-surface: #ffffff;
  --cb-bg: #f8fafc;
  --cb-border: #e2e8f0;
  --cb-text: #0f172a;
  --cb-text-muted: #64748b;
  --cb-radius: 16px;
}

.hero-sec {
  max-width: 960px;
  margin: 2rem auto 1.25rem auto;
  padding: 0 1.25rem;
  text-align: center;
}

.hero-title {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cb-text);
  margin-bottom: 0.5rem;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--cb-text-muted);
  max-width: 680px;
  margin: 0 auto;
}

.container {
  max-width: 960px;
  margin: 0 auto 3rem auto;
  padding: 0 1.25rem;
}

.main-card {
  background: var(--cb-surface);
  border-radius: var(--cb-radius);
  border: 1px solid var(--cb-border);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
  padding: 2.25rem 2rem;
  margin-bottom: 2.5rem;
}

/* Upload Dropzone Container */
.dropzone {
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropzone:hover {
  border-color: #94a3b8;
  background: #fbfcfe;
}

/* PC Interactive Demo Showcase Box */
.pc-showcase-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.pc-showcase-avatar-wrap {
  width: 220px;
  height: 270px;
  border-radius: 16px;
  margin: 0 auto 1rem auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.9);
  transition: background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.pc-showcase-cutout-img {
  width: 100%;
  height: 100%;
  max-width: 220px;
  max-height: 270px;
  object-fit: contain;
  object-position: bottom center;
  pointer-events: none;
}

.pc-showcase-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.pc-demo-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 0.5rem;
}

.pc-demo-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #e2e8f0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.pc-demo-dot:hover {
  transform: scale(1.15);
}

.pc-demo-dot.active {
  transform: scale(1.2);
  border-color: #2563eb;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #2563eb;
}

.pc-demo-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

.pc-upload-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.btn-pc-upload {
  background: var(--cb-primary);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 0.8rem 2.5rem;
  font-size: 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.28);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-pc-upload:hover {
  background: var(--cb-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.38);
}

.pc-upload-subhint {
  font-size: 0.82rem;
  color: #94a3b8;
}

/* Loading Spinner */
.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid #e2e8f0;
  border-top-color: var(--cb-primary);
  border-radius: 50%;
  animation: cbSpin 0.8s linear infinite;
  margin: 0 auto 1.25rem auto;
}

@keyframes cbSpin {
  to { transform: rotate(360deg); }
}

.loading-progress-bar {
  width: 220px;
  height: 4px;
  background: #f1f5f9;
  border-radius: 9999px;
  margin: 1rem auto 0 auto;
  overflow: hidden;
  position: relative;
}

.loading-progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 40%;
  background: var(--cb-primary);
  border-radius: 9999px;
  animation: cbProgress 1.4s ease-in-out infinite;
}

@keyframes cbProgress {
  0% { left: -40%; width: 30%; }
  50% { left: 40%; width: 50%; }
  100% { left: 100%; width: 30%; }
}

/* State 3: Editor Workspace */
.color-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.color-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.color-card-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.color-card-btn.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: inline-block;
  flex-shrink: 0;
}

.preview-box {
  width: 100%;
  max-width: 440px;
  height: 480px;
  margin: 0 auto;
  background: repeating-conic-gradient(#f1f5f9 0% 25%, #ffffff 0% 50%) 50% / 16px 16px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1rem;
}

#previewCanvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}

.btn-action {
  padding: 0.75rem 1.8rem;
  border-radius: 9999px;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-outline {
  background: #ffffff;
  color: #475569;
  border: 1.5px solid #cbd5e1;
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-primary {
  background: var(--cb-primary);
  color: #ffffff;
  border: none;
  box-shadow: 0 3px 12px rgba(234, 88, 12, 0.28);
}

.btn-primary:hover {
  background: var(--cb-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.38);
}
