/* 重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #0d0d0d; color: #ccc; line-height: 1.6; }

/* 导航 */
header { background: #111; border-bottom: 1px solid #222; padding: 0 1rem; }
nav { max-width: 960px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 50px; }
.logo { color: #fff; text-decoration: none; font-weight: bold; font-size: 1.1rem; }
nav ul { list-style: none; display: flex; gap: 1.2rem; }
nav a { color: #888; text-decoration: none; font-size: 0.9rem; transition: color .2s; }
nav a:hover { color: #fff; }

/* 主体 */
main { max-width: 960px; margin: 2rem auto; padding: 0 1rem; min-height: 70vh; }
.page { display: none; }
.page.active { display: block; }
h1 { color: #fff; font-size: 1.8rem; margin-bottom: 1rem; }
h2 { color: #ddd; font-size: 1.3rem; margin: 1.5rem 0 0.8rem; }
p { margin-bottom: 0.8rem; }

/* 日志列表 */
.log-list { list-style: none; }
.log-list li { border-bottom: 1px solid #1a1a1a; padding: 0.8rem 0; }
.log-list a { color: #ccc; text-decoration: none; font-size: 1rem; }
.log-list .date { color: #555; font-size: 0.8rem; margin-right: 0.8rem; }

/* 页脚 */
footer { text-align: center; padding: 1rem 1rem 4rem 1rem; color: #444; font-size: 0.8rem; border-top: 1px solid #1a1a1a; }

/* ===== BGM 控件 ===== */
#bgm-wrapper { position: fixed; bottom: 1.2rem; right: 1.2rem; z-index: 999; display: flex; align-items: center; gap: 0; padding-left: 120px; }

/* 音量切换按钮 */
#bgm-vol-toggle { flex-shrink: 0; width: 22px; height: 44px; border: 1px solid #333; border-right: none; background: #1a1a1a; color: #555; font-size: 0.55rem; cursor: pointer; border-radius: 6px 0 0 6px; z-index: 3; transition: color .2s, background .2s; display: flex; align-items: center; justify-content: center; outline: none; -webkit-tap-highlight-color: transparent; }
#bgm-vol-toggle:hover { color: #aaa; background: #222; }

/* 主按钮 */
#bgm-btn { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: #1a1a1a; border: 1px solid #333; color: #fff; font-size: 1.3rem; cursor: pointer; transition: background .2s; display: flex; align-items: center; justify-content: center; z-index: 2; outline: none; -webkit-tap-highlight-color: transparent; }
#bgm-btn:hover { background: #2a2a2a; }
#bgm-btn.spin { animation: bgmSpin 4s linear infinite; }

@keyframes bgmSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* 音量条 —— 从按钮右侧展开 */
#bgm-vol { flex-shrink: 0; height: 44px; max-width: 0; width: 0; margin: 0; padding: 0; border: 1px solid #333; border-left: none; opacity: 0; overflow: hidden; cursor: pointer; accent-color: #888; background: #1a1a1a; border-radius: 0 6px 6px 0; transition: max-width .3s ease, width .3s ease, opacity .3s ease; outline: none; -webkit-tap-highlight-color: transparent; }

/* 展开 */
#bgm-wrapper.vol-open #bgm-vol { max-width: 90px; width: 90px; opacity: 1; }

/* 桌面 hover */
@media (hover: hover) {
  #bgm-wrapper:hover #bgm-vol { max-width: 90px; width: 90px; opacity: 1; }
}

/* 手机适配 */
@media (max-width: 600px) {
  nav { flex-direction: column; height: auto; padding: 0.6rem 0; gap: 0.4rem; }
  nav ul { gap: 0.8rem; }
  main { margin: 1.2rem auto; min-height: 60vh; }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.1rem; }
  #bgm-wrapper { bottom: 1rem; right: 1rem; padding-left: 100px; }
  #bgm-btn { width: 40px; height: 40px; font-size: 1.1rem; }
  #bgm-vol-toggle { width: 20px; height: 40px; font-size: 0.5rem; }
  #bgm-vol { height: 40px; }
  #bgm-wrapper.vol-open #bgm-vol { max-width: 75px; width: 75px; }
}