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

body { font-family: 'Bricolage Grotesque', sans-serif; overflow-x: hidden; }
.app-bg {
  background:
    radial-gradient(ellipse at 15% -10%, rgba(59,43,181,.45), transparent 55%),
    radial-gradient(ellipse at 100% 30%, rgba(6,182,212,.12), transparent 50%),
    radial-gradient(circle at 50% 120%, rgba(245,211,28,.08), transparent 50%),
    #0d0d14;
}

@keyframes headerFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes letterWave { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.header-letter { display: inline-block; font-weight: 800; transition: filter .2s; cursor: default; }
.wave-letter { animation: letterWave 1.6s ease-in-out infinite; }
.header-letter:hover { filter: invert(1) hue-rotate(69deg); }

@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

@keyframes recBlink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.rec-badge { background: #ef4444; animation: recBlink 1s infinite; box-shadow: 0 0 12px rgba(239,68,68,.7); }

@keyframes countPop { 0% { transform: scale(.4); opacity: 0; } 40% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); } }
.countdown-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 6rem; color: #F5D31C; text-shadow: 0 0 30px #3B2BB5, 0 0 60px #8B5CF6;
  background: rgba(0,0,0,.35); animation: countPop .6s ease; pointer-events: none;
}

.panel-glass { background: rgba(21,21,31,.85); backdrop-filter: blur(12px); border: 1px solid rgba(42,42,61,.6); }
.fx-panel { border-color: rgba(245,211,28,.25); }

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

.btn-action { transition: all .2s ease; }
.btn-action:active { transform: scale(.96); }
.btn-action:disabled { opacity: .6; cursor: not-allowed; }

.classic-btn {
  background: #F5D31C; color: #1a0f6b; border: 2px solid #000;
  box-shadow: 3px 3px 0 #000, 0 0 18px rgba(245,211,28,.35);
}
.classic-btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 #000, 0 0 26px rgba(245,211,28,.5); }

.fx-card { background: rgba(13,13,20,.7); transition: border-color .2s, opacity .2s; }
.fx-mini { font-size: .75rem; padding: 2px 7px; border-radius: 6px; border: 1px solid #2a2a3d; color: #aaa; }
.fx-mini:hover:not(:disabled) { border-color: #8B5CF6; color: #fff; }
.fx-mini:disabled { opacity: .3; }

.switch { position: relative; width: 32px; height: 18px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #2a2a3d; border-radius: 9px; transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; background: #888; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: #8B5CF6; }
.switch input:checked + span::before { transform: translateX(14px); background: #F5D31C; }

.chain-readout {
  font-family: 'Fira Code', monospace; font-size: .65rem; color: #F5D31C;
  background: rgba(0,0,0,.6); padding: 3px 8px; border-radius: 6px; pointer-events: none; max-width: 90%;
}

.drop-zone { border: 2px dashed #2a2a3d; transition: all .2s; }
.drop-zone.drag-over { border-color: #F5D31C; background: rgba(59,43,181,.25); }

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

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 .3s ease forwards; }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.preview-canvas { border: 2px dashed rgba(245,211,28,.3); }
.preview-canvas:hover { border-color: rgba(245,211,28,.6); }

.code-block { font-family: 'Fira Code', monospace; font-size: .72rem; line-height: 1.5; 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'%3E%3Cpath fill='%238B5CF6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; -webkit-appearance: none; appearance: none; padding-right: 28px;
}
.preset-chip { transition: all .15s ease; }
.preset-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139,92,246,.25); }