/* 全局样式修复 */

/* 确保所有元素都在视口内 */
* {
  box-sizing: border-box;
}

/* 防止元素溢出 */
html, body, #root {
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden !important;
}

/* 修复 transform 导致的溢出 */
.overflow-hidden {
  overflow: hidden !important;
}

/* 确保所有绝对定位元素都在父容器内 */
.absolute {
  max-width: 100%;
}

/* 修复 scale 变换导致的布局问题 */
[class*="scale-"] {
  transform-origin: center center;
}

/* 防止动画过程中的布局抖动 */
.will-change-transform {
  will-change: transform;
}

/* 修复按钮点击时的缩放问题 */
button:active {
  transform: scale(0.98);
}

/* 确保图片不会溢出 */
img {
  max-width: 100%;
  height: auto;
}

/* 修复 flex 容器的溢出问题 */
.flex {
  min-width: 0;
  min-height: 0;
}

/* 修复 grid 容器的溢出问题 */
.grid {
  min-width: 0;
  min-height: 0;
}
