/* ===== RELAXATION RADIO ===== */

.radio-main {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #04040d;
}

#radioCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.3;
}

/* ---- Off screen ---- */
.radio-off {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}

.radio-logo { font-size: 3.5rem; }

.radio-off h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
}

.radio-off p { color: var(--muted); max-width: 340px; }

.radio-big-play { font-size: 1.1rem; padding: 0.9rem 2.5rem; margin-top: 0.5rem; }

/* ---- Player ---- */
.radio-player {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: rgba(17,17,34,0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin: 1rem;
}

/* ---- Now playing ---- */
.radio-now-playing {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.radio-track-icon { font-size: 2.4rem; flex-shrink: 0; }

.radio-track-info { flex: 1; }

.radio-track-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

.radio-track-sub  { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }

/* ---- Level bars ---- */
.radio-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.radio-bars span {
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
  animation: radioBar 0.7s ease-in-out infinite alternate;
}

.radio-bars.stopped span { animation: none; height: 3px !important; }

.radio-bars span:nth-child(1) { animation-delay: 0s;    animation-duration: 0.7s;  }
.radio-bars span:nth-child(2) { animation-delay: 0.1s;  animation-duration: 0.9s;  }
.radio-bars span:nth-child(3) { animation-delay: 0.05s; animation-duration: 0.65s; }
.radio-bars span:nth-child(4) { animation-delay: 0.2s;  animation-duration: 0.85s; }
.radio-bars span:nth-child(5) { animation-delay: 0.15s; animation-duration: 0.75s; }

@keyframes radioBar {
  from { height: 3px;  }
  to   { height: 18px; }
}

/* ---- Progress ---- */
.radio-progress {
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.radio-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 1s linear;
}

.radio-time { font-size: 0.75rem; color: var(--muted); text-align: right; margin-top: -0.5rem; }

/* ---- Controls ---- */
.radio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.radio-ctrl-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.3rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.radio-ctrl-btn:hover { border-color: var(--accent); background: rgba(139,124,248,0.1); transform: scale(1.08); }
.radio-ctrl-main { width: 60px; height: 60px; font-size: 1.5rem; border-color: rgba(139,124,248,0.5); }
.radio-ctrl-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/* ---- Volume ---- */
.radio-vol-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.radio-vol-icon { font-size: 0.9rem; }
.radio-vol { flex: 1; accent-color: var(--accent); cursor: pointer; }

/* ---- Playlist ---- */
.radio-playlist {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.radio-pl-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.88rem;
}

.radio-pl-item:hover { background: var(--surface2); }
.radio-pl-item.current { background: rgba(139,124,248,0.1); color: var(--accent); }

.radio-pl-item-icon { font-size: 1.1rem; flex-shrink: 0; }
.radio-pl-item-name { flex: 1; }
.radio-pl-item-dur  { font-size: 0.74rem; color: var(--muted); }

/* ---- My Playlist builder ---- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.radio-mypl {
  width: 100%;
  max-width: 460px;
  margin: 1.5rem auto 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
}

.radio-mypl-title { font-family: var(--font-serif); font-size: 1.15rem; margin-bottom: 0.4rem; }
.radio-mypl-hint  { font-size: 0.78rem; color: var(--muted); line-height: 1.5; margin-bottom: 1rem; }

.radio-mypl-add { display: flex; gap: 0.6rem; margin-bottom: 1rem; }

.radio-mypl-select {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  outline: none;
}
.radio-mypl-select:focus { border-color: var(--accent); }

.radio-mypl-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; counter-reset: pl; }

.radio-mypl-empty { font-size: 0.8rem; color: var(--muted); text-align: center; padding: 0.5rem 0; }

.radio-mypl-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.7rem;
  counter-increment: pl;
}
.radio-mypl-item::before {
  content: counter(pl);
  font-size: 0.72rem;
  color: var(--muted);
  width: 1.1rem;
  flex-shrink: 0;
}
.radio-mypl-item-name { flex: 1; font-size: 0.85rem; }
.radio-mypl-item-ctrls { display: flex; gap: 0.25rem; flex-shrink: 0; }

.radio-mypl-mini {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: border-color 0.2s, opacity 0.2s;
}
.radio-mypl-mini:hover { border-color: var(--accent); }
.radio-mypl-mini:disabled { opacity: 0.35; cursor: default; }
.radio-mypl-del { color: var(--muted); }
.radio-mypl-del:hover { color: var(--text); border-color: var(--border); }

.radio-mypl-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.radio-mypl-actions .btn:disabled { opacity: 0.45; cursor: default; }
