* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  background: #f8f5f0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

#languageSwitch {
  position: fixed;
  top: 20px;
  right: 40px;
  display: flex;
  z-index: 10;
  gap: 0;
}

.lang-btn {
  padding: 12px 24px;
  background-color: #ffffff;
  color: #666666;
  border: none;
  border-radius: 0;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-btn:first-child {
  border-radius: 14px 0 0 14px;
}
.lang-btn:last-child {
  border-radius: 0 14px 14px 0;
}
.lang-btn:hover {
  background-color: #f0f0f0;
}
.lang-btn.active {
  background-color: #eca040;
  color: #ffffff;
}

.login-container {
  width: 440px;
  max-width: calc(100vw - 32px);
  background: linear-gradient(
    to bottom,
    #bcd6e9 0%,
    #d1ebe0 30%,
    #e8f3e3 60%,
    #e5f0f9 85%,
    #d7e6f4 100%
  );
  /* 固定背景，不随滚动移动 */
  background-attachment: fixed;
  background-size: cover;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
  padding: 40px 40px;
  display: flex;
  flex-direction: column;
}

.logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.logo-full {
  width: 100%;
  /* max-width: 280px; */
  height: auto;
  object-fit: contain;
}

.login-tabs {
  display: flex;
  margin-bottom: 24px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.login-tabs .tab {
  flex: 1;
  padding: 14px 0;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.login-tabs .tab.account {
  background-color: #4ea8ca;
  color: #ffffff;
}

.login-tabs .tab.verification {
  background-color: #eca040;
  color: #ffffff;
}

.login-tabs .tab {
  opacity: 0.55;
}
.login-tabs .tab.active {
  opacity: 1;
}

.form-container-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.form-slider {
  display: flex;
  width: 200%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-section {
  width: 50%;
  flex-shrink: 0;
  padding: 0 2px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.input-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field-wrapper .input-icon {
  position: absolute;
  left: 20px;
  color: #333333;
  font-size: 16px;
  z-index: 1;
  pointer-events: none;
}

.input-field {
  width: 100%;
  padding: 14px 18px 14px 50px;
  border: 2px solid #e0e0e0;
  border-radius: 14px;
  font-size: 16px;
  background-color: #ffffff;
  transition: all 0.3s ease;
  color: #333333;
}

.input-field:focus {
  outline: none;
  border-color: #2d8cf0;
  box-shadow: 0 0 0 4px rgba(45, 140, 240, 0.12);
}

.input-field.error {
  border-color: #f87171;
}

.toggle-password-btn {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: #333333;
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
}

.toggle-password-btn:hover {
  color: #2d8cf0;
}

.verify-code-wrapper {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.verify-code-wrapper .input-field-wrapper {
  flex: 1;
}

.get-code-btn {
  padding: 0 14px;
  min-width: 118px;
  background: #ffffff;
  border: 2px solid #eca040;
  border-radius: 14px;
  color: #c98a30;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.get-code-btn:hover:not(:disabled) {
  background: rgba(236, 160, 64, 0.12);
}

.get-code-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 4px;
  font-size: 14px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #999999;
  cursor: pointer;
}

.remember-me input {
  width: 18px;
  height: 18px;
}

.forgot-password {
  color: #999999;
  text-decoration: none;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: #2d8cf0;
  text-decoration: underline;
}
.form-container-register {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-button {
  width: 100%;
  padding: 16px;
  background-color: #4ea8ca;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(52, 113, 120, 0.35);
}

.login-button:hover {
  background-color: #2a5a60;
  box-shadow: 0 8px 20px rgba(52, 113, 120, 0.45);
  transform: translateY(-2px);
}

.login-button.loading {
  pointer-events: none;
  opacity: 0.75;
  position: relative;
}

.login-button.loading span {
  display: none;
}

.login-button.loading::after {
  content: "";
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.login-divider {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: #e0e0e0;
}

.login-divider span {
  font-size: 14px;
  color: #999999;
}

.visitor-button.guest-login-btn {
  width: 100%;
  padding: 16px;
  background-color: #eaeaea;
  color: #666666;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.visitor-button.guest-login-btn:hover {
  background-color: #dddddd;
  transform: translateY(-2px);
}

.guest-hint {
  text-align: center;
  font-size: 13px;
  color: #999999;
  margin-bottom: 20px;
}

.register-link {
  text-align: center;
  font-size: 15px;
  margin-bottom: 24px;
}

.register-link a {
  color: #2d8cf0;
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
}

.register-link a:hover {
  color: #1a6fcc;
  text-decoration: underline;
}

.login-footer {
  text-align: center;
  font-size: 13px;
  color: #999;
  line-height: 1.6;
}

.login-footer img {
  width: 11px;
  height: 11px;
  margin: 0 4px;
  vertical-align: middle;
}

.login-footer a {
  color: #999;
  text-decoration: none;
}

.login-footer a:hover {
  color: #2d8cf0;
  text-decoration: underline;
}

.error-message {
  color: #f87171;
  font-size: 13px;
  margin-top: 4px;
  display: none;
}

.input-group.has-error .error-message {
  display: block;
}

.global-error-message,
.global-success-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 16px;
}

.global-error-message {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #e53935;
}

.global-success-message {
  background: rgba(78, 168, 202, 0.12);
  border: 1px solid rgba(78, 168, 202, 0.35);
  color: #2a5a60;
}

/* 用户协议弹窗 */
.agreement-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.agreement-overlay.show {
  display: flex;
}

.agreement-modal {
  background: #fff;
  border-radius: 12px;
  width: 65%;
  /* max-width: 900px; */
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.agreement-header {
  padding: 18px 20px 0;
  border-bottom: 1px solid #eee;
}

.agreement-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
}

.agreement-header-top h2 {
  margin: 0;
  font-size: 17px;
  color: #222;
  font-weight: 600;
}

.agreement-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}

.agreement-close-btn:hover {
  color: #333;
}

.agreement-tabs {
  display: flex;
  gap: 0;
}

.agreement-tab-btn {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  font-size: 14px;
  color: #888;
  cursor: pointer;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.agreement-tab-btn:hover {
  color: #4ea8ca;
}

.agreement-tab-btn.active {
  color: #4ea8ca;
  border-bottom-color: #4ea8ca;
}

.agreement-tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  color: #444;
  line-height: 1.85;
  font-size: 14px;
}

.agreement-tab-content.active {
  display: block;
}

.agreement-tab-content h3 {
  margin: 22px 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.agreement-tab-content h3:first-child {
  margin-top: 0;
}
.agreement-tab-content ul {
  margin: 8px 0 10px 18px;
}
.agreement-tab-content li {
  margin-bottom: 5px;
}

.scroll-tip {
  text-align: center;
  padding: 10px;
  background: #f0f7fa;
  color: #4ea8ca;
  font-size: 13px;
  border-top: 1px solid #d0e8f0;
}

.scroll-tip.hidden {
  display: none;
}

.agreement-footer {
  padding: 14px 20px;
  border-top: 1px solid #eee;
  background: #f9f9f9;
}

.agree-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  cursor: pointer;
  user-select: none;
}

.agree-checkbox-wrapper.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.agree-checkbox-wrapper input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #4ea8ca;
}

.agree-checkbox-wrapper span a {
  color: #4ea8ca;
  text-decoration: none;
}

.agreement-buttons {
  display: flex;
  gap: 10px;
}

.agreement-btn {
  flex: 1;
  padding: 11px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  border: none;
  font-weight: 500;
}

.agreement-btn-cancel {
  background: #e8e8e8;
  color: #555;
}

.agreement-btn-confirm {
  background: #4ea8ca;
  color: #fff;
}

.agreement-btn-confirm:disabled {
  background: #a8d0e0;
  cursor: not-allowed;
}

/* 忘记密码 */
.forgot-password-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(3px);
}

.forgot-password-overlay.show {
  display: flex;
}

.forgot-password-modal {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid #e8e8e8;
  overflow: hidden;
}

.forgot-password-header {
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-password-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.forgot-password-close-btn {
  background: none;
  border: none;
  font-size: 26px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.forgot-password-close-btn:hover {
  color: #f87171;
}

.forgot-password-body {
  padding: 24px;
}

.reset-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  gap: 8px;
}

.reset-steps .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 100px;
}

.reset-steps .step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #999;
}

.reset-steps .step.active .step-number,
.reset-steps .step.completed .step-number {
  background: #4ea8ca;
  border-color: #4ea8ca;
  color: #fff;
}

.reset-steps .step span {
  font-size: 12px;
  color: #666;
  text-align: center;
}

.reset-steps .step.active span {
  color: #4ea8ca;
  font-weight: 600;
}

.reset-steps .step-line {
  width: 50px;
  height: 2px;
  background: #e0e0e0;
  margin: 0 6px 28px;
}

.reset-steps .step-line.active {
  background: #4ea8ca;
}

.reset-step-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.forgot-password-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
}

.forgot-password-btn {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.forgot-password-btn-cancel {
  background: #f0f0f0;
  color: #555;
}

.forgot-password-btn-next {
  background: #4ea8ca;
  color: #fff;
}

.forgot-password-btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.forgot-password-btn-next.loading {
  pointer-events: none;
  opacity: 0.75;
}

.forgot-password-btn-next.loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

/* ---------- 注册页（与登录页同一视觉体系） ---------- */
.register-page-subtitle {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 24px;
}

.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: #e8e8e8;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.strength-bar.weak {
  background: #f87171;
}

.strength-bar.medium {
  background: #eca040;
}

.strength-bar.strong {
  background: #4ea8ca;
}

.strength-text {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.back-to-login {
  text-align: center;
  margin-top: 4px;
  margin-bottom: 12px;
  /* margin-bottom: 0; */
  font-size: 15px;
  color: #666;
}

.back-to-login a {
  color: #2d8cf0;
  font-weight: 500;
  margin-left: 4px;
  text-decoration: none;
}

.back-to-login a:hover {
  text-decoration: underline;
  color: #1a6fcc;
}

.login-options.register-form-agree {
  justify-content: flex-start;
  margin-top: 12px;
  margin-bottom: 8px;
}

#showServiceAgreementLink,
#showPrivacyAgreementLink {
  color: #2d8cf0;
  text-decoration: none;
}

#showServiceAgreementLink:hover,
#showPrivacyAgreementLink:hover {
  text-decoration: underline;
}

/* 注册页协议弹窗：单栏滚动正文 */
.agreement-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  color: #444;
  line-height: 1.85;
  font-size: 14px;
}

.agreement-body h3 {
  margin: 22px 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.agreement-body h3:first-child {
  margin-top: 0;
}

.agreement-body p {
  margin-bottom: 10px;
}

.agreement-body ul {
  margin: 8px 0 10px 18px;
}

.agreement-body li {
  margin-bottom: 5px;
}

/* 藏语模式：表单与主要文案字号 +2px（登录 / 注册 / 弹窗共用） */
body.lang-tibetan .lang-btn {
  font-size: 17px;
}

body.lang-tibetan .login-tabs .tab {
  font-size: 18px;
}

body.lang-tibetan .input-label {
  font-size: 17px;
}

body.lang-tibetan .input-field-wrapper .input-icon {
  font-size: 18px;
}

body.lang-tibetan .input-field {
  font-size: 18px;
}

body.lang-tibetan .toggle-password-btn {
  font-size: 18px;
}

body.lang-tibetan .get-code-btn {
  font-size: 16px;
}

body.lang-tibetan .login-options,
body.lang-tibetan .remember-me,
body.lang-tibetan .forgot-password {
  font-size: 16px;
}

body.lang-tibetan .login-button {
  font-size: 19px;
}

body.lang-tibetan .login-divider span {
  font-size: 16px;
}

body.lang-tibetan .visitor-button.guest-login-btn {
  font-size: 18px;
}

body.lang-tibetan .guest-hint {
  font-size: 15px;
}

body.lang-tibetan .register-link {
  font-size: 17px;
}

body.lang-tibetan .login-footer {
  font-size: 15px;
}

body.lang-tibetan .error-message {
  font-size: 15px;
}

body.lang-tibetan .global-error-message,
body.lang-tibetan .global-success-message {
  font-size: 16px;
}

body.lang-tibetan .register-page-subtitle {
  font-size: 20px;
}

body.lang-tibetan .strength-text {
  font-size: 14px;
}

body.lang-tibetan .back-to-login {
  font-size: 17px;
}

body.lang-tibetan .login-options.register-form-agree {
  font-size: 16px;
}

body.lang-tibetan .agreement-header-top h2 {
  font-size: 19px;
}

body.lang-tibetan .agreement-tab-btn {
  font-size: 16px;
}

body.lang-tibetan .agreement-tab-content {
  font-size: 16px;
}

body.lang-tibetan .agreement-tab-content h3 {
  font-size: 16px;
}

body.lang-tibetan .agreement-body {
  font-size: 16px;
}

body.lang-tibetan .agreement-body h3 {
  font-size: 16px;
}

body.lang-tibetan .scroll-tip {
  font-size: 15px;
}

body.lang-tibetan .agree-checkbox-wrapper {
  font-size: 16px;
}

body.lang-tibetan .agreement-btn {
  font-size: 16px;
}

body.lang-tibetan .forgot-password-header h2 {
  font-size: 20px;
}

body.lang-tibetan .reset-steps .step-number {
  font-size: 16px;
}

body.lang-tibetan .reset-steps .step span {
  font-size: 14px;
}

body.lang-tibetan .forgot-password-btn {
  font-size: 17px;
}
