/* Vypínač · fx-plus: visual upgrades layered on top of engine.js components (drug pages only).
   Kept separate from site.css so it can be developed alongside other work on the shared files. */

/* ---------- hospital monitor (cocaine heart, heroin breathing) ---------- */
.monitor.hosp { position: relative; overflow: hidden; background: #031012; border-color: #0f2a2c; box-shadow: inset 0 0 40px rgba(0, 0, 0, .8); }
.monitor.hosp canvas { filter: drop-shadow(0 0 3px rgba(255, 255, 255, .45)) saturate(1.35); }
.monitor.hosp::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55));
  animation: hospFlicker 7s steps(1) infinite;
}
@keyframes hospFlicker { 0%, 96% { opacity: 1; } 97% { opacity: .82; } 98% { opacity: 1; } }
.hosp-bar { display: flex; gap: 14px; align-items: center; padding: 2px 4px 8px; font: 600 .66rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: #5fd3b3; }
.hosp-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: #ff6b5b; }
.hosp-live i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d3d; animation: hospBlink 1s steps(2) infinite; }
@keyframes hospBlink { 50% { opacity: .2; } }
.monitor.hosp.alarm { animation: hospAlarm .8s ease-in-out infinite; }
@keyframes hospAlarm { 0%, 100% { box-shadow: inset 0 0 0 2px #ff4d3d, 0 0 26px rgba(255, 77, 61, .45); } 50% { box-shadow: inset 0 0 0 2px transparent, 0 0 6px transparent; } }
.monitor.hosp.alarm .hosp-bar { color: #ff8a7d; }
.hosp-vitals .vital { background: #031012; border: 1px solid #0f2a2c; }
.hosp-vitals .vital .k { color: #5fd3b3; }
.hosp-vitals .vital .v { color: #e8f6f1; font-size: 1.55rem; text-shadow: 0 0 10px currentColor; }
.hosp-vitals .vital .v.ok { color: #34e3c8; }
.hosp-vitals .vital .v.warn { color: #ffc04a; }
.hosp-vitals .vital .v.bad { color: #ff5a4a; animation: hospBlink 1s steps(2) infinite; }

/* ---------- metallic roulette drum ---------- */
.drum svg.metal .ch { stroke: #10161b; stroke-width: 3; }
.drum svg.metal .ch.s1 { fill: rgba(43, 212, 192, .62); }
.drum svg.metal .ch.s2 { fill: rgba(255, 176, 32, .62); }
.drum svg.metal .ch.s3 { fill: rgba(255, 77, 61, .68); }
.drum svg.metal .ch.hit { stroke: #fff; stroke-width: 4; }
.drum svg.metal .chn { fill: #fff; paint-order: stroke; stroke: rgba(0, 0, 0, .75); stroke-width: 3px; }
.drum svg .rot { transition: filter .5s ease-out; }
.spinning .drum svg .rot { filter: blur(1.6px); transition: filter .15s; }
.drum svg .glare { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .spinning .drum svg .rot { filter: none; }
}

/* ================== JUICE PASS ================== */
.fxp-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 61; }
.fxp-progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 40; background: var(--accent); transform-origin: left center; transform: scaleX(0); pointer-events: none; box-shadow: 0 0 10px var(--accent); }
/* ripple: the tap is acknowledged where the finger landed */
.seg button, .tog, .counter button, .guide button, .organ-list button { position: relative; overflow: hidden; }
.fxp-ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .22; transform: scale(0); pointer-events: none; animation: fxpRipple .5s var(--out) forwards; }
@keyframes fxpRipple { to { transform: scale(1); opacity: 0; } }
/* number punch / landing */
.fxp-punch { display: inline-block; animation: fxpPunch .34s var(--out); }
@keyframes fxpPunch { 35% { transform: scale(1.18); } }
.fxp-land { animation: fxpLand .42s var(--spring); }
@keyframes fxpLand { 0% { transform: translateY(-6px) scale(1.12); } 100% { transform: none; } }
#bVal { transition: color .35s; transform-origin: left center; }
#bVal[data-zone="ok"] { color: var(--own); } #bVal[data-zone="warn"] { color: var(--lh); } #bVal[data-zone="bad"] { color: var(--exo); text-shadow: 0 0 22px var(--exo-soft); }
/* zones: worse lands hard, better lands soft */
.fxp-hit { animation: fxpHit .45s var(--out); }
@keyframes fxpHit { 0% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-2px); } 100% { transform: none; } }
.fxp-calm { animation: fxpCalm .5s var(--out); }
@keyframes fxpCalm { from { box-shadow: 0 0 0 3px var(--own-soft); } to { box-shadow: 0 0 0 0 transparent; } }
.fxp-sour { animation: fxpSour .7s ease-out; }
@keyframes fxpSour { from { box-shadow: inset 0 0 0 2px var(--exo), 0 0 20px var(--exo-soft); } to { box-shadow: none; } }
/* guide invitation until first use */
.guide.fxp-invite button b { animation: fxpInvite 1.6s ease-out infinite; }
.guide.fxp-invite button:nth-of-type(2) b { animation-delay: .2s; } .guide.fxp-invite button:nth-of-type(3) b { animation-delay: .4s; } .guide.fxp-invite button:nth-of-type(4) b { animation-delay: .6s; }
@keyframes fxpInvite { 0% { box-shadow: 0 0 0 0 rgba(255, 176, 32, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(255, 176, 32, 0); } }
/* monitor icons */
.fxp-heart { width: 12px; height: 11px; flex: none; background: #ff4d3d; clip-path: path("M6 11 L1 6 A2.6 2.6 0 0 1 6 2 A2.6 2.6 0 0 1 11 6 Z"); animation: fxpBeat 1s ease-in-out infinite; }
@keyframes fxpBeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.45); } 24% { transform: scale(1); } 36% { transform: scale(1.2); } }
.fxp-lung { width: 14px; height: 12px; flex: none; border-radius: 6px 6px 7px 7px; border: 2px solid #8ea2ff; animation: fxpLung 4s ease-in-out infinite; }
.fxp-lung.stop { border-color: #ff4d3d; animation: none; transform: scale(.7); }
@keyframes fxpLung { 50% { transform: scale(1.35, 1.25); } }
.fxp-apnoe { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); padding: 8px 14px; border-radius: 6px; background: rgba(255, 77, 61, .92); color: #fff; font: 800 1.15rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .06em; animation: hospBlink .9s steps(2) infinite; z-index: 2; }
/* pervitín glitch, extáza heat */
.fxp-glitch b { animation: fxpGlitch 2.4s steps(1) infinite; }
@keyframes fxpGlitch { 0%, 88% { text-shadow: none; transform: none; } 90% { text-shadow: 2px 0 var(--exo), -2px 0 var(--gnrh); transform: translateX(-2px) skewX(-6deg); } 93% { text-shadow: -3px 0 var(--lh), 3px 0 var(--exo); transform: translateX(2px); } 96% { text-shadow: none; transform: none; } }
.fxp-haze .v { display: inline-block; animation: fxpHaze 1.8s ease-in-out infinite; }
@keyframes fxpHaze { 50% { transform: translateY(-1px) skewX(2deg); filter: blur(.4px); } }
.fxp-fever .v { text-shadow: 0 0 16px rgba(255, 90, 74, .9) !important; }
.fxp-fever { box-shadow: inset 0 0 0 1px rgba(255, 90, 74, .7), 0 0 18px rgba(255, 90, 74, .35); }

@media (prefers-reduced-motion: reduce) {
  .fxp-ripple, .fxp-punch, .fxp-land, .fxp-hit, .fxp-calm, .fxp-sour, .guide.fxp-invite button b, .fxp-heart, .fxp-lung, .fxp-apnoe, .fxp-glitch b, .fxp-haze .v { animation: none !important; }
}

/* ================== JUICE PASS · WAVE 2 ================== */
/* play-button progress ring around the time-curve icon */
.tl #tlPlay .ico::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(#fff var(--fxp-p, 0%), rgba(255, 255, 255, .18) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); pointer-events: none; }
/* meter past 1.6×: moving warning stripes */
.meter.fxp-over .bar b { background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .28) 0 6px, transparent 6px 12px) !important; background-size: 34px 34px; animation: fxpStripes .7s linear infinite; }
@keyframes fxpStripes { to { background-position: 34px 0; } }
.meter.fxp-over .k b { color: var(--exo); }
/* body-scanner hover label */
.fxp-tip { position: fixed; z-index: 62; pointer-events: none; padding: 6px 9px; border-radius: 6px; background: var(--fg); color: var(--bg); font: 700 .78rem/1 var(--font-body); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); white-space: nowrap; }
/* roulette: the chamber that fell locks in with two pulses */
.drum svg.metal .ch.hit { animation: fxpLock .5s ease-out 2; }
@keyframes fxpLock { 0% { stroke-width: 9; stroke-opacity: .2; } 100% { stroke-width: 4; stroke-opacity: 1; } }
/* myth tilt with a soft light spot following the pointer */
.myth.fxp-tilt { transition: transform .18s ease-out, border-color .2s, box-shadow .2s; transform-style: preserve-3d; }
.myth.fxp-tilt::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s; background: radial-gradient(circle at var(--fxp-gx, 50%) var(--fxp-gy, 50%), rgba(255, 255, 255, .09), transparent 55%); }
.myth.fxp-tilt:hover::after { opacity: 1; }
/* overdose steps pop in order the first time they are seen */
.help.sos.fxp-steps .steps li::before { animation: fxpStep .5s var(--spring) backwards; }
.help.sos.fxp-steps .steps li:nth-child(2)::before { animation-delay: .25s; } .help.sos.fxp-steps .steps li:nth-child(3)::before { animation-delay: .5s; }
.help.sos.fxp-steps .steps li:nth-child(4)::before { animation-delay: .75s; } .help.sos.fxp-steps .steps li:nth-child(5)::before { animation-delay: 1s; }
@keyframes fxpStep { 0% { transform: scale(1); } 40% { transform: scale(1.35); box-shadow: 0 0 0 6px var(--exo-soft); } 100% { transform: scale(1); } }
/* eyebrow underline draws once */
.eyebrow.fxp-line { position: relative; display: inline-block; padding-bottom: 6px; }
.eyebrow.fxp-line::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--out); }
.eyebrow.fxp-line.fxp-in::after { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .meter.fxp-over .bar b, .drum svg.metal .ch.hit, .help.sos.fxp-steps .steps li::before { animation: none !important; }
  .eyebrow.fxp-line::after { transform: scaleX(1); transition: none; }
}
