* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: rgb(247, 248, 248);
  overflow-x: hidden;
  width: 100%;
}

html {
  overflow-x: hidden;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  margin: 0 auto;
  background-color: #F3F5F9;
  overflow: hidden;
}

@media screen and (min-width: 700px) {
  .container {
    width: 450px;
  }
}

#content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  overflow: auto;
}

img {
  display: block;
  max-width: 100%;
}

.page.active {
  display: block;
}

.page iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.kefu {
  position: fixed;
  right: 10px;
  bottom: 30%;
  width: 85px;
  height: auto;
}

.kefu img {
  width: 100%;
  height: 100%;
}

#buy iframe {
  width: 100%;
  height: calc(100% - 60px);
  /* 减去banner高度 */
  border: none;
}

.top-img {
  height: 60px;
  overflow: hidden;
}

.top-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tab-bar {
  display: flex;
  background-color: #f8f8f8;
  border-top: 1px solid #ddd;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  line-height: normal;
  font-size: 12px;
  padding-bottom: calc(4px + env(safe-area-inset-bottom));
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  background-color: #F3F5F9;
  padding-bottom: 50px;
  /* 为tab-bar留出空间 */
  overflow-x: hidden;
}

@media screen and (min-width: 700px) {
  .container {
    width: 450px;
  }
}

.tab-item {
  flex: 1;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.tab-item.active {
  color: #261360;
}

.tab-item img {
  transform: scale(0.5);
  margin: -6px 0 -8px 0;
}

#home {
  overflow-x: hidden;
  /* 防止横向滚动 */
  width: 100%;
}

.image-container {
  display: grid;
  /* grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); */
  width: 100%;
  overflow-x: hidden;
  /* 防止横向滚动 */
}

.image-container img {
  display: block;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* 确保所有元素都不会导致横向溢出 */
* {
  max-width: 100%;
  overflow-wrap: break-word;
}

@media screen and (min-width: 700px) {
  .image-container img {
    width: 450px;
  }
}

.tips {
  background-color: #0A0A0A;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 45px;
}

.tips .txt {
  border: 1px solid #E5D2E8;
  padding: 6px 20px;
  font-size: 15px;
  color: #E5D2E8;
  border-radius: 99em;
}

.qrcode {
  background-color: #0A0A0A;
  display: flex;
  justify-content: center;
  padding: 20px 40px;
  gap: 20px;
}

.qrcode div {
  background-color: white;
  flex: 1;
  min-height: 50px;
  border-radius: 6px;
}

.qrcode div img {
  border-radius: 6px;
  display: block;
}

.lazy {
  width: auto;
  height: 200px;
  background-color: #eee;
  object-fit: cover;
  transition: opacity 0.3s;
  opacity: 0;
}

.lazy.loaded {
  opacity: 1;
  height: auto;
  background-color: transparent;
}