/* ===== 全体リセット ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== スクロール禁止 ===== */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

/* ===== ページ全体 ===== */
body {
  background: #111;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Twitter Link ===== */
.twitter-link {
  position: fixed;
  left: 50%;
  top: calc(50% + 220px);
  transform: translateX(-50%);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  opacity: 0.8;
  z-index: 5;
}

.twitter-link:hover {
  opacity: 1;
}

/* ===== プレイヤー ===== */
.player {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;

  /* 初期描画でブレないように追加 */
  width: 120px;   /* ボタンサイズに合わせる */
  height: 120px;
}

/* ===== ステータス表示 ===== */
#status {
  margin-top: 20px;
  font-size: 14px;
  letter-spacing: 0.2em;
  opacity: 0;
  transform: translateY(0);
  transition: opacity 0.5s linear, transform 0.5s linear;
}

#status.show {
  opacity: 1;
  transform: translateY(-10px);
}

#status.hidden {
  opacity: 0;
  transform: translateY(0);
}

/* ===== 再生/停止ボタン ===== */
#playBtn {
  width: 100%;
  height: 100%;
  background: #1e1e1e;
  border: 3px solid #fff;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.1s ease;
}

/* 擬似要素で再生/停止アイコン */
#playBtn::before {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 再生（三角形） */
#playBtn.play::before {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 30px 0 30px 50px;
  border-color: transparent transparent transparent #fff;
}

/* 停止（四角） */
#playBtn.stop::before {
  width: 40px;
  height: 40px;
  background: #fff;
}

/* ホバー/アクティブ */
#playBtn:hover { background: #2a2a2a; }
#playBtn:active { transform: scale(0.96); }

/* ===== スマホ対応 ===== */
@media (max-width: 480px) {
  .player {
    width: 90px;
    height: 90px;
  }
  #playBtn.play::before {
    border-width: 22px 0 22px 36px;
  }
  #playBtn.stop::before {
    width: 30px;
    height: 30px;
  }
  #status { font-size: 12px; }
}

/* ===== canvas のクリック無効化 ===== */
canvas {
  pointer-events: none;
}
