/* Center Player Card */
.player-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 22px;
  padding: 22px 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  border: 1px solid rgba(192, 132, 252, 0.26);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease;
}

.disc-wrapper {
  display: none;
  width: 132px;
  height: 132px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.disc-wrapper.revealed {
  display: flex;
  animation: fadeUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.disc-center-hole {
  display: none;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Equalizer Wave Animation */
.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 18px;
  margin-bottom: 12px;
  opacity: 0.25;
  transition: opacity 0.2s;
}

.equalizer.playing {
  opacity: 1;
}

.bar {
  width: 4px;
  background: var(--level-color);
  border-radius: 2px;
  height: 4px;
  transition: height 0.2s, background-color 0.25s ease;
}

.equalizer.playing .bar:nth-child(1) {
  animation: eq 0.6s ease-in-out infinite alternate;
}

.equalizer.playing .bar:nth-child(2) {
  animation: eq 0.45s ease-in-out infinite alternate 0.1s;
}

.equalizer.playing .bar:nth-child(3) {
  animation: eq 0.7s ease-in-out infinite alternate 0.2s;
}

.equalizer.playing .bar:nth-child(4) {
  animation: eq 0.5s ease-in-out infinite alternate 0.15s;
}

.equalizer.playing .bar:nth-child(5) {
  animation: eq 0.65s ease-in-out infinite alternate 0.05s;
}

@keyframes eq {
  0% {
    height: 4px;
  }

  100% {
    height: 18px;
  }
}

.status-text {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 14px;
  min-height: 20px;
  text-align: center;
  font-weight: 500;
}

.retry-inline-btn {
  display: none;
  margin-bottom: 14px;
  padding: 6px 14px;
  font-size: 12px;
  background: var(--surface-hover);
  color: var(--text-main);
  border: 1px solid #444;
  border-radius: 999px;
  font-family: inherit;
  cursor: pointer;
}

.retry-inline-btn:hover {
  border-color: var(--spotify-green);
}

/* Unified Timeline Progress Bar */
.timeline-wrapper {
  width: 100%;
  position: relative;
  margin-bottom: 30px;
  direction: ltr;
}

.segments-bar {
  display: flex;
  width: 100%;
  height: 22px;
  background: rgba(15, 9, 34, 0.85);
  border-radius: 999px;
  border: 1px solid rgba(192, 132, 252, 0.28);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65);
}

.playback-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0%;
  background: var(--level-color);
  box-shadow: 0 0 14px var(--level-glow);
  z-index: 3;
  pointer-events: none;
  border-radius: 999px 0 0 999px;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.segment {
  height: 100%;
  background: transparent;
  border-right: 1.5px solid #131313;
  position: relative;
  z-index: 2;
  transition: background-color 0.25s ease;
}

.segment:last-child {
  border-right: none;
}

.segment:nth-child(2) {
  flex: 0 0 2.5%;
}

.segment:nth-child(3) {
  flex: 0 0 5.5%;
}

.segment:nth-child(4) {
  flex: 0 0 17%;
}

.segment:nth-child(5) {
  flex: 0 0 25%;
}

.segment:nth-child(6) {
  flex: 0 0 50%;
}

.segment.active {
  background: rgba(255, 255, 255, 0.06);
}

.segment.wrong {
  background: rgba(233, 20, 41, 0.24);
}

.segment.correct {
  background: rgba(29, 185, 84, 0.32);
}

.timeline-marker {
  position: absolute;
  top: calc(100% + 3px);
  left: 2.5%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 4;
}

.marker-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid var(--level-color);
  margin-bottom: 2px;
  filter: drop-shadow(0 0 4px var(--level-glow));
  transition: border-bottom-color 0.25s ease;
}

.marker-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--level-color);
  letter-spacing: -0.3px;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.side-duration-readout {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 17px;
  font-weight: 700;
  color: var(--level-color);
  min-width: 52px;
  text-align: left;
  direction: ltr;
  transition: color 0.25s ease;
}

.play-control-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  padding: 6px 0 4px;
}

/* Subtle Reactive Waveform Wing Next to In-Game Play Button */
.game-wave-wing {
  min-width: 52px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.game-wave-wing span {
  width: 3.5px;
  border-radius: 999px;
  background: var(--level-color);
  opacity: 0.32;
  transition: opacity 0.25s ease, background-color 0.25s ease;
}

.game-wave-wing span:nth-child(1) { height: 10px; }
.game-wave-wing span:nth-child(2) { height: 22px; }
.game-wave-wing span:nth-child(3) { height: 16px; }
.game-wave-wing span:nth-child(4) { height: 28px; }

.play-control-row.is-playing .game-wave-wing span {
  opacity: 0.92;
  box-shadow: 0 0 10px var(--level-glow);
  animation: gameWingPulse 0.62s ease-in-out infinite alternate;
}

.play-control-row.is-playing .game-wave-wing span:nth-child(1) { animation-delay: 0s; }
.play-control-row.is-playing .game-wave-wing span:nth-child(2) { animation-delay: 0.14s; }
.play-control-row.is-playing .game-wave-wing span:nth-child(3) { animation-delay: 0.26s; }
.play-control-row.is-playing .game-wave-wing span:nth-child(4) { animation-delay: 0.08s; }

@keyframes gameWingPulse {
  0% { transform: scaleY(0.45); }
  100% { transform: scaleY(1.22); }
}

.play-fab {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--level-color);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
  box-shadow: 0 10px 30px var(--level-glow);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease, box-shadow 0.25s ease, filter 0.2s ease;
}

.play-fab::before,
.play-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--level-color);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.play-fab:not(:disabled):not(.is-playing)::before {
  animation: playReadyBreath 2.4s ease-in-out infinite;
}

.play-fab.is-playing {
  transform: scale(1.04);
  box-shadow: 0 12px 36px var(--level-glow);
}

.play-fab.is-playing::before {
  animation: playSonicRipple 1.35s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.play-fab.is-playing::after {
  animation: playSonicRipple 1.35s cubic-bezier(0.16, 1, 0.3, 1) infinite 0.65s;
}

@keyframes playReadyBreath {
  0%,
  100% {
    transform: scale(1);
    opacity: 0;
  }

  50% {
    transform: scale(1.14);
    opacity: 0.32;
  }
}

@keyframes playSonicRipple {
  0% {
    transform: scale(1);
    opacity: 0.65;
  }

  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.play-fab:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: scale(1.07);
}

.play-fab:active:not(:disabled) {
  transform: scale(0.93);
}

.play-fab:disabled {
  background: #282828;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

.play-fab svg {
  width: 36px;
  height: 36px;
  fill: #000000;
  margin-right: -2px;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.play-fab.is-playing svg {
  margin-right: 0;
}

/* 15s Hints Panel */
.hints-panel {
  display: none;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 196, 0, 0.07);
  border: 1px dashed rgba(245, 197, 24, 0.4);
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeUp 0.25s ease-out;
}

.hints-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--medium-color);
  display: flex;
  align-items: center;
  gap: 5px;
}

.hints-btns-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.hint-chip-btn {
  background: #222;
  color: var(--text-main);
  border: 1px solid #3c3c3c;
  border-radius: 999px;
  padding: 6px 11px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.hint-chip-btn:hover:not(.revealed) {
  border-color: var(--medium-color);
  color: var(--medium-color);
}

.hint-chip-btn.revealed {
  background: rgba(245, 197, 24, 0.18);
  border-color: var(--medium-color);
  color: #ffe270;
  cursor: default;
}

/* Subtle Active Helper Badges Row */
.active-settings-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 4px;
}

.setting-status-pill {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(29, 185, 84, 0.12);
  color: var(--spotify-green);
  border: 1px solid rgba(29, 185, 84, 0.3);
  cursor: pointer;
}

.setting-status-pill.visible {
  display: inline-flex;
}
