.audio-card-wrapper {
  display: flex;
  padding: 8px;
  justify-content: center;
  align-items: center;
  gap: 20px;
  align-self: stretch;
  border-radius: 16px;
  background: transparent;
  backdrop-filter: none;
  transition:
    background 0.3s ease,
    backdrop-filter 0.3s ease;
}

/* Wrapper aktiv bei Hover/Playing */
.audio-card-wrapper:hover,
.audio-card-wrapper.playing {
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.40) 0%, rgba(255, 255, 255, 0.40) 100%),
    linear-gradient(309deg, rgba(91, 104, 176, 0.90) 0%, rgba(202, 43, 145, 0.90) 49.42%, rgba(251, 174, 76, 0.90) 98.84%);
  backdrop-filter: blur(15px);
  cursor: pointer;
}

/* CARD */
.audio-card {
  position: relative;
  display: flex;
  width: 100%;
  gap: 20px;
  padding: 12px;
  border-radius: 16px;
  background: #f3f2f2;
  align-items: center;
  overflow: hidden;
  /* keine Transition auf Background nötig, wenn dich der „Sprung“ stört */
}

/* Inhalt über Pseudo-Element */
.audio-card > * {
  position: relative;
  z-index: 1;
}

/* Idle: graue dashed-Border via ::before */
.audio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px dashed rgba(20, 24, 33, 0.25);
  box-sizing: border-box;
  opacity: 1;
  /* KEINE transition mehr, sonst wirkt das „matschig“ */
  z-index: 0;
}

/* Hover/Playing: Border sofort wegblenden */
.audio-card-wrapper:hover .audio-card::before,
.audio-card-wrapper.playing .audio-card::before {
  opacity: 0;
}

/* Idle bleibt #f3f2f2, im aktiven Zustand direkter Switch auf Gradient */
.audio-card-wrapper:hover .audio-card,
.audio-card-wrapper.playing .audio-card {
  background: linear-gradient(170deg, #FBAE4C, #CA2B91, #5B68B0);
  color: #fff;
}

/* IMAGE */
.audio-img {
  width: 150px;
  height: 150px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.audio-img img {
  width: 100%;
  aspect-ratio: 1 / 1;
}

/* PLAY BUTTON */
.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: #FCB720;
  cursor: pointer;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 6px 12px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.16s ease-out,
    box-shadow 0.16s ease-out,
    background-color 0.16s ease-out;
}

.play-btn:hover,
.play-btn:focus-visible {
  background-color: #ffcb3c;
  transform: translate3d(-50%, -52%, 0) scale(1.06);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.10),
    0 10px 18px rgba(0, 0, 0, 0.30);
}

.play-btn:active {
  transform: translate3d(-50%, -48%, 0) scale(0.96);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.14),
    0 4px 8px rgba(0, 0, 0, 0.32);
}

.play-btn .play,
.play-btn .pause {
  width: 18px;
  height: 18px;
}

.play-btn .pause {
  display: none;
}

.audio-card.playing .play {
  display: none;
}

.audio-card.playing .pause {
  display: block;
}

/* INFO */
.audio-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
}

.track-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
}

.songname {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  align-self: stretch;
  overflow: hidden;
  color: #141821;
  text-overflow: ellipsis;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 2%;
  line-height: normal;
  transition: color 0.25s ease;
}

.bandname {
  color: #141821;
  font-size: 12px;
  font-weight: 300;
  line-height: 125%;
  transition: color 0.25s ease;
}

.topic {
  color: rgba(20, 24, 33, 0.45);
  font-size: 10px;
  font-weight: 600;
  line-height: 125%;
  transition: color 0.25s ease;
}

/* Invertiert, wenn Wrapper aktiv */
.audio-card-wrapper:hover .songname,
.audio-card-wrapper.playing .songname,
.audio-card-wrapper:hover .bandname,
.audio-card-wrapper.playing .bandname,
.audio-card-wrapper:hover .topic,
.audio-card-wrapper.playing .topic {
  color: #ffffff;
}

/* ACTIONS */
.audio-actions {
  display: flex;
  gap: 10px;
}

.audio-actions button {
    display: flex;
    width: 24px;
    height: 24px;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1/1;
    cursor: pointer;
    border-radius: 8px;
    border: none;
    outline: none;
    padding: 0;
    background: transparent;
    position: relative;
    overflow: hidden;
    transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out
}

.audio-actions button img {
    pointer-events: none;
}

/* Default Spotify look */
button.spotify {
  background-color: #1ED760;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 4px 8px rgba(0, 0, 0, 0.18);
}

button.deezer {
  background-color: #A238FF;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 4px 8px rgba(0, 0, 0, 0.18);
}

/* Light sheen overlay */
button.spotify::before,
button.deezer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 0%, rgba(255,255,255,0.45), transparent 55%);
  opacity: 0.0;
  transition: opacity 0.18s ease-out;
  pointer-events: none;
}

/* Hover / focus state */
button.spotify:hover,
button.spotify:focus-visible {
  transform: translateY(-1px) scale(1.06);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.12),
    0 6px 14px rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, #1ED760, #1fdf64);
}

/* Hover / focus */
button.deezer:hover,
button.deezer:focus-visible {
  transform: translateY(-1px) scale(1.06);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.12),
    0 6px 14px rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, #A238FF, #c55bff);
}

button.spotify:hover::before,
button.spotify:focus-visible::before,
button.deezer:hover::before,
button.deezer:focus-visible::before {
  opacity: 1;
}

/* Optional active press effect */
button.spotify:active,
button.deezer:active {
  transform: translateY(0) scale(0.97);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.32);
}

/* Spotify/Deezer auf hellem/dunklem BG leicht anpassen */
.audio-card-wrapper:hover .audio-actions button,
.audio-card-wrapper.playing .audio-actions button {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.24),
    0 6px 14px rgba(0, 0, 0, 0.35);
}

/* WAVE */
.wave-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.time-start, .time-end {
  font-size: 10px;
  font-weight: 300;
  line-height: 125%;
  width: 26px;
  transition: color 0.25s ease;
}

.time-end {
  text-align: right;  
}

/* WAVE */
.fake-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15vw;
  height: 48px;  
}

.fake-wave__bar {
  width: 1px;
  background-color: #141821;
  opacity: 0.65;
  transform-origin: bottom center;
  height: 30%;
  transition: background-color 0.25s ease, opacity 0.25s ease;
}

/* invertierte Wave */
.audio-card-wrapper:hover .fake-wave__bar,
.audio-card-wrapper.playing .fake-wave__bar {
  background-color: #ffffff;
  opacity: 0.65;
}

/* schon abgespielter Bereich */
.fake-wave__bar.played,
.fake-wave__bar.played {
  background-color: #A238FF;   /* oder andere Highlight-Farbe */
}

.audio-card-wrapper:hover .fake-wave__bar.played,
.audio-card-wrapper.playing .fake-wave__bar.played {
  background-color: #6C1CD1;
}

/* niedrige Balken */
.fake-wave__bar:nth-child(1),
.fake-wave__bar:nth-child(7),
.fake-wave__bar:nth-child(13),
.fake-wave__bar:nth-child(22),
.fake-wave__bar:nth-child(31),
.fake-wave__bar:nth-child(44),
.fake-wave__bar:nth-child(53),
.fake-wave__bar:nth-child(61),
.fake-wave__bar:nth-child(72),
.fake-wave__bar:nth-child(84) {
  height: 18%;
}

.fake-wave__bar:nth-child(4),
.fake-wave__bar:nth-child(11),
.fake-wave__bar:nth-child(19),
.fake-wave__bar:nth-child(27),
.fake-wave__bar:nth-child(36),
.fake-wave__bar:nth-child(48),
.fake-wave__bar:nth-child(57),
.fake-wave__bar:nth-child(68),
.fake-wave__bar:nth-child(79),
.fake-wave__bar:nth-child(88) {
  height: 26%;
}

/* mittlere Balken */
.fake-wave__bar:nth-child(2),
.fake-wave__bar:nth-child(6),
.fake-wave__bar:nth-child(10),
.fake-wave__bar:nth-child(15),
.fake-wave__bar:nth-child(23),
.fake-wave__bar:nth-child(29),
.fake-wave__bar:nth-child(38),
.fake-wave__bar:nth-child(46),
.fake-wave__bar:nth-child(54),
.fake-wave__bar:nth-child(63),
.fake-wave__bar:nth-child(71),
.fake-wave__bar:nth-child(77),
.fake-wave__bar:nth-child(83) {
  height: 42%;
}

.fake-wave__bar:nth-child(5),
.fake-wave__bar:nth-child(9),
.fake-wave__bar:nth-child(17),
.fake-wave__bar:nth-child(21),
.fake-wave__bar:nth-child(26),
.fake-wave__bar:nth-child(34),
.fake-wave__bar:nth-child(41),
.fake-wave__bar:nth-child(51),
.fake-wave__bar:nth-child(59),
.fake-wave__bar:nth-child(66),
.fake-wave__bar:nth-child(74),
.fake-wave__bar:nth-child(82) {
  height: 55%;
}

/* hohe Balken */
.fake-wave__bar:nth-child(3),
.fake-wave__bar:nth-child(8),
.fake-wave__bar:nth-child(14),
.fake-wave__bar:nth-child(18),
.fake-wave__bar:nth-child(25),
.fake-wave__bar:nth-child(33),
.fake-wave__bar:nth-child(39),
.fake-wave__bar:nth-child(47),
.fake-wave__bar:nth-child(56),
.fake-wave__bar:nth-child(64),
.fake-wave__bar:nth-child(70),
.fake-wave__bar:nth-child(76),
.fake-wave__bar:nth-child(81),
.fake-wave__bar:nth-child(87) {
  height: 72%;
}

.fake-wave__bar:nth-child(12),
.fake-wave__bar:nth-child(16),
.fake-wave__bar:nth-child(20),
.fake-wave__bar:nth-child(24),
.fake-wave__bar:nth-child(30),
.fake-wave__bar:nth-child(35),
.fake-wave__bar:nth-child(40),
.fake-wave__bar:nth-child(45),
.fake-wave__bar:nth-child(50),
.fake-wave__bar:nth-child(58),
.fake-wave__bar:nth-child(62),
.fake-wave__bar:nth-child(67),
.fake-wave__bar:nth-child(73),
.fake-wave__bar:nth-child(78),
.fake-wave__bar:nth-child(85),
.fake-wave__bar:nth-child(89) {
  height: 90%;
}

/* PLAYING: asynchron „Sound“-Animation */
.fake-wave[data-playing="true"] .fake-wave__bar {
  animation: soundPulse 0.9s ease-in-out infinite alternate;
}

/* unterschiedliche Delays + Geschwindigkeiten für 89 Bars */
.fake-wave[data-playing="true"] .fake-wave__bar:nth-child(3n+1) {
  animation-duration: 0.7s;
}
.fake-wave[data-playing="true"] .fake-wave__bar:nth-child(4n+2) {
  animation-duration: 1.1s;
}
.fake-wave[data-playing="true"] .fake-wave__bar:nth-child(5n+3) {
  animation-duration: 0.95s;
}
.fake-wave[data-playing="true"] .fake-wave__bar:nth-child(7n+4) {
  animation-duration: 1.3s;
}
.fake-wave[data-playing="true"] .fake-wave__bar:nth-child(2n) {
  animation-delay: 0.08s;
}
.fake-wave[data-playing="true"] .fake-wave__bar:nth-child(3n) {
  animation-delay: 0.16s;
}
.fake-wave[data-playing="true"] .fake-wave__bar:nth-child(5n) {
  animation-delay: 0.24s;
}
.fake-wave[data-playing="true"] .fake-wave__bar:nth-child(7n) {
  animation-delay: 0.32s;
}

@keyframes soundPulse {
  0% {
    transform: scaleY(0.4);
    opacity: 0.6;
  }
  35% {
    transform: scaleY(1.1);
    opacity: 1;
  }
  70% {
    transform: scaleY(0.7);
    opacity: 0.8;
  }
  100% {
    transform: scaleY(0.3);
    opacity: 0.5;
  }
}

  
@media (max-width: 959px) {
  .fake-wave {
    gap: 0.25vw;
  }
}

@media (max-width: 480px) {
  .tt-audio-samples .mcb-wrap-inner .mcb-column {
    width: auto;
  }

  .audio-card-wrapper {
    display: inline-flex;
    justify-self: center;
    align-self: center;
  }

  .audio-card {
    flex-direction: column;
    gap: 12px;
    width: auto;
    padding: 12px 24px;
    border-radius: 12px;
  }

  .audio-info {
    align-items: center;
  }

  .track-info {
    align-items: center;
    text-align: center;
  }

  .fake-wave {
    gap: 0.3vw;
  }

  .play-btn {
    width: 32px;
    height: 32px;
  }
}