/* ===================================================
 * Register Page Styles - JUWA 2.0
 * 匹配效果图：紫色霓虹主题注册页
 * =================================================== */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  /* 背景色兜底（背景图加载前） */
  background-color: #1a0033;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ---------- Main Container ---------- */
.main-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  /* 背景图覆盖整个视口：cover 填满，底部火焰部分能显示 */
  background: url("/static/image/background.jpg") no-repeat center center /
    cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

/* ---------- Logo Area ---------- */
.logo-area {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 20px 12px;
  /* logo 区高度跟随图片自适应 */
}

.logo-img {
  width: 88%;
  max-width: 360px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ---------- Register Card：透明毛玻璃，四周有间距 ---------- */
.register-box {
  /* 左右底三边留 12px 间距，顶部圆角 */
  width: calc(100% - 24px);
  max-width: 456px;
  margin: 0 12px 12px 12px;
  border-radius: 20px; /* 四角都圆，稍大一点 */

  /* 紫红渐变透明背景，更接近效果图 */
  /* background: linear-gradient(
    180deg,
    rgba(140, 40, 180, 0.42) 0%,
    rgba(90, 25, 140, 0.52) 100%
  ); */

  /* 毛玻璃效果 */
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);

  /* 明显的霓虹紫边框 */
  border: 1.5px solid rgba(200, 100, 255, 0.45);
  box-shadow:
    0 0 20px rgba(180, 60, 255, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);

  padding: 24px 20px 28px;
  flex: 1;
}

/* ---------- Form Title ---------- */
.form-title {
  text-align: center;
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 18px;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

/* ---------- Form Item ---------- */
.layui-form-item {
  margin-bottom: 14px;
}

/* ---------- Label ---------- */
.input-label {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 6px;
  text-align: left;
  line-height: 1.4;
}

/* ---------- Input Wrapper ---------- */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

/* 左侧图标 - 颜色 #646464 */
.input-with-icon .layui-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #646464; /* 按要求设定 */
  font-size: 17px;
  pointer-events: none;
  z-index: 2;
}

/* 左侧图标图片（验证码icon） */
.input-with-icon .input-icon-img {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 2;
}

/* ---------- Input ---------- */
.layui-input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  padding: 10px 14px 10px 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  color: #333;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

/* 占位符字体颜色 #a3a3a3 */
.layui-input::placeholder {
  color: #a3a3a3;
  font-size: 13px;
}

/* 聚焦状态 */
.layui-input:focus {
  border-color: #d000ff;
  box-shadow: 0 0 0 3px rgba(200, 0, 255, 0.18);
  background-color: #fff;
}

/* 错误状态 */
.layui-form-danger .layui-input,
.layui-input.layui-form-danger {
  border-color: #ff4d4f !important;
  box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.18) !important;
}

/* 禁用状态 */
.layui-input:disabled {
  background-color: #e0e0e0;
  color: #999;
  cursor: not-allowed;
}

/* ---------- Password Field ---------- */
.password-field .layui-input {
  padding-right: 44px; /* 给右侧眼睛图标留空间 */
}

.password-field .toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  left: auto;
  cursor: pointer;
  color: #646464; /* 与左侧图标保持一致 */
  font-size: 17px;
  z-index: 2;
  transition: color 0.2s;
  pointer-events: all;
}

.password-field .toggle-password:hover {
  color: #444;
}

/* ---------- Verify Code Row ---------- */
.verify-code-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.verify-code-input-group {
  flex: 1;
  min-width: 0;
}

.verify-code-input {
  padding-right: 14px;
}

.captcha-img-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.captcha-img {
  width: 120px; /* 固定图片宽度 */
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  object-fit: contain;
  display: block;
  cursor: pointer;
  object-fit: fill;
}

.refresh-captcha {
  font-size: 18px; /* 稍微缩小 */
  color: #ffffff;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    color 0.2s;
  display: inline-block;
  flex-shrink: 0;
}

.refresh-captcha {
  font-size: 20px;
  color: #ffffff;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    color 0.2s;
  display: inline-block;
  flex-shrink: 0;
}

.refresh-captcha:hover {
  color: #d06bff;
  transform: rotate(180deg);
}

/* ---------- CREATE Button ---------- */
.btn-area {
  margin-top: 4px;
}

.btn-create,
.layui-btn.btn-create {
  display: block !important;
  width: 100% !important;
  height: 48px !important;
  line-height: 48px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 10px !important;
  background: linear-gradient(90deg, #e020ff 0%, #a020f0 100%) !important;
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(200, 40, 255, 0.55) !important;
  transition:
    box-shadow 0.2s ease,
    transform 0.15s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  outline: none !important;
  text-indent: 0 !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
}

.btn-create:hover,
.layui-btn.btn-create:hover {
  background: linear-gradient(90deg, #d010f0 0%, #9010e0 100%) !important;
  box-shadow: 0 6px 22px rgba(200, 40, 255, 0.7) !important;
  transform: translateY(-1px) !important;
}

.btn-create:active,
.layui-btn.btn-create:active {
  transform: translateY(1px) !important;
  box-shadow: 0 2px 10px rgba(200, 40, 255, 0.45) !important;
}

/* ---------- DOWNLOAD Button ---------- */
.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-top: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #0070ff 0%, #00d4ff 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 150, 255, 0.5);
  transition:
    box-shadow 0.2s ease,
    transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.btn-download:hover,
.btn-download:active {
  box-shadow: 0 6px 22px rgba(0, 150, 255, 0.65);
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

.btn-download:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(0, 100, 255, 0.35);
}

/* ---------- PLAY ONLINE Button (primary call-to-action) ---------- */
.btn-play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-top: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #00c853 0%, #64dd17 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 200, 80, 0.55);
  transition:
    box-shadow 0.2s ease,
    transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.btn-play:hover,
.btn-play:active {
  box-shadow: 0 6px 24px rgba(0, 200, 80, 0.7);
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

.btn-play:active {
  transform: translateY(1px);
  box-shadow: 0 2px 12px rgba(0, 180, 70, 0.4);
}

/* subheading under the play button that frames download as the alternative */
.download-alt-note {
  text-align: center;
  font-size: 12px;
  color: #9aa0b0;
  margin: 14px 0 2px;
  letter-spacing: 0.3px;
}

/* success modal: green play button variant */
#successModal .success-play-btn {
  width: 100%;
  height: 50px;
  padding: 0;
  border-radius: 25px;
  background: linear-gradient(90deg, #00c853 0%, #64dd17 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 200, 80, 0.4);
  margin-bottom: 12px;
}

#successModal .success-play-btn a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ---------- Customer Service Button ---------- */
.customer-service-area {
  position: fixed;
  right: -20px;
  top: -30px;
}

.customer-service-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

/* ---------- Success Modal ---------- */
#successModal {
  max-width: 420px;
  width: 90%;
  padding: 24px 20px;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition:
    transform 0.3s ease-out,
    opacity 0.2s ease-out;
  z-index: 1000;
  opacity: 1;
  display: none;
}

#successModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 14px;
  margin-bottom: 14px;
}

#successModal .modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

#successModal .close-btn {
  font-size: 24px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

#successModal .close-btn:hover {
  color: #555;
}

#successModal .modal-body {
  padding: 0;
}

.info-table {
  width: 100%;
  margin-bottom: 16px;
  border-collapse: collapse;
}

.info-table td {
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
  font-size: 14px;
}

.info-table td:first-child {
  color: #666;
  font-weight: 500;
  width: 38%;
}

.info-table td:last-child {
  color: #222;
  font-weight: 600;
}

.security-note {
  color: #e74c3c;
  font-size: 13px;
  text-align: center;
  margin-top: 14px;
}

#successModal .modal-footer {
  text-align: center;
  margin-top: 18px;
}

#successModal .success-download-btn {
  width: 100%;
  height: 50px;
  padding: 0;
  border-radius: 25px;
  background: linear-gradient(90deg, #0055ee 0%, #00aaff 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 100, 255, 0.35);
}

#successModal .success-download-btn a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ---------- Error Modal (layui layer) ---------- */
.error-modal .layui-layer-content {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  padding: 0;
}

.error-modal-container {
  text-align: center;
  padding: 30px 24px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.error-modal-container.show {
  opacity: 1;
  transform: translateY(0);
}

.error-icon {
  width: 80px;
  height: 80px;
  background: #fff2f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.error-icon i {
  font-size: 40px;
  color: #f56c6c;
}

.error-title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}

.error-message {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* ---------- Layui Override ---------- */
.layui-form-item .layui-form-mid {
  color: #fff;
}

.layui-layer-tips {
  border-radius: 8px !important;
}

/* ---------- Responsive ---------- */

/* 超小屏 (< 375px) */
@media (max-width: 374px) {
  .logo-img {
    width: 86%;
  }

  .register-box {
    padding: 20px 16px 24px;
  }

  .form-title {
    font-size: 18px;
  }

  .layui-input {
    height: 42px;
    font-size: 13px;
  }

  .btn-create,
  .layui-btn.btn-create,
  .btn-download,
  #successModal .success-download-btn {
    height: 46px !important;
    line-height: 46px !important;
    font-size: 15px !important;
  }

  .captcha-img {
    width: 82px;
    height: 42px;
  }
}

/* 标准手机 (375px - 767px) */
@media (min-width: 375px) and (max-width: 767px) {
  .register-box {
    border-radius: 18px;
  }
}

/* 平板及以上 (>= 768px) */
@media (min-width: 768px) {
  body {
    align-items: center;
    min-height: 100vh;
    background: #12002a;
  }

  .main-container {
    width: 450px;
    min-height: 100vh;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(140, 0, 255, 0.4);
    overflow: hidden;
    margin: 20px 0;
  }

  .register-box {
    border-radius: 18px;
  }
}

/* 宽屏 (>= 1024px) */
@media (min-width: 1024px) {
  body {
    background: #0d0020;
  }

  .main-container {
    box-shadow: 0 0 60px rgba(140, 0, 255, 0.45);
  }
}
