:root {
  --bg: #121418;
  --panel: #1c2028;
  --line: #2c3340;
  --text: #e8edf4;
  --muted: #8b97a8;
  --accent: #ff7a3d;
  --strong: #ffd166;
  --weak: #4d7cff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(1200px 500px at 20% -10%, #2a1c14 0%, var(--bg) 55%);
  color: var(--text);
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: 0.02em; }
.sub { margin: 0; color: var(--muted); }

.file-btn {
  background: var(--accent);
  color: #1a0f08;
  font-weight: 700;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
}

.file-btn input { display: none; }

.drop {
  margin-top: 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 18px 16px;
}

.drop.over { border-color: var(--accent); }
.meta { color: var(--muted); margin: 6px 0 0; font-size: 13px; }

.wave-wrap {
  position: relative;
  margin-top: 16px;
  height: 160px;
  background: #0d1016;
  border-radius: 12px;
  overflow: hidden;
}

.wave-label {
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9d4e3;
  background: rgba(13, 16, 22, 0.65);
  padding: 3px 8px;
  border-radius: 6px;
  pointer-events: none;
}

.wave-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.slices {
  display: flex;
  gap: 3px;
  margin-top: 10px;
  min-height: 28px;
}

.slice {
  height: 28px;
  border-radius: 4px;
  min-width: 4px;
  opacity: 0.9;
}
.slice.strong { background: var(--strong); }
.slice.weak { background: var(--weak); }
.slice.active { outline: 2px solid #fff; }

.controls, .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  align-items: center;
}

.controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #2a3140;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

button:disabled { opacity: 0.4; cursor: default; }
button.primary { background: var(--accent); color: #1a0f08; }

.status { margin-top: 16px; color: var(--muted); }
