/*
 * FROSTFIRE NIGHT — motion layer (r547, r550)
 * ---------------------------------------------------------------------------
 * No particles, no flying specks: what moves here is LIGHT — a cold mist band
 * drifting down over the app and a thin glass sheen crossing the hero.
 * (owner, r550: "থিম আর বোড গুলোতে ছোট বল এর মত উড়ে কেন" — the dot fields read
 *  as little balls, so every one of them is gone.)
 * Transform/opacity only, pointer-events: none, reduced-motion freezes it.
 */
html[data-cosmetic-theme="frostfire"] body::before {
  content: '';
  position: fixed;
  left: -12%;
  right: -12%;
  top: -20%;
  height: 140vh;
  z-index: 9998;
  pointer-events: none;
  opacity: .42;
  mix-blend-mode: screen;
  will-change: transform, opacity;
  /* তিনটি নরম, লম্বা আলোর ব্যান্ড — বিন্দু নয় */
  background-image:
    linear-gradient(178deg, rgba(214, 242, 255, .16), rgba(214, 242, 255, 0) 58%),
    repeating-linear-gradient(76deg, rgba(226, 250, 255, .085) 0 1.5px, transparent 1.5px 46px),
    repeating-linear-gradient(68deg, rgba(190, 232, 255, .06) 0 1px, transparent 1px 74px);
  background-size: 100% 100%, 100% 320px, 100% 520px;
  background-repeat: no-repeat, repeat, repeat;
  animation: ff-mist-drift 34s linear infinite, ff-mist-fade 9s ease-in-out infinite;
}
@keyframes ff-mist-drift {
  from { transform: translate3d(0, -14vh, 0); }
  to   { transform: translate3d(-18px, 104vh, 0); }
}
@keyframes ff-mist-fade {
  0%, 100% { opacity: .32; }
  50%      { opacity: .5; }
}

/* hero: কাচের ওপর দিয়ে সরু আলোর রেখা কেটে যায় */
html[data-cosmetic-theme="frostfire"] .home-welcome-card::after {
  animation: none;
}
html[data-cosmetic-theme="frostfire"] .home-welcome-card {
  animation: ff-hero-glint 9s ease-in-out infinite;
}
@keyframes ff-hero-glint {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(230, 250, 255, .18), 0 14px 28px rgba(0, 6, 12, .42); }
  50%      { box-shadow: inset 0 1px 0 rgba(240, 253, 255, .34), 0 14px 30px rgba(0, 6, 12, .48), 0 0 24px rgba(150, 225, 255, .18); }
}

/* নেভের সক্রিয় ঘরে বরফের আলো নিঃশ্বাস নেয় */
html[data-cosmetic-theme="frostfire"] .b-tab.active .bt-icon {
  animation: ff-cell-glow 4.6s ease-in-out infinite;
}
@keyframes ff-cell-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(150, 225, 255, .2); }
  50%      { box-shadow: 0 0 18px rgba(190, 240, 255, .5); }
}

/* ম্যাচে বরফ পড়া কমে — বোর্ড/পিপ পরিষ্কার থাকে */
@supports selector(:has(*)) {
  html[data-cosmetic-theme="frostfire"]:has(#screen-game.active) body::before { opacity: .14; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-cosmetic-theme="frostfire"] body::before,
  html[data-cosmetic-theme="frostfire"] .home-welcome-card,
  html[data-cosmetic-theme="frostfire"] .b-tab.active .bt-icon {
    animation: none !important;
  }
  html[data-cosmetic-theme="frostfire"] body::before { opacity: .2; transform: none; }
}
