/* 电子木鱼 · 样式（.g-woodfish 前缀） */

.g-woodfish {
  justify-content: center;
  gap: 10px;
}

/* ---------------- 顶栏 ---------------- */

.g-woodfish .wf-head { align-items: center; gap: 8px; }
.g-woodfish .wf-head .g-title { font-size: 15px; font-weight: 800; }
.g-woodfish .wf-head .g-sub { min-height: 16px; }

.g-woodfish .wf-btn {
  min-height: 40px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--dim);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  touch-action: manipulation;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.1s ease;
}

.g-woodfish .wf-btn:active { transform: scale(0.95); }

.g-woodfish .wf-btn.on {
  color: #fff;
  border-color: rgba(255, 180, 84, 0.6);
  background: linear-gradient(180deg, rgba(255, 180, 84, 0.3), rgba(224, 123, 42, 0.16));
  box-shadow: 0 0 16px rgba(255, 180, 84, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* ---------------- 舞台 ---------------- */

.g-woodfish .wf-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(70% 52% at 50% 54%, rgba(255, 180, 84, 0.13), transparent 70%),
    radial-gradient(120% 80% at 50% 120%, rgba(224, 123, 42, 0.08), transparent 60%);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.g-woodfish .wf-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(88vw, 366px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 180, 84, 0.11);
  box-shadow: inset 0 0 70px rgba(255, 180, 84, 0.05);
  pointer-events: none;
}

.g-woodfish .wf-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(72vw, 300px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(255, 180, 84, 0.09);
  pointer-events: none;
}

.g-woodfish .wf-fish-wrap {
  position: relative;
  width: min(86vw, 340px);
  aspect-ratio: 320 / 230;
  touch-action: manipulation;
}

.g-woodfish .wf-glow {
  position: absolute;
  inset: -12% -6% -4%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 56%, rgba(255, 180, 84, 0.26), transparent 62%);
  filter: blur(14px);
  pointer-events: none;
}

.g-woodfish .wf-fish {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: 50% 74%;
  will-change: transform;
}

.g-woodfish .wf-fish svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 20px 22px rgba(0, 0, 0, 0.45));
}

.g-woodfish .wf-mallet {
  position: absolute;
  right: -7%;
  top: -21%;
  width: 38%;
  transform-origin: 42% 76%;
  transform: rotate(-30deg);
  will-change: transform;
  pointer-events: none;
}

.g-woodfish .wf-mallet svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.35));
}

.g-woodfish .wf-fish-wrap.hit .wf-fish { animation: wfPulse 0.2s ease-out; }
.g-woodfish .wf-fish-wrap.hit .wf-mallet { animation: wfStrike 0.2s ease-out; }

@keyframes wfPulse {
  0% { transform: scale(1); }
  35% { transform: scale(0.94, 0.9); }
  100% { transform: scale(1); }
}

@keyframes wfStrike {
  0% { transform: rotate(-30deg); }
  35% { transform: rotate(5deg); }
  100% { transform: rotate(-30deg); }
}

/* 功德数字 */
.g-woodfish .wf-merit {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.g-woodfish .wf-merit-k {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--dim);
}

.g-woodfish .wf-total {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #ffe0b2;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(255, 180, 84, 0.32);
}

.g-woodfish .wf-today {
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.g-woodfish .wf-today b {
  color: var(--dim);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.g-woodfish .wf-hint {
  text-align: center;
  font-size: 11px;
}

/* ---------------- 敲击特效 ---------------- */

.g-woodfish .wf-ripple {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 56%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 194, 120, 0.55);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: wfRipple 0.6s ease-out forwards;
}

@keyframes wfRipple {
  0% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.55); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}

.g-woodfish .wf-float {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 800;
  color: #ffe3b3;
  text-shadow: 0 1px 2px rgba(80, 40, 0, 0.65), 0 0 12px rgba(255, 170, 70, 0.6);
  pointer-events: none;
  animation: wfFloat 0.82s ease-out forwards;
}

.g-woodfish .wf-float.auto {
  font-size: 14px;
  color: #f5cf9d;
}

@keyframes wfFloat {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(0.7); }
  18% { opacity: 1; transform: translate(-50%, -74%) scale(1.06); }
  100% { opacity: 0; transform: translate(-50%, -165%) scale(0.95); }
}

/* ---------------- 设置面板 ---------------- */

.g-woodfish .wf-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(4, 6, 11, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.g-woodfish .wf-mask.show { display: flex; animation: fadeIn 0.18s ease both; }

.g-woodfish .wf-sheet {
  width: 100%;
  max-width: 430px;
  padding: 16px 16px calc(16px + var(--safe-b));
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--line-2);
  border-bottom: 0;
  background: linear-gradient(180deg, #161c2b, #111623);
  box-shadow: 0 -22px 60px -18px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: wfSheetIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

@keyframes wfSheetIn {
  from { transform: translateY(26px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}

.g-woodfish .wf-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
}

.g-woodfish .wf-x {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--dim);
  font-size: 19px;
  line-height: 1;
  touch-action: manipulation;
}

.g-woodfish .wf-x:active { transform: scale(0.94); }

.g-woodfish .wf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
}

.g-woodfish .wf-row-k { font-size: 13.5px; color: var(--text); font-weight: 600; }

.g-woodfish .wf-sw {
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--line-2);
  transition: background 0.16s ease, border-color 0.16s ease;
  touch-action: manipulation;
}

.g-woodfish .wf-sw::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #cfd8e8;
  transition: transform 0.16s ease, background 0.16s ease;
}

.g-woodfish .wf-sw.on {
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  border-color: transparent;
}

.g-woodfish .wf-sw.on::after {
  transform: translateX(20px);
  background: #fff;
}

.g-woodfish .wf-sheet-stats {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.g-woodfish .wf-sheet-stat {
  flex: 1;
  min-width: 0;
  padding: 9px 8px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}

.g-woodfish .wf-sheet-k {
  font-size: 10px;
  color: var(--faint);
  margin-bottom: 2px;
}

.g-woodfish .wf-sheet-stat b {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.g-woodfish .wf-reset { margin-bottom: 9px; }

/* ---------------- 窄屏 ---------------- */

@media (max-width: 359px) {
  .g-woodfish .wf-head .g-title { font-size: 14px; }
  .g-woodfish .wf-btn { padding: 0 9px; font-size: 11.5px; }
  .g-woodfish .wf-total { font-size: 30px; }
  .g-woodfish .wf-fish-wrap { width: min(84vw, 300px); }
}
