/* Dirigent-teilt-aus — angelehnt an die Infografik (Dirigent → Musiker) */

.tf-share-flow {
  --sf-panel: #1e293b;
  --sf-panel-edge: #334155;
  --sf-orange: #3b82f6;
  --sf-orange-dim: rgba(59, 130, 246, 0.35);
  --sf-ink: #f5f5f7;
  --sf-muted: #94a3b8;
  --sf-stage-bg: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
  width: min(100%, 520px);
  margin-inline: auto;
}

.tf-share-flow__stage {
  position: relative;
  aspect-ratio: 640 / 400;
  border-radius: var(--tf-radius-lg);
  background: var(--sf-stage-bg);
  box-shadow:
    0 28px 64px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  overflow: hidden;
}

.tf-share-flow__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(242, 101, 34, 0.08), transparent 55%);
  pointer-events: none;
}

/* ─── Dirigent (oben) ─── */
.tf-share-flow__conductor {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 6%;
  height: 22%;
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  background: var(--sf-panel);
  border: 1px solid var(--sf-panel-edge);
  border-radius: 12px;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.tf-share-flow__tablet {
  flex: 0 0 38%;
  border-radius: 8px;
  background: #252a35;
  border: 1px solid #4a5162;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
}

.tf-share-flow__tablet svg {
  width: 100%;
  height: auto;
  max-height: 100%;
}

.tf-share-flow__action {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
}

.tf-share-flow__action p {
  margin: 0;
  font-size: clamp(0.62rem, 2.2vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sf-ink);
  line-height: 1.2;
}

.tf-share-flow__btn {
  align-self: flex-start;
  padding: 0.28rem 0.75rem;
  border: none;
  border-radius: 6px;
  background: var(--sf-orange);
  color: #fff;
  font-size: clamp(0.58rem, 2vw, 0.72rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.45);
  animation: tfShareBtnPulse 5s ease-in-out infinite;
}

.tf-share-flow__cursor {
  position: absolute;
  width: 14px;
  height: 14px;
  right: 18%;
  top: 52%;
  opacity: 0;
  z-index: 3;
  animation: tfShareCursor 5s ease-in-out infinite;
}

.tf-share-flow__cursor::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(-15deg) scale(0.9);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* ─── Verbindungslinien ─── */
.tf-share-flow__wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.tf-share-flow__wire {
  fill: none;
  stroke: var(--sf-orange);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.85;
  animation: tfShareWireDraw 5s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.35));
}

.tf-share-flow__wire:nth-child(1) {
  animation-delay: 0.55s;
}
.tf-share-flow__wire:nth-child(2) {
  animation-delay: 0.68s;
}
.tf-share-flow__wire:nth-child(3) {
  animation-delay: 0.81s;
}
.tf-share-flow__wire:nth-child(4) {
  animation-delay: 0.94s;
}
.tf-share-flow__wire:nth-child(5) {
  animation-delay: 1.07s;
}
.tf-share-flow__wire:nth-child(6) {
  animation-delay: 1.2s;
}

@keyframes tfShareWireDraw {
  0%,
  14% {
    stroke-dashoffset: 1;
    opacity: 0.2;
  }
  32%,
  88% {
    stroke-dashoffset: 0;
    opacity: 0.95;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.95;
  }
}

/* ─── Musiker ─── */
.tf-share-flow__musicians {
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 5%;
  height: 58%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 2;
}

.tf-share-flow__musician {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 0.2rem 0.5rem;
  background: var(--sf-panel);
  border: 1px solid var(--sf-panel-edge);
  border-radius: 10px;
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease;
  animation: tfShareMusicianGlow 5s ease-in-out infinite;
}

.tf-share-flow__musician:nth-child(1) {
  animation-delay: 1.35s;
}
.tf-share-flow__musician:nth-child(2) {
  animation-delay: 1.5s;
}
.tf-share-flow__musician:nth-child(3) {
  animation-delay: 1.65s;
}
.tf-share-flow__musician:nth-child(4) {
  animation-delay: 1.8s;
}
.tf-share-flow__musician:nth-child(5) {
  animation-delay: 1.95s;
}
.tf-share-flow__musician:nth-child(6) {
  animation-delay: 2.1s;
}

@keyframes tfShareMusicianGlow {
  0%,
  26% {
    border-color: var(--sf-panel-edge);
    box-shadow: none;
  }
  34%,
  88% {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 0 0 1px var(--sf-orange-dim), 0 8px 20px rgba(59, 130, 246, 0.15);
  }
  100% {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 0 0 1px var(--sf-orange-dim);
  }
}

.tf-share-flow__label {
  font-size: clamp(0.45rem, 1.4vw, 0.58rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sf-ink);
  text-align: center;
  line-height: 1.15;
  margin-bottom: 0.2rem;
}

.tf-share-flow__icon {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  min-height: 2.2rem;
  color: #8b93a8;
}

.tf-share-flow__icon svg {
  width: 85%;
  max-height: 2.8rem;
  height: auto;
}

.tf-share-flow__icon .sf-accent {
  fill: var(--sf-orange);
}

.tf-share-flow__badge {
  position: absolute;
  right: 0.15rem;
  bottom: 0.15rem;
  width: clamp(14px, 3.5vw, 20px);
  height: clamp(14px, 3.5vw, 20px);
  border-radius: 5px;
  background: #252a35;
  border: 1px solid var(--sf-panel-edge);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  opacity: 0;
  animation: tfShareBadgePop 5s var(--tf-ease-spring) infinite;
}

.tf-share-flow__musician:nth-child(1) .tf-share-flow__badge {
  animation-delay: 1.4s;
}
.tf-share-flow__musician:nth-child(2) .tf-share-flow__badge {
  animation-delay: 1.55s;
}
.tf-share-flow__musician:nth-child(3) .tf-share-flow__badge {
  animation-delay: 1.7s;
}
.tf-share-flow__musician:nth-child(4) .tf-share-flow__badge {
  animation-delay: 1.85s;
}
.tf-share-flow__musician:nth-child(5) .tf-share-flow__badge {
  animation-delay: 2s;
}
.tf-share-flow__musician:nth-child(6) .tf-share-flow__badge {
  animation-delay: 2.15s;
}

.tf-share-flow__badge svg {
  width: 70%;
  height: 70%;
}

@keyframes tfShareBadgePop {
  0%,
  28% {
    transform: scale(0);
    opacity: 0;
  }
  36%,
  88% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes tfShareBtnPulse {
  0%,
  8% {
    transform: scale(1);
    box-shadow: 0 4px 14px rgba(242, 101, 34, 0.45);
  }
  12% {
    transform: scale(0.94);
    box-shadow: 0 2px 8px rgba(242, 101, 34, 0.35);
  }
  16%,
  88% {
    transform: scale(1);
    box-shadow: 0 6px 20px rgba(242, 101, 34, 0.55);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes tfShareCursor {
  0%,
  6% {
    opacity: 0;
    transform: translate(8px, 8px);
  }
  10% {
    opacity: 1;
    transform: translate(0, 0);
  }
  14% {
    opacity: 1;
    transform: translate(0, 2px);
  }
  18%,
  100% {
    opacity: 0;
    transform: translate(0, 2px);
  }
}

/* Partikel: fliegende Notenblätter */
.tf-share-flow__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.tf-share-flow__particle {
  position: absolute;
  width: 10px;
  height: 12px;
  background: var(--sf-orange);
  border-radius: 2px;
  opacity: 0;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
  animation: tfShareParticle 5s ease-in-out infinite;
}

.tf-share-flow__particle::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  right: 2px;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 3px 0 rgba(255, 255, 255, 0.35);
}

.tf-share-flow__particle:nth-child(1) {
  left: 48%;
  top: 28%;
  animation-delay: 0.7s;
  --sf-dx: -38%;
  --sf-dy: 42%;
}
.tf-share-flow__particle:nth-child(2) {
  left: 50%;
  top: 28%;
  animation-delay: 0.85s;
  --sf-dx: -22%;
  --sf-dy: 44%;
}
.tf-share-flow__particle:nth-child(3) {
  left: 51%;
  top: 28%;
  animation-delay: 1s;
  --sf-dx: 0%;
  --sf-dy: 46%;
}
.tf-share-flow__particle:nth-child(4) {
  left: 50%;
  top: 28%;
  animation-delay: 1.15s;
  --sf-dx: 18%;
  --sf-dy: 44%;
}
.tf-share-flow__particle:nth-child(5) {
  left: 49%;
  top: 28%;
  animation-delay: 1.3s;
  --sf-dx: 32%;
  --sf-dy: 42%;
}
.tf-share-flow__particle:nth-child(6) {
  left: 50%;
  top: 28%;
  animation-delay: 1.45s;
  --sf-dx: 42%;
  --sf-dy: 40%;
}

@keyframes tfShareParticle {
  0%,
  14% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
  }
  20% {
    opacity: 1;
  }
  38% {
    opacity: 0;
    transform: translate(var(--sf-dx), var(--sf-dy)) scale(0.85);
  }
  100% {
    opacity: 0;
  }
}

@media (max-width: 520px) {
  .tf-share-flow__musicians {
    gap: 0.2rem;
  }

  .tf-share-flow__label {
    font-size: 0.42rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tf-share-flow__wire,
  .tf-share-flow__btn,
  .tf-share-flow__cursor,
  .tf-share-flow__musician,
  .tf-share-flow__badge,
  .tf-share-flow__particle {
    animation: none !important;
  }

  .tf-share-flow__wire {
    stroke-dashoffset: 0;
    opacity: 0.9;
  }

  .tf-share-flow__badge {
    transform: scale(1);
    opacity: 1;
  }

  .tf-share-flow__particle {
    display: none;
  }
}
