/* ============================================================
   components.css — individual UI pieces
   ============================================================ */

/* ---- Brand ---- */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand__logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 30px rgba(124, 92, 255, 0.45);
}

.brand__logo::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, rgba(255, 255, 255, 0.2));
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.7);
}

.brand__name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand__tag {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 2px;
}

.badge {
  font-size: 11px;
  color: var(--accent-2);
  border: 1px solid rgba(34, 211, 238, 0.3);
  padding: 3px 9px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ---- Visualizer ---- */
.visualizer {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 26px;
}

.visualizer i {
  width: 4px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(var(--accent-2), var(--accent));
  transition: height 0.08s;
}

/* ---- Camera stage ---- */
.stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 10;
}

.stage__video,
.stage__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* mirror for natural interaction */
}

.stage__video {
  opacity: 0.75;
  filter: saturate(1);
}

.stage__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  background: rgba(5, 6, 10, 0.6);
  backdrop-filter: blur(4px);
  transition: opacity 0.4s;
  z-index: 3;
}

.stage__overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.stage__overlay p {
  color: var(--text-dim);
  margin-top: 14px;
  font-size: 13.5px;
  max-width: 360px;
  line-height: 1.5;
}

.stage__overlay p.error {
  color: #fca5a5;
}

/* ---- Primary button ---- */
.btn-primary {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  padding: 15px 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 0 12px 34px rgba(124, 92, 255, 0.5);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(124, 92, 255, 0.65);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ---- Live readout chips ---- */
.readout {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 4;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  background: rgba(5, 6, 10, 0.55);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 12px;
  backdrop-filter: blur(6px);
  min-width: 64px;
}

.chip small {
  display: block;
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.chip b {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-top: 1px;
}

.chip--accent b {
  color: var(--accent-2);
}

/* ---- Now playing ---- */
.now-playing {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  text-align: right;
  background: rgba(5, 6, 10, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 10px 16px;
  backdrop-filter: blur(6px);
}

.now-playing__chord {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.now-playing__sub {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

/* ---- Control rows ---- */
.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.control-row label {
  font-size: 13px;
  color: var(--text);
}

.control-row__value {
  font-size: 12px;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.divider {
  height: 1px;
  background: var(--glass-border);
  margin: 16px 0;
}

/* ---- Segmented control ---- */
.segmented {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 5px;
  border-radius: 14px;
}

.segmented--compact {
  width: 160px;
}

.segmented button {
  flex: 1;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  padding: 9px 10px;
  border-radius: 10px;
  transition: 0.2s;
}

.segmented button.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.4);
}

/* ---- Range sliders ---- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 150px;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 2px 10px rgba(34, 211, 238, 0.5);
}

/* ---- Note picker ---- */
.note-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.note-picker button {
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 0;
  border-radius: 10px;
  transition: 0.15s;
}

.note-picker button.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  border-color: transparent;
}

/* ---- Guide ---- */
.guide__hand h3 {
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide__hand ul {
  list-style: none;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.7;
}

.guide__hand li b {
  color: var(--text);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot--pink {
  background: var(--accent-3);
}

.dot--cyan {
  background: var(--accent-2);
}
