/* 常態功能: 浮動愛心背景 + 游標愛心軌跡 + 股票心跳卡片 */

/* ── 浮動愛心 ─────────────────────────────────────────────── */
@keyframes loveFloat {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10%  { opacity: 0.85; }
  50%  { transform: translateY(-42vh) translateX(var(--dx, 20px)) scale(1.12); opacity: 0.72; }
  90%  { opacity: 0.35; }
  100% { transform: translateY(-96vh) translateX(calc(var(--dx, 20px) * 1.9)) scale(0.65); opacity: 0; }
}

.love-heart {
  position: fixed;
  bottom: -40px;
  pointer-events: none;
  user-select: none;
  font-size: 22px;
  z-index: 9000;
  animation: loveFloat var(--duration, 12s) ease-in-out forwards;
  will-change: transform, opacity;
}

/* ── 游標愛心軌跡 ─────────────────────────────────────────── */
@keyframes cursorFade {
  0%   { transform: scale(1) translateY(0); opacity: 0.85; }
  100% { transform: scale(0.25) translateY(-18px); opacity: 0; }
}

.love-cursor-heart {
  position: fixed;
  pointer-events: none;
  user-select: none;
  font-size: 13px;
  z-index: 9001;
  animation: cursorFade 680ms ease-out forwards;
  transform-origin: center;
}

/* ── 股票頁: 心跳指數卡片 ────────────────────────────────── */
.love-stock-card {
  background: #ffffff;
  border: 1px solid rgba(220,38,38,0.18);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.love-stock-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #dc2626, #f1a82c);
}
.love-stock-meta { flex: 0 0 auto; }
.love-stock-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #65675e;
  margin-bottom: 4px;
}
.love-stock-num {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #111827;
  line-height: 1;
}
.love-stock-change {
  font-size: 14px;
  font-weight: 600;
  color: #dc2626;
  margin-top: 4px;
}
.love-ecg-wrap {
  flex: 1;
  min-width: 120px;
  overflow: hidden;
}

@keyframes ecgScroll {
  from { stroke-dashoffset: 200; }
  to   { stroke-dashoffset: 0; }
}
.love-ecg-path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: ecgScroll 2.4s linear infinite;
}
