/* =====================================================
   SóMp3Top – Player Global (Bottom Bar)
   PalcoMP3 style · Orange accent
   ===================================================== */

/* ─── Bar ─────────────────────────────────────────── */
.player-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--player-h, 80px);
  background: rgba(15, 10, 5, .97);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(255,102,0,.2);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 20px;
  box-shadow: 0 -4px 32px rgba(0,0,0,.6);
}
.player-bar.hidden { display: none; }

/* faixa laranja no topo */
.player-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
}

/* ─── Info (esquerda) ─────────────────────────────── */
.player-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.player-cover {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg3);
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.6);
  transition: transform .2s;
}
.player-cover:hover { transform: scale(1.04); }
.player-meta { min-width: 0; }
.player-title {
  font-size: .84rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  color: var(--txt);
  transition: color .2s;
}
.player-title:hover { color: var(--accent); }
.player-artist {
  font-size: .73rem;
  color: var(--txt3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.player-artist a { color: inherit; transition: color .2s; }
.player-artist a:hover { color: var(--accent); }

.player-like-btn {
  background: none;
  border: none;
  color: var(--txt3);
  cursor: pointer;
  padding: 7px;
  font-size: .95rem;
  transition: var(--transition);
  flex-shrink: 0;
  border-radius: 50%;
}
.player-like-btn:hover { color: #ef4444; background: rgba(239,68,68,.1); }
.player-like-btn.liked { color: #ef4444; }

/* ─── Controls (centro) ───────────────────────────── */
.player-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex: 2;
  min-width: 0;
  max-width: 520px;
}
.player-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}
.player-btn {
  background: none;
  border: none;
  color: var(--txt3);
  cursor: pointer;
  font-size: .95rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.player-btn:hover { color: var(--txt); background: rgba(255,255,255,.07); }
.player-btn.active { color: var(--accent); }

/* Botão play/pause principal */
.player-btn-main {
  width: 42px;
  height: 42px;
  background: var(--accent);
  color: #fff !important;
  border-radius: 50%;
  font-size: .95rem;
  box-shadow: 0 4px 16px rgba(255,102,0,.45);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.player-btn-main:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(255,102,0,.6);
  background: var(--accent2) !important;
}
.player-btn-main:active { transform: scale(.97); }

/* ─── Progress bar ────────────────────────────────── */
.player-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
}
.player-time {
  font-size: .7rem;
  color: var(--txt3);
  width: 36px;
  text-align: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,.08);
  border-radius: 99px;
  cursor: pointer;
  position: relative;
  transition: height .15s;
}
.progress-bar:hover { height: 5px; }
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  width: 0%;
  pointer-events: none;
  position: relative;
  transition: width .1s linear;
}
/* thumb dot on hover */
.progress-bar:hover .progress-fill::after {
  content: '';
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255,102,0,.7);
}

/* ─── Volume (direita) ────────────────────────────── */
.player-volume {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  justify-content: flex-end;
}
.player-volume .player-btn { font-size: .9rem; }
.volume-bar {
  width: 76px;
  height: 3px;
  background: rgba(255,255,255,.08);
  border-radius: 99px;
  cursor: pointer;
  position: relative;
  transition: height .15s;
}
.volume-bar:hover { height: 5px; }
.volume-fill {
  height: 100%;
  background: var(--txt3);
  border-radius: 99px;
  width: 80%;
  pointer-events: none;
  transition: background .2s;
}
.volume-bar:hover .volume-fill { background: var(--accent); }

.player-queue-btn {
  background: none;
  border: none;
  color: var(--txt3);
  cursor: pointer;
  padding: 7px;
  font-size: .85rem;
  border-radius: 50%;
  transition: var(--transition);
}
.player-queue-btn:hover { color: var(--txt); background: rgba(255,255,255,.07); }
.player-queue-btn.active { color: var(--accent); }

/* ─── Queue Drawer ────────────────────────────────── */
.queue-drawer {
  position: fixed;
  bottom: var(--player-h, 80px);
  right: 14px;
  width: 320px;
  max-height: 460px;
  background: #191919;
  border: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  z-index: 999;
  display: none;
  box-shadow: -4px -4px 32px rgba(0,0,0,.5);
  animation: queueSlideUp .2s ease;
}
@keyframes queueSlideUp {
  from { opacity:0; transform: translateY(12px); }
  to   { opacity:1; transform: translateY(0); }
}
.queue-drawer.open { display: flex; flex-direction: column; }
.queue-header {
  padding: 12px 16px;
  font-size: .84rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #141414;
}
.queue-header .queue-count { color: var(--txt3); font-size: .72rem; font-weight: 400; }
.queue-list { padding: 6px; overflow-y: auto; flex: 1; }
.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s;
}
.queue-item:hover { background: rgba(255,255,255,.05); }
.queue-item.active { background: rgba(255,102,0,.1); }
.queue-item img {
  width: 40px; height: 40px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
}
.queue-item-info { flex: 1; min-width: 0; }
.queue-item-title {
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-item-artist { font-size: .72rem; color: var(--txt3); margin-top: 1px; }
.queue-item.active .queue-item-title { color: var(--accent); }
.queue-item-num {
  font-size: .72rem;
  color: var(--txt3);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.queue-item.active .queue-item-num { display: none; }
.queue-item .eq-icon { display: none; }
.queue-item.active .eq-icon { display: inline-flex; }

/* ─── Equalizer animation ─────────────────────────── */
.eq-icon {
  display: inline-flex;
  gap: 2px;
  align-items: flex-end;
  height: 13px;
}
.eq-icon span {
  width: 3px;
  background: var(--accent);
  border-radius: 1px;
  animation: eqBar .8s ease infinite;
}
.eq-icon span:nth-child(1) { animation-duration: .9s; }
.eq-icon span:nth-child(2) { animation-delay: .15s; animation-duration: .7s; }
.eq-icon span:nth-child(3) { animation-delay: .3s;  animation-duration: 1s; }
@keyframes eqBar {
  0%, 100% { height: 3px; }
  50%       { height: 13px; }
}

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .player-bar { padding: 0 14px; gap: 12px; }
  .player-volume { display: none; }
  .player-controls { flex: 3; }
}
@media (max-width: 600px) {
  .player-bar { gap: 9px; padding: 0 10px; }
  .queue-drawer { width: 100%; right: 0; border-radius: 10px 10px 0 0; }
  .player-cover { width: 42px; height: 42px; }
  .player-btns { gap: 3px; }
}
@media (max-width: 480px) {
  .player-bar { height: 68px; }
  :root { --player-h: 68px; }
}
