/* Layout */
#trance-app {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1rem;
}

/* Panels */
.panel {
    background: #f7f7f7;
    border: 1px solid #ddd;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
}

.panel h2 {
    margin-top: 0;
    font-size: 1.3rem;
}

/* Buttons */
button {
    padding: 0.5rem 1rem;
    border: none;
    background: #444;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #222;
}

/* Track list */
#track-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Track panel */
.track {
    background: #fff;
    border: 1px solid #ccc;
    padding: 0.8rem;
    border-radius: 4px;
}

.track-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}
.track-controls {
    display: flex;
    flex-wrap: wrap; /* mobile-friendly */
    gap: 0.75rem;
    align-items: center;
}

/* Each control block */
.track-controls .ctrl {
    display: flex;
    flex-direction: column;
    min-width: 70px; /* keeps layout tidy */
}
/* Make labels small and subtle */
.track-controls label {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-bottom: 0.2rem;
}

/* Sliders should be compact */
.track-controls input[type="range"] {
    width: 100%;
}

/* EQ dropdown compact */
.track-controls select {
    width: 100%;
}



/* Playback controls */
#tempo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#play-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}


#tempo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#play-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#countdown-display {
    font-weight: bold;
    min-width: 50px;
    text-align: right;
}

#tempo-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* mobile safe */
    gap: 1rem;
}

#tempo-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#tempo-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#countdown-display {
    font-weight: bold;
    min-width: 50px;
    text-align: right;
}

/* Ensure the playback container is a positioning context */
.playback-area, .playback-header {
  position: relative; /* required so the meta can be absolutely positioned inside */
}

/* Floating badge container */
#playback-meta {
  position: absolute;
  top: -18px;                 /* float above the controls */
  right: 8px;                 /* align to the right edge of the block */
  z-index: 50;                /* sit above buttons and other doodads */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.92); /* light translucent panel */
  color: #222;                /* darker text for contrast on light bg */
  font-size: 12px;
  box-shadow: 0 6px 18px rgba(20,20,20,0.08);
  user-select: none;
  pointer-events: auto;       /* allow links/buttons inside if needed */
}

/* Keep the internal structure for version + badge */
#playback-meta .version {
  color: #222;                /* darker version text */
  font-weight: 600;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

#playback-meta .license-badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-block;
}

/* Slightly darker / higher contrast variants for badges */
#playback-meta .license-free {
  background: rgba(0,0,0,0.06);
  color: #0b2b3b;
  border: 1px solid rgba(0,0,0,0.06);
}

#playback-meta .license-premium {
  background: linear-gradient(90deg,#ffb86b,#ff7a59);
  color: #1b0b00;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* Responsive: if the container is too small, move the meta inline above controls */
@media (max-width: 520px) {
  #playback-meta {
    position: static;
    display: flex;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.95);
    right: auto;
    top: auto;
  }
}
