/* styles.css — Beat Quantizer app surface (slime theme).
 * Tokens, fonts, and slime buttons come from theme.css. */

/* ---- App nav ------------------------------------------------------------- */
.app-nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(6,11,7,.85), rgba(6,11,7,.5));
  border-bottom: 1px solid var(--line-soft);
}
.app-nav-inner {
  max-width: 920px; margin: 0 auto; padding: 0 24px; height: 66px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--display); font-size: 19px; color: var(--text); letter-spacing: .5px;
}
.brand .blob { display: grid; place-items: center; }

/* ---- App shell ----------------------------------------------------------- */
.app { max-width: 920px; margin: 0 auto; padding: 40px 24px 90px; }

header h1 {
  font-size: clamp(32px, 5vw, 44px);
  margin: 16px 0 10px;
  text-shadow: 0 0 36px rgba(79,192,34,.12);
}
header h1 .drip, header .slime { color: var(--slime); }
header .sub { color: var(--muted); max-width: 640px; line-height: 1.6; margin: 0; font-size: 16px; }

.hidden { display: none !important; }

/* ---- Dropzone ------------------------------------------------------------ */
.dropzone {
  margin-top: 32px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 120% at 50% -20%, rgba(79,192,34,.06), transparent 60%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  padding: 60px 24px; text-align: center;
  transition: border-color .2s, box-shadow .2s, background .2s;
  cursor: pointer;
}
.dropzone:hover { border-color: var(--slime-deep); }
.dropzone.drag {
  border-color: var(--slime);
  box-shadow: 0 0 50px -14px var(--glow), 0 0 0 1px var(--slime) inset;
}
.drop-icon {
  color: var(--slime);
  margin-bottom: 12px;
  filter: drop-shadow(0 0 14px var(--glow));
  display: inline-flex;
}
.drop-inner p { margin: 6px 0; font-size: 16px; }
.drop-inner strong { color: var(--text); }
.hint { color: var(--faint); font-size: 13px; }

/* ---- Stage --------------------------------------------------------------- */
.stage { margin-top: 30px; }
.row.filename {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; color: var(--muted); font-size: 14px;
}
#fname { font-weight: 600; color: var(--text); word-break: break-all; }

.canvas-wrap {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  overflow: hidden;
  box-shadow: 0 0 60px -30px var(--glow);
}
#wave { width: 100%; display: block; }

.controls {
  display: flex; align-items: flex-end; gap: 26px; flex-wrap: wrap;
  margin-top: 20px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px;
}
.detected { display: flex; gap: 30px; }
.stat label, .target label {
  display: block; font-size: 12px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--faint); margin-bottom: 6px;
}
.big { font-family: var(--display); font-size: 30px; color: var(--text); }
#srcbpm { color: var(--slime); text-shadow: 0 0 22px var(--glow); }

.target { margin-left: auto; }
.bpm-input { display: flex; align-items: center; gap: 8px; }
.bpm-input input {
  width: 104px; font-family: var(--display); font-size: 24px; text-align: center;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 9px;
}
.bpm-input input:focus { outline: none; border-color: var(--slime); box-shadow: 0 0 0 3px var(--glow-soft); }
.bpm-input input::-webkit-outer-spin-button,
.bpm-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step {
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font-size: 22px; cursor: pointer; transition: border-color .15s, color .15s, box-shadow .15s;
}
.step:hover { border-color: var(--slime); color: var(--slime); box-shadow: 0 0 18px -6px var(--glow); }

/* small underline-style link button */
.link {
  background: none; border: none; color: var(--slime);
  cursor: pointer; font-size: inherit; padding: 0; text-decoration: underline;
  font-family: inherit;
}
.link:hover { color: var(--slime-bright); }

/* ---- Progress ------------------------------------------------------------ */
.progress { margin-top: 20px; display: flex; align-items: center; gap: 14px; }
.bar {
  flex: 1; height: 10px; background: var(--bg-2);
  border-radius: 999px; overflow: hidden; border: 1px solid var(--line-soft);
}
#bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--slime-deep), var(--slime-bright));
  box-shadow: 0 0 16px var(--glow);
  transition: width .15s;
}
#prog-label { color: var(--muted); font-size: 13px; min-width: 120px; }

/* ---- Players ------------------------------------------------------------- */
.players { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.player {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px;
}
.player h3 { margin: 0 0 12px; font-size: 16px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.player audio { width: 100%; }
.tag {
  font-family: var(--body); font-size: 12px; color: #07130a; font-weight: 700;
  background: linear-gradient(180deg, var(--slime-bright), var(--slime-deep));
  padding: 3px 10px; border-radius: 999px; box-shadow: 0 0 16px -4px var(--glow);
}
.player .btn { margin-top: 12px; }

/* download format row */
.dl-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.dl-row .btn { margin-top: 0; }
.dl-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--faint);
}
#dl-format {
  font-family: var(--body); font-size: 13px; font-weight: 600;
  color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 10px; cursor: pointer;
}
#dl-format:focus { outline: none; border-color: var(--slime); box-shadow: 0 0 0 3px var(--glow-soft); }

footer { margin-top: 42px; color: var(--muted); font-size: 13px; line-height: 1.6; }

@media (max-width: 680px) {
  .controls { flex-direction: column; align-items: stretch; }
  .target { margin-left: 0; }
  .players { grid-template-columns: 1fr; }
  .controls .btn-slime { width: 100%; justify-content: center; }
  .detected { justify-content: space-between; gap: 16px; }
}

@media (max-width: 480px) {
  .app-nav-inner { height: 58px; padding: 0 16px; }
  .app-nav .brand { font-size: 16px; gap: 8px; }
  .app-nav .brand svg { width: 24px; height: 24px; }
  .app-nav .btn-sm { padding: 8px 13px; font-size: 12px; }

  .app { padding: 26px 16px 64px; }
  header h1 { font-size: clamp(28px, 8.5vw, 44px); }
  header .sub { font-size: 15px; }

  .dropzone { padding: 42px 16px; margin-top: 24px; }
  .drop-inner p { font-size: 15px; }

  .row.filename { flex-wrap: wrap; gap: 10px; }
  .controls { padding: 16px; gap: 18px; }
  .big { font-size: 26px; }
  .bpm-input input { width: 90px; font-size: 21px; }
  .step { width: 44px; height: 44px; }

  #prog-label { min-width: 0; }
  .player { padding: 14px; }
  .player .btn { width: 100%; justify-content: center; }
}
