/*
 * 전술 체스 애니메이션 키트 — 스타일
 * tc-anim.js 와 함께 쓴다. design-tokens.css 다음에 불러온다.
 */

/* ---------- 이펙트·배너를 얹는 층 ---------- */
.tca-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.tca-fx {
  position: absolute;
  pointer-events: none;
  z-index: 20;
}
.tca-fx > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* 기물을 들어 옮길 때 다른 기물 위로 올라온다 */
.tca-lifted {
  z-index: 30 !important;
}

/* 깨진 기물 조각 */
.tca-shard {
  position: absolute;
  pointer-events: none;
  z-index: 25;
  background: center / 100% 100% no-repeat;
  will-change: transform, opacity;
}

/* 내려앉을 때 이는 먼지 */
.tca-dust {
  position: absolute;
  pointer-events: none;
  z-index: 4;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(203, 179, 134, 0.55), rgba(203, 179, 134, 0));
}

/* ---------- 화면 가운데 배너 ---------- */
.tca-banner-host {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 60;
}
.tca-banner {
  width: min(78cqw, 1000px);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.75));
}
.tca-banner > svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.tca-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 59;
  background: radial-gradient(ellipse at center, rgba(255, 244, 220, 0.85), rgba(255, 190, 120, 0.25) 45%, rgba(0, 0, 0, 0) 75%);
  mix-blend-mode: screen;
  opacity: 0;
}
.tca-dim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 58;
  background: radial-gradient(ellipse at center, rgba(11, 10, 9, 0.35), rgba(11, 10, 9, 0.8));
  opacity: 0;
}

/* ---------- 화면 전환: 먹 붓 획 ---------- */
.tca-wipe {
  position: absolute;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  overflow: hidden;
}
.tca-wipe img {
  position: absolute;
  top: -15%;
  height: 130%;
  width: 240%;
  left: -240%;
  max-width: none;
}

/* ---------- 배경의 불 ---------- */
.tca-fires {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.tca-flame,
.tca-flame-refl {
  position: absolute;
  mix-blend-mode: screen;
  background-repeat: no-repeat;
  will-change: background-position, opacity;
}
.tca-flame-refl {
  transform: scaleY(-1);
  filter: blur(7px);
  opacity: 0.32;
}
.tca-glow {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgba(255, 170, 80, 0.55), rgba(240, 120, 40, 0.18) 45%, rgba(200, 80, 31, 0) 100%);
  will-change: opacity, transform;
}
.tca-glow--lamp {
  background: radial-gradient(closest-side, rgba(255, 190, 110, 0.4), rgba(240, 138, 58, 0.12) 50%, rgba(240, 138, 58, 0) 100%);
}

/* ---------- 주사위 ---------- */
.tca-dice-glow {
  filter: drop-shadow(0 0 10px rgba(240, 138, 58, 0.9)) drop-shadow(0 0 24px rgba(200, 80, 31, 0.6));
}

/* ---------- 숫자 배지 갱신 ---------- */
@keyframes tca-bump {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.45);
  }
  100% {
    transform: scale(1);
  }
}
.tca-bump {
  animation: tca-bump 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}

/* ---------- 메뉴 글자: 고르면 불이 붙듯 달아오른다 ---------- */
@keyframes tca-ignite {
  0% {
    color: #c8c0b0;
    text-shadow: 0 2px 6px #000;
  }
  40% {
    color: #ffd08a;
    text-shadow: 0 0 18px rgba(255, 190, 110, 1), 0 0 40px rgba(240, 138, 58, 0.8), 0 2px 4px #000;
  }
  100% {
    color: #f3a548;
    text-shadow: 0 0 10px rgba(240, 138, 58, 0.85), 0 0 26px rgba(200, 80, 31, 0.55), 0 2px 4px #000;
  }
}
@keyframes tca-underline {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* ---------- 움직임 줄이기 ---------- */
@media (prefers-reduced-motion: reduce) {
  .tca-flame,
  .tca-flame-refl,
  .tca-glow {
    will-change: auto;
  }
}
