[v-cloak] {
  display: none;
}

.login-container * {
  box-sizing: border-box;
}

.lang-option {
  display: flex;
  align-items: center;
  column-gap: 5px;
}

.lang-option .lang-img {
  width: 30px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
}

.read-text {
  flex: 1;
  font-size: 12px;
  line-height: 1.5;
  padding: 0 10px;
  color: var(--text-light, #64748B);
  font-weight: 500;
}

#regist {
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  padding: calc(72px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 48px
    max(20px, env(safe-area-inset-left, 0px));
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

#regist::before {
  content: "";
  position: absolute;
  inset: -35%;
  background: radial-gradient(closest-side, rgba(59, 130, 246, 0.20), rgba(59, 130, 246, 0) 70%),
    radial-gradient(closest-side, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0) 70%),
    radial-gradient(closest-side, rgba(236, 72, 153, 0.10), rgba(236, 72, 153, 0) 70%);
  filter: blur(8px);
  transform: translate3d(0, 0, 0);
  pointer-events: none;
}

#regist::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 1120px;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 460px);
  gap: 24px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.login-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.login-header .header-left {
  display: flex;
  align-items: center;
}

.login-header .logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.login-header .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-header .back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(30, 41, 59, 0.85);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: all 0.2s;
  cursor: pointer;
}

.login-header .back-home-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.login-header .lang-box {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.login-header .lang-box span {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(30, 41, 59, 0.70);
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}

.login-header .lang-box span:hover {
  background: rgba(255, 255, 255, 0.55);
  color: rgba(30, 41, 59, 0.92);
}

.login-header .lang-box span.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--color-primary);
}

.login-header .btn {
  height: 38px;
  border-radius: 999px !important;
  padding: 0 20px !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.24);
}

.login-header .btn a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.container-back {
  width: 100%;
  height: auto;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.92));
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  font-family: Source Han Sans CN, PingFang SC, "Microsoft YaHei", sans-serif;
  padding: 46px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.container-back::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 68%);
  transform: translate(22%, -10%);
  pointer-events: none;
}

.container-back .back-text {
  font-size: 15px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.92);
  margin-top: 0;
  margin-left: 0;
  font-weight: 500;
  max-width: 520px;
}

.container-back .text-welcome {
  font-size: 44px;
  font-family: Bahnschrift, "DIN Alternate", "Segoe UI", sans-serif;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.container-back .text-title {
  margin-top: 12px;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.35;
}

.container-back .text-level {
  font-size: 13px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.back-line1,
.back-line2,
.back-line3 {
  width: 56px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 100%);
  z-index: 1;
  position: absolute;
}

.back-line1 {
  height: 420px;
  opacity: 1;
  transform: rotate(45deg);
  top: -120px;
  left: 300px;
}

.back-line2 {
  height: 560px;
  transform: rotate(110deg);
  top: 0;
  left: 360px;
}

.back-line3 {
  height: 420px;
  transform: rotate(45deg);
  top: 220px;
  left: 110px;
  clip-path: polygon(0px 30px, 56px 0px, 100% 100%, 0 100%);
}

.container-before {
  width: 100%;
  height: auto;
  position: relative;
  right: auto;
  z-index: 2;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 70px rgba(2, 6, 23, 0.12);
}

.login {
  padding: 40px 40px 34px;
  font-size: 14px;
  font-family: PingFang SC, "Microsoft YaHei", sans-serif;
  font-weight: 400;
  line-height: 1.2;
  position: relative;
}

.login .lang-box {
  position: absolute;
  right: 0.1rem;
  top: 0.1rem;
}

.login .qr-code {
  position: absolute;
  right: 22px;
  top: 22px;
  cursor: pointer;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.10);
  transition: all 0.2s ease;
}

.login .qr-code:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.14);
}

.login .qr-code svg {
  width: 100%;
  height: 100%;
}

.login .qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.login .qr-box .qr-box-img {
  width: 200px;
  height: 200px;
  position: relative;
}

.login .qr-box .qr-box-img img {
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.login .qr-box .qr-box-img .qr-expire-time {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  line-height: 14px;
  cursor: pointer;
}

.login .qr-box .qr-box-img .qr-expire-time .el-icon-refresh-right {
  font-size: 30px;
}

.login .qr-box .qr-box-tips {
  margin-top: 10px;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.62);
}

.login .qr-box-select-account {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 100%;
  height: 100%;
  padding: 0.2rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.60);
}

.login .qr-box-select-account .qr-box-back {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  font-size: 16px;
  color: var(--color-primary);
  cursor: pointer;
}

.login .qr-box-select-account .qr-box-select-account-title {
  font-size: 14px;
  color: rgba(15, 23, 42, 0.70);
}

.login-text {
  display: flex;
  flex-direction: column;
}

.login-text-title {
  font-size: 26px;
  color: rgba(15, 23, 42, 0.92);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.login-text-regist {
  font-weight: 500;
  margin-top: 10px;
  color: rgba(15, 23, 42, 0.68);
  line-height: 1.5;
}

.login-text-regist a {
  color: var(--color-primary);
  cursor: pointer;
}

.login-form {
  margin-top: 26px;
}

.login-form .el-input__inner {
  height: 44px;
  line-height: 44px;
}

.login-top {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.login-email,
.login-phone {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(15, 23, 42, 0.66);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  font-size: 13px;
  transition: all 0.18s ease;
}

.login-top .active {
  background: rgba(59, 130, 246, 0.12);
  color: rgba(59, 130, 246, 1);
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.10);
}

.form-main {
  margin-top: 18px;
}

.form-item {
  margin-top: 14px;
}

.input-with-select .el-input-group__prepend {
  background: rgba(255, 255, 255, 0.75);
  width: 76px;
}

.code-item {
  display: flex;
  flex-direction: row;
}

.code-btn {
  margin-left: 10px;
  color: #ffffff;
}

.rember-item {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 1.55;
}

.rember-item a {
  color: var(--color-primary);
  cursor: pointer;
}

.login-btn {
  width: 100%;
  height: 46px;
  border-radius: 12px !important;
}

.pass-btn {
  width: 100%;
  height: 46px;
  margin-left: 0 !important;
  margin-top: 10px;
  border-radius: 12px !important;
}

.read-item {
  margin-top: 10px;
}

.read-item a {
  color: var(--color-primary);
  cursor: pointer;
}

.line-item {
  margin-top: 18px;
}

.line-item text {
  font-size: 16px;
  color: rgba(15, 23, 42, 0.88);
}

.type-btn {
  width: 100%;
  height: 46px;
  font-size: 14px;
}

.login-type {
  display: flex;
  align-items: center;
  column-gap: 10px;
  flex-wrap: wrap;
}

.a-text {
  color: var(--color-primary);
  cursor: pointer;
  margin-right: 5px;
}

.oauth-item {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
  transition: all 0.18s ease;
}

.oauth-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.10);
}

.oauth-item:hover .oauth-img {
  filter: brightness(0.8);
}

.oauth-img {
  width: 40px;
  height: 40px;
}

/* 注册页特有样式 */
.custom-form-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.custom-form-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.7);
}

@media screen and (max-width: 750px) {
  #regist {
    /* 增加基础左右间距，并叠加安全区 */
    padding-top: calc(62px + env(safe-area-inset-top, 0px));
    padding-bottom: 40px;
    padding-left: 20px;
    padding-right: 20px;
    /* 防止 calc(max(...)) 兼容性问题，直接用 padding */
    padding-left: calc(20px + env(safe-area-inset-left, 0px));
    padding-right: calc(20px + env(safe-area-inset-right, 0px));
    align-items: flex-start;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
  }

  .login-container {
    min-height: auto;
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 0;
    padding: 0;
    /* 强制去除可能存在的负边距 */
  }

  .container-back {
    display: none;
  }

  .login {
    padding: 26px 18px 22px;
    font-size: 14px;
    line-height: 1.3;
  }

  .login .qr-code {
    right: 14px;
    top: 14px;
  }

  .login-text-title {
    font-size: 22px;
  }

  .login-text-regist {
    margin-top: 10px;
    font-size: 13px;
  }

  .login-form {
    margin-top: 20px;
  }

  .form-main {
    margin-top: 16px;
  }

  .login-top {
    width: 100%;
    display: flex;
  }

  .login-email,
  .login-phone {
    width: 100%;
    text-align: center;
    flex: 1;
  }

  .input-with-select .el-input-group__prepend {
    width: 68px;
  }

  .code-item {
    gap: 10px;
  }

  .code-btn {
    margin-left: 0;
    white-space: nowrap;
  }

  .el-checkbox__label {
    font-size: 12px;
  }

  .read-item {
    line-height: 1.4;
  }

  .login-btn {
    font-size: 14px;
    height: 44px;
  }

  .type-btn {
    border: none;
    color: var(--color-primary);
    font-size: 14px;
  }

  .login-header {
    height: 52px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  }

  .login-header .logo-img {
    height: 28px;
  }

  .login-header .back-home-btn span {
    display: none;
  }
  
  .login-header .back-home-btn {
    padding: 0;
    width: 32px;
    height: 32px;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
  }

  .login-header .header-right {
    gap: 10px;
  }

  .login-header .lang-box {
    padding: 3px;
  }

  .login-header .lang-box span {
    height: 26px;
    padding: 0 8px;
    font-size: 12px;
  }

  .login-header .btn {
    height: 32px;
    padding: 0 12px !important;
    font-size: 13px;
  }
}