/* drum-ui.css — stile condiviso dalla pagina pubblica e da quella riservata.
   Palette coerente col resto del sito (fondo scuro, arancio #ff9800), con i
   colori delle 12 voci ripresi TALI E QUALI dall'applicazione: chi conosce
   NOVA Synth Studio ritrova la stessa griglia. */

:root {
  --bg:      #121212;
  --surface: #1e1e1e;
  --raised:  #262626;
  --primary: #ff9800;
  --text:    #ffffff;
  --muted:   #aaaaaa;
  --line:    #333333;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

/* ── Intestazione ───────────────────────────────────────────────────────── */
.nd-header {
  text-align: center;
  padding: 28px 18px 10px;
  background: radial-gradient(ellipse at top, #2a1c10 0%, var(--bg) 62%);
  border-bottom: 1px solid var(--line);
}
.nd-header img { width: 104px; height: auto; margin-bottom: 10px; }
.nd-header h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.5px;
}
.nd-header h1 b { color: var(--primary); }
.nd-header p { margin: 0 auto; max-width: 760px; color: var(--muted); line-height: 1.6; }

.nd-nav {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; padding: 16px;
}
.nd-nav a {
  color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); border-radius: 20px;
  padding: 7px 15px; font-size: 14px; transition: .15s;
}
.nd-nav a:hover { color: var(--primary); border-color: var(--primary); }

.nd-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px 60px; }

/* ── Barra in alto: pattern corrente + trasporto ─────────────────────────── */
.nd-top {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center;
  justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px; margin: 18px 0;
}
.nd-now { min-width: 240px; flex: 1; }
.nd-now h2 { margin: 0 0 4px; font-size: 20px; color: var(--primary); }
.nd-now p  { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.nd-transport { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nd-bpmwrap { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.nd-bpmwrap b { color: var(--text); }
.nd-bpmwrap input { width: 150px; accent-color: var(--primary); }
.nd-meter {
  font-family: 'Courier New', monospace; font-weight: 700;
  color: var(--primary); background: #0d0d0d;
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 11px; font-size: 13px;
}

.nd-btn {
  background: var(--raised); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 15px; font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: .15s;
}
.nd-btn:hover { border-color: var(--primary); color: var(--primary); }
.nd-btn.big { font-size: 16px; font-weight: 700; padding: 12px 24px; min-width: 118px; }
.nd-btn.on  { background: var(--primary); color: #121212; border-color: var(--primary); }
.nd-btn:disabled { opacity: .55; cursor: wait; }
.nd-btn.dl { text-decoration: none; display: inline-block; }

/* ── I 12 pad ────────────────────────────────────────────────────────────── */
.nd-pads {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 9px; margin-bottom: 18px;
}
.nd-pad {
  position: relative; aspect-ratio: 1.45;
  background: color-mix(in srgb, var(--c) 20%, #191919);
  border: 2px solid var(--c); border-radius: 11px;
  color: var(--text); font-family: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; transition: transform .06s, box-shadow .06s, background .06s;
  touch-action: manipulation; user-select: none;
}
.nd-pad:hover { background: color-mix(in srgb, var(--c) 34%, #191919); }
.nd-pad.lit {
  background: var(--c); transform: scale(.95);
  box-shadow: 0 0 22px var(--c), 0 0 44px color-mix(in srgb, var(--c) 55%, transparent);
}
.nd-pad-n { font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.nd-pad-k { font-size: 10px; color: var(--muted); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }
.nd-pad.lit .nd-pad-k, .nd-pad.lit .nd-pad-n { color: #121212; }

/* ── Corpo: griglia + colonna laterale ───────────────────────────────────── */
.nd-main { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }

.nd-gridwrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; overflow-x: auto;
}
.nd-grid { display: flex; flex-direction: column; gap: 4px; min-width: 440px; }
.nd-row  { display: flex; align-items: center; gap: 8px; }
.nd-name {
  width: 62px; flex-shrink: 0; text-align: left;
  background: none; border: 0; padding: 0;
  font-family: inherit; font-size: 11px; font-weight: 700;
  letter-spacing: .03em; cursor: pointer;
}
.nd-name:hover { text-decoration: underline; }
.nd-cells { display: flex; flex: 1; gap: 2px; }

.nd-cell {
  flex: 1; height: 24px; min-width: 9px;
  background: #2b2b2b; border: 1px solid #3a3a3a; border-radius: 3px;
  padding: 0; cursor: pointer; transition: background .05s, box-shadow .05s;
}
.nd-cell.beat { border-left: 2px solid #5a4a30; }
.nd-cell.v1 { background: color-mix(in srgb, var(--c) 45%, #2b2b2b); border-color: var(--c); }
.nd-cell.v2 { background: var(--c); border-color: var(--c); box-shadow: 0 0 8px var(--c); }
.nd-cell.cur { outline: 2px solid #26c6da; outline-offset: -2px; }

.nd-gridfoot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; font-size: 12px; color: var(--muted);
}

.nd-side { display: flex; flex-direction: column; gap: 12px; }
.nd-field { display: flex; flex-direction: column; gap: 5px; }
.nd-field label { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.nd-field select, .nd-field input[type="search"] {
  width: 100%; padding: 9px 10px;
  background: var(--raised); color: var(--text);
  border: 1px solid var(--line); border-radius: 7px;
  font-family: inherit; font-size: 14px;
}
.nd-kitdesc { margin: 2px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.nd-count { font-size: 11px; color: var(--muted); }

.nd-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 460px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 9px; padding: 6px;
  background: #171717;
}
.nd-item {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  background: none; border: 1px solid transparent; border-radius: 6px;
  padding: 7px 9px; color: var(--text); font-family: inherit; cursor: pointer;
}
.nd-item:hover { background: var(--raised); }
.nd-item.sel  { background: color-mix(in srgb, var(--primary) 18%, transparent); border-color: var(--primary); }
.nd-item-n { font-size: 13px; font-weight: 500; }
.nd-item-m { font-size: 11px; color: var(--muted); }

.nd-dlbar {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
}

/* ── Sezioni informative ─────────────────────────────────────────────────── */
.nd-info { margin-top: 34px; }
.nd-info h2 { color: var(--primary); font-size: 22px; margin: 0 0 12px; }
.nd-info h3 { font-size: 17px; margin: 22px 0 7px; }
.nd-info p, .nd-info li { color: var(--muted); line-height: 1.7; }
.nd-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 14px; margin-top: 14px; }
.nd-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 15px 17px;
}
.nd-card h4 { margin: 0 0 7px; font-size: 15px; color: var(--primary); }
.nd-card p  { margin: 0; font-size: 13px; }

.nd-note {
  background: #1a1408; border: 1px solid #4a3a10; border-left: 3px solid var(--primary);
  border-radius: 8px; padding: 13px 16px; margin: 18px 0;
  font-size: 14px; color: #e8d9bd; line-height: 1.65;
}

.nd-foot {
  text-align: center; padding: 26px 16px; margin-top: 34px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.nd-foot a { color: var(--primary); text-decoration: none; }

/* ── Schermo piccolo ─────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .nd-main { grid-template-columns: 1fr; }
  .nd-pads { grid-template-columns: repeat(4, 1fr); }
  .nd-list { max-height: 300px; }
}
@media (max-width: 520px) {
  .nd-pads { grid-template-columns: repeat(3, 1fr); }
  .nd-pad-k { display: none; }
  .nd-top { flex-direction: column; align-items: stretch; }
}
