/* game.css — game.html 専用スタイル（ゲームページの枠・インベーダー） */
/* home.css にあったゲーム用スタイルをこちらへ移動 */

/* ページの枠（index のヒーローと同じ中央寄せ） */
.game-page {
  position: relative;
  z-index: 2;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 5% 34px;
}

@media (max-width: 600px) {
  .game-page { padding-top: 16px; min-height: 0; }   /* スマホは画面の高さに合わせず、ゲームの下をすぐフッターに */
}

/* invaders.css の下の余白（60px）も、このページでは消す */
.game-page .invaders-container { margin-bottom: 0; }

.game-container {
  margin: 30px auto 0;   /* フッターまでの間を詰める（以前は 60px） */
  max-width: 1040px;
  text-align: center;
  position: relative;
}

#invadersCanvas {
  max-width: 100%;
  height: auto;
  border: 1px solid #000000;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  touch-action: none;
  cursor: pointer;
}

.control-bar {
  margin: 15px auto 0;
  width: 100%;
  max-width: 1000px;
  height: 90px;
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: pointer;
}

.control-bar::before {
  content: "← ここを指で左右になぞって操作 →";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(0, 0, 0, 0.45);
  font-size: 1rem;
  white-space: nowrap;
  pointer-events: none;
}

@media (min-width: 769px) {
  .game-container { max-width: 620px; }
}

/* ==========================================================
   アーケード筐体（80年代アメリカのアップライト型をイメージしたオリジナル）
   マーキー（光る看板）→ 画面のベゼル → コントロールパネル → コインドア
   ========================================================== */
.arcade {
  --cab: #15161b;          /* 筐体の黒 */
  --tmold: #9b6cf0;        /* ふちのモール（ラベンダー） */
  width: 100%;
  margin: 0 auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.28));
}
/* マーキー：上の光る看板 */
.arcade-marquee {
  position: relative;
  margin: 0 3%;
  padding: 14px 10px 12px;
  border-radius: 10px 10px 0 0;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(180deg, #23103d, #0d0b18);
  border: 3px solid var(--tmold);
  border-bottom: 0;
  font-family: 'Liberation Mono', 'Courier New', monospace;
  font-weight: 700;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}
.arcade-marquee::after {   /* 看板のガラスの光沢 */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.16) 0 28%, transparent 28.5%);
  pointer-events: none;
}
.am-sub {
  font-size: clamp(0.6rem, 1.9vw, 0.8rem);
  letter-spacing: 0.5em;
  margin-right: -0.5em;
  color: #ffd6ec;
  opacity: 0.85;
}
.am-main {
  font-size: clamp(1.7rem, 7.4vw, 2.7rem);
  letter-spacing: 0.22em;
  margin-right: -0.22em;
  background: linear-gradient(90deg, #ff4d5e 0%, #ff6fb1 30%, #9b6cf0 65%, #3fa6e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 6px rgba(255, 111, 177, 0.65)) drop-shadow(0 0 16px rgba(155, 108, 240, 0.45));
}
/* 筐体の本体：左右にサイドアート（斜めのストライプ） */
.arcade-cab {
  position: relative;
  padding: 18px 26px 0;
  background:
    repeating-linear-gradient(118deg, #ff4d5e 0 6px, transparent 6px 10px, #ff9a3c 10px 16px, transparent 16px 20px, #9b6cf0 20px 26px, transparent 26px 60px) left top / 14px 100% no-repeat,
    repeating-linear-gradient(62deg, #ff4d5e 0 6px, transparent 6px 10px, #ff9a3c 10px 16px, transparent 16px 20px, #9b6cf0 20px 26px, transparent 26px 60px) right top / 14px 100% no-repeat,
    var(--cab);
  border: 3px solid var(--tmold);
  border-radius: 0 0 14px 14px;
}
/* 画面まわりのベゼル */
.arcade-bezel {
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #2a2c34, #0b0c10);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 10px 24px rgba(0, 0, 0, 0.7);
}
.arcade-screen {
  position: relative;
  border-radius: 14px / 18px;       /* ブラウン管のふくらみ */
  overflow: hidden;
  background: radial-gradient(120% 120% at 50% 45%, #10131d 0%, #05060a 70%);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
}
/* ゲーム画面：黒いドットを反転して、暗い画面に光るドットとして見せる */
.arcade #invadersCanvas {
  display: block;
  width: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  filter: invert(1) drop-shadow(0 0 2px rgba(255, 255, 255, 0.55));
}
/* ブラウン管の質感：走査線・色のにじみ・ガラスの反射 */
.arcade-crt {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.08) 0 22%, transparent 22.5%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgba(255, 111, 177, 0.55) 0%, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0) 70%, rgba(63, 166, 232, 0.55) 100%);
  mix-blend-mode: multiply;
}
.arcade-crt::after {   /* 光ったドットに色をのせる（上はピンク、下は水色） */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ff9ccc 0%, #ffffff 34%, #ffffff 66%, #8fd3ff 100%);
  mix-blend-mode: multiply;
}
/* コントロールパネル */
.arcade-panel {
  position: relative;
  margin: 18px -40px 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(180deg, #2b2d36 0%, #17181e 100%);
  border: 3px solid var(--tmold);
  border-radius: 10px;
  box-shadow: 0 10px 0 #0b0b0e, inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.arcade #invadersControlBar {
  flex: 1;
  margin: 0;
  height: 56px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.28);
}
.arcade #invadersControlBar::before { color: rgba(255, 255, 255, 0.6); }
.ap-stick {   /* レバー */
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a96, #ff4d5e 45%, #a3101f);
  box-shadow: 0 6px 0 #0a0a0c, 0 7px 10px rgba(0, 0, 0, 0.5);
}
.ap-btns { flex: none; display: flex; gap: 10px; }
.ap-btns i {   /* ボタン */
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d6c4ff, #9b6cf0 50%, #4b2a96);
  box-shadow: 0 4px 0 #0a0a0c;
}
.ap-btns i + i { background: radial-gradient(circle at 35% 30%, #c6ecff, #3fa6e8 50%, #135a8a); }
/* コインドア */
.arcade-coin {
  margin: 22px auto 0;
  padding: 14px 0 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.coin-slot {
  width: 40px;
  height: 54px;
  border-radius: 4px;
  background: linear-gradient(180deg, #3a3c45, #1b1c22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.coin-slot b {
  font: 700 0.62rem 'Liberation Mono', monospace;
  color: #ffb36b;
  text-shadow: 0 0 6px rgba(255, 140, 40, 0.9);
  border: 1px solid rgba(255, 160, 80, 0.7);
  padding: 8px 3px;
  border-radius: 2px;
}
.coin-label {
  flex-basis: 100%;
  text-align: center;
  font: 700 0.62rem 'Liberation Mono', monospace;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.45);
}
@media (max-width: 600px) {
  .arcade-cab { padding: 12px 16px 0; background-size: 9px 100%, 9px 100%, auto; }
  .arcade-bezel { padding: 8px; }
  .arcade-panel { margin: 14px -22px 0; padding: 10px 12px; gap: 10px; }
  .arcade #invadersControlBar { height: 60px; }
  .ap-stick { width: 26px; height: 26px; }
  .ap-btns i { width: 18px; height: 18px; }
  .ap-btns { gap: 6px; }
  .arcade-coin { margin-top: 18px; padding-bottom: 14px; }
  .coin-slot { width: 32px; height: 44px; }
}
