﻿/* ---------- Mini player ---------- */

#mini {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(var(--nav-h) + 8px + var(--safe-bottom));
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 20;
  overflow: hidden;
  cursor: pointer;
  transform: translateY(0);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.2s ease;
}
#mini.hidden {
  transform: translateY(90px);
  opacity: 0;
  pointer-events: none;
}
.mini-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 10px;
}
.mini-cover {
  width: 42px; height: 42px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}
.mini-meta { flex: 1; min-width: 0; }
.mini-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.mini-progress {
  position: relative;
  height: 30px; /* generous touch target; the visible track stays 3px */
  margin-top: -14px; /* the strip grows upward into the padding - card height unchanged */
  touch-action: none;
  cursor: pointer;
}
.mini-progress::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6.5px;
  height: 3px;
  background: var(--border);
}
.mini-progress i {
  position: absolute;
  left: 0; bottom: 6.5px;
  display: block;
  height: 3px;
  width: 0;
  background: var(--grad);
  transition: width 0.25s linear;
}
.mini-progress.scrubbing i { transition: none; }

/* ---------- Full player ---------- */

.fullplayer {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 52;
  padding-top: var(--safe-top);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.fullplayer.open { transform: translateY(0); }

/* The scroll column: fp-inner is the flex item that must shrink to the player
   height, otherwise .fp-scroll grows to content and never overflows. */
.fp-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.fp-drag {
  padding: 10px 0 2px;
  display: flex;
  justify-content: center;
  touch-action: none;
  cursor: grab;
}
.fp-drag .grab {
  width: 44px; height: 5px;
  border-radius: 3px;
  background: var(--border);
}
.fp-menu {
  position: absolute;
  top: calc(var(--safe-top) + 8px);
  right: 12px;
  z-index: 2;
  color: var(--text-2);
}

.fp-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 6px 22px calc(26px + var(--safe-bottom));
}

.fp-art {
  width: min(72%, 330px);
  aspect-ratio: 1;
  margin: 10px auto 0;
  border-radius: 22px;
  overflow: hidden;
  background: var(--elevated);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}
.fp-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.fp-artph {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.fp-artph svg { width: 64px; height: 64px; }

.fp-meta { margin-top: 18px; text-align: center; }
.fp-title { font-size: 18px; font-weight: 800; }
.fp-sub { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.fp-meta .fppill { margin-top: 10px; padding: 5px 16px; font-size: 11px; }

.fp-seek { margin-top: 18px; }
.fp-wave { width: 100%; height: 64px; display: block; touch-action: none; }
.fp-times {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-2);
  padding-top: 4px;
}

.fp-transport {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 6px 2px;
}
.fp-transport .iconbtn { color: var(--text-2); }
.fp-transport .iconbtn.on { color: var(--violet); }
.fp-transport .fp-prev, .fp-transport .fp-next { width: 42px; height: 42px; }
.fp-transport .fp-repeat { position: relative; }
.fp-transport .fp-repeat .one {
  display: none;
  position: absolute;
  top: 2px; right: 2px;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  background: var(--violet);
  color: #fff;
  border-radius: 7px;
  padding: 2px 4px;
}
.fp-transport .fp-repeat.one .one { display: block; }
.fp-toggle.main {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 26px rgba(139, 92, 246, 0.35);
}
.fp-toggle.main svg { width: 32px; height: 32px; }

.fp-actionsrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px 2px;
}
.fp-actionsrow .iconbtn { color: var(--text-2); }
.fp-actionsrow .iconbtn.on { color: var(--violet); }
.fp-actionsrow .iconbtn:active { transform: scale(0.88); }
.fp-like { color: var(--text-2); }
.fp-like.hearted { color: var(--heart); }

.fppill {
  padding: 8px 18px;
  border-radius: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
}
.fppill.on {
  background: rgba(139, 92, 246, 0.16);
  border-color: var(--violet);
  color: var(--text);
}

.fp-extra { min-height: 12px; }
.fp-empty { text-align: center; color: var(--text-2); font-size: 13px; padding: 22px 0; }

.fp-lyrics { padding: 8px 2px; }
.lyline {
  text-align: center;
  padding: 6px 8px;
  font-size: 14px;
  color: rgba(244, 244, 248, 0.72);
  transition: color 0.2s ease;
}
.lyline.marker { font-size: 11px; font-weight: 800; color: var(--text-2); }
.lyline.active { color: #fff; font-weight: 700; }

.fp-queue { padding: 6px 0; }
.qitem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
}
.qitem.current { background: var(--elevated); }
.qitem img, .qitem .ph {
  width: 44px; height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}
.qitem .qm { flex: 1; min-width: 0; }
.qitem .qt { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qitem .qs { font-size: 11px; color: var(--text-2); }
.qitem svg { width: 16px; height: 16px; color: var(--violet); }

/* Queue as a bottom-sheet modal over the full player (.bubblesheet base gives
   the swipe-up transition, 76vh cap, scrim, z-index above .fullplayer). */
.queuesheet .fp-queue { padding: 2px 4px 0; }
.queuesheet .qhead { display: flex; align-items: center; gap: 8px; padding: 4px 10px 10px; }
.queuesheet .qhead .bstitle { flex: 1; padding: 0; }
.queuesheet .qcount { font-size: 11px; color: var(--text-2); white-space: nowrap; }
.queuesheet .qclear {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  padding: 7px 12px;
  border-radius: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.queuesheet .qremove,
.queuesheet .qhandle {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  flex-shrink: 0;
}
.queuesheet .qremove svg { width: 15px; height: 15px; color: var(--text-2); }
.queuesheet .qremove:active svg { color: var(--danger); }
.queuesheet .qhandle svg { width: 16px; height: 16px; color: var(--text-2); }
.queuesheet .qhandle:active { color: var(--text); }
.queuesheet .qitem.dragging {
  position: relative;
  z-index: 2;
  background: var(--elevated);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}
