:root{
  /* 🔧 EDITABLE: colores y tipografías principales */
  --bg: #040406;
  --accent: #b3fffd;
  --accent-2: #ff4aff;
  --muted: #131315;
  --white: #f7f8fa;
  --font: 'Space Grotesk', sans-serif;
  --ui-size: 14px;
}

/* RECOMMENDED RESET (más eficiente que *) */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
html, body, main, header, footer, section, div, p, img, ul, li, button, input, textarea {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  vertical-align: baseline;
}

/* Base */
html, body { height: 100%; }
body {
  background:
    radial-gradient(1200px 700px at 10% 10%, rgba(60,10,60,0.06), transparent),
    radial-gradient(900px 500px at 90% 90%, rgba(0,200,220,0.03), transparent),
    var(--bg);
  color: var(--white);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Top overlay */
#uiTop{ position: fixed; left: 0; right: 0; top: 18px; pointer-events: none; z-index: 50; }
#overlayTxt{
  display:inline-block; margin:0 auto; padding:6px 14px; border-radius:999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  color: var(--accent); font-size: var(--ui-size); letter-spacing:1.8px; text-align:center;
  width: max-content; margin-left:50%; transform: translateX(-50%); opacity: .9; backdrop-filter: blur(2px);
}

/* Canvas layout */
#canvas{
  position: relative; width: 100vw; height: 100vh; overflow: hidden;
}

/* Modelo (no interactuable - recibe snap) */
.model{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: clamp(220px, 46vw, 640px);
  max-height: 85vh;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 20px 60px rgba(0,0,0,.7));
  z-index: 10;
  transition: transform .25s ease;
}

/* Diseño (sticker) */
.design{
  position: absolute;
  width: clamp(64px, 11vw, 240px);
  touch-action: none;
  cursor: grab;
  z-index: 30;
  transform-origin: center center;
  transition: transform .12s linear, box-shadow .12s linear;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.6));
}

/* Hover / focus visual (onboarding) */
.design:hover,
.design:focus{
  outline: 2px solid rgba(179,255,253,0.06);
  box-shadow: 0 6px 26px rgba(179,255,253,0.06), 0 0 12px rgba(255,255,255,0.02) inset;
  transform: scale(1.06);
}

/* Mientras arrastra -> glitch anim (sólo cuando se mueve) */
.design.dragging{
  cursor: grabbing;
  animation: glitchAnim .12s steps(2) infinite;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.7));
  transform: scale(1.02) translateZ(0);
  z-index: 999;
}

/* Modelo resaltado (zona válida) */
.model-highlight{
  box-shadow: 0 0 0 4px rgba(179,255,253,0.05), 0 0 32px rgba(0,200,220,0.04);
  transform: translate(-50%,-50%) scale(1.01);
}

/* Glitch keyframes (subtle) */
@keyframes glitchAnim{
  0%{ transform: translate(1px,-1px) rotate(-0.6deg) }
  25%{ transform: translate(-1px,1px) rotate(0.4deg) }
  50%{ transform: translate(2px,-2px) rotate(-0.8deg) }
  75%{ transform: translate(-2px,2px) rotate(0.6deg) }
  100%{ transform: translate(0px,0px) rotate(0deg) }
}

/* Controls */
#controls{
  position: fixed; right: 18px; bottom: 18px; display: flex; gap: 10px; z-index: 200;
}
#screenshotBtn, #resetBtn{
  background: transparent; border: 1px solid rgba(179,255,253,0.12);
  color: var(--accent); padding: 8px 12px; border-radius: 999px; font-size: 13px;
  backdrop-filter: blur(6px); cursor: pointer; transition: transform .12s ease, opacity .12s;
  opacity: 0.9;
}
#screenshotBtn:hover,#resetBtn:hover{ transform: scale(1.04); opacity: 1 }

/* Mobile */
@media (max-width:720px){
  #overlayTxt{ font-size:12px; top:12px }
  #controls{ right:10px; bottom:10px }
  .design{ width: clamp(60px, 20vw, 160px) }
  .model{ width: clamp(180px, 72vw, 480px); top:56% }
}

/* Hint text */
#hint{ position: fixed; left: 18px; bottom: 18px; color: rgba(255,255,255,0.06); font-size: 12px; }