/**
 * ==============================================================================
 * Magic UI + UIverse.io Design System & Interactive Components for Social Shout
 * Based on: https://magicui.design & https://uiverse.io
 * ==============================================================================
 */

:root {
  --magic-primary: #465FFF;
  --magic-primary-light: #EFF4FE;
  --magic-secondary: #00D2D3;
  --magic-accent: #7C3AED;
  --magic-glow: rgba(70, 95, 255, 0.35);
  --magic-glow-emerald: rgba(16, 185, 129, 0.35);
  --magic-glow-rose: rgba(244, 63, 94, 0.35);
  --magic-card-bg: #FFFFFF;
  --magic-border: #E5E7EB;
  --uiverse-shadow: 0 10px 30px -10px rgba(0,0,0,0.08);
}

/* ==============================================================================
   1. MAGIC UI: PATTERNS & BACKGROUNDS
   ============================================================================== */
.magic-grid-bg {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

.magic-dot-bg {
  background-image: radial-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Meteors Effect */
.magic-meteor-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.magic-meteor {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 9999px;
  background-color: var(--magic-primary);
  box-shadow: 0 0 0 1px #ffffff10;
  transform: rotate(215deg);
  animation: magicMeteorAnim linear infinite;
}

.magic-meteor::before {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--magic-primary), transparent);
}

@keyframes magicMeteorAnim {
  0% { transform: rotate(215deg) translateX(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: rotate(215deg) translateX(-500px); opacity: 0; }
}

/* ==============================================================================
   2. MAGIC UI: SHINY TEXT & GRADIENTS
   ============================================================================== */
.magic-text-gradient {
  background: linear-gradient(135deg, #465FFF 0%, #00D2D3 50%, #7C3AED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.magic-shiny-text {
  background: linear-gradient(90deg, #1E293B 0%, #465FFF 40%, #00D2D3 60%, #1E293B 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: magicShinySweep 4s infinite linear;
}

@keyframes magicShinySweep {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.magic-badge-shiny {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 9999px;
  background: #EFF4FE;
  border: 1px solid #DBE5FE;
  color: #3641F5;
  font-size: 11.5px;
  font-weight: 700;
  overflow: hidden;
}

.magic-badge-shiny::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  animation: magicBadgeShimmer 2.8s infinite;
}

@keyframes magicBadgeShimmer {
  0% { left: -100%; }
  60% { left: 150%; }
  100% { left: 150%; }
}

/* ==============================================================================
   3. MAGIC UI: BORDER BEAM & GLOW CARDS
   ============================================================================== */
.magic-border-beam {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 16px;
}

.magic-border-beam::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, transparent, transparent, #465FFF, #00D2D3, transparent);
  animation: magicRotateBeam 5s linear infinite;
  z-index: -2;
}

.magic-border-beam::after {
  content: '';
  position: absolute;
  inset: 1.5px;
  background: #ffffff;
  border-radius: 14.5px;
  z-index: -1;
}

@keyframes magicRotateBeam {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Interactive Spotlight (Mouse-Tracking Radial Glow) */
.magic-spotlight {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--magic-border);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.magic-spotlight::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, -200px);
  left: var(--mouse-x, -200px);
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(70, 95, 255, 0.12) 0%, rgba(70, 95, 255, 0.03) 40%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.magic-spotlight:hover::before {
  opacity: 1;
}

.magic-spotlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(70, 95, 255, 0.12);
}

/* ==============================================================================
   4. UIVERSE.IO: BEST BUTTONS & INTERACTIVE CONTROLS
   ============================================================================== */

/* UIverse Shimmer Button (Hero Action) */
.uiverse-btn-shimmer {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, #465FFF 0%, #3641F5 100%);
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(70, 95, 255, 0.35);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
}

.uiverse-btn-shimmer:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(70, 95, 255, 0.45);
}

.uiverse-btn-shimmer:active {
  transform: translateY(0);
}

.uiverse-btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
  transform: rotate(25deg);
  animation: uiverseShimmerBtn 3.5s infinite;
}

@keyframes uiverseShimmerBtn {
  0% { transform: translateX(-100%) rotate(25deg); }
  35% { transform: translateX(100%) rotate(25deg); }
  100% { transform: translateX(100%) rotate(25deg); }
}

/* UIverse Copy-to-Clipboard Animated Button */
.uiverse-btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  background: #F4F6F8;
  border: 1px solid #E5E7EB;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.uiverse-btn-copy:hover {
  background: #EFF4FE;
  border-color: #DBE5FE;
  color: #465FFF;
}

.uiverse-btn-copy.copied {
  background: #ECFDF5 !important;
  border-color: #A7F3D0 !important;
  color: #059669 !important;
}

/* UIverse Creative Checkbox & Switch Pills */
.uiverse-channel-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #ffffff;
  border: 1.5px solid #E5E7EB;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.uiverse-channel-pill:hover {
  border-color: #CBD5E1;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.06);
}

.uiverse-channel-pill.selected {
  border-color: var(--magic-primary) !important;
  background: #F8FAFF !important;
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.15), 0 8px 20px -4px rgba(70, 95, 255, 0.12) !important;
}

/* UIverse Animated Spring Checkmark */
.uiverse-check-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.uiverse-channel-pill.selected .uiverse-check-circle {
  background: var(--magic-primary);
  border-color: var(--magic-primary);
  color: #ffffff;
  transform: scale(1.08);
}

/* ==============================================================================
   5. UIVERSE.IO: STATS CARDS & BENTO GRID
   ============================================================================== */
.uiverse-bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.uiverse-stat-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.uiverse-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -6px rgba(0,0,0,0.06);
  border-color: #D1D5DB;
}

.uiverse-stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.uiverse-stat-card:hover .uiverse-stat-icon-wrap {
  transform: scale(1.1);
}

/* Number Ticker Display */
.magic-number-ticker {
  font-family: 'Public Sans', sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
}

/* ==============================================================================
   6. UIVERSE.IO: PULSE LOADERS & RADIAL ORBIT
   ============================================================================== */
.uiverse-orbit-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(70, 95, 255, 0.15);
  border-top-color: var(--magic-primary);
  animation: uiverseSpin 0.8s linear infinite;
  display: inline-block;
}

@keyframes uiverseSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.uiverse-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 3px 10px;
  border-radius: 9999px;
}

.uiverse-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  position: relative;
}

.uiverse-live-dot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: #10B981;
  animation: magicPulse 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes magicPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ==============================================================================
   7. UIVERSE.IO: CREATIVE DROPZONE
   ============================================================================== */
.uiverse-dropzone {
  border: 2px dashed #CBD5E1;
  background: #F8FAFC;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.uiverse-dropzone:hover, .uiverse-dropzone.dragover {
  border-color: var(--magic-primary);
  background: #EFF4FE;
  box-shadow: 0 0 0 4px rgba(70, 95, 255, 0.1);
}

.uiverse-dropzone .dropzone-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #DBE5FE;
  color: #465FFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 12px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.uiverse-dropzone:hover .dropzone-icon-box {
  transform: translateY(-3px) scale(1.05);
  background: #465FFF;
  color: #ffffff;
}

/* ==============================================================================
   8. MARQUEE / STATUS TICKER
   ============================================================================== */
.magic-marquee-wrapper {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.magic-marquee-content {
  display: inline-flex;
  gap: 24px;
  animation: magicMarqueeScroll 25s linear infinite;
}

@keyframes magicMarqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
