/* 全局自适应样式 - 全站生效 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-size: 16px;
}

body {
  background-color: #f5f5f5;
  color: #333;
}

/* 页面容器自适应 */
.page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page.active {
  display: block;
}

/* 头部导航自适应 */
.page-header {
  display: flex;
  align-items: center;
  padding: clamp(12px, 4vw, 18px) clamp(16px, 5vw, 24px);
  background-color: #ff69b4;
  color: #fff;
  width: 100%;
}

.back-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: clamp(15px, 4vw, 18px);
  margin-right: 10px;
  cursor: pointer;
}

.page-title {
  font-size: clamp(16px, 5vw, 20px);
  font-weight: bold;
  flex: 1;
  text-align: center;
}

/* 通用按钮自适应 */
.btn {
  padding: clamp(8px, 3vw, 12px) clamp(16px, 4vw, 24px);
  border-radius: clamp(8px, 2vw, 12px);
  border: none;
  font-size: clamp(14px, 3.5vw, 16px);
  cursor: pointer;
}

/* 加载动画 */
.loading-dots {
  display: flex;
  justify-content: space-around;
  width: 60px;
  height: 30px;
  align-items: center;
}

.loading-dots span {
  font-size: 24px;
  animation: dot-flash 1s infinite alternate;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dot-flash {
  0% { opacity: 0.2; }
  100% { opacity: 1; }
}

/* 抖动动画 */
.shake {
  animation: shake 0.3s infinite;
}

@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}