/* MaskFuse - Global Styles */

html { scroll-behavior: smooth; }

/* Hide scrollbar on chip containers */
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* Custom scrollbar for other areas */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* Range slider */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 5px; background: rgba(255,255,255,0.1); border-radius: 3px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: #2d6cff; cursor: pointer; border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #2d6cff; cursor: pointer; border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Template card */
.tpl-card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.tpl-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

/* Drag-over */
.drag-over { border-color: rgba(96,165,250,0.6) !important; background: rgba(59,130,246,0.06) !important; }

/* Preview canvas touch */
.preview-stage { touch-action: none; -webkit-user-select: none; user-select: none; }

/* Loading spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: white;
  border-radius: 50%; animation: spin 0.5s linear infinite;
  display: inline-block; vertical-align: middle; margin-right: 6px;
}

/* Toast */
.toast {
  position: fixed; bottom: 20px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(10,18,32,0.95); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 10px 18px; font-size: 13px; font-weight: 600;
  color: white; z-index: 200; transition: transform 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4); backdrop-filter: blur(8px);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(34,197,94,0.3); }
.toast.error { border-color: rgba(248,113,113,0.3); }

/* Text layer item */
.text-layer-item {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; padding: 8px; transition: background 0.15s;
}
.text-layer-item:hover { background: rgba(255,255,255,0.05); }

/* Mobile slider thumb bigger */
@media (max-width: 640px) {
  input[type="range"]::-webkit-slider-thumb { width: 22px; height: 22px; }
  input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; }
}

/* Smooth step transitions */
.step { will-change: opacity, transform; }
