* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #8B5CF6 #15151f;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #15151f; }
::-webkit-scrollbar-thumb { background: #8B5CF6; border-radius: 3px; }

body {
  font-family: 'Bricolage Grotesque', sans-serif;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 15%, rgba(139,92,246,0.08), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(6,182,212,0.07), transparent 45%),
    #0b0b12;
}

@keyframes headerFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }

@keyframes ihtxPulseEmpty {
  0%,100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.03); opacity: 0.55; }
}

@keyframes bounce { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }

@keyframes rainbowExplosion {
  0% { filter: hue-rotate(0deg) brightness(1) saturate(1); transform: scale(1); }
  25% { filter: hue-rotate(90deg) brightness(1.6) saturate(2.5); transform: scale(1.2) rotate(-3deg); }
  50% { filter: hue-rotate(180deg) brightness(2) saturate(3); transform: scale(1.1) rotate(3deg); }
  75% { filter: hue-rotate(270deg) brightness(1.6) saturate(2.5); transform: scale(1.3) rotate(-2deg); }
  100% { filter: hue-rotate(360deg) brightness(1) saturate(1); transform: scale(1); }
}
.ihtx-egg { animation: rainbowExplosion 0.6s ease infinite !important; }

.header-letter {
  display: inline-block;
  transition: all 0.2s ease;
  cursor: default;
}
.header-letter:hover {
  animation: bounce 0.4s ease;
  color: #06B6D4;
  text-shadow: 0 0 20px rgba(6,182,212,0.6);
}

.panel-glass {
  background: rgba(21,21,31,0.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(42,42,61,0.6);
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
}

.control-label {
  display: block;
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8B5CF6;
  margin-bottom: 4px;
}

.btn-action {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.btn-action::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.btn-action:hover::after { opacity: 1; }
.btn-action:active { transform: scale(0.96); }

.effect-chip { transition: all 0.12s ease; }
.effect-chip:hover { transform: translateY(-1px); }
.effect-chip:active { transform: scale(0.94); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  background: transparent; cursor: pointer;
  width: 100%; height: 18px;
}
input[type="range"]::-webkit-slider-track { height: 4px; background: #2a2a3d; border-radius: 2px; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: #8B5CF6; margin-top: -5.5px; box-shadow: 0 0 8px rgba(139,92,246,0.5);
}
input[type="range"]::-moz-range-track { height: 4px; background: #2a2a3d; border-radius: 2px; }
input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; background: #8B5CF6; border: none;
  box-shadow: 0 0 8px rgba(139,92,246,0.5);
}

input[type="color"] {
  -webkit-appearance: none; border: 2px solid #2a2a3d; border-radius: 8px;
  cursor: pointer; padding: 0; overflow: hidden;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 4px; }

.toast-enter { animation: toastIn 0.3s ease forwards; }
@keyframes toastIn { from{transform:translateY(-20px);opacity:0} to{transform:translateY(0);opacity:1} }

.preview-canvas {
  border: 2px dashed rgba(139,92,246,0.3);
  transition: border-color 0.3s;
}
.preview-canvas:hover { border-color: rgba(139,92,246,0.55); }

.code-block {
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  tab-size: 2;
  white-space: pre-wrap;
  word-break: break-all;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238B5CF6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 28px;
}

.preset-chip { transition: all 0.15s ease; }
.preset-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139,92,246,0.2); }