/* Custom spacing and responsive layouts */
.mockup-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  margin-top: 24px;
}

@media (max-width: 1024px) {
  .mockup-grid {
    grid-template-columns: 1fr;
  }
}

/* Preview Canvas Wrapper */
.canvas-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 24px;
  height: fit-content;
}

.canvas-viewport-container {
  width: 100%;
  background: #1e1e24;
  background-image: radial-gradient(circle, #2a2a35 1px, transparent 1px), radial-gradient(circle, #2a2a35 1px, #1e1e24 1px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 480px;
  max-height: 640px;
  position: relative;
}

/* Target Canvas styling */
#mockup-canvas {
  max-width: 100%;
  max-height: 580px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  border-radius: 4px;
  object-fit: contain;
  transition: transform 0.2s;
}

/* Control Sidebar Panel */
.controls-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.control-group {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.group-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

/* Sliders and fields styling */
.field-row {
  margin-bottom: 16px;
}
.field-row:last-child {
  margin-bottom: 0;
}

.field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.field-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.field-value {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.input-slider {
  width: 100%;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  accent-color: var(--accent);
}

.input-select, .input-text {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
}
.input-select:focus, .input-text:focus {
  border-color: var(--accent);
}

/* Swatches selection for device and background colors */
.swatches-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}
.color-swatch:hover {
  transform: scale(1.1);
  border-color: var(--text);
}
.color-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent);
}

/* Specific background gradients */
.bg-g1 { background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%); }
.bg-g2 { background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%); }
.bg-g3 { background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%); }
.bg-g4 { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.bg-g5 { background: linear-gradient(135deg, #f857a6 0%, #ff5858 100%); }
.bg-g6 { background: linear-gradient(135deg, #0575e6 0%, #00f260 100%); }
.bg-g7 { background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%); }
.bg-g8 { background: linear-gradient(135deg, #eecda3 0%, #ef629f 100%); }
.bg-g9 { background: linear-gradient(135deg, #434343 0%, #000000 100%); }
.bg-g10 { background: linear-gradient(135deg, #8a2387 0%, #e94057 50%, #f27121 100%); }

/* Drag & Drop file uploader */
.upload-box {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  transition: border-color 0.2s, background-color 0.2s;
  position: relative;
}
.upload-box:hover {
  border-color: var(--accent);
  background: rgba(120, 120, 120, 0.02);
}
.upload-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}
.upload-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.upload-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Thumbnail of uploaded image */
.upload-thumbnail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 12px;
}
.thumb-preview {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  background: #000;
}
.thumb-info {
  flex-grow: 1;
  margin-left: 12px;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thumb-remove {
  background: none;
  border: none;
  color: #EF4444;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
}

/* Action triggers button row */
.actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.btn-action {
  width: 100%;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-action-primary {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
}
.btn-action-primary:hover {
  background: var(--accent-hover);
}
.btn-action-secondary {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-action-secondary:hover {
  background: var(--bg);
}

/* Orientation radio layout */
.radio-group {
  display: flex;
  gap: 8px;
}
.radio-card {
  flex: 1;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  background: var(--bg);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.radio-card:hover {
  border-color: var(--text);
}
.radio-card.active {
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 2px var(--accent);
}

/* Status indicator on viewport header */
.viewport-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
.canvas-resolution-badge {
  background: rgba(120, 120, 120, 0.08);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Article styles at the bottom */
.seo-article {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
  line-height: 1.6;
}
.seo-article h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.seo-article h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
}
.seo-article p {
  color: var(--text-muted);
  margin-bottom: 16px;
}
.faq-grid {
  display: grid;
  grid-template-cols: 1fr;
  gap: 24px;
  margin-top: 32px;
}
.faq-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.faq-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.faq-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}
