/* 钓鱼 · 样式（.g-fishing 前缀） */

.g-fishing {
  gap: 8px;
  padding-bottom: calc(12px + var(--safe-b));
}

.g-fishing .fs-stage {
  position: relative;
  flex: 1;
  min-height: 420px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #0a1524;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 60px -30px rgba(0, 0, 0, 0.95);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.g-fishing .fs-canvas-host {
  position: absolute;
  inset: 0;
}

.g-fishing .fs-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  z-index: 0;
}

/* ---------------- HUD ---------------- */

.g-fishing .fs-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.g-fishing .fs-chip,
.g-fishing .fs-sound {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 16, 26, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--dim);
  font-size: 11.5px;
  font-weight: 600;
  touch-action: manipulation;
}

.g-fishing .fs-chip b {
  font-size: 14px;
  font-weight: 800;
  color: #dff0ff;
  font-variant-numeric: tabular-nums;
}

.g-fishing .fs-sound.on {
  color: #cfe8ff;
  border-color: rgba(121, 184, 255, 0.45);
  background: rgba(121, 184, 255, 0.14);
}

.g-fishing .fs-hint {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(14px + var(--safe-b));
  z-index: 2;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: rgba(212, 235, 255, 0.68);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
  pointer-events: none;
}

/* ---------------- 底部主按钮 ---------------- */

.g-fishing .fs-controls { flex: none; }

.g-fishing .fs-main-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  box-shadow: 0 12px 26px -16px var(--accent), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.g-fishing .fs-main-btn:active { transform: scale(0.985); filter: brightness(1.05); }

.g-fishing .fs-main-btn.hot {
  background: linear-gradient(180deg, #ffb454, #e07b2a);
  box-shadow: 0 0 26px rgba(255, 180, 84, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: fsPulse 0.42s ease-in-out infinite alternate;
}

.g-fishing .fs-main-btn.hold {
  background: linear-gradient(180deg, #3fae56, #20662d);
  box-shadow: 0 0 22px rgba(126, 231, 135, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

@keyframes fsPulse {
  from { transform: scale(1); }
  to { transform: scale(1.02); }
}

/* ---------------- 张力面板 ---------------- */

.g-fishing .fs-tension {
  position: absolute;
  right: 12px;
  top: 50%;
  z-index: 2;
  width: 104px;
  padding: 10px 10px 8px;
  border-radius: 14px;
  border: 1px solid rgba(121, 184, 255, 0.28);
  background: rgba(8, 14, 22, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 36px -20px rgba(0, 0, 0, 0.9);
  transform: translateY(-50%);
  animation: fadeIn 0.2s ease both;
}

.g-fishing .fs-tension.hidden { display: none; }

.g-fishing .fs-t-label {
  margin-bottom: 7px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: #ffd166;
}

.g-fishing .fs-bar {
  position: relative;
  width: 36px;
  height: 198px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 107, 107, 0.16);
}

.g-fishing .fs-zone-yellow {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(255, 209, 102, 0.26);
  z-index: 1;
  transition: top 0.12s linear, height 0.12s linear;
}

.g-fishing .fs-zone-green {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  background: rgba(126, 231, 135, 0.52);
  border-top: 1px solid rgba(180, 255, 190, 0.8);
  border-bottom: 1px solid rgba(180, 255, 190, 0.8);
  transition: top 0.12s linear, height 0.12s linear;
}

.g-fishing .fs-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  background: rgba(121, 184, 255, 0.26);
}

.g-fishing .fs-needle {
  position: absolute;
  left: -6px;
  right: -6px;
  height: 3px;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.85);
  z-index: 4;
  transform: translateY(50%);
}

.g-fishing .fs-t-progress,
.g-fishing .fs-t-tension {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 9px;
  color: var(--faint);
}

.g-fishing .fs-t-track {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.g-fishing .fs-t-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: var(--accent);
}

.g-fishing .fs-t-meta { font-size: 9px; color: var(--faint); }

.g-fishing .fs-t-track.small i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: #7ee787;
}

/* ---------------- 结果卡 ---------------- */

.g-fishing .fs-card {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 8, 14, 0.5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.g-fishing .fs-card.show { display: flex; animation: fadeIn 0.18s ease both; }

.g-fishing .fs-card-inner {
  width: min(84%, 300px);
  padding: 22px 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(121, 184, 255, 0.28);
  background: linear-gradient(180deg, #141d2c, #0e1520);
  box-shadow: 0 28px 60px -24px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  animation: fsCardIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

@keyframes fsCardIn {
  from { transform: translateY(14px) scale(0.97); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}

.g-fishing .fs-card-badge {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--faint);
  margin-bottom: 8px;
}

.g-fishing .fs-card-badge.common { color: #9fb4c7; }
.g-fishing .fs-card-badge.rare { color: #79b8ff; }
.g-fishing .fs-card-badge.legend { color: #ffd166; text-shadow: 0 0 14px rgba(255, 209, 102, 0.5); }
.g-fishing .fs-card-badge.fail { color: #ff8b96; }

.g-fishing .fs-card-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #eaf4ff;
}

.g-fishing .fs-card-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--dim);
}

.g-fishing .fs-card-meta {
  margin: 10px 0 16px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--faint);
}

.g-fishing .fs-card .btn { min-height: 44px; flex: 1; }
.g-fishing .fs-card .btn.hidden { display: none; }

/* ---------------- 图鉴 sheet ---------------- */

.g-fishing .fs-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-fishing .fs-mask.show { display: flex; animation: fadeIn 0.18s ease both; }

.g-fishing .fs-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, #101a28, #0b121c);
  box-shadow: 0 -22px 60px -18px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: fsSheetIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

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

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

.g-fishing .fs-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-fishing .fs-sheet-sub {
  font-size: 11px;
  color: var(--faint);
  margin-bottom: 12px;
}

.g-fishing .fs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 46vh;
  overflow-y: auto;
}

.g-fishing .fs-fish {
  padding: 9px 6px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
}

.g-fishing .fs-fish.got {
  border-color: rgba(121, 184, 255, 0.3);
  background: rgba(121, 184, 255, 0.08);
}

.g-fishing .fs-fish-icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--f, #79b8ff) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--f, #79b8ff) 45%, transparent);
  color: var(--f, #79b8ff);
  font-size: 14px;
  font-weight: 800;
  filter: grayscale(1) opacity(0.5);
}

.g-fishing .fs-fish.got .fs-fish-icon { filter: none; }

.g-fishing .fs-fish-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.g-fishing .fs-fish.got .fs-fish-name { color: #eaf4ff; }

.g-fishing .fs-fish-rarity {
  margin-top: 2px;
  font-size: 9px;
  color: var(--faint);
}

.g-fishing .fs-fish.got .fs-fish-rarity.common { color: #9fb4c7; }
.g-fishing .fs-fish.got .fs-fish-rarity.rare { color: #79b8ff; }
.g-fishing .fs-fish.got .fs-fish-rarity.legend { color: #ffd166; }

.g-fishing .fs-fish-stat {
  margin-top: 3px;
  font-size: 9px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.g-fishing .fs-sheet-tip { margin-top: 12px; text-align: center; }

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

@media (max-height: 700px) {
  .g-fishing .fs-tension { width: 96px; padding: 8px 8px 6px; }
  .g-fishing .fs-bar { height: 160px; width: 32px; }
  .g-fishing .fs-stage { min-height: 340px; }
}

@media (max-width: 359px) {
  .g-fishing .fs-main-btn { min-height: 48px; font-size: 15px; }
  .g-fishing .fs-bar { height: 176px; }
  .g-fishing .fs-tension { width: 92px; }
}
