/* ===================================
   TVモニターフレーム・リセット機能スタイル
   =================================== */
.tv-container {
  position: relative;
  display: block;                  /* 中央寄せを安定させるため block に変更 */
  width: 100%;
  max-width: 550px;                /* テレビの最大幅 */
  max-height: calc(100vh - 200px); /* ブラウザ画面の高さに収める */
  aspect-ratio: 4 / 3;             /* 縦横比を維持 */
  margin: 0 auto;

  /* テレビ全体（外枠）の角丸 */
  border-radius: 45px;
  overflow: hidden;
}

.tv-frame {
  display: block;
  width: 100%;
  height: auto;
}

/* つまみ（リセットボタン）へ誘導するヒントタグ */
.tv-hint-tag {
  position: absolute;
  bottom: 18%;                     /* ダイヤルの上に配置 */
  left: 4%;
  z-index: 30;
  
  background-color: #ff007f;       /* ネオンピンク */
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 12px;
  border: 2px solid #000;
  
  /* スプラトゥーン風に少し傾ける＋立体影 */
  transform: rotate(-8deg);
  box-shadow: 2px 2px 0px #000;
  
  pointer-events: none;            /* ボタンクリックを妨げない設定 */
  transition: transform 0.2s ease;
}

/* 下向きの小さな三角（吹き出しのツノ部分） */
.tv-hint-tag::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #000;
}

/* 最外周の青い画面領域に合わせた指定 */
.tv-screen-wrapper {
  position: absolute;
  top: 7.5%;
  left: 5%;
  width: 64%;
  height: 68%;
  z-index: 10;
  
  /* 外枠の大きな丸みにフィットさせる */
  border-radius: 30px; 
  overflow: hidden;
}

.tv-screen {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* 一番左のつまみ（ダイヤル）のみに透過ボタンを配置 */
.tv-knob-btn {
  position: absolute;
  bottom: 5.5%;
  left: 11%;      /* 位置を調整して一番左のダイヤルに重ねる */
  width: 12.5%;   /* 幅を絞ってダイヤル1つ分に設定 */
  height: 12%;
  z-index: 20;
  
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  border-radius: 50%; /* つまみの形に合わせた丸型 */
  
  /* ホバー時の変化を滑らかにする設定 */
  transition: all 0.2s ease-in-out;
}

/* ホバー時のエフェクト（丸く発光＋少し拡大） */
.tv-knob-btn:hover {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

/* つまみホバー時に上のヒントタグも少し動く連動演出 */
.tv-container:has(.tv-knob-btn:hover) .tv-hint-tag {
  transform: rotate(-8deg) translateY(-3px) scale(1.05);
  background-color: #eaff00;       /* ネオンイエローに変化 */
  color: #000;
}

/* クリックした（押した）瞬間のエフェクト */
.tv-knob-btn:active {
  transform: scale(0.95) rotate(15deg);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}


/* ===================================
   レトロゲーム（8bit）スタイル
   =================================== */

/* レトロページ専用背景（黒背景 ＋ グリッド線） */
body.retro-body {
  font-family: 'DotGothic16', sans-serif;
  background-color: #050508;
  background-image: 
    linear-gradient(rgba(0, 255, 204, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 204, 0.07) 1px, transparent 1px);
  background-size: 20px 20px;
  background-attachment: fixed;
}

/* ヘッダーのカスタマイズ */
.retro-header {
  transform: none; /* 傾きを解除してカチッとしたドット感を強調 */
  border-bottom: 4px solid #00ffcc;
}

.retro-logo {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2rem !important;
  color: #00ffcc !important;
  text-shadow: 2px 2px 0px #ff007f !important;
}

.retro-nav a {
  font-family: 'DotGothic16', sans-serif;
  font-size: 1.1rem;
}

.retro-nav a:hover {
  color: #00ffcc;
  transform: scale(1.1);
}

/* ヒーローエリア */
.retro-hero {
  text-align: center;
  padding: 40px 20px 30px;
}

.retro-credit {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.75rem;
  color: #eaff00;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.retro-main-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 2.2rem;
  color: #ff007f;
  text-shadow: 3px 3px 0px #eaff00, -2px -2px 0px #000;
  margin-bottom: 15px;
}

/* 点滅アニメーション（PUSH START） */
.blink-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  color: #00ffcc;
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* カード風セクション枠 */
.retro-card {
  background: #111118;
  border: 4px solid #00ffcc;
  box-shadow: 6px 6px 0px #ff007f;
  padding: 25px;
  margin-bottom: 50px;
  border-radius: 0; /* ドット感を出すため角丸をフラットに */
}

.stage-header {
  text-align: center;
  margin-bottom: 15px;
}

.stage-num {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  color: #eaff00;
  display: block;
  margin-bottom: 5px;
}

.retro-title {
  font-family: 'DotGothic16', sans-serif;
  font-size: 1.8rem;
  color: #ffffff;
  text-shadow: 2px 2px 0px #ff007f;
}

/* リセットヒントタグ（ステッカー風） */
.retro-hint {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  background-color: #00ffcc;
  color: #000000;
  border: 2px solid #000000;
  border-radius: 0;
  transform: rotate(-3deg);
}

/* ボタン（ドット絵風） */
.retro-btn {
  font-family: 'DotGothic16', sans-serif;
  border-radius: 0;
  transform: none;
  background-color: #ff007f;
  box-shadow: 4px 4px 0px #000000;
  border: 2px solid #ffffff;
}

.retro-btn:hover {
  transform: translateY(-2deg);
  background-color: #00ffcc;
  color: #000;
  box-shadow: 6px 6px 0px #000000;
}

/* フッター */
.retro-footer {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  color: #666;
}


/* ===================================
   背景を飛ぶお化け（Ghost）スタイル
   =================================== */

.ghost-particle {
  position: fixed;
  pointer-events: auto; /* クリック可能 */
  cursor: pointer;      /* マウスホバー時にポインター表示 */
  z-index: 100;         /* 前面に配置してクリックしやすく */
  font-size: 2rem;
  opacity: 0.8;
  filter: drop-shadow(0 0 8px rgba(0, 255, 204, 0.8));
  user-select: none;
  transition: transform 0.1s;
}

/* ホバー時に少し大きくする */
.ghost-particle:hover {
  transform: scale(1.2) !important;
  filter: drop-shadow(0 0 12px rgba(255, 0, 127, 1));
}

/* 左から右へ飛ぶアニメーション */
@keyframes fly-right {
  0% {
    left: -60px;
    transform: translateY(0px) scaleX(1);
  }
  25% {
    transform: translateY(-15px) scaleX(1);
  }
  50% {
    transform: translateY(10px) scaleX(1);
  }
  75% {
    transform: translateY(-15px) scaleX(1);
  }
  100% {
    left: 105vw;
    transform: translateY(0px) scaleX(1);
  }
}

/* 右から左へ飛ぶアニメーション（反転） */
@keyframes fly-left {
  0% {
    left: 105vw;
    transform: translateY(0px) scaleX(-1);
  }
  25% {
    transform: translateY(-15px) scaleX(-1);
  }
  50% {
    transform: translateY(10px) scaleX(-1);
  }
  75% {
    transform: translateY(-15px) scaleX(-1);
  }
  100% {
    left: -60px;
    transform: translateY(0px) scaleX(-1);
  }
}

/* お化け消滅時のドット弾けアニメーション */
.ghost-pop {
  pointer-events: none;
  animation-name: ghost-vanish !important;
  animation-duration: 0.3s !important;
  animation-timing-function: steps(4, end) !important;
  animation-iteration-count: 1 !important;
  animation-fill-mode: forwards !important;
}

@keyframes ghost-vanish {
  0% {
    transform: scale(1.2) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.8) rotate(15deg);
    opacity: 0.5;
    filter: drop-shadow(0 0 15px #eaff00);
  }
  100% {
    transform: scale(2.5) rotate(-15deg);
    opacity: 0;
  }
} 