/* ═══════════════════════════════════════════════════════════════
   CARNATIC BANSURI VISUALIZER — CSS  v3.0.0  (2026-05-17)
   Targets: #staff-visualizer  #keyboard-container
   Canvas IDs: #fv-part  #fv-breath  #fv-glow  #fv-main
   Badges: .fv-badge  (#fv-badge-inst / -note / -raaga / -reg)
   Controls: .fv-row  .fv-lbl  .fv-pill  .fv-sel
   ═══════════════════════════════════════════════════════════════ */

/* ── Custom properties ─────────────────────────────────────── */
:root {
  --fv-bamboo:     #d4a84a;
  --fv-bamboo-hi:  #f0d070;
  --fv-bamboo-sh:  #7a5010;
  --fv-breath:     #a8d8f8;
  --fv-breath-hi:  #dff0ff;
  --fv-amber:      #f0c840;
  --fv-amber-lo:   #a07820;
  --fv-cream:      #f5edd8;
  --fv-cream-dim:  #c8ac78;
  --fv-dark:       #0e0904;
  --fv-glow:       rgba(240, 200, 64, 0.18);
  --fv-bg-from:    #0a0703;
  --fv-bg-to:      #140e06;
  --fv-border:     rgba(210, 168, 72, 0.18);
}

/* ── Visualizer container ───────────────────────────────────── */
#staff-visualizer {
  position: relative;
  width: 100%;
  height: 300px;
  margin: 12px 0;
  border-radius: 20px;
  overflow: hidden;

  background:
    radial-gradient(ellipse 75% 60% at 18% 50%,  rgba(44, 26, 6, 0.80) 0%, transparent 68%),
    radial-gradient(ellipse 55% 70% at 82% 38%,  rgba(168, 216, 248, 0.04) 0%, transparent 72%),
    linear-gradient(155deg, var(--fv-bg-from) 0%, #181008 48%, var(--fv-bg-to) 100%);

  border: 1px solid var(--fv-border);
  box-shadow:
    inset 0 1px 0 rgba(240, 210, 100, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 10px 40px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(210, 168, 72, 0.08);

  transition: box-shadow 0.45s ease;
}

#staff-visualizer:hover {
  box-shadow:
    inset 0 1px 0 rgba(240, 210, 100, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 14px 50px rgba(0, 0, 0, 0.70),
    0 0 0 1px rgba(240, 200, 64, 0.22);
}

/* ── Canvas stack ───────────────────────────────────────────── */
#keyboard-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#fv-part,
#fv-breath,
#fv-glow,
#fv-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Stacking order and blend modes */
#fv-part   { z-index: 2;  opacity: 0.85; mix-blend-mode: screen;  }
#fv-breath { z-index: 4;  opacity: 0.90; mix-blend-mode: screen;  }
#fv-glow   { z-index: 7;  opacity: 0.75; mix-blend-mode: screen;  }
#fv-main   { z-index: 10; }

/* ── Badges ─────────────────────────────────────────────────── */
.fv-badge {
  position: absolute;
  z-index: 20;
  padding: 4px 13px;
  border-radius: 22px;
  border: 1px solid rgba(210, 168, 72, 0.22);
  background: rgba(8, 5, 1, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.6px;
  color: var(--fv-cream-dim);
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

/* Instrument badge — top left */
#fv-badge-inst {
  top: 11px;
  left: 14px;
  color: var(--fv-amber);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 1.0px;
  text-transform: uppercase;
  border-color: rgba(240, 200, 64, 0.32);
}

/* Active note badge — top right */
#fv-badge-note {
  top: 11px;
  right: 14px;
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fv-bamboo-hi);
  letter-spacing: 0.3px;
  min-width: 28px;
  text-align: center;
}

/* Raaga name badge — bottom left */
#fv-badge-raaga {
  bottom: 30px;
  left: 14px;
  font-size: 0.58rem;
  letter-spacing: 0.7px;
  color: var(--fv-cream-dim);
  border-color: rgba(210, 168, 72, 0.16);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Octave register badge — bottom right */
#fv-badge-reg {
  bottom: 30px;
  right: 14px;
  font-size: 0.56rem;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--fv-breath);
  border-color: rgba(168, 216, 248, 0.22);
  transition: opacity 0.28s ease;
}

/* ── CONTROLS ──────────────────────────────────────────────── */
.fv-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 18px 3px;

  /* Subtle divider */
  border-top: 1px solid rgba(210, 168, 72, 0.07);
}

/* Remove border from first row */
.fv-row:first-of-type { border-top: none; }

/* Label text */
.fv-lbl {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgb(187 148 64);
  text-transform: uppercase;
  letter-spacing: 1.3px;
  white-space: nowrap;
  user-select: none;
}

/* Pill buttons & selects — shared base */
.fv-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border: 1px solid rgba(210, 168, 72, 0.22);
  border-radius: 22px;
  background: rgba(10, 6, 1, 0.90);
  color: rgb(247 231 197 / 70%);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color 0.16s ease,
    color        0.16s ease,
    background   0.16s ease,
    box-shadow   0.16s ease;
}

.fv-pill:hover {
  border-color: var(--fv-amber);
  color: var(--fv-bamboo-hi);
  background: rgba(240, 200, 64, 0.08);
  box-shadow: 0 0 9px rgba(240, 200, 64, 0.16);
}

.fv-pill.active {
  background: linear-gradient(135deg, var(--fv-bamboo) 0%, var(--fv-bamboo-sh) 100%);
  color: #0e0a02;
  border-color: var(--fv-bamboo);
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(212, 168, 72, 0.38);
}

/* Select overrides */
.fv-sel {
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(210,168,72,0.55)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 8px;
  max-width: 210px;
}

.fv-sel option,
.fv-sel optgroup {
  background: #100a02;
  color: #c8ac78;
  font-size: 0.68rem;
}

.fv-sel optgroup {
  color: rgba(210, 168, 72, 0.50);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  #staff-visualizer {
    height: 230px;
    border-radius: 14px;
  }
  #fv-badge-inst  { display: none; }
  #fv-badge-note  { font-size: 0.78rem; }
  #fv-badge-raaga { display: none; }
  #fv-badge-reg   { font-size: 0.50rem; }
  .fv-row         { padding: 6px 12px 2px; gap: 5px; }
  .fv-pill        { font-size: 0.56rem; padding: 3px 8px; }
  .fv-lbl         { font-size: 0.54rem; }
  .fv-sel         { max-width: 150px; }
}

@media (max-width: 480px) {
  #staff-visualizer { height: 188px; }
  .fv-row           { padding: 5px 8px 2px; gap: 4px; }
  .fv-pill          { font-size: 0.52rem; padding: 2px 6px; }
  .fv-sel           { max-width: 120px; }
}

/* ── Scrollbar hiding on control rows ───────────────────────── */
.fv-row::-webkit-scrollbar { display: none; }
.fv-row { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Transition helpers (for badge opacity changes) ─────────── */
.fv-badge.hidden { opacity: 0; pointer-events: none; }
.fv-badge.visible { opacity: 1; }


