*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.carousel-wrap {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  width: 100vw; overflow: visible;
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}

@media (max-width: 1100px)  { .carousel-wrap { zoom: 0.92; } }

.carousel-track { position: relative; width: 460px; height: 780px; }

.player-card,
.side-card {
  position: absolute; top: 0; left: 0;
  width: 460px; min-height: 780px;
  border-radius: 36px; overflow: visible;
  padding: 0 36px 28px;
  display: flex; flex-direction: column; align-items: center;
  will-change: transform, filter, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

.player-card { z-index: 10; }
.side-card { z-index: 1; box-shadow: 0 20px 60px rgba(0,0,0,0.6); pointer-events: auto; cursor: pointer; }

.card-clip { position: absolute; inset: 0; border-radius: 36px; overflow: hidden; pointer-events: none; z-index: 0; }

.album-wrapper { position: absolute; top: 0; bottom: 0; left: -30px; right: -30px; z-index: 0; pointer-events: none; }
#coverImg { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.4s ease; will-change: opacity; }

.default-cover {
  width: 100%; height: 100%; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 76px; opacity: 0.15; font-family: 'DM Serif Display', serif;
}

.actions-row {
  width: calc(100% + 72px); margin-left: -36px; margin-right: -36px;
  display: flex; justify-content: center; position: relative;
  margin-top: auto; margin-bottom: 10px; z-index: 2;
}

.char-name {
  width: calc(100% + 72px); margin-left: -36px; margin-right: -36px;
  text-align: center; padding: 18px 36px 0;
  font-family: 'IBM Plex Mono', monospace; font-size: 20px;
  letter-spacing: 0.12em; text-transform: uppercase; transition: none;
  position: relative; margin-bottom: -8px; z-index: 3;
}

.credits-row {
  width: calc(100% + 72px); margin-left: -36px; margin-right: -36px;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 10px 20px 0; margin-top: 8px; position: relative; z-index: 1;
}

.credit-item { display: flex; flex-direction: column; gap: 2px; }
.credit-item.right { align-items: flex-end; text-align: right; }
.credit-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.65; }
.credit-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; letter-spacing: 0.06em; text-decoration: none;
  opacity: 0.9; transition: opacity 0.2s; cursor: pointer;
}
.credit-link:hover { opacity: 1; }
.credit-link svg { width: 11px; height: 11px; flex-shrink: 0; opacity: 0.8; }

.track-title {
  width: 100%; text-align: center; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 18px;
  transition: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  position: relative; z-index: 1;
}

.heart-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  transition: transform 0.18s; display: flex; align-items: center; justify-content: center;
  will-change: transform;
}
.heart-btn:hover  { transform: scale(1.18); }
.heart-btn:active { transform: scale(0.88); }
.heart-svg { width: 36px; height: 36px; display: block; transition: none; overflow: visible; }
.heart-btn.liked { animation: heartPop 0.35s ease; }

@keyframes heartPop {
  0%  { transform:scale(1); } 40% { transform:scale(1.45); }
  70% { transform:scale(0.87); } 100%{ transform:scale(1); }
}

.progress-section { width:100%; margin-bottom:26px; position: relative; z-index: 1; }
.progress-track {
  width:100%; height:6px; border-radius:99px; position:relative; cursor:pointer;
  background: rgba(0,0,0,0.12);
}
.progress-track::before { content:''; position:absolute; left:0; right:0; top:-10px; bottom:-10px; }
.player-card.dark-card .progress-track { background: rgba(255,255,255,0.12); }
.progress-fill { height:100%; width:0%; border-radius:99px; pointer-events:none; transition: width 0.25s linear; will-change: width; }
.progress-thumb {
  position:absolute; top:50%; transform:translate(-50%,-50%);
  width:20px; height:20px; pointer-events:none;
  display:flex; align-items:center; justify-content:center; background: none !important;
}
.progress-thumb svg { width:20px; height:20px; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.25)); }

.time-row { display:flex; justify-content:space-between; margin-top:8px; }
.time-label { font-size:11px; letter-spacing:0.04em; }

.controls-row {
  display:flex; align-items:center; justify-content:center;
  gap:18px; width:100%; position: relative; z-index: 1;
}
.ctrl-btn { background:none; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; border-radius:50%; will-change: transform; }
.ctrl-btn:hover  { transform:scale(1.12); }
.ctrl-btn:active { transform:scale(0.88); }
.skip-svg { width:28px; height:28px; }

.play-btn {
  width:72px; height:72px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.22); transition: transform 0.18s, box-shadow 0.18s;
}
.play-btn:hover  { transform:scale(1.08); box-shadow:0 6px 26px rgba(0,0,0,0.35); }
.play-btn:active { transform:scale(0.92); }
#playIcon  { display:block; }
#pauseIcon { display:none; align-items:center; justify-content:center; gap:6px; }
#pauseIcon span { display:block; width:5px; height:22px; border-radius:2px; }

.mode-btn { background:none; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:4px; border-radius:50%; transition: transform 0.18s; will-change: transform; }
.mode-btn:hover  { transform:scale(1.15); }
.mode-btn:active { transform:scale(0.88); }
.mode-btn svg { width:20px; height:20px; }

.left-modes { display:flex; align-items:center; gap:30px; position: absolute; left: 0; transform: translateX(-12px); }

.volume-btn {
  background:none; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center;
  padding:4px; border-radius:50%; transition:transform 0.18s; position: absolute; right: 16px; will-change: transform;
}
.volume-btn:hover { transform:scale(1.15); }
.volume-btn svg { width:26px; height:26px; }

.volume-popup {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(6px); width: 36px;
  padding: 14px 0 10px; background: var(--card-popup-bg, #ffffff);
  border: 1px solid var(--card-popup-border, rgba(0,0,0,0.15));
  border-radius: 20px; display: flex; flex-direction: column; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s;
  z-index: 50; box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  will-change: transform, opacity;
}
.volume-popup.vol-visible { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); }

.volume-slider {
  -webkit-appearance: none; appearance: none;
  writing-mode: vertical-lr; direction: rtl;
  width: 4px; height: 80px; border-radius: 99px; outline: none; cursor: pointer;
  background: var(--vol-gradient, var(--card-popup-track, rgba(0,0,0,0.12)));
}
.volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--card-popup-thumb, #1a1a1a); cursor: pointer; transition: background 0.3s; }
.volume-slider::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; border: none; background: var(--card-popup-thumb, #1a1a1a); cursor: pointer; }
