/* Creator Asset Hub - Custom Animated CTA Generator Styles */
@import url('tokens.css');
@import url('components.css');
@import url('hub.css');

/* ==========================================================================
   CTA Timeline Scrubber & Playback Controls
   ========================================================================== */
.timeline-bar {
  min-height: 64px;
  background: var(--hub-bg-glass);
  backdrop-filter: var(--hub-blur-md);
  border-top: 1px solid var(--hub-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  gap: 20px;
  z-index: 100;
  width: 100%;
}

.timeline-playback-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-playback {
  width: 38px;
  height: 38px;
  border-radius: var(--hub-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hub-border-subtle);
  color: var(--hub-text-primary);
  cursor: pointer;
  transition: all var(--hub-transition-fast);
}

.btn-playback:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: scale(1.05);
}

.btn-playback.active-play {
  background: var(--hub-accent-primary);
  color: #0b0a10;
  border-color: transparent;
  box-shadow: 0 0 14px rgba(229, 169, 60, 0.55);
}

[data-theme="light"] .btn-playback.active-play {
  background: #1c1612;
  color: #f8f5ee;
}

[data-theme="light"] .btn-playback {
  background: var(--hub-bg-surface);
  border-color: var(--hub-border-subtle);
  color: var(--hub-text-primary);
}

[data-theme="light"] .timeline-bar {
  background: var(--hub-bg-surface);
  border-top-color: var(--hub-border-subtle);
}

.timeline-track-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.timecode-display {
  font-family: var(--font-telemetry);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hub-accent-primary);
  min-width: 80px;
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.timeline-slider {
  flex: 1;
  position: relative;
  min-width: 0;
}

.timeline-progress-bar {
  width: 100%;
  height: 8px;
  appearance: none;
  background: var(--hub-border-medium);
  border-radius: var(--hub-radius-full);
  outline: none;
  cursor: pointer;
}

[data-theme="light"] .timeline-progress-bar {
  background: var(--hub-border-subtle);
}

.timeline-progress-bar::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--hub-accent-primary);
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(229, 169, 60, 0.8);
  cursor: pointer;
  transition: transform 0.1s;
}

[data-theme="light"] .timeline-progress-bar::-webkit-slider-thumb {
  background: #1c1612;
  border: 2px solid var(--hub-accent-primary);
}

.timeline-progress-bar::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.timeline-meta-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* ==========================================================================
   Interactive Animation Canvas Stage
   ========================================================================== */
.cta-stage-container {
  width: 100%;
  max-width: 900px;
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: var(--hub-radius-lg);
  box-shadow: var(--hub-shadow-lg);
  transition: height var(--hub-transition-smooth);
}

/* Virtual Cursor */
.virtual-mouse-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  pointer-events: none;
  z-index: 1000;
  transform: translate(-50px, -50px);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
  transition: transform 0.05s linear;
}

.virtual-mouse-cursor svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
  stroke: #181829;
  stroke-width: 1.5;
}

.cursor-click-ripple {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.4);
  border: 2px solid var(--hub-accent-primary);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  opacity: 0;
  z-index: 999;
}

.cursor-click-ripple.rippling {
  animation: ripplePop 0.45s ease-out forwards;
}

@keyframes ripplePop {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

/* ==========================================================================
   Animated CTA Elements & Templates
   ========================================================================== */

/* Template 1: YouTube Subscribe & Bell Bar */
.cta-yt-subscribe-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(18, 18, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  border-radius: 40px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  transform-origin: center center;
  max-width: 100%;
  box-sizing: border-box;
}

.cta-channel-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.cta-channel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-channel-info {
  display: flex;
  flex-direction: column;
  margin-right: 8px;
  min-width: 0;
}

.cta-channel-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cta-channel-subs {
  font-family: var(--font-body);
  font-size: 0.775rem;
  color: var(--hub-text-secondary);
  white-space: nowrap;
}

.cta-sub-button {
  padding: 10px 22px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  background: #ff0000;
  color: #ffffff;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cta-sub-button.is-subscribed {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.cta-bell-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cta-bell-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.cta-bell-button.bell-ringing {
  animation: bellWiggle 0.6s ease-in-out;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
}

@keyframes bellWiggle {
  0% { transform: rotate(0); }
  20% { transform: rotate(-22deg); }
  40% { transform: rotate(20deg); }
  60% { transform: rotate(-12deg); }
  80% { transform: rotate(8deg); }
  100% { transform: rotate(0); }
}

/* Template 2: Social Lower-Third / Follow Pill */
.cta-social-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  background: rgba(14, 14, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  max-width: 100%;
  box-sizing: border-box;
}

.cta-social-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.cta-social-text-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cta-social-action-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hub-text-secondary);
}

.cta-social-handle {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Template 3: Streamer Alert / Event Notification */
.cta-stream-alert-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  background: linear-gradient(135deg, rgba(30, 20, 50, 0.95), rgba(15, 10, 30, 0.95));
  border: 2px solid var(--hub-accent-secondary);
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.45);
  max-width: 100%;
  box-sizing: border-box;
}

.cta-stream-alert-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--hub-accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

/* Template 4: Engagement Like & Share Multi-Action */
.cta-engagement-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(18, 18, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 40px;
  max-width: 100%;
  box-sizing: border-box;
}

.engagement-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

.engagement-item.active-liked {
  background: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
}

/* ==========================================================================
   Mobile Responsive Rules for Animated CTA Generator
   ========================================================================== */
@media (max-width: 768px) {
  .cta-stage-container {
    height: 300px;
    border-radius: var(--hub-radius-md);
  }

  .cta-yt-subscribe-card {
    padding: 10px 14px;
    gap: 10px;
    border-radius: 30px;
    max-width: 95%;
  }

  .cta-channel-avatar {
    width: 38px;
    height: 38px;
  }

  .cta-channel-name {
    font-size: 0.875rem;
  }

  .cta-channel-subs {
    font-size: 0.675rem;
  }

  .cta-sub-button {
    padding: 7px 14px;
    font-size: 0.775rem;
  }

  .cta-bell-button {
    width: 34px;
    height: 34px;
  }

  .cta-bell-button svg {
    width: 16px;
    height: 16px;
  }

  .cta-social-pill {
    padding: 10px 16px;
    gap: 10px;
  }

  .cta-social-icon-box {
    width: 34px;
    height: 34px;
  }

  .cta-social-handle {
    font-size: 0.95rem;
  }

  .cta-stream-alert-box {
    padding: 12px 18px;
    gap: 10px;
  }

  .cta-engagement-bar {
    padding: 8px 12px;
    gap: 6px;
  }

  .engagement-item {
    padding: 6px 10px;
    font-size: 0.75rem;
    gap: 5px;
  }

  /* Responsive Timeline Bar */
  .timeline-bar {
    height: auto;
    padding: 10px 12px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .timeline-track-container {
    order: 1;
    width: 100%;
    flex: 1 1 100%;
    gap: 10px;
  }

  .timecode-display {
    font-size: 0.75rem;
    min-width: 70px;
  }

  .timeline-playback-btns {
    order: 2;
  }

  .timeline-meta-controls {
    order: 3;
    margin-left: auto;
  }
}

@media (max-width: 480px) {
  .cta-stage-container {
    height: 270px;
  }

  .cta-yt-subscribe-card {
    padding: 8px 10px;
    gap: 8px;
  }

  .cta-channel-name {
    font-size: 0.8rem;
  }

  .cta-sub-button {
    padding: 6px 10px;
    font-size: 0.725rem;
  }
}
