/* ===== 主菜单样式 ===== */
#bg { position: fixed; inset: 0; z-index: 0; }

.menu-wrap {
  position: relative;
  z-index: 1;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(28px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ---------- LOGO ---------- */
.logo { text-align: center; margin: 6px 0 22px; }

.logo-main {
  font-family: var(--font-en);
  font-size: clamp(34px, 9vw, 52px);
  font-weight: 900;
  letter-spacing: 6px;
  background: linear-gradient(92deg, #7df9ff, #a78bfa 45%, #f472b6 75%, #7df9ff);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: logoFlow 5s linear infinite;
  filter: drop-shadow(0 0 14px rgba(140, 190, 255, .65));
}
.logo-main span { margin-left: 8px; font-weight: 700; letter-spacing: 10px; }
@keyframes logoFlow { to { background-position: -220% 0; } }

.logo-sub {
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 8px;
  color: rgba(255, 255, 255, .75);
  text-shadow: 0 0 12px rgba(150, 200, 255, .6);
}
.logo-tag {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(167, 139, 250, .95);
}

/* ---------- 歌曲列表 ---------- */
.song-list {
  width: 100%;
  max-width: 430px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  padding-bottom: 8px;
}

.song-card {
  position: relative;
  width: 100%;
  padding: 16px 16px 14px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .15s ease, box-shadow .15s ease;
}
.song-card:active { transform: scale(.975); }
.song-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, .22), transparent 45%),
    linear-gradient(135deg, var(--card-a, #3a1d4f), var(--card-b, #170b2b) 75%);
  opacity: .96;
  z-index: 0;
}
.song-card::after {
  content: var(--card-deco, "♪");
  position: absolute;
  right: -6px;
  bottom: -18px;
  font-size: 92px;
  opacity: .16;
  z-index: 0;
  transform: rotate(-8deg);
  text-shadow: 0 0 24px currentColor;
}

.song-card-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }

.song-icon {
  width: 62px; height: 62px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .32);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 0 16px var(--glow, rgba(125, 221, 255, .35));
}

.song-info { flex: 1; min-width: 0; }
.song-name { font-size: 21px; font-weight: 800; letter-spacing: 2px; }
.song-en { font-family: var(--font-en); font-size: 12px; letter-spacing: 1.5px; color: rgba(255, 255, 255, .65); margin-top: 2px; }
.song-desc { font-size: 11.5px; color: rgba(255, 255, 255, .55); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-best {
  margin-top: 5px;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--accent, #7df);
  text-shadow: 0 0 8px var(--glow, rgba(125, 221, 255, .6));
}
.song-best b { font-size: 13px; }

.song-arrow {
  flex: none;
  font-size: 20px;
  color: rgba(255, 255, 255, .5);
  transition: transform .15s ease;
}
.song-card:active .song-arrow { transform: translateX(4px); }

.menu-footer {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, .4);
  text-align: center;
  padding-bottom: 6px;
}

/* ---------- 难度弹层 ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-mask {
  position: absolute; inset: 0;
  background: rgba(4, 2, 12, .66);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .18s ease;
}
.sheet-card {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(22px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(30, 20, 52, .98), rgba(12, 7, 26, .99));
  border-top: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .6);
  animation: slideUp .22s cubic-bezier(.2, .9, .3, 1.1);
  max-width: 460px;
  margin: 0 auto;
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(60%); opacity: .4; } }

.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sheet-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 0 14px var(--glow, rgba(125, 221, 255, .35));
}
.sheet-title-wrap { flex: 1; }
.sheet-title { font-size: 20px; font-weight: 800; letter-spacing: 2px; }
.sheet-en { font-family: var(--font-en); font-size: 12px; color: rgba(255, 255, 255, .55); margin-top: 2px; letter-spacing: 1px; }
.sheet-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 14px;
  color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .08);
}

.diff-list { display: flex; flex-direction: column; gap: 10px; }
.diff-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  transition: transform .12s ease, border-color .12s ease;
}
.diff-row:active { transform: scale(.98); border-color: var(--accent, #7df); }
.diff-row .diff-dot {
  width: 40px; height: 40px;
  flex: none;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: rgba(0, 0, 0, .3);
}
.diff-row.easy .diff-dot { color: #6ee7a0; }
.diff-row.normal .diff-dot { color: #7dd7ff; }
.diff-row.hard .diff-dot { color: #ff8fa3; }
.diff-row .diff-meta { flex: 1; }
.diff-row .diff-name { font-size: 16px; font-weight: 700; letter-spacing: 2px; }
.diff-row .diff-desc { font-size: 11px; color: rgba(255, 255, 255, .5); margin-top: 2px; }
.diff-row .diff-best { font-size: 12px; font-weight: 700; color: var(--accent, #7df); text-shadow: 0 0 8px var(--glow); }
