/* ============================================================
   EVrace — arcade-fx.css
   CRT / flicker / neon / shine / blink / new-flash / season / reduced-fx
   Активно ТОЛЬКО при html[data-theme="arcade"].
   Значения keyframes/shadow — 1:1 из CSS/arcade.css.
   ============================================================ */

@keyframes flicker {
  0%, 100% { opacity: 1; }
  93% { opacity: 0.87; }
  96% { opacity: 0.93; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

@keyframes new-flash-arcade {
  0%, 50% {
    box-shadow: inset 0 0 0 2px #00ff41, 0 0 16px rgba(0, 255, 65, 0.35);
    background: rgba(0, 255, 65, 0.06);
  }
  100% {
    box-shadow: inset 0 0 0 0 transparent, 0 0 0 transparent;
    background: transparent;
  }
}

/* CRT scanlines */
html[data-theme="arcade"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

/* Flicker экрана */
html[data-theme="arcade"] body {
  animation: flicker calc(8s / var(--anim-flicker, 1)) infinite;
}
html[data-theme="arcade"][data-anim-flicker="0"] body {
  animation: none;
}

/* Blink cursor */
html[data-theme="arcade"] .cursor {
  animation: blink calc(1s / var(--anim-blink, 1)) infinite;
}
html[data-theme="arcade"][data-anim-blink="0"] .cursor {
  animation: none;
}

/* Progress shine */
html[data-theme="arcade"] .progress-bar-wrap {
  position: relative;
  overflow: hidden;
}
html[data-theme="arcade"] .progress-bar-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 25%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  animation: shine calc(2.5s / var(--anim-shine, 1)) infinite linear;
  pointer-events: none;
  will-change: transform;
}
html[data-theme="arcade"][data-anim-shine="0"] .progress-bar-wrap::after {
  animation: none;
  opacity: 0;
}

/* NEW flash */
html[data-theme="arcade"] .new-flash {
  animation: new-flash-arcade 2s ease-out 1;
}

/* Neon helpers (demo / future components) */
html[data-theme="arcade"] .arcade-neon {
  text-shadow: 0 0 14px var(--accent), 0 0 28px rgba(0, 255, 65, 0.35);
}
html[data-theme="arcade"] .arcade-neon-dc {
  text-shadow: 0 0 10px var(--dc);
}
html[data-theme="arcade"] .arcade-neon-ac {
  text-shadow: 0 0 10px var(--ac);
}

/* Season chips (значения из arcade.css) */
html[data-theme="arcade"] .month-btn.winter {
  color: var(--winter);
  border-color: rgba(0, 229, 255, 0.25);
}
html[data-theme="arcade"] .month-btn.winter.on {
  background: rgba(0, 229, 255, 0.08);
  border-color: var(--winter);
}
html[data-theme="arcade"] .month-btn.spring {
  color: var(--spring);
  border-color: rgba(170, 255, 0, 0.25);
}
html[data-theme="arcade"] .month-btn.spring.on {
  background: rgba(170, 255, 0, 0.08);
  border-color: var(--spring);
}
html[data-theme="arcade"] .month-btn.summer {
  color: var(--summer);
  border-color: rgba(255, 68, 170, 0.25);
}
html[data-theme="arcade"] .month-btn.summer.on {
  background: rgba(255, 68, 170, 0.08);
  border-color: var(--summer);
}
html[data-theme="arcade"] .month-btn.autumn {
  color: var(--autumn);
  border-color: rgba(255, 170, 0, 0.25);
}
html[data-theme="arcade"] .month-btn.autumn.on {
  background: rgba(255, 170, 0, 0.08);
  border-color: var(--autumn);
}

/* reduced-fx (fx-toggle) — checklist допускает body.reduced-fx */
html[data-theme="arcade"] body.reduced-fx::before {
  display: none;
}
html[data-theme="arcade"] body.reduced-fx {
  animation: none;
}
html[data-theme="arcade"] body.reduced-fx .arcade-neon {
  text-shadow: 0 0 6px var(--accent);
}
html[data-theme="arcade"] body.reduced-fx .arcade-neon-dc,
html[data-theme="arcade"] body.reduced-fx .arcade-neon-ac {
  text-shadow: none;
}
