/* ══════════════════════════════════════════════════════════════════════════
   SECTION 1: CENTRAL INTRO PLAYER
   CD disc, controls, progress, volume row, playlist panel
   ══════════════════════════════════════════════════════════════════════════ */

.player-grid {
  display: grid;
  grid-template-columns: 220px 1fr 340px;
  gap: 2.5rem;
  align-items: center;
}

/* CD Disc spin graphics */
.cd-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cd-disc {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 35%, rgba(255, 255, 255, 0.02) 35.5%, rgba(255, 255, 255, 0.02) 36%, transparent 36.5%),
    radial-gradient(circle, transparent 55%, rgba(255, 255, 255, 0.02) 55.5%, rgba(255, 255, 255, 0.02) 56%, transparent 56.5%),
    radial-gradient(circle, transparent 75%, rgba(255, 255, 255, 0.015) 75.5%, rgba(255, 255, 255, 0.015) 76%, transparent 76.5%),
    radial-gradient(circle, #0b0f1a 10%, transparent 10.5%),
    radial-gradient(circle, #1e293b 20%, transparent 20.5%),
    conic-gradient(
      #030712 0%, #1e293b 12.5%, #030712 25%, #1e293b 37.5%,
      #030712 50%, #1e293b 62.5%, #030712 75%, #1e293b 87.5%, #030712 100%
    );
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.03),
    0 0 25px rgba(0, 242, 254, 0.25),
    inset 0 0 20px rgba(0, 0, 0, 0.95);
  position: relative;
  transition: transform 0.4s cubic-bezier(0.1, 0.8, 0.3, 1);
  border: 1px solid rgba(0, 242, 254, 0.25);
}

.cd-disc.spinning {
  animation: cdSpin 12s linear infinite;
}

.cd-disc::before {
  content: '';
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 45%, #312e81, #030712);
  border: 1px solid rgba(0, 242, 254, 0.3);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.cd-disc::after {
  content: '';
  position: absolute;
  inset: calc(50% - 8px);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 12px var(--neon-cyan);
}

@keyframes cdSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cd-title {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.5px;
}

.cd-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'Fira Code', monospace;
}

/* Central Controls Area */
.ctrl-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.time-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
  font-family: 'Fira Code', monospace;
}

.range-bar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.range-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
  cursor: pointer;
  transition: transform 0.1s;
}

.range-bar::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.range-bar::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
  cursor: pointer;
  transition: transform 0.1s;
}

.range-bar::-moz-range-thumb:hover {
  transform: scale(1.3);
}

/* Button Control Row */
.btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ctrl-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.ctrl-btn.active {
  color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.08);
  box-shadow: inset 0 0 8px rgba(0, 242, 254, 0.1);
}

/* Repeat-one: hiện badge "1" chồng lên icon */
.ctrl-btn.repeat-one {
  position: relative;
}
.ctrl-btn.repeat-one::after {
  content: '1';
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  font-family: 'Fira Code', monospace;
  color: var(--neon-cyan);
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ctrl-btn.play-btn {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-cyan-dark) 100%);
  color: var(--text-dark);
  font-size: 1.25rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

.ctrl-btn.play-btn:hover {
  background: linear-gradient(135deg, #38f9d7 0%, var(--neon-cyan) 100%);
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.65);
  color: var(--text-dark);
}

/* Master Volume Mixer Row */
.vol-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.65rem 1rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.vol-icon {
  color: var(--text-muted);
  font-size: 1rem;
  width: 24px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.vol-icon:hover {
  color: var(--neon-cyan);
}

.vol-pct {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'Fira Code', monospace;
  min-width: 36px;
  text-align: right;
}

/* Interactive playlist column panel */
.plist-panel {
  border-left: 1px solid var(--glass-border);
  padding-left: 1.75rem;
  height: 250px;
  display: flex;
  flex-direction: column;
}

.plist-hdr {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--neon-cyan);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 1px;
}

.plist-items {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding-right: 0.25rem;
}

.plist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
  border-left: 2px solid transparent;
  margin-bottom: 2px;
}

.plist-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  padding-left: 1rem;
}

.plist-item.active {
  background: linear-gradient(90deg, rgba(0, 242, 254, 0.08) 0%, transparent 100%);
  color: var(--neon-cyan);
  font-weight: 600;
  border-left-color: var(--neon-cyan);
  padding-left: 1rem;
}

.plist-num {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.15);
  min-width: 18px;
}

.plist-item.active .plist-num {
  color: var(--neon-cyan);
}

.plist-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plist-playing.equalizer {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  width: 14px;
  height: 12px;
  margin-left: 0.5rem;
}

.plist-playing.equalizer span {
  display: inline-block;
  width: 2px;
  height: 100%;
  background-color: var(--neon-cyan);
  border-radius: 1px;
  transform-origin: bottom;
  transform: scaleY(0.3);
  transition: transform 0.2s ease;
}

.plist-playing.equalizer.animating span:nth-child(1) {
  animation: bounceBar 1.2s ease-in-out infinite alternate;
}

.plist-playing.equalizer.animating span:nth-child(2) {
  animation: bounceBar 0.8s ease-in-out infinite alternate;
  animation-delay: -0.2s;
}

.plist-playing.equalizer.animating span:nth-child(3) {
  animation: bounceBar 1.0s ease-in-out infinite alternate;
  animation-delay: -0.5s;
}

.plist-playing.equalizer.animating span:nth-child(4) {
  animation: bounceBar 0.7s ease-in-out infinite alternate;
  animation-delay: -0.1s;
}

@keyframes bounceBar {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1.0); }
}

/* Player highlight when selected */
.player-grid.selected {
  border: 1px solid rgba(0, 242, 254, 0.3);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.1);
}
