/* 全局样式和px转换系统 */
:root {
  --base-font-size: 16px;
}

html {
  font-size: var(--base-font-size);
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  height: 100%;
  background-color: #F5F7FA;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* px单位转换 - 基于750px设计稿 */
@media screen and (max-width: 750px) {
  html {
    font-size: calc(100vw / 750 * 100);
  }
}

@media screen and (min-width: 751px) {
  html {
    font-size: calc(100px);
  }
}

.err_page {
  display: none;
  padding: 1rem .4rem;
  text-align: center;
  font-size: .5rem;
}

/* 通用组件样式 */
.container {
  width: 100%;
  box-sizing: border-box;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-center {
  text-align: center;
}

/* 金额选择页面样式 */
.amount-page {
  min-height: 100vh;
  background-color: #F5F7FA;
  position: relative;
  display: none;
}

/* 顶部导航栏 - 白色背景 */
.nav-bar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.4rem;
  background: #FFFFFF;
  font-size: 0.4rem;
  color: #000000;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-title {
  font-weight: bold;
  font-size: 0.38rem;
  color: #0A080B;
  flex: 1;
  text-align: center;
}

.other-page-btn {
  position: absolute;
  top: 50%;
  right: .1rem;
  width: 0.6rem;
  height: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.back-btn {
  position: absolute;
  width: 0.6rem;
  height: 0.6rem;
  top: 50%;
  left: .1rem;
  transform: translate(50%, -50%);

}

.other-page-btn img {
  width: 0.42rem;
  height: 0.48rem;
}

.title {
  padding: 0.42rem 0.38rem;
  font-weight: bold;
  font-size: 0.31rem;
  color: #262626;
}

/* 金额选择区域 */
.amount-section {
  border-radius: 0.267rem;
}

/* 金额网格布局 - 一行三个 */
.amount-grid {
  padding: 0 0.36rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;

}

.amount-item {
  margin-bottom: 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 1.13rem;
  border-radius: 0.13rem;
  font-size: 0.38rem;
  color: #000000;
  background-color: #fff;
  border: 1px solid #fff;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.amount-item:hover {
  border-color: #ddd;
  background-color: #f9f9f9;
}

.amount-item.selected {
  border-color: #6D3DF2;
  background-color: #e8e6f9;
  color: #6D3DF2;
  box-shadow: 0 0 0.1rem rgba(109, 61, 242, 0.2);
}

.amount-value {
  font-weight: 700;
  font-size: 0.38rem;
  margin-bottom: 0.1rem;
}

.amount-desc {
  color: inherit;
  font-size: 0.28rem;
  opacity: 0.7;
  margin-top: 0.1rem;
}

/* 确认按钮区域 */

.confirm-btn {
  display: block;
  margin: 2rem auto;
  width: 6.11rem;
  height: 0.94rem;
  border-radius: 0.2rem;
  background-color: #6A39F2;
  text-align: center;
  font-size: 0.36rem;
  color: #FFFFFF;
  cursor: pointer;
  border: none;
  outline: none;
  transition: background-color 0.3s;
  margin-bottom: 0.4rem;
}

.confirm-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.confirm-btn:not(:disabled):hover {
  background-color: #5a29e2;
}

/* 存款提示信息 */
.deposit-tips {
  padding: 0.33rem 0.53rem;
}


.tips-content {
  font-size: 0.29rem;
  color: #767676;
  line-height: 0.43rem;
}


/* 加载和弹窗样式 */
.loading {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 2.5rem;
  height: 1.7rem;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: white;
  border-radius: .2rem;
}

.loading.active {
  display: flex;
}

.loading-spinner {
  width: 0.4rem;
  height: 0.4rem;
  border: 0.1rem solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 0.427rem;
}

/* Toast样式 */
.toast-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 0.2rem;
  font-size: 0.3rem;
  z-index: 10000;
  max-width: 70%;
  text-align: center;
}

.deposit-item {
  margin-bottom: .2rem;
  padding: 0.4rem 0.3rem;
  font-size: 0.3rem;
  color: #060606;
  background-color: #FFFFFF;

}

.deposit-item:last-child {
  border-bottom: none;
}

.deposit-item p {
  margin: 0;
  line-height: 0.5rem;
}

.deposit-item strong {
  color: #767676;
  font-weight: 400;
}

.no_more_data {
  text-align: center;
  padding: 1.3rem 0;
  font-size: 0.28rem;
  color: #999999;
}

/* 自定义金额输入区域 */
.custom-amount-section {
    padding: 0.4rem 0.36rem;
    margin-top: 0.2rem;
}

.custom-amount-label {
    font-size: 0.32rem;
    color: #262626;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.custom-amount-input-wrapper {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0.13rem;
    padding: 0 0.3rem;
    height: .96rem;
    transition: all 0.3s;
    position: relative;
}

.custom-amount-input-wrapper.focused {
    border-color: #6D3DF2;
    box-shadow: 0 0 0.1rem rgba(109, 61, 242, 0.2);
}

.currency-symbol {
    font-size: 0.38rem;
    font-weight: 700;
    color: #000;
    margin-right: 0.15rem;
}

.custom-amount-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.38rem;
    font-weight: 700;
    color: #000;
    background: transparent;
    height: 100%;
    padding: 0;
}

.custom-amount-input::placeholder {
    color: #999;
    font-weight: normal;
}

/* 移除数字输入框的上下箭头 */
.custom-amount-input::-webkit-outer-spin-button,
.custom-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.custom-amount-input[type=number] {
    -moz-appearance: textfield;
}

.amount-limits {
    font-size: 0.28rem;
    color: #767676;
    margin-top: 0.15rem;
    text-align: center;
}

/* 限制提示样式 */
.limit-hint {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFE5E5;
    color: #FF3B30;
    font-size: 0.26rem;
    padding: 0.15rem 0.3rem;
    border-radius: 0 0 0.13rem 0.13rem;
    z-index: 1;
    animation: slideDown 0.3s ease;
    border: 1px solid #FF3B30;
    border-top: none;
    margin-top: -1px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}