@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: #f5f5f5;
  overflow: hidden;
  touch-action: manipulation;
}

#game-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

#score {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

#game-canvas {
  width: 90vw;
  max-width: 400px;
  height: 50vh;
  max-height: 400px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

#timing-bar {
  width: 90vw;
  max-width: 400px;
  height: 60px;
  background: #eee;
  border-radius: 30px;
  margin-top: 30px;
  position: relative;
  overflow: hidden;
}

#target-zone {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 100%;
  background: rgba(76, 175, 80, 0.3);
}

#indicator {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 40px;
  background: #333;
  border-radius: 5px;
  transition: left 0.05s linear;
}

#punch-button {
  margin-top: 30px;
  padding: 16px 48px;
  font-size: 20px;
  font-weight: 700;
  font-family: 'Noto Sans JP', sans-serif;
  background: #ff9800;
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
  transition: transform 0.1s;
  min-width: 200px;
  min-height: 60px;
}

#punch-button:active {
  transform: scale(0.95);
}

#punch-button.success {
  animation: successPulse 0.3s;
}

#punch-button.fail {
  animation: failShake 0.3s;
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); background: #4caf50; }
}

@keyframes failShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}