/* ==============================
   PHASE 4: ADDICTION LOOP UI
   Intelligence Feed Styles
   ============================== */

/* Daily Spark Widget */
.daily-spark {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  animation: sparkGlow 3s ease-in-out infinite;
}
@keyframes sparkGlow {
  0%, 100% { box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3); }
  50%       { box-shadow: 0 10px 40px rgba(102, 126, 234, 0.5); }
}
.daily-spark::before {
  content: '✨';
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 120px;
  opacity: 0.08;
  animation: sparkRotate 20s linear infinite;
  pointer-events: none;
}
@keyframes sparkRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.spark-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.spark-message {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  opacity: 0.95;
}
.spark-action {
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  padding: 9px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s;
  backdrop-filter: blur(10px);
}
.spark-action:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

/* Maturity Score Widget */
.maturity-widget {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 16px;
  padding: 20px 24px;
  color: white;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.maturity-score-circle {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  position: relative;
}
.score-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  font-weight: 700;
}
.maturity-info { flex: 1; }
.maturity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}
.badge-icon { font-size: 18px; }
.maturity-subtitle {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 8px;
}
.maturity-progress {
  height: 6px;
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
  overflow: hidden;
}
.maturity-progress-fill {
  height: 100%;
  background: white;
  border-radius: 3px;
  transition: width 1.2s ease-out;
  width: 0%;
}

/* Intelligence Ticker */
.intelligence-ticker {
  background: rgba(10, 10, 30, 0.85);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 10px;
  padding: 10px 0;
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}
.intelligence-ticker::before,
.intelligence-ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}
.intelligence-ticker::before {
  left: 0;
  background: linear-gradient(to right, rgba(10,10,30,0.85), transparent);
}
.intelligence-ticker::after {
  right: 0;
  background: linear-gradient(to left, rgba(10,10,30,0.85), transparent);
}
.ticker-track {
  display: flex;
  animation: tickerScroll 40s linear infinite;
  width: max-content;
}
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  white-space: nowrap;
  color: #c8d0e0;
  font-size: 13px;
}
.ticker-separator {
  color: rgba(102, 126, 234, 0.4);
  padding: 0 4px;
}

/* Brain Pulse FAB */
.brain-pulse {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.45);
  cursor: pointer;
  animation: brainPulse 2.5s ease-in-out infinite;
  z-index: 999;
  transition: transform 0.2s;
}
.brain-pulse:hover { transform: scale(1.12); }
@keyframes brainPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.45);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 4px 32px rgba(102, 126, 234, 0.65);
  }
}
.brain-pulse.scanning {
  animation: brainScan 0.8s linear infinite;
}
@keyframes brainScan {
  0%   { transform: rotate(0deg)   scale(1); }
  50%  { transform: rotate(180deg) scale(1.05); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Staggered fade-in for feed items */
.feed-fade-in {
  animation: feedFadeUp 0.5s ease-out forwards;
  opacity: 0;
}
.feed-fade-in:nth-child(1) { animation-delay: 0.05s; }
.feed-fade-in:nth-child(2) { animation-delay: 0.15s; }
.feed-fade-in:nth-child(3) { animation-delay: 0.25s; }

@keyframes feedFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
