/* Also try — compact tool cards with mini motion previews */

.rd-lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 14px;
}

.rd-lab-prem {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #5aa0ff, #2e6fd1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 14px rgba(90, 160, 255, 0.45);
  pointer-events: none;
}

.rd-lab-prem .diamond {
  width: 7px;
  height: 7px;
  display: inline-block;
  background: linear-gradient(135deg, #fff, #cfe2ff 55%, #5aa0ff);
  clip-path: polygon(50% 0, 100% 38%, 80% 100%, 20% 100%, 0 38%);
}

.rd-lab-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid var(--lab-edge, rgba(255, 255, 255, 0.07));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease,
    box-shadow 0.4s ease;
  min-width: 0;
}

.rd-lab-card:hover {
  transform: translateY(-3px);
  border-color: var(--lab-accent, rgba(90, 160, 255, 0.45));
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.55),
    0 0 36px var(--lab-glow, rgba(90, 160, 255, 0.12));
}

.rd-lab-prev {
  position: relative;
  height: 118px;
  overflow: hidden;
  background: var(--lab-surface, #080808);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rd-lab-prev::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 80% at 50% -10%, var(--lab-wash, transparent), transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 100%, var(--lab-wash, transparent), transparent 65%);
  opacity: 0.95;
}

.rd-lab-motion {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rd-lab-foot {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 15px;
  min-width: 0;
}

.rd-lab-foot b {
  display: block;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: #eef2f8;
  margin: 0 0 3px;
}

.rd-lab-foot span.desc {
  display: block;
  font-size: 12.5px;
  line-height: 1.38;
  color: #8791a4;
  letter-spacing: -0.004em;
}

.rd-lab-tx {
  flex: 1;
  min-width: 0;
}

.rd-lab-go {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-top: 2px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #eef2f8;
  transition: background 0.25s ease, transform 0.35s ease, border-color 0.25s ease;
}

.rd-lab-card:hover .rd-lab-go {
  background: var(--lab-accent-solid, #5aa0ff);
  border-color: transparent;
  color: #fff;
  transform: translateX(2px);
}

/* ── Per-tool colors ── */
.rd-lab-card[data-lab="beat-editor"] {
  --lab-accent: rgba(90, 160, 255, 0.55);
  --lab-accent-solid: #5aa0ff;
  --lab-surface: #0c1628;
  --lab-wash: rgba(74, 139, 232, 0.22);
  --lab-glow: rgba(74, 139, 232, 0.2);
  --lab-edge: rgba(90, 160, 255, 0.12);
}

/* Mobile B editor tile — desktop hub only links to full timeline editor */
@media (min-width: 721px) {
  .rd-lab-card[data-lab="beat-editor"] {
    display: none;
  }
}
.rd-lab-card[data-lab="lyric"] {
  --lab-accent: rgba(255, 120, 180, 0.55);
  --lab-accent-solid: #ff4d8d;
  --lab-surface: #1a0d18;
  --lab-wash: rgba(255, 77, 141, 0.2);
  --lab-glow: rgba(255, 77, 141, 0.18);
  --lab-edge: rgba(255, 120, 180, 0.14);
}
.rd-lab-card[data-lab="hook"] {
  --lab-accent: rgba(255, 160, 80, 0.55);
  --lab-accent-solid: #ff8c3a;
  --lab-surface: #1a100c;
  --lab-wash: rgba(255, 140, 58, 0.2);
  --lab-glow: rgba(255, 140, 58, 0.16);
  --lab-edge: rgba(255, 160, 80, 0.14);
}
.rd-lab-card[data-lab="tempo"] {
  --lab-accent: rgba(79, 212, 168, 0.55);
  --lab-accent-solid: #4caf7a;
  --lab-surface: #0c1412;
  --lab-wash: rgba(76, 175, 122, 0.2);
  --lab-glow: rgba(76, 175, 122, 0.16);
  --lab-edge: rgba(79, 212, 168, 0.14);
}
.rd-lab-card[data-lab="reframe"] {
  --lab-accent: rgba(90, 160, 255, 0.55);
  --lab-accent-solid: #4a8be8;
  --lab-surface: #0c1420;
  --lab-wash: rgba(74, 139, 232, 0.18);
  --lab-glow: rgba(74, 139, 232, 0.16);
  --lab-edge: rgba(90, 160, 255, 0.12);
}
.rd-lab-card[data-lab="enhance"] {
  --lab-accent: rgba(82, 219, 142, 0.55);
  --lab-accent-solid: #52db8e;
  --lab-surface: #0c1210;
  --lab-wash: rgba(63, 203, 126, 0.18);
  --lab-glow: rgba(63, 203, 126, 0.14);
  --lab-edge: rgba(82, 219, 142, 0.12);
}
.rd-lab-card[data-lab="montage"] {
  --lab-accent: rgba(120, 200, 255, 0.55);
  --lab-accent-solid: #78c8ff;
  --lab-surface: #0c1620;
  --lab-wash: rgba(120, 200, 255, 0.18);
  --lab-glow: rgba(120, 200, 255, 0.14);
  --lab-edge: rgba(120, 200, 255, 0.12);
}
.rd-lab-card[data-lab="vs"] {
  --lab-accent: rgba(176, 156, 255, 0.55);
  --lab-accent-solid: #9b8cff;
  --lab-surface: #12101c;
  --lab-wash: rgba(155, 140, 255, 0.18);
  --lab-glow: rgba(155, 140, 255, 0.14);
  --lab-edge: rgba(176, 156, 255, 0.12);
}

/* ── Mini preview animations ── */
@keyframes labBeatBar {
  0%, 100% { height: 18%; opacity: 0.55; }
  50% { height: 72%; opacity: 1; }
}
@keyframes labLoopSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes labRampPulse {
  0%, 100% { transform: scaleX(0.65); opacity: 0.5; }
  50% { transform: scaleX(1); opacity: 1; }
}
@keyframes labReframePan {
  0%, 100% { transform: translateX(-18%); }
  50% { transform: translateX(18%); }
}
@keyframes labSparkle {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}
@keyframes labSlide {
  0%, 100% { opacity: 0.35; transform: translateY(6px); }
  50% { opacity: 1; transform: translateY(0); }
}
@keyframes labLyricPop {
  0%, 70%, 100% { opacity: 0.4; transform: scale(0.92); }
  78%, 88% { opacity: 1; transform: scale(1.05); }
}

.rd-lab-motion--beat .lb-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 72%;
  height: 52px;
}
.rd-lab-motion--beat .lb-bars span {
  flex: 1;
  max-width: 8px;
  height: 20%;
  border-radius: 99px;
  background: linear-gradient(180deg, #7cc0ff, #3d8ef0);
  transform-origin: center;
  animation: labBeatBar 1s ease-in-out infinite;
}
.rd-lab-motion--beat .lb-bars span:nth-child(2) { animation-delay: 0.08s; }
.rd-lab-motion--beat .lb-bars span:nth-child(3) { animation-delay: 0.16s; }
.rd-lab-motion--beat .lb-bars span:nth-child(4) { animation-delay: 0.24s; }
.rd-lab-motion--beat .lb-bars span:nth-child(5) { animation-delay: 0.32s; }

.rd-lab-motion--lyric .lb-word {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffd6f0;
  text-align: center;
  animation: labLyricPop 2.4s ease-in-out infinite;
}
.rd-lab-motion--lyric .lb-word em {
  font-style: normal;
  color: #ff4d8d;
  text-shadow: 0 0 20px rgba(255, 77, 141, 0.5);
}

.rd-lab-motion--hook .lb-loop {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid rgba(255, 140, 58, 0.25);
  border-top-color: #ff8c3a;
  animation: labLoopSpin 1.4s linear infinite;
}
.rd-lab-motion--hook .lb-loop::after {
  content: "3s";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: #ffd6a8;
}

.rd-lab-motion--tempo .lb-ramp {
  width: 70%;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.rd-lab-motion--tempo .lb-ramp i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2d8a55, #78dca8 40%, #ff8c3a 60%, #2d8a55);
  transform-origin: center;
  animation: labRampPulse 1.8s ease-in-out infinite;
}

.rd-lab-motion--reframe .lb-frame {
  position: relative;
  width: 88px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(90, 160, 255, 0.35);
  background: linear-gradient(135deg, #1a3a6b, #4a8be8);
}
.rd-lab-motion--reframe .lb-crop {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 28px;
  margin-left: -14px;
  border: 2px solid #fff;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
  animation: labReframePan 2.2s ease-in-out infinite;
}

.rd-lab-motion--enhance .lb-spark {
  font-size: 36px;
  animation: labSparkle 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(82, 219, 142, 0.45));
}

.rd-lab-motion--montage .lb-photos {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.rd-lab-motion--montage .lb-photos i {
  width: 34px;
  height: 46px;
  border-radius: 6px;
  background: linear-gradient(155deg, rgba(120, 200, 255, 0.55), rgba(58, 107, 255, 0.35));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  animation: labSlide 1.4s ease-in-out infinite;
}
.rd-lab-motion--montage .lb-photos i:nth-child(2) { animation-delay: 0.2s; }
.rd-lab-motion--montage .lb-photos i:nth-child(3) { animation-delay: 0.4s; }

.rd-lab-motion--vs .lb-split {
  display: flex;
  gap: 6px;
  align-items: center;
}
.rd-lab-motion--vs .lb-split span {
  width: 38px;
  height: 54px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 11px;
  color: #fff;
}
.rd-lab-motion--vs .lb-split span.a {
  background: linear-gradient(135deg, #2d6cd0, #4a8be8);
}
.rd-lab-motion--vs .lb-split span.b {
  background: linear-gradient(135deg, #ff8c3a, #d96b1a);
}
.rd-lab-motion--vs .lb-split em {
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
  color: #c4b0ff;
  letter-spacing: 0.06em;
}

@media (prefers-reduced-motion: reduce) {
  .rd-lab-motion * {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .rd-lab-prev { height: 104px; }
  .rd-lab-foot { padding: 12px; }
}
