body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #1a1a1a;
  color: #fff;
  text-align: center;
  margin: 0;
  padding: 10px;
  user-select: none;
  touch-action: manipulation;
}

#hud {
  display: flex;
  justify-content: space-around;
  max-width: 500px;
  margin: 0 auto 8px;
  background: #2c2c2c;
  padding: 8px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
}

#sub-hud {
  display: flex;
  justify-content: space-around;
  max-width: 500px;
  margin: 0 auto 8px;
  font-size: 13px;
  color: #ccc;
}

#game-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 450px;
  margin: 0 auto;
  background: #87CEEB;
  border: 3px solid #fff;
  border-radius: 8px;
  overflow: hidden;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#jump-btn {
  width: 100%;
  max-width: 500px;
  padding: 15px;
  margin-top: 10px;
  font-size: 20px;
  font-weight: bold;
  background: #2196F3;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#jump-btn:active {
  background: #1976D2;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 10;
}

.overlay h2 {
  margin-bottom: 5px;
}

.rule-text {
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

#result-detail {
  font-size: 15px;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

.start-btn {
  padding: 12px 28px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 8px;
  margin-top: 15px;
}

.danger {
  color: #ff5252;
}

.warning {
  color: #ffeb3b;
}

#ranking-box {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 8px;
  width: 85%;
  font-size: 14px;
}

ol {
  text-align: left;
  margin: 5px 0;
  padding-left: 20px;
}
#ranking-list {
  list-style-type: decimal;
  padding-left: 24px;
  margin: 8px 0;
  line-height: 1.6;
  word-break: break-all;
}
.samurai-title {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
  font-size: 56px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 8px;
  margin: 0 0 12px 0;
  text-shadow:
    0 0 10px #ff0000,
    3px 3px 0px #8b0000,
    -2px -2px 0px #000;
}
