/* ============================================================================
 * proxi-live.css — "signs of life" layer for the pool dashboard (live badge,
 * value flashes, new-block highlight, balance deltas).
 * Additive only: no Material-Dashboard rules are overridden destructively.
 * Rollback: remove the <link> from index.html and YourStats.html.
 * ========================================================================== */

:root {
  --pxl-orange: #FF6B35;
  --pxl-orange-soft: rgba(255, 107, 53, .12);
  --pxl-green: #4CAF50;
}


/* ---- pulsing LIVE dot ---- */
.pxl-live {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--pxl-green);
  vertical-align: middle;
  margin-left: .5rem;
}
.pxl-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pxl-green);
  position: relative;
}
.pxl-live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--pxl-green);
  animation: pxl-ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes pxl-ping {
  0%   { transform: scale(1);   opacity: .8; }
  80%, 100% { transform: scale(2.8); opacity: 0; }
}

/* ---- value-updated flash (JS adds .pxl-flash on text change) ---- */
.pxl-flash {
  animation: pxl-flash-anim 1.1s ease-out;
  border-radius: .25rem;
}
@keyframes pxl-flash-anim {
  0%   { background-color: var(--pxl-orange-soft); box-shadow: 0 0 12px rgba(255,107,53,.45); }
  100% { background-color: transparent;            box-shadow: none; }
}

/* (removed 2026-09-11 per Marcel: no gradient/orange ink on the big stat
   numbers — they render in the theme's normal text color again) */

/* ---- cards respond to the cursor: lift + orange glow ---- */
.card {
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -6px rgba(52, 71, 103, .18),
              0 0 0 1px rgba(255, 107, 53, .18),
              0 4px 14px -4px rgba(255, 107, 53, .22) !important;
}

/* stat icons pick up the brand color on card hover */
.card:hover .icon-shape.bg-gradient-dark {
  background-image: linear-gradient(195deg, var(--pxl-orange) 0%, #d84315 100%) !important;
  transition: background-image .25s ease;
}

/* ---- ticking "last block ago" line ---- */
.pxl-lastblock {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  color: #67748e;
}
.pxl-lastblock b { color: var(--pxl-orange); font-variant-numeric: tabular-nums; }
.pxl-lastblock .pxl-pick { animation: pxl-swing 2.4s ease-in-out infinite; display: inline-block; transform-origin: 70% 30%; }
@keyframes pxl-swing {
  0%, 100% { transform: rotate(0deg); }
  40%      { transform: rotate(-14deg); }
  70%      { transform: rotate(8deg); }
}

/* ---- newest block row slides in with a glow ---- */
.pxl-block-new {
  animation: pxl-block-in .9s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes pxl-block-in {
  0%   { transform: translateX(-14px); opacity: 0; box-shadow: 0 0 18px rgba(255,107,53,.55); }
  60%  { box-shadow: 0 0 18px rgba(255,107,53,.35); }
  100% { transform: translateX(0);    opacity: 1; box-shadow: none; }
}

/* ---- effort badge heartbeat when the round runs hot (>100%) ---- */
.pxl-effort-hot {
  animation: pxl-heartbeat 1.8s ease-in-out infinite;
  color: var(--pxl-orange) !important;
  font-weight: 700;
}
@keyframes pxl-heartbeat {
  0%, 100% { transform: scale(1); }
  14%      { transform: scale(1.12); }
  28%      { transform: scale(1); }
  42%      { transform: scale(1.09); }
}

/* respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
  .pxl-live-dot::after, .pxl-lastblock .pxl-pick,
  .pxl-flash, .pxl-block-new, .pxl-effort-hot { animation: none !important; }
  .card, .card:hover { transform: none; }
}

/* ============================================================================
 * YourStats page liveness (2026-09-11) — balance growth, payout countdown,
 * worker online pulse, progress shimmer.
 * ========================================================================== */

/* floating "+0.0012 PROX" when the balance grows */
.pxl-delta {
  position: absolute;
  font-size: .8rem;
  font-weight: 700;
  color: var(--pxl-green);
  text-shadow: 0 0 8px rgba(76, 175, 80, .35);
  pointer-events: none;
  animation: pxl-float-up 2.4s ease-out forwards;
  white-space: nowrap;
  z-index: 50;
}
@keyframes pxl-float-up {
  0%   { opacity: 0; transform: translateY(4px)  scale(.9); }
  15%  { opacity: 1; transform: translateY(-2px) scale(1.05); }
  100% { opacity: 0; transform: translateY(-34px) scale(1); }
}

/* balance progress bar: smooth growth + moving shimmer stripe */
.balance-progress-bar {
  transition: width 1.2s cubic-bezier(.25, .8, .3, 1);
  background-image: linear-gradient(110deg,
    rgba(255,255,255,0) 30%, rgba(255,255,255,.35) 50%, rgba(255,255,255,0) 70%) !important;
  background-size: 200% 100%;
  background-color: var(--pxl-orange) !important;
  animation: pxl-bar-shimmer 2.6s linear infinite;
}
@keyframes pxl-bar-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* worker Online badges get a pulsing dot */
#workerTableBody .badge.bg-gradient-success::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: .3rem;
  border-radius: 50%;
  background: #fff;
  vertical-align: middle;
  animation: pxl-worker-pulse 1.6s ease-in-out infinite;
}
@keyframes pxl-worker-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.7); }
}

/* payout countdown line */
.pxl-payout-eta {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  color: #67748e;
}
.pxl-payout-eta b { color: var(--pxl-orange); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .pxl-delta, .balance-progress-bar,
  #workerTableBody .badge.bg-gradient-success::before { animation: none !important; }
}

/* ---- PROX price card (prox-price.js, 2026-11-14) ---------------------------- */
.pp-change { font-size: .8125rem; font-weight: 600; margin-left: .25rem; white-space: nowrap; }
.pp-change.pp-up { color: #4caf50; }
.pp-change.pp-down { color: #f44335; }
/* 24h low-high track; the dot sits at the current price */
.pp-range { margin: .55rem .75rem .15rem 0; }
.pp-track { position: relative; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(244,67,53,.35), rgba(123,128,154,.25) 50%, rgba(76,175,80,.35)); }
.pp-mark { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: #344767; box-shadow: 0 0 0 2px #fff; transition: left .6s ease; }
.pp-ends { display: flex; justify-content: space-between; font-size: .6875rem; color: #7b809a; margin-top: .3rem; }
.pp-link:hover, .pp-link:focus-visible { text-decoration: underline; }
.dark-version .pp-mark { background: #fff; box-shadow: 0 0 0 2px #1f283e; }
.dark-version .pp-ends { color: rgba(255,255,255,.6); }
@media (prefers-reduced-motion: reduce) { .pp-mark { transition: none; } }
