* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #070b13;
}
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI",
    sans-serif;
  -webkit-user-select: none;
  user-select: none;
}
#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#pad {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 22px;
  z-index: 5;
}
#pad button {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 1.5px solid rgba(120, 190, 255, 0.35);
  background: rgba(28, 58, 96, 0.55);
  color: #cfe6ff;
  font-size: 20px;
  line-height: 1;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  cursor: pointer;
  transition: transform 0.08s, background 0.15s;
}
#pad button:active {
  background: rgba(60, 125, 200, 0.75);
  transform: scale(0.93);
}

#btnEnd {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 120, 120, 0.4);
  background: rgba(90, 32, 42, 0.6);
  color: #ff9a9a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  touch-action: none;
  transition: background 0.15s, transform 0.08s;
}
#btnEnd:active {
  background: rgba(130, 45, 58, 0.8);
  transform: translateX(-50%) scale(0.94);
}

#overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 10, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.card {
  width: 100%;
  max-width: 380px;
  padding: 30px 26px 26px;
  border-radius: 22px;
  text-align: center;
  color: #e8f0f8;
  background: linear-gradient(
    180deg,
    rgba(26, 44, 70, 0.96),
    rgba(13, 22, 38, 0.96)
  );
  border: 1px solid rgba(90, 150, 220, 0.25);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}
.logo {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 10px;
}
.card h1 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 1px;
}
.card .sub {
  margin-top: 7px;
  font-size: 13px;
  color: #7f97b5;
}

.how {
  list-style: none;
  text-align: left;
  margin: 18px 0 16px;
}
.how li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: #a8bdd6;
}
.how li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2ea8ff;
}
.how b {
  color: #cfe6ff;
}

.diff-label {
  margin: 4px 0 10px;
  font-size: 12px;
  color: #7f97b5;
  letter-spacing: 1px;
  text-align: left;
}
.diffs {
  display: flex;
  gap: 9px;
}
.diff-btn {
  flex: 1;
  padding: 11px 0;
  border-radius: 12px;
  border: 1px solid rgba(90, 150, 220, 0.28);
  background: rgba(20, 36, 58, 0.7);
  color: #9db4d0;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.16s;
}
.diff-btn:active {
  transform: scale(0.96);
}
.diff-btn.active {
  border-color: rgba(46, 168, 255, 0.9);
  background: rgba(35, 100, 180, 0.55);
  color: #eaf3ff;
  box-shadow: 0 0 18px rgba(46, 168, 255, 0.3);
}
.diff-desc {
  margin-top: 11px;
  font-size: 12px;
  color: #6d84a3;
  min-height: 17px;
}

.score-box {
  margin: 18px 0 6px;
}
.score-num {
  display: block;
  font-size: 52px;
  font-weight: 800;
  color: #2ee06a;
  line-height: 1.1;
  text-shadow: 0 0 30px rgba(46, 224, 106, 0.4);
}
.score-label {
  font-size: 12px;
  color: #7f97b5;
  letter-spacing: 2px;
}
.hint {
  margin-top: 10px;
  font-size: 12.5px;
  color: #6d84a3;
}

.btn {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border: none;
  border-radius: 13px;
  background: linear-gradient(135deg, #2ea8ff, #1b6ff0);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(30, 120, 255, 0.35);
  transition: transform 0.1s, box-shadow 0.2s;
}
.btn:active {
  transform: translateY(1px);
  box-shadow: 0 5px 14px rgba(30, 120, 255, 0.3);
}

/* 新增：左下角署名 */
#credit {
  position: fixed;
  left: 16px;
  bottom: 14px;
  z-index: 20; /* 高于 overlay，始终可见 */
  font-size: 12px;
  color: rgba(150, 180, 215, 0.55);
  letter-spacing: 1px;
  pointer-events: none; /* 不挡点击 */
  font-family: inherit;
}

/* 新增：左下角署名 */
#credit {
  position: fixed;
  left: 16px;
  bottom: 14px;
  z-index: 20; /* 高于 overlay，始终可见 */
  font-size: 12px;
  color: rgba(150, 180, 215, 0.55);
  letter-spacing: 1px;
  pointer-events: none; /* 不挡点击 */
  font-family: inherit;
}
