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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #ddeed8;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 常驻时钟（可作壁纸） ---------- */
#clock {
  position: fixed;
  left: 9%;
  top: 11%;
  z-index: 8;
  font-family: "Baloo 2", "Varela Round", "PingFang SC", sans-serif;
  font-weight: 600;
  font-size: clamp(56px, 8.5vw, 110px);
  letter-spacing: 0.05em;
  line-height: 1;
  color: #4a4038; /* 会被 JS 按画面配色覆盖 */
  opacity: 0.92;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
body.no-clock #clock { opacity: 0; }

/* ---------- 圆形图标按钮（无文字） ---------- */
.switcher {
  position: fixed;
  z-index: 10;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: rgba(46, 44, 48, 0.82);
  box-shadow: 0 8px 26px rgba(40, 35, 30, 0.26);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.9s ease, box-shadow 0.3s;
}
.switcher svg { transition: transform 0.6s cubic-bezier(0.34, 1.2, 0.64, 1); }

.refresh-btn { left: 50%; bottom: 32px; transform: translateX(-50%); }
.refresh-btn:hover { transform: translateX(-50%) translateY(-3px); box-shadow: 0 12px 32px rgba(40, 35, 30, 0.32); }
.refresh-btn:hover svg { transform: rotate(120deg); }
.refresh-btn:active { transform: translateX(-50%) scale(0.9); }
.refresh-btn:active svg { transform: rotate(240deg); }

.clock-btn { left: 32px; bottom: 32px; width: 48px; height: 48px; }
.clock-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(40, 35, 30, 0.32); }
.clock-btn:active { transform: scale(0.9); }
body.no-clock .clock-btn { opacity: 0.55; }

/* ---------- 右下角版权标注（颜色由 JS 按画面配色覆盖） ---------- */
.credit {
  position: fixed;
  right: 22px;
  bottom: 18px;
  z-index: 10;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: opacity 0.9s ease, color 1.2s ease;
}
.credit:hover { text-decoration: underline; }

/* 无操作 10 秒：隐藏按钮、标注与光标，静静看画 */
body.idle { cursor: none; }
body.idle .refresh-btn {
  opacity: 0;
  transform: translateX(-50%) translateY(24px);
  pointer-events: none;
}
body.idle .clock-btn {
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
}
body.idle .credit {
  opacity: 0;
  pointer-events: none;
}

/* ---------- 切换时的短暂小提示 ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%) translateY(8px);
  z-index: 9;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 3px;
  color: #fff;
  background: rgba(46, 44, 48, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 横屏矮屏（手机横放）：提示移到顶部、时钟缩小，避免遮挡小狗 */
@media (max-height: 520px) {
  #toast { bottom: auto; top: 14px; }
  #clock { left: 5%; top: 7%; font-size: clamp(36px, 12vh, 64px); }
  .refresh-btn { bottom: 18px; }
  .clock-btn { bottom: 18px; }
}
