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

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

#game { position: fixed; inset: 0; display: block; }

.hidden { display: none !important; }

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(11, 16, 38, 0.92);
  z-index: 10;
  padding: 24px;
  text-align: center;
}

h1 {
  font-size: 56px;
  letter-spacing: 4px;
  background: linear-gradient(90deg, #4dd0ff, #c56cf0, #ff9f43);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle { color: rgba(255, 255, 255, 0.6); margin-top: -8px; }

#song-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 280px;
}

.song-btn {
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.song-btn.selected {
  border-color: #4dd0ff;
  background: rgba(77, 208, 255, 0.15);
}

.section-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  padding: 6px 2px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 4px;
}

.row { display: flex; gap: 12px; }

.pill {
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.primary {
  padding: 14px 48px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #4dd0ff, #c56cf0);
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
}

.hint { color: rgba(255, 255, 255, 0.5); font-size: 13px; max-width: 480px; }

/* 自制谱面区 */
#custom-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 280px;
  max-width: 92vw;
}

.section-title {
  font-size: 15px;
  font-weight: normal;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.mini-btn {
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

#custom-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

#custom-list:empty { display: none; }

.custom-item {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.custom-item .song-btn {
  flex: 1;
  padding: 8px 14px;
  font-size: 14px;
  text-align: left;
}

.custom-item .tool-btn {
  width: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  cursor: pointer;
}

.custom-item .tool-btn:hover { background: rgba(255, 255, 255, 0.15); }

/* 内嵌对话框 */
.dlg-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
}

.dlg-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 280px;
  max-width: 86vw;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background: #131a33;
  text-align: center;
}

.dlg-title { font-size: 16px; font-weight: normal; white-space: pre-line; }

.dlg-input {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  outline: none;
}

.dlg-btns { justify-content: center; }

.rating {
  font-size: 64px;
  font-weight: bold;
  color: #ffd32a;
  text-shadow: 0 0 24px rgba(255, 211, 42, 0.6);
}

#result-body { list-style: none; line-height: 1.9; color: rgba(255, 255, 255, 0.85); }

/* 暂停 */
#pause-btn {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(11, 16, 38, 0.6);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.pause-cols {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 92vw;
}

.pause-box {
  min-width: 260px;
  max-width: 400px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.pause-list {
  list-style: none;
  margin-top: 10px;
  line-height: 2;
  font-size: 14px;
  text-align: left;
  color: rgba(255, 255, 255, 0.85);
}

/* 音量滑条(暂停面板/编辑器共用) */
.vol-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vol-list li span { width: 34px; flex: none; }
.vol-list li b { width: 38px; flex: none; font-weight: normal; text-align: right; }
.vol-list input[type="range"] {
  flex: 1;
  min-width: 120px;
  accent-color: #4dd0ff;
  cursor: pointer;
}

/* 原生下拉弹层是白底,选项必须用深色字,否则白底白字看不见 */
select option {
  color: #111;
  background: #fff;
}
