/* 找茬 · 专属样式（场景由 JS 生成 SVG；选择器统一 .g-spotfind 前缀） */

/* ---------------- 视图容器 ---------------- */
.g-spotfind .sf-setup-view,
.g-spotfind .sf-play,
.g-spotfind .sf-result {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.g-spotfind .sf-play { flex: 1; }
.g-spotfind .sf-result { flex: 1; }

/* ---------------- 设置 ---------------- */
.g-spotfind .sf-setup-view .panel { padding: 12px 13px; }
.g-spotfind .sf-setup-view .panel-h { margin-bottom: 8px; }
.g-spotfind .sf-rules { padding: 12px 13px; }
.g-spotfind .sf-rule-line {
  font-size: 12px;
  line-height: 1.78;
  color: var(--dim);
}
.g-spotfind .sf-rule-line b { color: var(--text); font-weight: 600; }

/* ---------------- HUD ---------------- */
.g-spotfind .sf-hud { display: flex; gap: 8px; flex: none; }
.g-spotfind .sf-hud-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 6px 7px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.16s, background 0.16s;
}
.g-spotfind .sf-hud-k { font-size: 10px; letter-spacing: 0.05em; color: var(--faint); }
.g-spotfind .sf-hud-item .num { font-size: 17px; font-weight: 700; line-height: 1.2; color: var(--text); }
.g-spotfind .sf-hud-item.warn { border-color: rgba(255, 92, 108, 0.5); background: rgba(255, 92, 108, 0.1); }
.g-spotfind .sf-hud-item.warn .num { color: #ff8b96; animation: sfTick 1s ease-in-out infinite; }
.g-spotfind .sf-time-bar { flex: none; height: 6px; }
.g-spotfind .sf-time-bar > i { transition: width 0.12s linear; }

/* ---------------- 两幅场景 ---------------- */
.g-spotfind .sf-scenes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: none;
}
.g-spotfind .sf-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 360 / 170;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 12px 28px -18px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  touch-action: manipulation;
  cursor: crosshair;
}
.g-spotfind .sf-scene svg { display: block; width: 100%; height: 100%; }
.g-spotfind .sf-marks { position: absolute; inset: 0; pointer-events: none; z-index: 2; }

.g-spotfind .sf-mark {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  box-sizing: border-box;
}
.g-spotfind .sf-found {
  width: 34px;
  height: 34px;
  border: 2.5px solid #3ecf8e;
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.18), 0 0 16px rgba(62, 207, 142, 0.45);
  animation: sfPop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}
.g-spotfind .sf-hint {
  width: 46px;
  height: 46px;
  border: 2px dashed rgba(242, 209, 107, 0.95);
  box-shadow: 0 0 0 4px rgba(242, 209, 107, 0.12);
  animation: sfHintPulse 0.9s ease-in-out infinite;
}
.g-spotfind .sf-wrong {
  position: absolute;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(255, 92, 108, 0.9);
  background: rgba(255, 92, 108, 0.16);
  pointer-events: none;
  animation: sfWrong 0.5s ease-out forwards;
  z-index: 3;
}

/* ---------------- 工具 ---------------- */
.g-spotfind .sf-tools { display: flex; gap: 8px; flex: none; }
.g-spotfind .sf-tools .btn { flex: 1; min-height: 44px; }

/* ---------------- 结算 ---------------- */
.g-spotfind .sf-res-head { text-align: center; padding: 2px 0 0; }
.g-spotfind .sf-res-big {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
  background: linear-gradient(120deg, var(--accent), #fff2c2 55%, var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.g-spotfind .sf-res-big.win {
  background: linear-gradient(120deg, #7df0b0, #ffe9a8);
  -webkit-background-clip: text;
  background-clip: text;
}
.g-spotfind .sf-res-big.lose {
  background: linear-gradient(120deg, #ff8b96, #ffc1c7);
  -webkit-background-clip: text;
  background-clip: text;
}
.g-spotfind .sf-res-sub { margin-top: 3px; font-size: 11.5px; color: var(--faint); }
.g-spotfind .sf-res-best {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--dim);
  text-align: center;
}
.g-spotfind .sf-res-best .badge { font-size: 10.5px; }

/* ---------------- 动画 ---------------- */
@keyframes sfPop {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes sfHintPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.95; }
  50% { transform: translate(-50%, -50%) scale(1.12); opacity: 0.55; }
}
@keyframes sfWrong {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.35); opacity: 0; }
}
@keyframes sfTick {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ---------------- 小屏 ---------------- */
@media (max-width: 359px) {
  .g-spotfind .sf-hud-item .num { font-size: 16px; }
  .g-spotfind .sf-res-big { font-size: 27px; }
}
