/* Sleek Monotone Professional 3D Tool UI */
:root {
  --bg: #0a0a0a;
  --card: #141414;
  --card-hover: #1a1a1a;
  --text: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #707070;
  --accent: #ffffff;
  --accent-dim: #d4d4d4;
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.15);
  --glass: rgba(255, 255, 255, 0.03);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.8);
  --ring: rgba(255, 255, 255, 0.2);
  
  /* Monotone gradients */
  --gradient-subtle: linear-gradient(135deg, #141414 0%, #0f0f0f 100%);
  --gradient-card: linear-gradient(135deg, #1a1a1a 0%, #141414 100%);
  --gradient-shine: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  
  /* Spacing & sizing */
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --header-height: 64px;
  --gap: 16px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa;
    --card: #ffffff;
    --card-hover: #f5f5f5;
    --text: #0a0a0a;
    --text-secondary: #525252;
    --text-muted: #a3a3a3;
    --accent: #0a0a0a;
    --accent-dim: #404040;
    --border: rgba(0, 0, 0, 0.08);
    --border-bright: rgba(0, 0, 0, 0.15);
    --glass: rgba(0, 0, 0, 0.03);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: #0a0a0a;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.015) 0%, transparent 50%);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scope headings to the tool app to avoid overriding the global/site header styles */
#app h1, #app h2, #app h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
  margin-bottom: 0.5rem;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* ===== Sleek Minimalist Header ===== */
.design-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  height: 40px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.project-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.project-status {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Sleek Minimalist Button System */
.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: -0.01em;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.header-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.header-btn:hover:not(:disabled)::before {
  opacity: 1;
}

.header-btn:hover:not(:disabled) {
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header-btn:active:not(:disabled) {
  transform: translateY(0);
}

.header-btn:disabled {
  cursor: not-allowed;
  opacity: 0.3;
  color: var(--text-muted);
}

.header-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Auth Button */
.auth-btn {
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.auth-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

/* Save Button */
.header-btn#saveBtn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.header-btn#saveBtn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

@keyframes pulse {
  0%, 100% { 
    opacity: 1; 
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3), 0 2px 8px rgba(0, 0, 0, 0.5);
  }
  50% { 
    opacity: 0.9; 
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 2px 8px rgba(0, 0, 0, 0.5);
  }
}

/* Primary Action Button - Clean white accent */
.next-btn {
  background: var(--text) !important;
  color: var(--bg) !important;
  font-weight: 600;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 
              0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 9px 20px;
}

.next-btn:hover:not(:disabled) {
  background: var(--accent-dim) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.next-btn:disabled {
  opacity: 0.3;
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-muted) !important;
}

/* Convert Button - Subtle white */
.convert-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text) !important;
  font-weight: 500;
  border-color: var(--border-bright) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  padding: 9px 18px;
}

.convert-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.convert-btn:disabled {
  opacity: 0.3;
}

/* AI Button - Elegant minimal */
.ai-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-secondary) !important;
  font-weight: 500;
  border-color: var(--border) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  padding: 9px 18px;
}

.ai-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--border-bright) !important;
  color: var(--text) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ai-btn:disabled {
  opacity: 0.3;
}

/* ===== Auth Styles (from 2D) ===== */
.btn {
  border: 1px solid transparent;
  background: var(--card);
  color: var(--text);
  padding: .6rem .9rem;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}
.btn.primary {
  font-family: 'Bangers', Impact, 'Arial Black', sans-serif;
  font-size: 1.15rem;
  background: linear-gradient(90deg, #e23636 0%, #ff5a36 100%);
  color: white;
}
.btn.full { width: 100%; }
.btn.ghost { 
  background:transparent; 
  border:1px solid color-mix(in oklab, var(--muted) 30%, transparent) 
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  transition: all 0.2s ease;
}

.card:hover {
  background: var(--card-hover);
  border-color: var(--border-bright);
}

.stack {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

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

input[type="range"] {
  width: 100%;
}

/* Form inputs - Minimalist */
input, select {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  width: 100%;
  font-size: 0.9rem;
  font-family: 'Inter', system-ui, sans-serif;
  transition: all 0.2s ease;
}

input:focus, select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-bright);
}

input[type="file"] {
  padding: 0;
}

input[type="file"]::file-selector-button {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 8px 12px;
  border: none;
  border-right: 1px solid var(--border);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  margin-right: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

input[type="file"]::file-selector-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.3);
  outline-offset: 2px;
}

/* Main App Layout - Optimized spacing */
#app {
  display: grid;
  grid-template-columns: minmax(340px, 340px) 1fr;
  height: calc(100vh - var(--header-height));
  gap: 20px;
  padding: 20px 24px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#app.collapsed {
  grid-template-columns: 56px 1fr;
}

#controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overflow-x: visible;
  padding-right: 8px;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', system-ui, sans-serif;
}

/* Controls Panel Typography - Clean & Minimal */
#controls h2 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 0.85rem;
  color: var(--text);
}

#controls h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 0.8rem;
}

#controls p,
#controls label,
#controls span {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.3px;
}

#controls .upload-title-compact,
#controls .section-header {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

#controls button {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

#controls input,
#controls select {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 500;
}

#app.collapsed #controls {
  padding: 0;
  overflow: visible;
}

#controls::-webkit-scrollbar {
  width: 8px;
}
#controls::-webkit-scrollbar {
  width: 4px;
}
#controls::-webkit-scrollbar-track {
  background: transparent;
}
#controls::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}
#controls::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

#controls::-webkit-scrollbar {
  width: 6px;
}
#controls::-webkit-scrollbar-track {
  background: transparent;
}
#controls::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

#viewport {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

#viewport canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  outline: none; /* Remove canvas focus ring */
}

#loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-secondary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: block;
}

/* Pricing Summary - Minimal */
.pricing-summary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 12px;
  position: relative;
  overflow: hidden;
}

.pricing-summary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
}
.price-row:last-child {
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
  font-size: 16px;
}
.price-label {
  color: var(--text-dim);
  font-weight: 500;
}
.price-value {
  color: var(--text);
  font-weight: 700;
}

/* Responsive */
@media (max-width: 900px) {
  body {
    overflow: auto; /* Allow scrolling on mobile */
  }
  #app {
    grid-template-columns: 1fr;
    height: auto;
    padding: 8px;
  }
  #app.collapsed {
    grid-template-columns: 1fr; /* Same as expanded on mobile */
  }
  #controls {
    overflow-y: visible;
    padding-right: 0;
  }
  #viewport {
    min-height: 60vh; /* Give viewport space on mobile */
  }
  .design-header {
    padding: 0 10px;
  }
  .header-actions {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  
  .header-btn {
    padding: 8px 12px;
    font-size: 12px;
    gap: 4px;
  }
  
  .header-btn svg {
    width: 16px;
    height: 16px;
  }
  
  .next-btn, .convert-btn {
    padding: 8px 14px;
    font-size: 12px;
  }
  
  .project-name {
    display: none; /* Hide on smaller screens */
  }
}

@media (max-width: 480px) {
  .header-left {
    gap: 12px;
  }
  .logo {
    height: 32px;
  }
}

/* ===== Modern Adjust Controls Styles ===== */
.modern-adjust-card {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.control-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 10px;
}

.section-header {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.modern-label {
  display: block;
  margin-bottom: 12px;
}

.modern-label:last-child {
  margin-bottom: 0;
}

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

.label-icon {
  font-size: 0.85rem;
  margin-right: 6px;
  opacity: 0.7;
}

.label-text {
  flex: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

.modern-value {
  font-family: 'Inter', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  letter-spacing: 0;
  padding: 3px 8px;
  border-radius: 6px;
  min-width: 50px;
  text-align: center;
}

.value-input-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.value-input-group .modern-slider {
  flex: 1;
}

.exact-value-input {
  width: 75px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: 0;
}

/* Hide default spinner buttons completely and replace with custom */
.exact-value-input::-webkit-inner-spin-button,
.exact-value-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.exact-value-input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.exact-value-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.exact-value-input:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.modern-slider {
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: all 0.2s ease;
}

.modern-slider:hover {
  background: rgba(255, 255, 255, 0.15);
}

.modern-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.modern-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
}

.modern-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.modern-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
}

.btn-sm {
  padding: 6px 12px !important;
  font-size: 0.8rem !important;
}

.color-preview {
  font-family: 'Courier New', monospace;
}

/* Modern Toggle Button - Minimalist */
.modern-toggle-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 12px 18px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  position: relative;
  overflow: hidden;
}

.modern-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--border-bright) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modern-toggle-btn:active {
  transform: translateY(0);
}

.modern-toggle-btn.paused {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: var(--text) !important;
}

.modern-toggle-btn svg, .modern-toggle-btn span {
  position: relative;
  z-index: 1;
}

/* ===== Art Side Toggle Button - Sleek ===== */
.art-toggle-container {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.art-toggle-btn {
  flex: 1;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}

.art-toggle-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.art-toggle-btn:not(.active):hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.art-section {
  display: none;
}

.art-section.active {
  display: block;
}

/* ===== Modern Upload Card - Minimalist Black ===== */
.modern-upload-card {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  overflow: visible;
  position: relative;
  z-index: 2;
}

.upload-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.upload-header h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 0.85rem;
  color: var(--text);
}

.upload-header p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  font-size: 0.75rem;
}

.upload-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.upload-icon svg {
  stroke: var(--text);
  opacity: 0.9;
}

.upload-zone-compact {
  margin-bottom: 8px;
}

.upload-zone-compact:last-of-type {
  margin-bottom: 0;
}

.upload-label-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.upload-label-compact:hover {
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.upload-label-compact svg {
  stroke: var(--text-secondary);
  opacity: 0.8;
  flex-shrink: 0;
}

.upload-title-compact {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ===== Quick Icons Styles - Clean Grid ===== */
.quick-icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.quick-icon-item {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  position: relative;
  overflow: hidden;
}

.quick-icon-item:hover {
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.quick-icon-item.active {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.quick-icon-item.drag-active {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.1);
  animation: iconGlow 2s ease-in-out infinite;
}

@keyframes iconGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3), 0 0 0 2px rgba(255, 255, 255, 0.15);
  }
}

.quick-icon-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.icon-controls {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: none;
}

.icon-controls.active {
  display: block;
}

/* Placed Icons List - Minimal */
.placed-icons-list {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.placed-icon-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.placed-icon-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-bright);
  transform: translateX(2px);
}

.placed-icon-item.selected {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text);
}

.placed-icon-preview {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.placed-icon-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.placed-icon-info {
  flex: 1;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.placed-icon-delete {
  width: 24px;
  height: 24px;
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.placed-icon-delete:hover {
  background: rgba(220, 38, 38, 0.4);
  transform: scale(1.1);
}

.placed-icon-delete svg {
  width: 14px;
  height: 14px;
  stroke: #ef4444;
}

.icon-control-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.icon-control-row:last-child {
  margin-bottom: 0;
}

.icon-control-btn {
  flex: 1;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-control-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ===== Model Selection Buttons ===== */
.model-select-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.model-select-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
  transform: translateY(-2px);
}

.model-select-btn.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.model-select-btn svg {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.model-select-btn:hover svg,
.model-select-btn.active svg {
  opacity: 1;
}

/* Custom GLB Upload Hover Effect */
label[for="custom-glb-upload"]:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* ===== Modern Options Card Styles ===== */
.modern-options-card {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.options-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.options-header h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 0.9rem;
}

.options-header p {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.options-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.options-icon svg {
  stroke: white;
}

.modern-form-group {
  margin-bottom: 16px;
}

.modern-form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.modern-form-label svg {
  stroke: var(--accent);
}

.modern-select,
.modern-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.modern-select:hover,
.modern-input:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.modern-select:focus,
.modern-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.modern-pricing-summary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px;
  margin-top: 16px;
}

.modern-pricing-summary .price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.modern-pricing-summary .price-row:last-child {
  margin-bottom: 0;
}

.modern-pricing-summary .price-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-weight: 500;
}

.modern-pricing-summary .price-label svg {
  stroke: var(--text-dim);
}

.modern-pricing-summary .price-value {
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
}

.modern-pricing-summary .total-row {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 8px;
}

.modern-pricing-summary .total-row .price-label {
  color: var(--accent);
}

.modern-pricing-summary .total-row .price-label svg {
  stroke: var(--accent);
}

.modern-pricing-summary .total-price {
  font-size: 1.1rem;
  color: var(--text);
}

/* ===== Modern Finish Card Styles ===== */
.modern-finish-card {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.finish-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.finish-header h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 0.9rem;
}

.finish-header p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  letter-spacing: 0;
}

.finish-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.finish-icon svg {
  stroke: white;
  fill: white;
}

.finish-controls {
  margin-bottom: 12px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-label:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 48px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-label input:checked + .toggle-slider {
  background: rgba(255, 255, 255, 0.2);
}

.toggle-label input:checked + .toggle-slider::before {
  left: 26px;
}

.toggle-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.toggle-text svg {
  stroke: var(--accent);
}

.modern-export-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 2px solid rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  padding: 14px 20px !important;
  font-weight: 700 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease !important;
}

.modern-export-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.modern-export-btn svg {
  stroke: rgba(255, 255, 255, 0.9);
}

/* Base Color Preset Buttons */
.color-preset-btn {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.color-preset-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.color-preset-btn:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
}

.color-preset-btn:active::before {
  transform: translate(-50%, -50%) scale(1);
}

/* New Modern Color Preset Buttons */
.color-preset-btn-new {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-preset-btn-new::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s;
}

.color-preset-btn-new:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
}

.color-preset-btn-new:hover::after {
  opacity: 1;
}

.color-preset-btn-new:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ===== Modern Knob Controls ===== */
.knob-container {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 8px 0;
}

.knob-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  cursor: pointer;
  user-select: none;
  margin: 0 auto;
}

.knob-track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.knob-wrapper:hover .knob-track {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.4),
    0 6px 16px rgba(0, 0, 0, 0.3);
}

.knob-fill {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    var(--text) 0deg,
    var(--text) var(--knob-rotation, 0deg),
    transparent var(--knob-rotation, 0deg),
    transparent 360deg
  );
  opacity: 0.15;
  transition: opacity 0.2s ease;
}

.knob-wrapper:hover .knob-fill {
  opacity: 0.25;
}

.knob-dial {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  transform: rotate(var(--knob-rotation, 0deg));
}

.knob-wrapper:active .knob-dial {
  box-shadow: 
    0 1px 4px rgba(0, 0, 0, 0.8),
    inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transform: rotate(var(--knob-rotation, 0deg)) scale(0.98);
}

.knob-indicator {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 20px;
  background: linear-gradient(to bottom, var(--text), var(--text-secondary));
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.knob-center-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.knob-value-display {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  font-family: 'Inter', monospace;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  min-width: 60px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.knob-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
  font-weight: 500;
}

/* Knob tick marks */
.knob-ticks {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.knob-tick {
  position: absolute;
  width: 1px;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  left: 50%;
  top: 2px;
  transform-origin: center 38px;
  border-radius: 1px;
}

.knob-tick.major {
  height: 10px;
  width: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.knob-tick:nth-child(1) { transform: translateX(-50%) rotate(0deg); }
.knob-tick:nth-child(2) { transform: translateX(-50%) rotate(30deg); }
.knob-tick:nth-child(3) { transform: translateX(-50%) rotate(60deg); }
.knob-tick:nth-child(4) { transform: translateX(-50%) rotate(90deg); }
.knob-tick:nth-child(5) { transform: translateX(-50%) rotate(120deg); }
.knob-tick:nth-child(6) { transform: translateX(-50%) rotate(150deg); }
.knob-tick:nth-child(7) { transform: translateX(-50%) rotate(180deg); }
.knob-tick:nth-child(8) { transform: translateX(-50%) rotate(210deg); }
.knob-tick:nth-child(9) { transform: translateX(-50%) rotate(240deg); }
.knob-tick:nth-child(10) { transform: translateX(-50%) rotate(270deg); }
.knob-tick:nth-child(11) { transform: translateX(-50%) rotate(300deg); }
.knob-tick:nth-child(12) { transform: translateX(-50%) rotate(330deg); }

/* Knob Grid Layout */
.knob-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 24px;
  padding: 16px 0;
}

.knob-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.knob-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.knob-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .knob-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .knob-wrapper {
    width: 70px;
    height: 70px;
  }
  
  .knob-tick {
    transform-origin: center 33px;
  }
}
