:root {
  --bg-primary: #0D0A1A;
  --bg-secondary: #1A1030;
  --bg-tertiary: #251845;
  --accent-purple: #6B21A8;
  --accent-violet: #A855F7;
  --accent-magenta: #C026D3;
  --text-primary: #E9D5FF;
  --text-secondary: #C4B5FD;
  --glow-purple: rgba(168, 85, 247, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Fira Code', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

.font-cinzel {
  font-family: 'Cinzel', serif;
}

.font-fira {
  font-family: 'Fira Code', monospace;
}

/* Mystical glow effects */
.glow-text {
  text-shadow: 0 0 10px var(--glow-purple), 0 0 20px var(--glow-purple), 0 0 40px var(--accent-purple);
}

.glow-box {
  box-shadow: 0 0 15px var(--glow-purple), inset 0 0 15px rgba(168, 85, 247, 0.1);
}

.glow-border {
  border: 1px solid var(--accent-violet);
  box-shadow: 0 0 10px var(--glow-purple);
}

/* Floating particles background */
.particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-violet);
  border-radius: 50%;
  opacity: 0.4;
  animation: float-particle 15s infinite ease-in-out;
}

@keyframes float-particle {
  0%, 100% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-20vh) scale(1); opacity: 0; }
}

/* Mist effect */
.mist {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  background: linear-gradient(to top, rgba(106, 33, 168, 0.15), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Sigil animation */
@keyframes pulse-sigil {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.sigil-pulse {
  animation: pulse-sigil 3s infinite ease-in-out;
}

/* Sound pad styling */
.sound-pad {
  transition: all 0.15s ease;
  cursor: pointer;
}

.sound-pad:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px var(--glow-purple);
}

.sound-pad.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  box-shadow: 0 0 25px var(--accent-magenta);
}

.sound-pad.playing {
  animation: beat-pulse 0.15s ease-out;
}

@keyframes beat-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Sequencer beat animation */
@keyframes beat-glow {
  0% { box-shadow: 0 0 5px var(--accent-violet); }
  50% { box-shadow: 0 0 20px var(--accent-magenta), 0 0 40px var(--accent-purple); }
  100% { box-shadow: 0 0 5px var(--accent-violet); }
}

/* Button styling */
.mystic-btn {
  background: linear-gradient(135deg, var(--accent-purple), var(--bg-tertiary));
  border: 1px solid var(--accent-violet);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.mystic-btn:hover {
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-purple));
  box-shadow: 0 0 20px var(--glow-purple);
  transform: translateY(-2px);
}

.mystic-btn:active {
  transform: translateY(0);
}

/* Slider styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-tertiary);
  height: 8px;
  border-radius: 4px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent-violet);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px var(--glow-purple);
}

/* Gallery card */
.gallery-card {
  transition: all 0.3s ease;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.3);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-purple);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-violet);
}

/* Tab navigation for mobile */
.tab-btn {
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--accent-purple);
  box-shadow: 0 0 15px var(--glow-purple);
}

/* Pixel art frame */
.pixel-frame {
  border: 3px solid var(--accent-violet);
  box-shadow: 
    0 0 10px var(--glow-purple),
    inset 0 0 20px rgba(106, 33, 168, 0.3);
  image-rendering: pixelated;
}

/* Footer link styling */
.remix-link {
  color: var(--accent-violet);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.remix-link:hover {
  color: var(--accent-magenta);
  text-shadow: 0 0 10px var(--glow-purple);
}

.remix-link::before {
  content: '✦';
  margin-right: 0.5rem;
  animation: pulse-sigil 2s infinite;
}

.remix-link::after {
  content: '✦';
  margin-left: 0.5rem;
  animation: pulse-sigil 2s infinite 1s;
}

/* Waveform visualization */
.waveform-bar {
  background: linear-gradient(to top, var(--accent-purple), var(--accent-violet));
  animation: wave-dance 0.5s infinite alternate;
}

@keyframes wave-dance {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* Delete smoke animation */
@keyframes smoke-puff {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5) translateY(-20px); }
}

.smoke-puff {
  animation: smoke-puff 0.5s ease-out forwards;
}