:root {
  --bg: #080815;
  --card: rgba(255,255,255,0.08);
  --card2: rgba(255,255,255,0.12);
  --text: #ffffff;
  --muted: rgba(255,255,255,0.68);
  --line: rgba(255,255,255,0.16);
  --hot: #ff3df2;
  --cyan: #29e7ff;
  --green: #77ff92;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: linear-gradient(135deg, #12001f, #001b33, #200018, #002b22);
  background-size: 400% 400%;
  animation: beatseedGradientMove 12s ease infinite;
}

@keyframes beatseedGradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

button,
input {
  font: inherit;
}

.app {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 28px 16px 36px;
}

.hero {
  text-align: center;
  padding: 20px 0 18px;
}

.eyebrow,
.label,
.hint {
  color: var(--muted);
  margin: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}

h1 {
  font-size: clamp(3rem, 16vw, 5.5rem);
  margin: 8px 0 0;
  line-height: 0.88;
  letter-spacing: -0.08em;
  text-shadow: 0 0 24px rgba(255,61,242,0.35);
}

h2 {
  margin: 2px 0 0;
  font-size: 1.35rem;
}

.tagline {
  color: var(--muted);
  margin: 14px auto 0;
  max-width: 420px;
  font-size: 1.05rem;
}

.player-card,
.library-card,
.share-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 26px;
  padding: 18px;
  margin-top: 14px;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
}

.beat-title-row {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 4px;
  min-height: 48px;
}

#beatName {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 2rem;
  line-height: 1.1;
}

.section-title-row,
.share-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.transport {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 13px 16px;
  color: var(--text);
  background: linear-gradient(135deg, var(--hot), var(--cyan));
  font-weight: 800;
  cursor: pointer;
}

button.secondary {
  background: var(--card2);
  border: 1px solid var(--line);
}

button.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

button.big {
  font-size: 1.15rem;
  padding: 16px;
}

#renameBeatButton,
#saveBeatButton {
  width: 96px;
}

#renameBeatButton {
  margin-bottom: 12px;
}

.active-loops {
  display: grid;
  gap: 8px;
}

.active-loop,
.loop-button {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(0,0,0,0.18);
}

.active-loop {
  animation: beatseedActivePulse 1.4s ease-in-out infinite;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

@keyframes beatseedActivePulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.12);
  }

  50% {
    transform: scale(1.015);
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.28);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.12);
  }
}

.loop-library {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.loop-button {
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,0.08);
}

.loop-button[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
}

.loop-button.selected {
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.25);
  transform: scale(1.02);
}

.loop-meta,
.pill {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
}

.share-row {
  margin-top: 8px;
}

input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 14px;
}

.hint {
  margin-top: 10px;
  font-size: 0.92rem;
}

.empty {
  color: var(--muted);
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  text-align: center;
}

.eq-visualizer {
  width: 100%;
  max-width: 100%;
  height: 96px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  margin: 10px 0 22px 0;
  padding: 14px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.eq-bar {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.42);
  transition: height 0.08s linear, opacity 0.08s linear;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-left: 0;
  justify-content: space-between;
}

.volume-slider {
  width: 110px;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.volume-readout {
  min-width: 42px;
  font-size: 12px;
  opacity: 0.75;
}

.volume-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

.volume-slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.volume-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

.remove-loop-button {
  width: 100%;
  margin-left: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
  font-size: 12px;
}

.remove-loop-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.edit-chop-button {
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.22);
}

.chop-editor {
  margin-top: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.22);
}

.chop-editor.hidden {
  display: none;
}

.chop-header,
.chop-grid-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chop-grid-buttons button.selected,
.chop-slot.selected {
  outline: 2px solid white;
}

.chop-lane-wrap {
  margin: 14px 0;
  position: relative;
}

.chop-lane {
  display: grid;
  gap: 4px;
}

.chop-slot,
.chop-source-slice {
  min-width: 0;
  padding: 12px 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
}

.chop-source-slice {
  background: rgba(41,231,255,0.16);
}

.chop-playhead {
  position: absolute;
  top: 24px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 14px rgba(119, 255, 146, 0.7);
  pointer-events: none;
  transition: left 0.06s linear, width 0.06s linear;
  z-index: 5;
}

.chop-waveform {
  width: 100%;
  height: 56px;
  display: block;
  margin: 8px 0 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.chop-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.chop-actions button {
  width: 100%;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}

.reverse-chop-button {
  background: rgba(119, 255, 146, 0.16);
  border: 1px solid rgba(119, 255, 146, 0.45);
}

.saved-beat-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.saved-beat-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.18);
}

.saved-beat-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (min-width: 700px) {
  .active-loop {
    grid-template-columns: 1fr auto auto;
  }

  .volume-control {
    width: auto;
    margin-left: auto;
  }

  .remove-loop-button {
    width: auto;
    margin-left: 12px;
  }

  .edit-chop-button {
    width: auto;
  }
}

.beat-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 12px auto 18px;
  max-width: 420px;
}

#renameBeatButton,
#saveBeatButton,
#newBeatButton {
  position: static;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#newBeatButton {
  background: var(--card2);
  border: 1px solid var(--line);
}

.chop-slot.silent {
  background: rgba(255, 61, 242, 0.20);
  border: 1px solid rgba(255, 61, 242, 0.45);
}

.mute-chop-button {
  background: rgba(255, 61, 242, 0.16);
  border: 1px solid rgba(255, 61, 242, 0.45);
}

.site-footer {
  margin-top: 14px;
}

.footer-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 26px;
  padding: 24px;
  text-align: center;
  backdrop-filter: blur(18px);
}

.footer-text {
  color: var(--muted);
  margin: 12px 0 18px 0;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: white;
  text-decoration: none;
  font-weight: 700;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-links span {
  color: var(--muted);
}

.footer-card h3 {
  margin: 0 0 16px 0;
}