body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    margin: 0;
  background: #0b0b0b;
  color: #eee;
  /* font-family: 'Courier New', monospace; */
  /* font-family: "WDXL Lubrifont JP N", sans-serif; */
  text-align: center;
  /* padding-top: 10px; */
  padding-top: 5%;
}
h1 {
  margin: 10px 0;
  position: relative;
  z-index: 2;
}
canvas {
  display: block;
  margin: 0 auto;
  background: #000;
  border: 1px solid #222;
  width: 100%;
  max-width: 480px;
  box-shadow:
    0 0 10px 2px #00ffb0,
    0 0 24px 4px #00ff88 inset,
    0 0 4px 1px #fff inset;
  border-radius: 16px;
  position: relative;
  z-index: 1;
  opacity: 0.85;
  opacity: 0.8;
}
button {
  /* margin-top: -20px; */
  margin-top: 8px;
  padding: 10px 100px;
  font-size: 35px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #00ffb0 0%, #00ff88 100%);
  color: white;
  cursor: pointer;
  box-shadow: 0 0 3px #00ffb0, 0 0 1px #00ff88 inset;
  text-shadow: 0 0 1px #00ffb0;
  font-family: 'Courier New', monospace;
  letter-spacing: 10px;
  transition: background 0.2s;
  font-weight: bold;
}
button.sell {
  background: linear-gradient(90deg, #ff4d8b 0%, #ffb700 100%);
  box-shadow: 0 0 6px #ff4d8b, 0 0 2px #ffb700 inset;
  text-shadow: 0 0 3px #ffb700;
}
#info {
    font-size: 20px;
  padding: 5px 80px;

  border-radius: 12px;
  background: rgba(0, 30, 50, 0.12);
  box-shadow: 0 0 8px #00ffb0 inset;
  /* margin-bottom: 10px; */
  display: inline-block;
  font-weight: bold;
  margin-bottom: 8px;

}
#timer {
  font-size: 32px;
  text-shadow: 0 0 12px #ffb700, 0 0 24px #fff;
  background: rgba(30, 20, 0, 0.18);
  /* margin: 8px 0; */

  letter-spacing: 2px;

}
#timer-area{
  font-size: 20px;
  box-shadow: 0 0 12px #ffb700 inset;
  display: inline-block;
  padding: 5px 50px;
  border-radius: 8px;
  color: #ffb700;
  font-weight: bold;
  margin-bottom: 5px;

  border-radius: 50px;

}
#obstacle-bg {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
#info, #timer-area, #action, #status {
  position: relative;
  z-index: 2;
}
#game-title {
  font-size: 40px;
  z-index: 10;
  background: rgba(0,0,0,0.7);
  color: #ffb700;
  border-radius: 16px;
  padding: 32px 0 24px 0;
  position: fixed;
  left: 50%;
  top: 33%;
  transform: translate(-50%, -50%);
  width: 100vw;
  text-align: center;
  font-weight: bold;
}
#score {
  font-size: 38px;
  font-weight: bold;
  /* color: #00ffb0; */
  /* letter-spacing: 2px; */
}
.game-desc {
  font-size: 20px;
  color: #fff;
  margin-top: 18px;
  line-height: 1.6;
}
#devil-img {
  position: fixed;
  right: 13%;
  bottom: -90px;
  width: 70%;
  max-width: 400px;
  z-index: 100;
  transition: opacity 1s;
  top: 50%;
}
#restart-btn {
  margin-top: 25px;
  padding: 12px 48px;
  font-size: 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #ffb700 0%, #ff4d8b 100%);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 8px #ffb700;
}
#result-screen {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  background: rgba(0,0,0,0.85);
  color: #ffb700;
  border-radius: 24px;
  padding: 48px 32px;
  font-size: 25px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 0 32px #fff;
  width: 100%;
  max-width: 280px;
}
#result-screen .score-value {
  font-size: 2em;
  color: #00ffb0;
}
#result-screen.negative .score-value {
  color: #ff4d8b;
}
#result-screen .score-label {
  margin-top: 24px;
  font-size: 40px;
  color: #fff;
}

/* Safari対策: filterやopacityは控えめに */
.obstacle-emoji {
  will-change: transform, opacity;
  /* opacity: 0.45; */
  filter: drop-shadow(0 0 12px #ffb700);
  pointer-events: none;
  transition: none !important;
}
.howto {
  margin-top: 10px;
  margin-left: auto;
  margin-right: auto;
  font-size: 15px;
  color: #fff;
  /* background: rgba(0,0,0,0.3); */
  /* padding: 10px 18px; */
  /* border-radius: 10px; */
  display: block;
  /* box-shadow: 0 0 8px #00ffb022; */
  z-index: 10;
  position: absolute;
  width: 100%;
  text-align: center;
}
@keyframes blink {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 1; }
}

#start-hint,
.game-start-hint {
  font-size: 25px; /* 少し小さめに調整 */
  color: #00ff88;  /* 緑色 */
  font-weight: 600;
  margin-top: 8px;
  opacity: 1;
  pointer-events: none; /* タップを妨げない */
  text-shadow: 0 0 6px rgba(0,255,136,0.12);
  will-change: opacity, transform;
  animation: blink 1.2s ease-in-out infinite;
}

/* ユーザーがモーションを減らしたい設定ならアニメを無効化 */
@media (prefers-reduced-motion: reduce) {
  #start-hint,
  .game-start-hint {
    animation: none;
  }
}