*:focus {
  outline: none;
  -webkit-outline: none;
}

* {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

button,
[role="button"],
.clickable,
.get-container,
.login-btn,
.doc-btn,
.role-card-side_photo,
.choose-indicator,
.top-right-back,
.enter-btn,
.space-btn-img {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

.toast-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 20px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 4px;
  font-size: 14px;
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.toast-notification.show {
  opacity: 1;
}

body::before {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 1778px;
  height: 966px;
  background-image: url("../img/login/bg.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  transform: translateX(-50%) translateY(-50%);
  z-index: -1;
}

.all-container {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  padding-bottom: 60px;
}

.phone-container {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 320px;
  height: 98px;
  background-image: url("../img/login/phone.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  transform: translate(calc(-50% + 330px), calc(-50% - 50px));
  z-index: 1;
}

.phone-input {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 180px;
  height: 36px;
  opacity: 0.8;
  background-color: transparent;
  transform: translate(calc(-50% + 355px), calc(-50% - 27px)) rotate(11deg);
  border: none;
  z-index: 2;
  font-size: 14px;
  color: #333;
}

.phone-input:focus {
  outline: none;
}

.phone-input::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

.code-container {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 320px;
  height: 80px;
  background-image: url("../img/login/code.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  transform: translate(calc(-50% + 330px), calc(-50% + 0px));
  z-index: 1;
}

.code-input {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 180px;
  height: 36px;
  opacity: 0.8;
  background-color: transparent;
  transform: translate(calc(-50% + 355px), calc(-50% + 18px)) rotate(10deg);
  border: none;
  z-index: 2;
  font-size: 14px;
  color: #333;
}

.code-input:focus {
  outline: none;
}

.code-input::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

.get-container {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 110px;
  height: 74px;
  background-image: url("../img/login/get.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  transform: translate(calc(-50% + 435px), calc(-50% + 39px));
  z-index: 3;
  cursor: pointer;
}

.login-container {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 320px;
  height: 130px;
  background-image: url("../img/login/login.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  transform: translate(calc(-50% + 330px), calc(-50% + 60px));
  z-index: 1;
}

.login-btn {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 300px;
  height: 44px;
  background-color: transparent;
  opacity: 0.8;
  transform: translate(calc(-50% + 320px), calc(-50% + 72px)) rotate(13deg);
  z-index: 2;
  cursor: pointer;
}

.doc-container {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 488px;
  height: 156px;
  background-image: url("../img/login/doc.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  transform: translate(calc(-50% + 330px), calc(-50% + 125px));
  z-index: 1;
}

.doc-btn {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  background-color: transparent;
  opacity: 0.8;
  transform: translate(calc(-50% + 130px), calc(-50% + 72px)) rotate(7deg);
  z-index: 2;
  cursor: pointer;
}

.doc-check {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 15.7px;
  background-color: transparent;
  background-image: url("../img/login/confirm.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 2px;
  transform: translate(calc(-50% + 130px), calc(-50% + 74px)) rotate(7deg);
  z-index: 5;
  display: none;
  justify-content: center;
  align-items: center;
}

.client-doc {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 105px;
  height: 28px;
  background-color: transparent;
  opacity: 0.8;
  transform: translate(calc(-50% + 330px), calc(-50% + 120px)) rotate(12deg);
  z-index: 2;
  cursor: pointer;
}

.private-doc {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 105px;
  height: 28px;
  background-color: transparent;
  opacity: 0.8;
  transform: translate(calc(-50% + 470px), calc(-50% + 151px)) rotate(12deg);
  z-index: 2;
  cursor: pointer;
}

.tourist-container {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 116px;
  height: 96px;
  background-image: url("../img/login/tourist.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  transform: translate(calc(-50% + 580px), calc(-50% + 140px));
  z-index: 3;
  cursor: pointer;
}

.logo {
  position: fixed;
  left: 36px;
  bottom: 45px;
  width: 113px;
  height: 90px;
  background-image: url("../img/login/logo.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  z-index: 3;
  cursor: pointer;
}

.title {
  font-size: 18px;
  margin-bottom: 20px;
}

.button-group {
  flex-direction: column;
}

.button-group button {
  width: 100%;
}

.agreement {
  font-size: 11px;
}

body {
  background-image: none;
  position: relative;
  background-color: white;
}

body {
  background-size: 100vw auto;
}

.phone-container,
.login-container {
  padding: 15px;
  margin: 15px 0;
}

.title {
  font-size: 16px;
  margin-bottom: 15px;
}

.input-group input {
  padding: 10px 12px;
  font-size: 14px;
}

.verify-code button {
  font-size: 12px;
  padding: 0 10px;
}

.button-group button {
  padding: 10px;
  font-size: 14px;
}

/* 协议弹窗样式 */
.protocol-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1001;
  display: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 800px;
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.modal-close:hover {
  background-color: #f5f5f5;
  color: #333;
}

.modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: #666;
}

.modal-body h1,
.modal-body h2,
.modal-body h3,
.modal-body p,
.modal-body strong,
.modal-body br {
  all: revert;
  margin: 0;
  padding: 0;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: center;
}

.modal-confirm {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-confirm:hover {
  background-color: #0056b3;
}

.captcha-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1002;
  display: none;
}

.captcha-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.captcha-modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 400px;
  overflow: hidden;
}

.captcha-modal-body {
  padding: 20px;
}

/* 统一设置为垂直布局（原手机端样式） */
.captcha-input-group {
  display: flex;
  flex-direction: column; /* 垂直排列 */
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* 统一设置宽度为100%（原手机端样式） */
.captcha-image-container {
  width: 100%;
  min-width: 120px;
}

.captcha-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  min-height: 40px;
}

.captcha-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  margin-top: 0;
  min-height: 40px;
  box-sizing: border-box;
  flex: none; /* 取消弹性伸缩 */
}

/* 统一底部按钮布局（原手机端样式） */
.captcha-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between; /* 分散排列 */
  gap: 10px;
}

.captcha-modal-cancel,
.captcha-modal-confirm {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
  border: 1px solid #ddd;
  flex: 1; /* 平均分配宽度 */
  margin: 0 5px; /* 按钮间距 */
}

.captcha-modal-cancel {
  background-color: white;
  color: #333;
}

.captcha-modal-cancel:hover {
  background-color: #f5f5f5;
}

.captcha-modal-confirm {
  background-color: #007bff;
  color: white;
  border: none;
}

.captcha-modal-confirm:hover {
  background-color: #0056b3;
}

.captcha-modal-confirm {
  background-color: #007bff;
  color: white;
  border: none;
}

.captcha-modal-confirm:hover {
  background-color: #0056b3;
}

/* 手机端适配 */
@media (max-width: 768px) {
  body {
    background-image: none;
    position: relative;
    background-color: white;
  }

  body::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    width: 430px;
    height: 961px;
    background-image: url("../img/login/bg-phone.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    transform: translateX(-50%) translateY(-50%);
    z-index: -1;
  }

  .phone-container {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 282px;
    height: 87px;
    background-image: url("../img/login/phone.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    transform: translate(calc(-50% + 28px), calc(-50% - 85px));
    z-index: 1;
  }

  .phone-input {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 158px;
    height: 31px;
    opacity: 0.8;
    background-color: transparent;
    transform: translate(calc(-50% + 52px), calc(-50% - 62px)) rotate(12deg);
    border: none;
    z-index: 2;
    font-size: 12px;
    color: #333;
  }

  .phone-input:focus {
    outline: none;
  }

  .phone-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
  }

  .code-container {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 282px;
    height: 70px;
    background-image: url("../img/login/code.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    transform: translate(calc(-50% + 28px), calc(-50% - 40px));
    z-index: 1;
  }

  .code-input {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 158px;
    height: 31px;
    opacity: 0.8;
    background-color: transparent;
    transform: translate(calc(-50% + 48px), calc(-50% - 25px)) rotate(12deg);
    border: none;
    z-index: 2;
    font-size: 12px;
    color: #333;
  }

  .code-input:focus {
    outline: none;
  }

  .code-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
  }

  .get-container {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 98px;
    height: 65px;
    background-image: url("../img/login/get.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    transform: translate(calc(-50% + 120px), calc(-50% - 5px));
    z-index: 3;
    cursor: pointer;
  }

  .login-container {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 282px;
    height: 105px;
    background-image: url("../img/login/login.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    transform: translate(calc(-50% + 28px), calc(-50% + 20px));
    z-index: 1;
  }

  .login-btn {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 240px;
    height: 36px;
    background-color: transparent;
    opacity: 0.8;
    transform: translate(calc(-50% + 20px), calc(-50% + 32px)) rotate(13deg);
    z-index: 2;
    cursor: pointer;
  }

  .doc-container {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 390px;
    height: 124px;
    background-image: url("../img/login/doc.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    transform: translate(calc(-50% + 20px), calc(-50% + 85px));
    z-index: 1;
  }

  .doc-btn {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    background-color: transparent;
    opacity: 0.8;
    transform: translate(calc(-50% - 138px), calc(-50% + 44px)) rotate(10deg);
    z-index: 2;
    cursor: pointer;
  }

  .doc-check {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 16.7px;
    height: 13.1px;
    background-color: transparent;
    background-image: url("../img/login/confirm.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 2px;
    transform: translate(calc(-50% - 138px), calc(-50% + 44px)) rotate(10deg);
    z-index: 5;
    display: none;
    justify-content: center;
    align-items: center;
  }

  .client-doc {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 82px;
    height: 26px;
    background-color: transparent;
    opacity: 0.8;
    transform: translate(calc(-50% + 20px), calc(-50% + 80px)) rotate(12deg);
    z-index: 2;
    cursor: pointer;
  }

  .private-doc {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 85px;
    height: 26px;
    background-color: transparent;
    opacity: 0.8;
    transform: translate(calc(-50% + 132px), calc(-50% + 105px)) rotate(12deg);
    z-index: 2;
    cursor: pointer;
  }

  .tourist-container {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 92px;
    height: 76px;
    background-image: url("../img/login/tourist.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    transform: translate(calc(-50% + 140px), calc(-50% + 167px));
    z-index: 3;
    cursor: pointer;
  }

  .logo {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 113px;
    height: 90px;
    background-image: url("../img/login/logo.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center center;
    transform: translate(calc(-50%), calc(-50% + 300px));
    z-index: 3;
    cursor: pointer;
  }

  .line {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 11px;
    background-image: url("../img/login/line.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center center;
    z-index: 3;
    cursor: pointer;
  }

  .title {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .button-group {
    flex-direction: column;
  }

  .button-group button {
    width: 100%;
  }

  .agreement {
    font-size: 11px;
  }

  .modal-content,
  .captcha-modal-content {
    width: 80%;
    max-width: 500px;
  }

  .modal-header,
  .captcha-modal-header {
    padding: 14px 16px;
  }

  .modal-title,
  .captcha-modal-title {
    font-size: 16px;
  }

  .modal-body,
  .captcha-modal-body {
    padding: 16px;
    max-height: 50vh;
    font-size: 13px;
  }

  .modal-footer,
  .captcha-modal-footer {
    padding: 14px 16px;
  }

  .modal-confirm,
  .captcha-modal-confirm,
  .captcha-modal-cancel {
    padding: 8px 20px;
    font-size: 13px;
  }

  /* 手机端验证码弹窗适配 */
  .captcha-input-group {
    flex-direction: column;
    gap: 10px;
  }

  .captcha-image-container,
  .captcha-input {
    width: 100%;
    flex: none;
  }

  .captcha-modal-footer {
    justify-content: space-between;
  }

  .captcha-modal-confirm,
  .captcha-modal-cancel {
    flex: 1;
    margin: 0 5px;
  }
}

/* PC端适配 */
@media (min-width: 769px) {
  .modal-body::-webkit-scrollbar,
  .captcha-modal-body::-webkit-scrollbar {
    width: 6px;
  }

  .modal-body::-webkit-scrollbar-track,
  .captcha-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }

  .modal-body::-webkit-scrollbar-thumb,
  .captcha-modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
  }

  .modal-body::-webkit-scrollbar-thumb:hover,
  .captcha-modal-body::-webkit-scrollbar-thumb:hover {
    background: #aaa;
  }
}