/*!
 * 秘密花園 特效樣式 garden-fx v1（2026-10-28）
 * 搭配 garden-fx.js：Canvas 負責粒子，這裡負責光環、閃光與浮動文字。
 * 全部不攔截點擊（pointer-events:none），不影響既有操作。
 */

.gfx-canvas,
.gfx-layer {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.gfx-layer > * {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  will-change: transform, opacity;
}

/* 播種：土塵 */
.gfx-dust {
  width: 70px;
  height: 35px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 106, 82, .55), rgba(138, 106, 82, 0) 70%);
  animation: gfx-dust .6s ease-out forwards;
}
@keyframes gfx-dust {
  from { opacity: .9; transform: translate(-50%, -50%) scale(.4); }
  to   { opacity: 0;  transform: translate(-50%, -50%) scale(1.5); }
}

/* 澆水：地面水環（等角橢圓） */
.gfx-ripple,
.gfx-ripple::after {
  width: 86px;
  height: 43px;
  border-radius: 50%;
  border: 3px solid rgba(127, 210, 255, .85);
  animation: gfx-ripple .85s cubic-bezier(.2, .7, .3, 1) forwards;
}
.gfx-ripple::after {
  content: "";
  position: absolute;
  left: -3px;
  top: -3px;
  border-color: rgba(255, 246, 250, .6);
  animation-delay: .16s;
}
@keyframes gfx-ripple {
  from { opacity: .95; transform: translate(-50%, -50%) scale(.25); }
  to   { opacity: 0;   transform: translate(-50%, -50%) scale(1.45); }
}

/* 收成／送禮：短促爆開 */
.gfx-burst {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 154, .55), rgba(255, 113, 176, .22) 55%, rgba(255, 113, 176, 0) 72%);
  animation: gfx-burst .5s ease-out forwards;
}
@keyframes gfx-burst {
  from { opacity: 1; transform: translate(-50%, -50%) scale(.3); }
  to   { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
}

/* 升級：全畫面感的暖金閃光（只在原點附近） */
.gfx-flash {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 250, .75), rgba(255, 215, 154, .35) 40%, rgba(255, 184, 107, 0) 70%);
  animation: gfx-flash .65s ease-out forwards;
}
@keyframes gfx-flash {
  0%   { opacity: 0;   transform: translate(-50%, -50%) scale(.2); }
  35%  { opacity: 1;   transform: translate(-50%, -50%) scale(.85); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(1.25); }
}

/* 好感度：粉色心形光環 */
.gfx-heartring {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid rgba(255, 113, 176, .85);
  box-shadow: 0 0 18px rgba(255, 113, 176, .55);
  animation: gfx-heartring .9s ease-out forwards;
}
@keyframes gfx-heartring {
  from { opacity: .95; transform: translate(-50%, -50%) scale(.35); }
  to   { opacity: 0;   transform: translate(-50%, -50%) scale(1.5); }
}

/* 任務完成：打勾 */
.gfx-check {
  width: 76px;
  height: 76px;
  color: #FFD79A;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 15, 46, .72), rgba(26, 15, 46, 0) 72%);
  animation: gfx-check .9s cubic-bezier(.2, .8, .3, 1) forwards;
}
.gfx-check svg { width: 48px; height: 48px; }
@keyframes gfx-check {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
  30%  { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  70%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.04); }
}

/* 浮動文字（+120、LEVEL UP、任務完成…） */
.gfx-label {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #FFD79A;
  text-shadow: 0 2px 6px rgba(26, 15, 46, .85);
  white-space: nowrap;
  animation: gfx-label 1.15s ease-out forwards;
}
@keyframes gfx-label {
  0%   { opacity: 0; transform: translate(-50%, -30%) scale(.86); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(1); }
}

/* 使用者要求減少動態：保留狀態提示，但拿掉縮放與長距離位移 */
@media (prefers-reduced-motion: reduce) {
  .gfx-dust, .gfx-ripple, .gfx-ripple::after, .gfx-burst,
  .gfx-flash, .gfx-heartring, .gfx-check {
    animation-duration: .36s;
    animation-name: gfx-fade;
  }
  .gfx-label { animation: gfx-fade .9s ease-out forwards; }
  @keyframes gfx-fade {
    from { opacity: .9; transform: translate(-50%, -50%); }
    to   { opacity: 0;  transform: translate(-50%, -50%); }
  }
}
