/* ============================================================
   MyDailyCost Game FX styles  (pairs with /game-fx.js)
   ============================================================ */

/* Shared particle canvas */
.fx-layer{position:fixed;inset:0;pointer-events:none;z-index:9998}

/* Floating score text */
.fx-float{position:fixed;z-index:9999;pointer-events:none;transform:translate(-50%,-50%);
  font-family:'Syne','DM Sans',sans-serif;font-weight:800;font-size:22px;color:#facc15;
  white-space:nowrap;letter-spacing:-.01em;
  text-shadow:0 2px 0 rgba(0,0,0,.45),0 0 18px currentColor;
  animation:fx-float 1s cubic-bezier(.2,.9,.3,1) forwards}
.fx-float-big{font-size:34px;animation-duration:1.5s}
@keyframes fx-float{
  0%{opacity:0;transform:translate(-50%,-30%) scale(.4)}
  18%{opacity:1;transform:translate(-50%,-80%) scale(1.25)}
  35%{transform:translate(-50%,-95%) scale(1)}
  100%{opacity:0;transform:translate(-50%,-260%) scale(.9)}}

/* Back / navigation bar for standalone game pages */
.fx-back-bar{width:100%;max-width:960px;margin:0 auto;padding:10px 12px 0;display:flex;align-items:center;justify-content:space-between;gap:10px;
  font-family:'DM Sans',system-ui,sans-serif;font-size:13px;font-weight:600;position:relative;z-index:5}
.fx-back-bar a{color:#cbd5e1;text-decoration:none;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.1);display:inline-flex;align-items:center;gap:6px;min-height:36px;transition:background .2s,color .2s}
.fx-back-bar a:hover{background:rgba(16,185,129,.15);color:#34d399}
.fx-back-bar span{display:flex;gap:6px}

/* Flying content (FX.fly) */
.fx-fly{position:fixed;left:0;top:0;z-index:9999;pointer-events:none;font-size:30px;line-height:1;
  filter:drop-shadow(0 6px 10px rgba(0,0,0,.45));will-change:transform}

/* Centre banner */
.fx-banner{position:fixed;inset:0;z-index:9999;pointer-events:none;display:flex;
  align-items:center;justify-content:center}
.fx-banner>span{--fx-banner:#10b981;display:flex;flex-direction:column;align-items:center;
  font-family:'Syne',sans-serif;font-weight:800;font-size:clamp(28px,8vw,56px);color:#fff;
  letter-spacing:-.02em;text-align:center;padding:14px 28px;border-radius:18px;
  background:linear-gradient(135deg,var(--fx-banner),rgba(15,23,42,.92));
  box-shadow:0 0 0 2px rgba(255,255,255,.15),0 20px 60px rgba(0,0,0,.5),0 0 60px var(--fx-banner);
  animation:fx-banner 1.6s cubic-bezier(.2,1.4,.4,1) forwards}
.fx-banner small{display:block;font-family:'DM Sans',sans-serif;font-weight:600;font-size:14px;
  letter-spacing:.04em;text-transform:uppercase;opacity:.85;margin-top:4px}
@keyframes fx-banner{
  0%{opacity:0;transform:scale(.3) rotate(-8deg)}
  15%{opacity:1;transform:scale(1.12) rotate(2deg)}
  25%{transform:scale(1) rotate(0)}
  80%{opacity:1;transform:scale(1)}
  100%{opacity:0;transform:scale(1.15) translateY(-30px)}}

/* Screen flash */
.fx-flash{position:fixed;inset:0;z-index:9997;pointer-events:none}

/* Button press squish (auto-applied by game-fx.js) */
button,.btn,[data-fx-press]{transition:transform .14s cubic-bezier(.3,1.6,.5,1),filter .14s}
.fx-pressed{transform:scale(.93)!important;filter:brightness(1.12)}

/* Rolling counter tick */
.fx-tick-up{animation:fx-tick-up .45s cubic-bezier(.3,1.6,.5,1)}
.fx-tick-down{animation:fx-tick-down .45s ease-out}
@keyframes fx-tick-up{0%{transform:scale(1)}35%{transform:scale(1.28);color:#34d399;text-shadow:0 0 14px rgba(52,211,153,.8)}100%{transform:scale(1)}}
@keyframes fx-tick-down{0%{transform:scale(1)}30%{transform:scale(.88);color:#f87171;text-shadow:0 0 14px rgba(248,113,113,.8)}100%{transform:scale(1)}}
.fx-tick-up,.fx-tick-down{display:inline-block}

/* Staggered entrance */
.fx-in{animation:fx-in .55s cubic-bezier(.2,1.2,.4,1) both;animation-delay:calc(var(--fx-i,0) * 70ms)}
@keyframes fx-in{0%{opacity:0;transform:translateY(22px) scale(.96)}100%{opacity:1;transform:none}}

/* 3D tilt + cursor spotlight */
[data-fx-tilt]{--fx-rx:0deg;--fx-ry:0deg;--fx-mx:50%;--fx-my:50%;
  transform:perspective(900px) rotateX(var(--fx-rx)) rotateY(var(--fx-ry));
  transition:transform .25s ease-out,box-shadow .25s,border-color .25s;transform-style:preserve-3d}
[data-fx-tilt]::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:radial-gradient(420px circle at var(--fx-mx) var(--fx-my),rgba(255,255,255,.10),transparent 45%);
  opacity:0;transition:opacity .25s}
[data-fx-tilt]:hover::after{opacity:1}

/* Animated aurora background for game pages */
.fx-aurora{position:fixed;inset:-20%;z-index:-1;pointer-events:none;overflow:hidden;
  background:#070b14}
.fx-aurora i{position:absolute;width:55vmax;height:55vmax;border-radius:50%;filter:blur(70px);opacity:.38;
  animation:fx-drift 22s ease-in-out infinite alternate}
.fx-aurora i:nth-child(1){background:#10b981;left:-5%;top:-10%}
.fx-aurora i:nth-child(2){background:#6366f1;right:-10%;top:10%;animation-duration:27s;animation-delay:-6s}
.fx-aurora i:nth-child(3){background:#ec4899;left:20%;bottom:-25%;opacity:.22;animation-duration:31s;animation-delay:-12s}
@keyframes fx-drift{0%{transform:translate(0,0) scale(1)}50%{transform:translate(8vw,6vh) scale(1.15)}100%{transform:translate(-6vw,10vh) scale(.95)}}

/* Shine sweep on primary buttons */
.fx-shine{position:relative;overflow:hidden;isolation:isolate}
.fx-shine::before{content:'';position:absolute;top:0;left:-60%;width:40%;height:100%;z-index:-1;
  background:linear-gradient(105deg,transparent,rgba(255,255,255,.45),transparent);
  transform:skewX(-20deg);animation:fx-shine 3.2s ease-in-out infinite}
@keyframes fx-shine{0%,55%{left:-60%}100%{left:130%}}

/* Gentle breathing glow for call-to-action */
.fx-breathe{animation:fx-breathe 2.4s ease-in-out infinite}
@keyframes fx-breathe{0%,100%{box-shadow:0 6px 24px rgba(16,185,129,.35),0 0 0 0 rgba(16,185,129,.5)}
  50%{box-shadow:0 10px 34px rgba(16,185,129,.55),0 0 0 8px rgba(16,185,129,0)}}

/* Floating / bobbing emoji */
.fx-bob{display:inline-block;animation:fx-bob 3s ease-in-out infinite}
@keyframes fx-bob{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-8px) rotate(5deg)}}

/* Glassy panel */
.fx-glass{background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.02))!important;
  border:1px solid rgba(255,255,255,.09)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.06) inset,0 12px 40px rgba(0,0,0,.35);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}

/* Overlay entrance */
.fx-ov-in{animation:fx-ov-in .45s cubic-bezier(.2,1.2,.4,1) both}
@keyframes fx-ov-in{0%{opacity:0;transform:scale(.92)}100%{opacity:1;transform:none}}

@media (prefers-reduced-motion: reduce){
  .fx-aurora i,.fx-shine::before,.fx-breathe,.fx-bob,.fx-in,.fx-ov-in{animation:none!important}
  [data-fx-tilt]{transform:none!important}
}
