/* ===========================================
   Neon Glow Effects & Animations
   =========================================== */

/* Glowing scan line on header */
.main-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(0, 240, 255, 0.5),
    rgba(255, 43, 214, 0.5),
    transparent);
  animation: scan-line 8s linear infinite;
}

@keyframes scan-line {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Pulse animation for active day pill */
.day-pill.active::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
  z-index: -1;
  opacity: 0.4;
  filter: blur(8px);
  animation: pulse-glow 3s ease-in-out infinite;
}

.day-pill { position: relative; }

@keyframes pulse-glow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Metric value subtle flicker */
.metric-value.value-cyan,
.metric-value.value-magenta,
.metric-value.value-green {
  animation: subtle-flicker 6s ease-in-out infinite;
}

@keyframes subtle-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.92; }
}

/* Day card glow on hover */
.day-card {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.day-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5),
              0 0 30px rgba(0, 240, 255, 0.08);
}

.dc-gym:hover { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 240, 255, 0.15); }
.dc-home:hover { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(57, 255, 20, 0.15); }
.dc-zwift:hover { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(176, 38, 255, 0.15); }
.dc-ride:hover { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 140, 0, 0.15); }
.dc-recover:hover { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 43, 214, 0.15); }

/* Section title scanning effect */
.section-title {
  position: relative;
}

.section-title::before {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  color: var(--neon-magenta);
  opacity: 0;
  pointer-events: none;
  filter: blur(2px);
  transform: translate(2px, 0);
  animation: glitch 8s ease-in-out infinite;
}

@keyframes glitch {
  0%, 96%, 100% { opacity: 0; transform: translate(0, 0); }
  97% { opacity: 0.6; transform: translate(-2px, 0); }
  98% { opacity: 0.6; transform: translate(2px, 0); }
  99% { opacity: 0; }
}

/* Type tag glow */
.day-card-type {
  position: relative;
  box-shadow: 0 0 15px var(--day-accent, var(--neon-cyan));
}

/* Loading shimmer for placeholders */
.shimmer {
  background: linear-gradient(90deg,
    var(--bg-card) 0%,
    rgba(0, 240, 255, 0.05) 50%,
    var(--bg-card) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

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

/* Smooth fade-in for content */
.day-card, .metric-card, .shop-category, .gloss-item {
  animation: fade-up 0.6s ease-out backwards;
}

.day-card:nth-child(1) { animation-delay: 0.05s; }
.day-card:nth-child(2) { animation-delay: 0.1s; }
.day-card:nth-child(3) { animation-delay: 0.15s; }
.day-card:nth-child(4) { animation-delay: 0.2s; }
.day-card:nth-child(5) { animation-delay: 0.25s; }
.day-card:nth-child(6) { animation-delay: 0.3s; }
.day-card:nth-child(7) { animation-delay: 0.35s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Selection */
::selection {
  background: var(--neon-cyan);
  color: var(--bg-primary);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-magenta));
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--neon-magenta), var(--neon-cyan));
}
