/* 基础样式设置 */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  overflow: auto;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: 16px;
  -webkit-overflow-scrolling: touch; /* 增强iOS滚动体验 */
}

/* 隐藏元素 */
.hidden {
  opacity: 0;
  visibility: hidden;
}

/* 动画效果 */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* 页面包装容器 */
.page-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff; /* 整个页面的背景色改为白色 */
  overflow-y: auto; /* 允许垂直滚动 */
}

/* 主容器 */
.container {
  position: relative;
  overflow-x: hidden; /* 水平方向隐藏溢出 */
  overflow-y: auto; /* 垂直方向允许滚动 */
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

/* 容器显示动画 */
.container.show {
  opacity: 1;
  visibility: visible;
}

/* logo */
.logo {
  width: 90px;
  margin: 42px auto 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.container.show .logo {
  opacity: 1;
  transform: translateY(0);
}

/* 欢迎标语 */
.welcome-text {
  width: 90%;
  margin-top: 30px;
  padding: 20px 10px;
  background-color: #1E0A2D;
  border: 1px solid #511885;
  border-radius: 8px;
  line-height: 20px;
  font-size: 13px;
  font-family: 'PingFang SC';
  color: #fff;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out 0.2s, transform 0.6s ease-out 0.2s;
}

.container.show .welcome-text {
  opacity: 1;
  transform: translateY(0);
}

/* 您的绑定码 */
.your-binding-code {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out 0.4s, transform 0.6s ease-out 0.4s;
}

.container.show .your-binding-code {
  opacity: 1;
  transform: translateY(0);
}

/* Your journey. Your victory. Your community. 标语样式 */
.your-journey-your-victory-your-community {
  width: 90%;
  margin: 30px auto 0;
  padding: 15px 10px;
  text-align: center;
  border: 1px solid #E8D7A4;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Inter';
  color: #fff;
  line-height: 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out 0.6s, transform 0.6s ease-out 0.6s;
}

.container.show .your-journey-your-victory-your-community {
  opacity: 1;
  transform: translateY(0);
}

/* 游戏ID和绑定码的横向布局容器 */
.id-code-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  width: 90%;
  margin-bottom: 10px;
}

/* 游戏ID样式 */
.game-id-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 48%;
}

.binding-code-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 48%;
}

.game-id-title {
  text-align: center;
  font-size: 20px;
  font-family: 'Inter';
  color: #fff;
}

.game-id-display {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 37px;
  background: linear-gradient(to right, #F08F31, #DD4C1C); /* 与绑定码保持一致的橙色渐变背景 */
  border-radius: 5px;
  border: 2px solid #F3BA63;
  margin-top: 10px;
}

.game-id-display span {
  font-size: 16px;
  font-family: 'Inter';
  color: #fff;
  letter-spacing: 1px; /* 数字间增加间距，提高可读性 */
}

.your-binding-code-title {
  text-align: center;
  font-size: 20px;
  font-family: 'Inter';
  color: #fff;
}

.your-binding-code-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 37px;
  background: linear-gradient(to right, #F08F31, #DD4C1C); /* 橙色渐变背景 */
  border: 2px solid #F3BA63;
  border-radius: 5px;
  margin-top: 10px;
}

.your-binding-code-wrap span {
  font-size: 16px;
  font-family: 'Inter';
  color: #fff;
} 

.copy-icon {
  width: 18px;
  height: 18px;
  margin-left: 8px;
  cursor: pointer;
}

.copy-icon:active {
  opacity: 0.8;
}

/* 游戏ID复制图标样式 */
.game-id-copy-icon {
  width: 18px;
  height: 18px;
  margin-left: 8px;
  cursor: pointer;
}

.game-id-copy-icon:active {
  opacity: 0.8;
}

.your-binding-code-explain {
  width: 90%;
  line-height: 16px;
  font-size: 10px;
  font-family: 'Inter';
  color: #D5C19C;
  text-align: center;
  margin-top: 15px;
  margin-bottom: 5px;
}

/* 跳转按钮群 */
.jump-button-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 60px; /* 减少顶部间距，让内容更紧凑 */
  margin-bottom: 20px; /* 添加底部间距 */
  width: 88%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out 0.8s, transform 0.6s ease-out 0.8s;
}

.container.show .jump-button-group {
  opacity: 1;
  transform: translateY(0);
}

/* 为每个按钮添加不同的延迟效果 */
.container.show .jump-button-1 {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out 0.8s, transform 0.6s ease-out 0.8s;
}

.container.show .jump-button-2 {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out 1.0s, transform 0.6s ease-out 1.0s;
}

.container.show .jump-button-3 {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out 1.2s, transform 0.6s ease-out 1.2s;
}

.jump-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 50px;
  margin-bottom: 12px;
  background: linear-gradient(to right, #FFEEC9, #9A825E);
  border-radius: 8px;
  color: #1A1021;
  cursor: pointer;
  user-select: none;
  opacity: 0;
  transform: translateY(20px);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.jump-button:active {
  opacity: 0.8;
  transform: scale(0.98);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* 按钮波纹效果 */
.jump-button .ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

.jump-icon {
  width: 30px;
  height: 30px;
  margin-right: 10px;
}

.jump-button span {
  display: block;
  width: 60px;
  text-align: center;
  font-size: 16px;
  font-family: 'PingFang SC';
  font-weight: 500;
 color: #1A1021;
}

/* 移动端样式 */
@media screen and (max-width: 750px) {
  .container {
    width: 100%;
    min-height: 100vh;
    background: url('../images/bg.png') #1A1021 no-repeat center top;
    background-size: contain;
    padding-bottom: 20px; /* 添加底部内边距 */
    overflow-y: auto; /* 允许垂直滚动 */
  }
  
  /* 确保页面包装器允许滚动 */
  .page-wrapper {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
  }
  
  /* 移动端下的ID和绑定码布局调整 */
  .id-code-container {
    width: 90%;
  }
  
  .game-id-title,
  .your-binding-code-title {
    font-size: 18px;
  }
  
  .game-id-display span,
  .your-binding-code-wrap span {
    font-size: 14px;
  }
  
  .copy-icon,
  .game-id-copy-icon {
    width: 16px;
    height: 16px;
    margin-left: 6px;
  }
}

/* 复制成功提示样式 */
.copy-success-toast {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background-color: #fff;
  border-left: 4px solid #67C23A;
  padding: 10px 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  width: 80%;
  max-width: 300px;
}

.copy-success-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.success-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  background-color: #67C23A;
  border-radius: 50%;
  color: white;
  margin-right: 10px;
  font-size: 14px;
  font-weight: bold;
}

/* 遮罩层样式 */
.language-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* 语言选择器样式 */
.language-selector {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  padding: 20px;
  z-index: 9999;
  width: 90%;
  max-width: 320px;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  from {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.language-selector-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.language-selector-title {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #333;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.language-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.language-option {
  padding: 12px 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 16px;
  color: #333;
}

.language-option:hover {
  background-color: #f5f5f5;
}

.language-option.active {
  background-color: #1E0A2D;
  color: #fff;
}

/* PC端样式 */
@media screen and (min-width: 751px) {
  .page-wrapper {
    background-color: #fff; /* PC端页面包装器的背景色改为白色 */
  }
  
  .container {
    width: 375px;
    height: 750px;
    background: url('../images/bg.png') #1A1021 no-repeat center top;
    background-size: 100%; /* 确保背景图片覆盖整个容器 */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }
}