body { font-family: Inter, sans-serif; }

.tool-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 3px 12px rgba(0,0,0,.04);
}

/* ── Mode buttons ── */
.mode-btn {
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.mode-btn.active {
  background: #fff;
  color: #065f46;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* ── Fret navigation ── */
.fret-nav-btn {
  width: 26px; height: 26px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}
.fret-nav-btn:hover { background: #fff; color: #065f46; border-color: #6ee7b7; }
.fret-display {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1f2937;
  min-width: 48px;
  text-align: center;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 3px 8px;
}

/* ── Bass instrument body ── */
.bass-body {
  display: flex;
  align-items: stretch;
  background: linear-gradient(160deg, #1a1208 0%, #0d0904 100%);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow:
    inset 0 2px 8px rgba(255,180,80,0.06),
    inset 0 -4px 20px rgba(0,0,0,0.5),
    0 6px 20px rgba(0,0,0,0.2);
  position: relative;
  min-height: 160px;
  user-select: none;
  margin: 0 -0.5rem;
}

/* ── Neck ── */
.bass-neck {
  flex: 1;
  position: relative;
  background: linear-gradient(90deg, #261608 0%, #3a2210 40%, #261608 100%);
  min-height: 160px;
  overflow: hidden;
  cursor: crosshair;
}

/* Fretboard wood grain overlay */
.bass-neck::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 18px,
    rgba(255,200,100,0.025) 18px,
    rgba(255,200,100,0.025) 19px
  );
  pointer-events: none;
}

/* ── Fret lines ── */
.fret-lines {
  position: absolute;
  top: 0; bottom: 0; left: 24px; right: 24px;
  pointer-events: none;
}
.fret-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #a08060 0%, #c0a070 50%, #a08060 100%);
  opacity: 0.65;
}
.fret-line.nut {
  width: 5px;
  background: linear-gradient(180deg, #e8d5b0 0%, #fff 50%, #e8d5b0 100%);
  opacity: 1;
}

/* ── Fret markers (dots) ── */
.fret-markers {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 24px; right: 24px;
  pointer-events: none;
  z-index: 1;
}
.fret-dot {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,220,150,0.25);
  transform: translate(-50%, -50%);
  top: 50%;
}

/* ── Bass strings ── */
.bass-strings {
  position: absolute;
  top: 0; bottom: 0; left: 24px; right: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 8px 0;
}
.bass-string-row {
  display: flex;
  align-items: center;
  position: relative;
  height: 100%;
  flex: 1;
  cursor: pointer;
}
.bass-string-line {
  position: absolute;
  left: -24px; right: -24px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.6), 0 -0.5px 1px rgba(255,255,255,0.15);
  transition: filter 0.05s;
}
.bass-string-row:hover .bass-string-line { filter: brightness(1.6); }
.bass-string-row.plucked .bass-string-line {
  filter: brightness(2.0);
  animation: stringVibrate 0.4s ease-out;
}
@keyframes stringVibrate {
  0%   { transform: translateY(-50%) scaleY(1); }
  10%  { transform: translateY(calc(-50% + 3px)) scaleY(1.5); }
  25%  { transform: translateY(calc(-50% - 2px)) scaleY(1.3); }
  40%  { transform: translateY(calc(-50% + 1px)) scaleY(1.1); }
  60%  { transform: translateY(-50%) scaleY(1); }
  100% { transform: translateY(-50%) scaleY(1); }
}

/* String thicknesses (G, D, A, E, B from thinnest to thickest) */
.str-0 .bass-string-line { height: 2px; background: linear-gradient(180deg, #d0d0d0, #b0b0b0); }
.str-1 .bass-string-line { height: 3px; background: linear-gradient(180deg, #c0a860, #907840); }
.str-2 .bass-string-line { height: 4px; background: linear-gradient(180deg, #b09050, #806830); }
.str-3 .bass-string-line { height: 5px; background: linear-gradient(180deg, #c8b080, #987040); }
.str-4 .bass-string-line { height: 6px; background: linear-gradient(180deg, #b8a070, #886030); }

/* ── Note labels along strings ── */
.note-labels {
  position: absolute;
  top: 0; bottom: 0; left: 24px; right: 24px;
  pointer-events: none;
  z-index: 3;
}
.note-label {
  position: absolute;
  font-size: 8.5px;
  font-weight: 700;
  color: rgba(255,220,120,0.7);
  transform: translate(-50%, -50%);
  pointer-events: none;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.note-label.root-note {
  color: rgba(110,231,183,0.9);
}

/* ── Hit flash indicator on fret ── */
.fret-hit-flash {
  position: absolute;
  top: 0; bottom: 0;
  pointer-events: none;
  background: rgba(255,200,80,0.15);
  border-radius: 2px;
  animation: fretFlash 0.3s ease-out forwards;
  z-index: 4;
}
@keyframes fretFlash {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ── Body section (pickup area) ── */
.bass-body-section {
  width: 60px;
  flex-shrink: 0;
  background: linear-gradient(160deg, #1a0f05 0%, #0d0800 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 6px;
  position: relative;
}
.bass-body-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(80,40,10,0.4) 0%, transparent 70%);
}

/* ── Pickups ── */
.pickup {
  width: 44px;
  height: 18px;
  border-radius: 4px;
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.7), inset 0 1px 2px rgba(255,255,255,0.05);
}
.pickup-neck {
  background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 1px solid #333;
}
.pickup-bridge {
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 1px solid #444;
}
/* Pickup pole pieces */
.pickup::before {
  content: '● ● ● ●';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5px;
  color: #555;
  letter-spacing: 3px;
  padding-top: 1px;
}

/* String open-note label (left side) */
.open-label {
  position: absolute;
  left: 6px;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,200,100,0.75);
  pointer-events: none;
  z-index: 5;
  text-shadow: 0 1px 3px rgba(0,0,0,1);
}

/* ── Fullscreen ── */
.tool-card.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  border-radius: 0 !important;
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100dvh !important;
  overflow-y: auto !important;
  margin: 0 !important;
  padding: 1.5rem !important;
  box-sizing: border-box !important;
}

tbody tr:nth-child(even) { background: #f9fafb; }

@media (max-width: 480px) {
  .bass-body-section { width: 44px; }
  .pickup { width: 32px; }
  .bass-body { margin: 0 -0.25rem; }
}
