/* BestMom Motivation Audio — Frontend v6 */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;0,700;1,600;1,700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

#bma-app {
  --p:       #6B4EFF;
  --p-d:     #5539E0;
  --p-l:     #EDE9FF;
  --p-g:     rgba(107,78,255,.15);
  --rose:    #F472B6;
  --rose-l:  rgba(244,114,182,.12);
  --bg:      #F6F4FF;
  --card:    #fff;
  --text:    #1C1040;
  --muted:   #7A6E9A;
  --border:  rgba(107,78,255,.10);
  --r:       16px;
  --font:    'Plus Jakarta Sans', system-ui, sans-serif;
  --serif:   'Cormorant Garamond', Georgia, serif;
  --shadow:  0 4px 24px rgba(107,78,255,.10);
  --shadow-h:0 10px 40px rgba(107,78,255,.20);

  font-family: var(--font);
  background:  var(--bg);
  color:       var(--text);
  padding-bottom: 90px;
  -webkit-font-smoothing: antialiased;
}

#bma-app * { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tabs ──────────────────────────── */
.bma-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 16px 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.bma-tabs::-webkit-scrollbar { display: none; }

.bma-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  transition: all .18s;
  white-space: nowrap;
}
.bma-tab:hover { color: var(--p); background: var(--p-g); }
.bma-tab--active { color: var(--p); border-bottom-color: var(--p); background: var(--p-g); }

.bma-badge {
  background: var(--rose);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
  min-width: 18px;
  text-align: center;
}

/* ── Panels ────────────────────────── */
.bma-panel { display: none; padding: 0 16px; }
.bma-panel--active { display: block; }

/* ── Hero ──────────────────────────── */
.bma-hero {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  margin: 16px 0 20px;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
}

.bma-hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #EDE9FF 0%, #F5F0FF 50%, #FFF0F8 100%);
  transition: background .4s;
}

.bma-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28,16,64,.7) 0%, rgba(28,16,64,.1) 60%, transparent 100%);
  pointer-events: none;
}

.bma-hero__content {
  position: relative;
  z-index: 1;
  padding: 24px;
  width: 100%;
}

.bma-hero__label {
  display: inline-block;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,.9);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,.2);
}

.bma-hero__title {
  font-family: var(--serif);
  font-size: clamp(20px,4vw,30px);
  font-weight: 700;
  font-style: italic;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.bma-hero__desc {
  font-size: 13px;
  color: rgba(255,255,255,.75);
  margin-bottom: 18px;
  line-height: 1.5;
  max-width: 500px;
}

.bma-hero__controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ── Circle Buttons ────────────────── */
.bma-btn-circle {
  border-radius: 50%;
  border: none;
  background: var(--p);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .22s cubic-bezier(.34,1.56,.64,1);
}
.bma-btn-circle--lg {
  width: 58px; height: 58px;
  box-shadow: 0 6px 24px rgba(107,78,255,.45);
}
.bma-btn-circle--sm {
  width: 40px; height: 40px;
  box-shadow: 0 4px 14px rgba(107,78,255,.35);
}
.bma-btn-circle--xs {
  width: 34px; height: 34px;
  background: var(--p-l);
  color: var(--p);
  box-shadow: none;
}
.bma-btn-circle:hover { transform: scale(1.08); }
.bma-btn-circle--lg:hover { box-shadow: 0 10px 32px rgba(107,78,255,.55); }
.bma-btn-circle.playing { background: var(--p-d); }
.bma-btn-circle--xs:hover,
.bma-btn-circle--xs.playing { background: var(--p); color: #fff; }

/* ── Progress ──────────────────────── */
.bma-progress-wrap { flex: 1; min-width: 0; }

.bma-progress {
  height: 4px;
  background: rgba(255,255,255,.25);
  border-radius: 100px;
  cursor: pointer;
  position: relative;
  overflow: visible;
}
.bma-progress__fill {
  height: 100%;
  background: #fff;
  border-radius: 100px;
  width: 0%;
  transition: width .1s linear;
  position: relative;
}
.bma-progress__fill::after {
  content: '';
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(107,78,255,.4);
  opacity: 0;
  transition: opacity .15s;
}
.bma-progress:hover .bma-progress__fill::after { opacity: 1; }

.bma-progress--dark { background: rgba(107,78,255,.12); }
.bma-progress--dark .bma-progress__fill {
  background: linear-gradient(90deg, var(--p), #A78BFA);
}
.bma-progress--dark .bma-progress__fill::after {
  background: var(--p);
  box-shadow: 0 0 0 2px #fff;
}

.bma-progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}
.bma-progress-meta span {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  font-variant-numeric: tabular-nums;
}
.bma-progress-meta--dark span { color: var(--muted); }

/* ── Love button ───────────────────── */
.bma-btn-love {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
.bma-btn-love:hover  { background: var(--rose-l); border-color: var(--rose); color: var(--rose); }
.bma-btn-love.loved  { background: var(--rose-l); border-color: var(--rose); color: var(--rose); }

/* ── Section header ────────────────── */
.bma-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.bma-section-title { font-family: var(--serif); font-size: 20px; font-weight: 700; font-style: italic; }
.bma-section-count { font-size: 12px; color: var(--muted); }

/* ── Track List ────────────────────── */
.bma-list { display: flex; flex-direction: column; gap: 8px; }

/* ── Track Row ─────────────────────── */
.bma-track {
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid var(--border);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .2s;
  cursor: pointer;
}
.bma-track:hover {
  border-color: rgba(107,78,255,.25);
  box-shadow: var(--shadow);
  transform: translateX(3px);
}
.bma-track.active {
  border-color: var(--p);
  background: var(--p-l);
  box-shadow: 0 4px 16px var(--p-g);
}

.bma-track__thumb {
  width: 48px; height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--p-l);
  overflow: hidden;
  position: relative;
}
.bma-track__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}

.bma-track__info { flex: 1; min-width: 0; }
.bma-track__title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.bma-track.active .bma-track__title { color: var(--p-d); }
.bma-track__sub { font-size: 11px; color: var(--muted); }

.bma-track__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.bma-track__dur { font-size: 11px; color: var(--muted); font-weight: 600; }

.bma-btn-love-sm {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: none;
  border: 1.5px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.bma-btn-love-sm:hover { border-color: var(--rose); color: var(--rose); }
.bma-btn-love-sm.loved { background: var(--rose-l); border-color: var(--rose); color: var(--rose); }

/* ── Mini progress (inside track) ─── */
.bma-track__progress-row {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.bma-track.active .bma-track__progress-row { display: flex; }
.bma-track__progress-row .bma-progress { flex: 1; }

/* ── Empty ─────────────────────────── */
.bma-empty { text-align: center; padding: 52px 20px; color: var(--muted); }
.bma-empty__icon  { font-size: 48px; display: block; margin-bottom: 12px; opacity: .5; }
.bma-empty__title { font-family: var(--serif); font-size: 20px; font-style: italic; color: var(--text); margin-bottom: 6px; }
.bma-empty__sub   { font-size: 13px; line-height: 1.6; }

/* ── Floating Player ───────────────── */
.bma-float {
  position: fixed;
  bottom: 12px; left: 12px; right: 12px;
  z-index: 99999;
  background: rgba(28,16,64,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 18px;
  border: 1px solid rgba(167,139,250,.18);
  box-shadow: 0 -4px 40px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  animation: bmaSlideUp .3s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
}

@keyframes bmaSlideUp {
  from { transform: translateY(120%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.bma-float__thumb {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg,var(--p),#A78BFA);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  overflow: hidden; position: relative;
}
.bma-float__thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.bma-float__info { flex: 1; min-width: 0; overflow: hidden; }
.bma-float__title {
  font-size: 13px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bma-float__sub { font-size: 10px; color: rgba(255,255,255,.5); margin-top: 2px; }

.bma-float__right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.bma-float__close {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: none;
  color: rgba(255,255,255,.5); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: all .2s;
}
.bma-float__close:hover { background: rgba(255,255,255,.18); color: #fff; }

.bma-float__bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,.08);
}
.bma-float__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--p), #A78BFA);
  width: 0%;
  transition: width .1s linear;
}

/* ── Responsive ────────────────────── */
@media (max-width: 540px) {
  .bma-hero { min-height: 180px; }
  .bma-hero__title { font-size: 20px; }
  .bma-float { bottom: 0; left: 0; right: 0; border-radius: 18px 18px 0 0; }
  #bma-app { padding-bottom: 80px; }
}
