/**
 * BeatUnzip AI — Smart Loop Studio (LoopCut Pro) Styles
 * Author: ComposerMind Labs / Boobalan Arjunan
 * Aesthetics: Cyberpunk Dark Studio Glassmorphism, Neon Accents, Rhythmic Typography
 */

/* View Container */
#view-smart-loop {
  padding-bottom: 4rem;
}

.smart-loop-hero-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.08) 0%, rgba(139, 92, 246, 0.05) 50%, rgba(10, 11, 16, 0.8) 100%);
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.smart-loop-title-block h2 {
  font-family: var(--font-brutal, 'Syne', sans-serif);
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.smart-loop-title-block p {
  color: var(--text-secondary, #94a3b8);
  font-size: 0.88rem;
  margin: 0;
}

.smart-loop-badge-pro {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.5);
}

/* Track Meta Badges Strip */
.smart-loop-track-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-pill-tag {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.8rem;
  font-weight: 600;
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-pill-tag.track-name-pill {
  border-color: rgba(236, 72, 153, 0.4);
  color: #f472b6;
  background: rgba(236, 72, 153, 0.1);
  font-weight: 700;
}

.meta-pill-tag.count-pill {
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
}

/* Control Rack Card */
.smart-loop-control-rack {
  background: #11131c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control-rack-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.rack-section-label {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.button-pills-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-bar-pill, .btn-stem-pill, .btn-mode-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.btn-bar-pill:hover, .btn-stem-pill:hover, .btn-mode-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

.btn-bar-pill.active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
  border-color: #ec4899;
  color: #fff;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.35);
}

.btn-stem-pill.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   ADVANCE HARDWARE SHIFTING ROCKER SWITCH — SLICING SCOPE
   ========================================================================== */
.slicing-scope-rack-module {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 460px;
}

.scope-shift-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  background: #080a11;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  padding: 3px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.85), 0 0 16px rgba(0, 0, 0, 0.4);
  width: 460px;
  max-width: 100%;
  box-sizing: border-box;
  user-select: none;
  overflow: hidden;
}

.scope-shift-glider {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 7px;
  transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  pointer-events: none;
  z-index: 1;
}

/* Smart Highlights Active State */
.scope-shift-track.mode-smart .scope-shift-glider {
  transform: translateX(0);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(229, 9, 20, 0.25) 100%);
  border: 1px solid #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Full Song Grid Active State */
.scope-shift-track.mode-full_song .scope-shift-glider {
  transform: translateX(100%);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22) 0%, rgba(16, 185, 129, 0.25) 100%);
  border: 1px solid #00ffc4;
  box-shadow: 0 0 16px rgba(0, 255, 196, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.scope-shift-btn {
  position: relative;
  z-index: 2;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer;
  border-radius: 7px;
  color: #94a3b8;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.79rem;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
  overflow: hidden;
}

.scope-sub-pill {
  font-size: 0.60rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-family: var(--font-mono, monospace);
  flex-shrink: 0;
  line-height: 1.2;
}

.scope-shift-btn:hover {
  color: #fff;
}

.scope-shift-track.mode-smart #btnScopeSmart {
  color: #fef3c7 !important;
  font-weight: 700 !important;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.scope-shift-track.mode-full_song #btnScopeFullSong {
  color: #e0f2fe !important;
  font-weight: 700 !important;
  text-shadow: 0 0 8px rgba(0, 255, 196, 0.5);
}

.scope-btn-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.scope-sub-pill {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-family: var(--font-mono, monospace);
}

.scope-sub-amber {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.scope-sub-cyan {
  background: rgba(6, 182, 212, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.45);
}

.scope-mode-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 0.73rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 3px;
  line-height: 1.4;
}

.scope-status-bulb {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.scope-shift-track.mode-smart ~ .scope-mode-status .scope-status-bulb {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.scope-shift-track.mode-full_song ~ .scope-mode-status .scope-status-bulb {
  background: #00ffc4;
  box-shadow: 0 0 8px #00ffc4;
}

.btn-mode-pill {
  letter-spacing: 0.3px;
}

.btn-mode-pill.active {
  background: linear-gradient(135deg, rgba(0, 255, 196, 0.16) 0%, rgba(16, 185, 129, 0.22) 100%) !important;
  border-color: #00ffc4 !important;
  color: #00ffc4 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 16px rgba(0, 255, 196, 0.35) !important;
}

/* Action Buttons */
.rack-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-loop-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: #fff;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
  transition: all 0.2s ease;
}

.btn-loop-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

.btn-loop-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-loop-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-loop-zip {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.btn-loop-zip:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(6, 182, 212, 0.25) 100%);
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}

/* Drag & Drop Mini Area */
.smart-loop-dropzone {
  border: 1.5px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.015);
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.smart-loop-dropzone:hover, .smart-loop-dropzone.dragover {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.05);
}

/* Loop Cards Grid */
.loop-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 18px;
  margin-bottom: 3rem;
}

@media (max-width: 600px) {
  .loop-cards-grid {
    grid-template-columns: 1fr;
  }
}

.loop-card {
  background: #10121a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.loop-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(236, 72, 153, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loop-card:hover {
  border-color: rgba(236, 72, 153, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.loop-card:hover::before {
  opacity: 1;
}

@keyframes loopCardPulse {
  0% {
    border-color: #00ffc4;
    box-shadow: 0 0 25px rgba(0, 255, 196, 0.45), inset 0 0 15px rgba(0, 255, 196, 0.08);
  }
  50% {
    border-color: #ec4899;
    box-shadow: 0 0 35px rgba(236, 72, 153, 0.65), inset 0 0 20px rgba(236, 72, 153, 0.12);
  }
  100% {
    border-color: #00ffc4;
    box-shadow: 0 0 25px rgba(0, 255, 196, 0.45), inset 0 0 15px rgba(0, 255, 196, 0.08);
  }
}

.loop-card.card-playing {
  border-color: #00ffc4 !important;
  animation: loopCardPulse 2.2s infinite ease-in-out !important;
  background: linear-gradient(180deg, #131b2e 0%, #0d121c 100%) !important;
}

.loop-card.card-playing::before {
  opacity: 1;
  background: linear-gradient(90deg, #00ffc4, #ec4899, #8b5cf6);
}

.loop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.loop-meta-title-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.loop-seq-num {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.85rem;
  font-weight: 800;
  color: #64748b;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.loop-name {
  font-family: var(--font-brutal, 'Syne', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 5px 0;
}

.loop-sub-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.loop-tag-chip {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

.loop-tag-chip.bar-tag {
  color: #f472b6;
  background: rgba(236, 72, 153, 0.12);
}

.loop-tag-chip.time-tag {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

.loop-tag-chip.src-tag {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
}

.loop-score-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #ec4899;
  min-width: 58px;
}

.score-num {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
}

.score-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Waveform Scrubber */
.loop-waveform-wrapper {
  position: relative;
  height: 48px;
  background: #090a0f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.loop-waveform-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  gap: 2px;
}

.waveform-stick {
  flex: 1;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  transition: background 0.15s ease;
}

.loop-card:hover .waveform-stick {
  background: rgba(236, 72, 153, 0.4);
}

@keyframes waveDance {
  0% { transform: scaleY(0.4); opacity: 0.6; }
  50% { transform: scaleY(1.15); opacity: 1; }
  100% { transform: scaleY(0.5); opacity: 0.7; }
}

.loop-card.card-playing .waveform-stick {
  background: linear-gradient(180deg, #00ffc4 0%, #ec4899 100%) !important;
  animation: waveDance 0.8s ease-in-out infinite alternate !important;
}
.loop-card.card-playing .waveform-stick:nth-child(2n) { animation-delay: 0.15s !important; }
.loop-card.card-playing .waveform-stick:nth-child(3n) { animation-delay: 0.3s !important; }
.loop-card.card-playing .waveform-stick:nth-child(4n) { animation-delay: 0.45s !important; }
.loop-card.card-playing .waveform-stick:nth-child(5n) { animation-delay: 0.6s !important; }

.loop-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 255, 196, 0.15);
  border: 1px solid rgba(0, 255, 196, 0.45);
  color: #00ffc4;
  box-shadow: 0 0 10px rgba(0, 255, 196, 0.35);
}

@keyframes livePulseDot {
  0% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 0 rgba(0, 255, 196, 0.7); }
  70% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 0 5px rgba(0, 255, 196, 0); }
  100% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 0 rgba(0, 255, 196, 0); }
}

.live-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ffc4;
  display: inline-block;
  animation: livePulseDot 1.4s infinite;
}

.loop-stop-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.loop-stop-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ef4444;
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.loop-scrubber-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.3) 0%, rgba(139, 92, 246, 0.5) 100%);
  border-right: 2px solid #ec4899;
  box-shadow: 0 0 10px #ec4899;
  pointer-events: none;
}

/* Card Footer Controls */
.loop-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.loop-play-control-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.loop-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.loop-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.6);
}

.loop-play-btn.playing {
  background: #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.5);
}

.loop-time-readout {
  display: flex;
  flex-direction: column;
}

.loop-timer-txt {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.loop-looping-indicator {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 500;
}

.btn-loop-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-loop-download:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* Scanning / Loading Box */
.loop-scanning-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  background: rgba(17, 19, 28, 0.6);
  border: 1px dashed rgba(236, 72, 153, 0.4);
  border-radius: 14px;
}

.scanning-ring-pulse {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(236, 72, 153, 0.2);
  border-top-color: #ec4899;
  border-radius: 50%;
  margin: 0 auto;
  animation: loopSpin 0.8s linear infinite;
}

@keyframes loopSpin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.empty-loop-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 24px;
  background: rgba(17, 19, 28, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

/* 12 Features Infographic Grid */
.loop-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 1rem;
}

.feature-info-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
}

.feature-info-card h5 {
  margin: 0 0 4px 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-info-card p {
  margin: 0;
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.4;
}
