/* repel-pigeon: スコープは #app-repel-pigeon に限定 */

#app-repel-pigeon {
  max-width: 720px;
}

/* ============================================================
   マスター起動/停止ボタン
   - 停止中: ティールグラデ（静的）
   - 起動中: 同じグラデ + サイズ拡大 + 周囲のグロー脈動
   ============================================================ */
#app-repel-pigeon #master-toggle {
  background: linear-gradient(135deg, #14b8a6 0%, #0d8a7c 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  border: 2px solid #0d8a7c;
  border-radius: 0.5rem;
  font-size: 1.05rem;
  padding: 0.9rem 1.25rem;
  letter-spacing: 0.08em;
  transition: border-color 0.25s, font-size 0.25s, padding 0.25s,
              box-shadow 0.25s, letter-spacing 0.25s, filter 0.2s;
}

#app-repel-pigeon #master-toggle:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.35);
}
#app-repel-pigeon #master-toggle:active {
  transform: scale(0.98);
}

/* 起動中: サイズ拡大 + 周囲のティールグロー脈動 */
#app-repel-pigeon #master-toggle.is-running {
  font-size: 1.15rem;
  padding: 1.1rem 1.5rem;
  letter-spacing: 0.1em;
  animation: master-pulse 1.4s ease-in-out infinite;
}

@keyframes master-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0.25rem rgba(20, 184, 166, 0.45),
                0 0 22px 4px rgba(20, 184, 166, 0.35);
  }
  50% {
    box-shadow: 0 0 0 0.75rem rgba(20, 184, 166, 0.12),
                0 0 36px 10px rgba(20, 184, 166, 0.65);
  }
}

/* 過剰な動きを抑える設定の人にはグロー脈動を停止 */
@media (prefers-reduced-motion: reduce) {
  #app-repel-pigeon #master-toggle.is-running {
    animation: none;
    box-shadow: 0 0 0 0.35rem rgba(20, 184, 166, 0.35),
                0 0 24px 6px rgba(20, 184, 166, 0.4);
  }
}

#app-repel-pigeon .nav-pills .nav-link {
  font-size: 0.9rem;
}

/* ============================================================
   音プリセット選択（カード型チェックリスト）
   ============================================================ */
#app-repel-pigeon .sound-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#app-repel-pigeon .sound-card-label {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  background: var(--bs-body-bg);
  transition: background-color 0.15s, border-color 0.15s;
  margin-bottom: 0;
}
#app-repel-pigeon .sound-card-label:hover {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.04);
}

#app-repel-pigeon .check-mark {
  font-size: 1.35rem;
  color: var(--bs-secondary-color);
  flex-shrink: 0;
  line-height: 1;
}
#app-repel-pigeon .check-mark .check-on { display: none; }
#app-repel-pigeon .check-mark .check-off { display: inline; }
#app-repel-pigeon .btn-check:checked + .sound-card-label .check-mark { color: var(--bs-primary); }
#app-repel-pigeon .btn-check:checked + .sound-card-label .check-on { display: inline; }
#app-repel-pigeon .btn-check:checked + .sound-card-label .check-off { display: none; }

#app-repel-pigeon .btn-check:checked + .sound-card-label {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.08);
}

#app-repel-pigeon .preset-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
#app-repel-pigeon .preset-title {
  font-weight: 600;
  color: var(--bs-body-color);
  font-size: 0.95rem;
}
#app-repel-pigeon .preset-desc {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  line-height: 1.3;
}

#app-repel-pigeon .btn-check:focus-visible + .sound-card-label {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* ============================================================
   視覚モード起動ボタン
   ============================================================ */
#app-repel-pigeon .visual-launch {
  padding: 1rem 0.5rem;
  font-size: 0.85rem;
  line-height: 1.3;
}
#app-repel-pigeon .visual-launch i {
  color: var(--bs-primary);
}

/* ============================================================
   全画面ビジュアルオーバーレイ（repel-crow と共通仕様）
   ============================================================ */
#repel-visual-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: none;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
#repel-visual-overlay.is-active {
  display: block;
}

#repel-visual-overlay .visual-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#repel-visual-overlay .exit-hint {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
}

/* 巨大目玉 */
.eye-svg {
  width: 80vmin;
  height: 80vmin;
  animation: eye-pulse 1.6s ease-in-out infinite;
}
@keyframes eye-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.eye-iris {
  transform-origin: center;
  animation: eye-look 3.2s ease-in-out infinite;
}
@keyframes eye-look {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(40px, -20px); }
  40%  { transform: translate(-40px, 20px); }
  60%  { transform: translate(30px, 30px); }
  80%  { transform: translate(-30px, -30px); }
  100% { transform: translate(0, 0); }
}
.eye-lid {
  transform-origin: center;
  animation: eye-blink 4.5s ease-in-out infinite;
}
@keyframes eye-blink {
  0%, 92%, 100% { transform: scaleY(0); }
  95%, 97%      { transform: scaleY(1); }
}

/* ハヤブサシルエット: 背景を「空の青」に切り替えて黒シルエットを浮かせる
   （実際にハトが警戒する自然な状況＝青空に猛禽の影） */
#repel-visual-overlay.mode-hawk {
  background: linear-gradient(180deg, #6cb4e8 0%, #b8dcf5 60%, #e8f4ff 100%);
}
.hawk-svg {
  width: 80vmin;
  height: 80vmin;
  animation: hawk-glide 3.5s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}
@keyframes hawk-glide {
  0%   { transform: translate(-3vw, -1vh) rotate(-3deg); }
  50%  { transform: translate(3vw, 1vh) rotate(3deg); }
  100% { transform: translate(-3vw, -1vh) rotate(-3deg); }
}
.hawk-eye {
  animation: hawk-glow 0.9s ease-in-out infinite;
}
@keyframes hawk-glow {
  0%, 100% { fill: #ffd400; opacity: 1; }
  50%      { fill: #ff5500; opacity: 0.9; }
}

/* 影が横切る: 上空から鳥影が旋回する状況を模す
   ハト固有: 頭上の影＝最上位の警戒トリガー（捕食者接近のシグナル） */
#repel-visual-overlay.mode-shadow {
  background: linear-gradient(180deg, #d4d4d4 0%, #f1f1f1 100%);
}
#repel-visual-overlay.mode-shadow .visual-stage {
  display: block;
  position: relative;
}
.shadow-bird {
  position: absolute;
  width: 50vw;
  height: 25vw;
  top: 30vh;
  left: 0;
  filter: blur(3px);
  opacity: 0.75;
  animation: shadow-cross 3.2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes shadow-cross {
  0%   { transform: translate(-60vw, 0) scale(0.7) rotate(-8deg); opacity: 0; }
  15%  { opacity: 0.45; }
  50%  { transform: translate(25vw, -10vh) scale(1.2) rotate(2deg); opacity: 0.85; }
  85%  { opacity: 0.45; }
  100% { transform: translate(110vw, 0) scale(0.7) rotate(8deg); opacity: 0; }
}

/* 高速フラッシュ */
#repel-visual-overlay.mode-flash {
  animation: flash-strobe 0.12s steps(2) infinite;
}
@keyframes flash-strobe {
  0%   { background: #fff; }
  100% { background: #000; }
}

/* レーザー風（緑点が走る） */
.laser-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, #00ff66 0%, #00aa44 40%, transparent 75%);
  box-shadow: 0 0 30px #00ff66, 0 0 60px #00ff66;
  will-change: transform;
}

/* タイマー残り表示 */
#countdown-pill {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #fff;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
