@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #040712;
  --surface: rgba(10, 13, 26, 0.76);
  --card: rgba(14, 18, 36, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --glow: #7cc9ff;
  --glow-2: #c15cff;
  --text: #eaf1ff;
  --muted: #9fb4e9;
  --grid: rgba(255, 255, 255, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  padding: 24px;
  isolation: isolate;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background: radial-gradient(circle at 20% 20%, rgba(111, 124, 255, 0.24), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(193, 92, 255, 0.22), transparent 38%),
    radial-gradient(circle at 20% 80%, rgba(124, 201, 255, 0.2), transparent 40%),
    radial-gradient(circle at 90% 60%, rgba(255, 110, 182, 0.18), transparent 40%);
  filter: blur(30px) saturate(1.1);
  animation: drift 24s ease-in-out infinite alternate;
}

body::after {
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05), transparent 55%);
}

@keyframes drift {
  0% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.02);
  }
  100% {
    transform: translateY(12px) scale(1.03);
  }
}

.cosmic-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 140px 140px;
  opacity: 0.32;
  mask-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0%, transparent 70%);
  animation: grid-pan 18s linear infinite;
  z-index: 1;
}

@keyframes grid-pan {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 140px 0, 0 140px;
  }
}

.parallax {
  position: fixed;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 1;
}

.parallax--aurora {
  background: radial-gradient(circle at 20% 40%, rgba(124, 201, 255, 0.2), transparent 30%),
    radial-gradient(circle at 70% 60%, rgba(193, 92, 255, 0.28), transparent 32%);
  filter: blur(35px) saturate(1.4);
  animation: aurora-flow 16s ease-in-out infinite;
}

.parallax--rings {
  background: conic-gradient(from 45deg, rgba(124, 201, 255, 0.05), transparent 20%, rgba(193, 92, 255, 0.08), transparent 60%);
  opacity: 0.65;
  animation: ring-spin 30s linear infinite;
}

@keyframes aurora-flow {
  0% {
    transform: translate3d(-12px, -8px, 0) scale(1.02);
  }
  50% {
    transform: translate3d(6px, 12px, 0) scale(1.05);
  }
  100% {
    transform: translate3d(-8px, 4px, 0) scale(1.03);
  }
}

@keyframes ring-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.stars {
  position: fixed;
  inset: 0;
  background-repeat: repeat;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

.stars::before,
.stars::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.7) 50%, transparent 60%),
    radial-gradient(1px 1px at 40% 70%, rgba(124, 201, 255, 0.7) 50%, transparent 60%),
    radial-gradient(1px 1px at 80% 40%, rgba(193, 92, 255, 0.7) 50%, transparent 60%),
    radial-gradient(1px 1px at 65% 15%, rgba(255, 255, 255, 0.6) 50%, transparent 60%);
}

.stars--near {
  animation: starfall 40s linear infinite;
}

.stars--far {
  opacity: 0.35;
  animation: starfall 80s linear infinite reverse;
}

@keyframes starfall {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(120px);
  }
}

.hero {
  position: relative;
  z-index: 2;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: radial-gradient(circle at 30% 20%, rgba(124, 201, 255, 0.08), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(193, 92, 255, 0.12), transparent 40%),
    var(--surface);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  max-width: 1200px;
  margin: 0 auto 32px;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  box-shadow: 0 0 50px rgba(124, 201, 255, 0.2), inset 0 0 30px rgba(193, 92, 255, 0.12);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(120deg, #6f8fff, #a55bff, #ff6eb6);
  border-radius: 999px;
  color: #040515;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(165, 91, 255, 0.45);
  position: relative;
  z-index: 2;
}

.hero__text {
  margin-top: 18px;
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #96b1ff;
  font-size: 13px;
}

h1 {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f6fbff;
}

.lede {
  color: #cfd9f8;
  max-width: 780px;
  font-size: 18px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7cc9ff, #6f7cff 40%, #c15cff);
  color: #040515;
  font-weight: 700;
  text-decoration: none;
  border: none;
  box-shadow: 0 14px 30px rgba(111, 124, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(193, 92, 255, 0.3);
  filter: drop-shadow(0 0 10px rgba(124, 201, 255, 0.45));
}

.control {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.control__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93a5ff;
}

.control__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ghost {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #f6fbff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero__panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.hero__panel > div {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.panel__title {
  font-weight: 700;
  margin-bottom: 4px;
  color: #f6fbff;
}

.panel__body {
  color: var(--muted);
  font-size: 14px;
}

.soundboard {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto 48px;
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent), var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.soundboard__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
}

.label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #86b7ff;
  font-size: 13px;
}

.hint {
  color: #9fb4e9;
  font-size: 14px;
  opacity: 0.85;
}

.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cfd9f8;
  font-size: 13px;
  flex-wrap: wrap;
}

.legend__dot {
  display: inline-flex;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin-right: 6px;
  position: relative;
  box-shadow: 0 0 12px rgba(124, 201, 255, 0.35);
}

.legend__dot--delay {
  background: linear-gradient(135deg, #7cc9ff, #4d8dff);
}

.legend__dot--echo {
  background: linear-gradient(135deg, #c15cff, #ff6eb6);
}

.soundboard-container {
  position: relative;
}

.flex-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.sound {
  position: relative;
  padding: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)), var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.sound:hover,
.sound:focus-within {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.sound__aura {
  position: absolute;
  inset: -20% -10%;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 45%, transparent 55%), transparent 55%),
    radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--accent) 35%, transparent 65%), transparent 65%);
  filter: blur(35px) saturate(1.2);
  opacity: 0.35;
  z-index: 0;
}

.sound__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.sound__trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  color: #f6fbff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.sound__trigger::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 30%, rgba(255, 255, 255, 0.12));
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(-10%);
}

.sound__trigger:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.4);
}

.sound__trigger:hover::after {
  opacity: 1;
  transform: translateX(0%);
}

.sound__trigger-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.12), transparent 50%),
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #ffffff 20%));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 40%, #ffffff 10%);
  position: relative;
}

.sound__trigger-icon::after {
  content: '';
  position: absolute;
  inset: 7px;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 4L20 12L6 20V4Z' fill='white'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
  opacity: 0.9;
}

.sound__trigger-text {
  white-space: nowrap;
}

.sound__meta {
  text-align: right;
}

.name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f6fbff;
}

.tag {
  color: #cfd9f8;
  font-size: 13px;
}

.sound__controls {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
  grid-template-columns: 1fr;
}

.delay {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.delay__label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: #9fb4e9;
}

.delay__slider {
  width: 100%;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7cc9ff, #c15cff);
  outline: none;
}

.delay__slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #7cc9ff;
  box-shadow: 0 0 12px rgba(124, 201, 255, 0.7);
}

.delay__slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #7cc9ff;
  box-shadow: 0 0 12px rgba(124, 201, 255, 0.7);
}

.delay__value {
  font-weight: 700;
  color: #f6fbff;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  color: #f6fbff;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.chip--glow {
  background: linear-gradient(135deg, rgba(124, 201, 255, 0.3), rgba(193, 92, 255, 0.3));
  box-shadow: 0 12px 24px rgba(111, 124, 255, 0.3);
}

.chip--ghost {
  background: rgba(255, 255, 255, 0.05);
}

.chip--flare {
  background: linear-gradient(135deg, rgba(193, 92, 255, 0.3), rgba(255, 110, 182, 0.3));
  box-shadow: 0 12px 22px rgba(193, 92, 255, 0.28);
}

.chip.is-armed {
  border-color: rgba(124, 201, 255, 0.8);
  box-shadow: 0 0 20px rgba(124, 201, 255, 0.45);
}

#footer,
.footer {
  text-align: center;
  color: #a8b7e8;
  font-size: 14px;
  padding: 22px 0 8px;
  position: relative;
  z-index: 1;
  margin: 0;
}

@media only screen and (max-width: 900px) {
  body {
    padding: 18px;
  }

  .hero,
  .soundboard {
    padding: 20px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .control {
    width: 100%;
    justify-content: space-between;
  }

  .sound__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .sound__meta {
    width: 100%;
    text-align: left;
  }

  .legend {
    justify-content: flex-start;
  }
}
