* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #12081f;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* 舞台固定 1280x720，由 JS 整体缩放到窗口大小 */
#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1280px;
  height: 720px;
  transform-origin: center center;
}

#game {
  position: absolute;
  inset: 0;
  width: 1280px;
  height: 720px;
  display: block;
}

.hidden { display: none !important; }

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(circle at 50% 40%, rgba(80, 30, 120, 0.82), rgba(18, 8, 31, 0.94));
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 76px;
  letter-spacing: 6px;
  background: linear-gradient(90deg, #ff8ad8, #ffe45c, #5ce1ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.35));
}

h2 { margin: 0; font-size: 52px; color: #ffe45c; }

.sub { margin: 0; font-size: 26px; opacity: 0.9; }

.group-tabs { display: flex; gap: 12px; margin-bottom: -6px; }
.group-tab {
  font-size: 20px;
  padding: 6px 26px;
  border-width: 2px;
}
.group-tab.active {
  background: #ffe45c;
  border-color: #ffe45c;
  color: #4a1f7a;
  font-weight: bold;
}

.songs {
  display: grid;
  grid-template-columns: repeat(4, 240px);
  gap: 14px;
}
.song {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  border-radius: 18px;
  font-size: 16px;
}
.song-name { font-size: 24px; font-weight: bold; }
.song-title { opacity: 0.75; }
.song-best { color: #ffe45c; }
.song.active {
  background: rgba(255, 111, 181, 0.35);
  border-color: #ff8ad8;
  box-shadow: 0 0 18px rgba(255, 111, 181, 0.6);
}

button {
  font: inherit;
  font-size: 24px;
  color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 30px;
  cursor: pointer;
  transition: transform 0.1s;
}
button:hover { transform: scale(1.05); }
button:active { transform: scale(0.96); }

button.big {
  font-size: 34px;
  font-weight: bold;
  padding: 14px 56px;
  border: none;
  background: linear-gradient(90deg, #ff6fb5, #ff9d5c);
  box-shadow: 0 6px 0 #b13a78;
}

.diffs { display: flex; gap: 16px; }

.start-row { display: flex; gap: 24px; align-items: center; }
button.tut {
  position: relative;
  font-size: 26px;
  font-weight: bold;
  padding: 12px 30px;
  border-color: #ffe45c;
  color: #ffe45c;
}
.tut .badge {
  display: none;
  position: absolute;
  left: 50%;
  top: -30px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 16px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #ffe45c;
  color: #4a1f7a;
}
.tut.first .badge { display: block; }
.tut.first { animation: tut-pulse 1.2s ease-in-out infinite; }
@keyframes tut-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 228, 92, 0.7); }
  50% { box-shadow: 0 0 0 14px rgba(255, 228, 92, 0); }
}
.tut-icons { display: flex; gap: 28px; }
.tut-icons img { width: 96px; height: 96px; object-fit: contain; }
.diff.active {
  background: #5ce1ff;
  border-color: #5ce1ff;
  color: #12081f;
  font-weight: bold;
}

.hint { margin: 0; font-size: 20px; line-height: 1.7; opacity: 0.85; }
.legend { display: flex; gap: 28px; font-size: 20px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend img { width: 36px; height: 36px; object-fit: contain; }
kbd {
  display: inline-block;
  min-width: 32px;
  padding: 0 6px;
  border-radius: 6px;
  background: #fff;
  color: #12081f;
  font-weight: bold;
}

.credit { margin: 0; font-size: 14px; opacity: 0.6; }
.credit a { color: #7fe7ff; }

.loading-text { font-size: 34px; animation: blink 1s infinite alternate; }
@keyframes blink { from { opacity: 0.4; } to { opacity: 1; } }

#pauseBtn {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 56px;
  height: 56px;
  padding: 0;
  font-size: 20px;
}

.res-main { display: flex; align-items: center; gap: 40px; }
#resCat { height: 230px; }
.rank {
  font-size: 140px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(180deg, #ffe45c, #ff8ad8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.res-score { font-size: 40px; font-weight: bold; }
.res-note { font-size: 24px; color: #ffe45c; min-height: 32px; }
.res-table { display: flex; gap: 26px; font-size: 24px; }
.res-table b { display: block; font-size: 32px; }
.res-btns { display: flex; gap: 20px; align-items: center; }
