@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/Inter.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body {
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
}

h1 {
  display: flex;
  align-items: center;
  justify-content: center;
}

#main-canvas {
  touch-action: none;
  cursor: grab;
}

#main-canvas:active {
  cursor: grabbing;
}

.step-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: opacity 0.3s ease;
}

.hidden-step {
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.active-step {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

.thumbnail-container {
  position: relative;
  max-width: 160px;
  max-height: 160px;
  width: fit-content;
  height: fit-content;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #f3f4f6;
  cursor: grab;
  transition: transform 0.2s, box-shadow 0.2s;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.thumbnail-img {
  display: block;
  max-width: 160px;
  max-height: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .thumbnail-container {
    background: #2a2a2a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
  }
}

.thumbnail-container:active {
  cursor: grabbing;
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border-radius: 999px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}

.delete-btn:hover {
  background: rgba(220, 38, 38, 1);
}

.drag-over {
  border: 2px dashed #3b82f6;
  opacity: 0.7;
}

.btn {
  width: 6.25em;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-primary:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}

@media (prefers-color-scheme: dark) {
  .btn-primary:disabled {
    background: #374151;
  }
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: inherit;
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
  }

  .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
  }
}

.toast {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  .toast {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
  }
}