* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #f5f7ff 0%, #e9eef9 100%);
  font-family: "Microsoft Yahei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* 注册页面左右布局容器 */
.register-wrapper {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  background: #ffffff;
  border-radius: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* 左侧区域 — 视觉/文案 */
.register-left {
  flex: 1.2;
  background: linear-gradient(145deg, #8195FC 0%, #5f72d4 100%);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  color: white;
  overflow: hidden;
}

.register-left::before {
  content: "♪ ♫ ♩";
  font-size: 280px;
  position: absolute;
  bottom: -40px;
  right: -40px;
  opacity: 0.12;
  font-family: monospace;
  pointer-events: none;
  white-space: nowrap;
}

.left-content {
  position: relative;
  z-index: 2;
}

.left-content h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.left-content .sub {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 40px;
  border-left: 3px solid rgba(255,255,255,0.6);
  padding-left: 20px;
}

.feature-list {
  list-style: none;
  margin-top: 30px;
}

.feature-list li {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
}

.feature-list li::before {
  content: "✔️";
  font-size: 1.2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* 动画装饰 */
.music-wave {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 40px;
  height: 50px;
}

.music-wave span {
  width: 6px;
  height: 20px;
  background: rgba(255,255,255,0.7);
  border-radius: 4px;
  animation: wave 1.2s ease-in-out infinite;
}

.music-wave span:nth-child(2) { animation-delay: 0.1s; height: 32px; }
.music-wave span:nth-child(3) { animation-delay: 0.2s; height: 45px; }
.music-wave span:nth-child(4) { animation-delay: 0.3s; height: 28px; }
.music-wave span:nth-child(5) { animation-delay: 0.4s; height: 38px; }
.music-wave span:nth-child(6) { animation-delay: 0.5s; height: 22px; }

@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.5); background: white; }
}

/* 右侧表单区域 */
.register-right {
  flex: 1;
  padding: 48px 40px;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.register-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.register-container .title {
  font-size: 28px;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: -0.3px;
}

.form-group {
  margin-bottom: 22px;
  position: relative;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: #334155;
  font-size: 0.9rem;
}

.form-group input,
.form-group .code-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  font-size: 0.95rem;
  transition: all 0.2s;
  background: #fafcff;
}

.form-group input:focus,
.form-group .code-input:focus {
  outline: none;
  border-color: #8195FC;
  box-shadow: 0 0 0 3px rgba(129, 149, 252, 0.15);
}

.password-group {
  position: relative;
}

.toggle-pwd {
  position: absolute;
  right: 14px;
  top: 40px;
  cursor: pointer;
  font-size: 1.2rem;
  user-select: none;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toggle-pwd:hover {
  opacity: 1;
}

.code-input {
  width: calc(100% - 110px);
  display: inline-block;
  margin-right: 10px;
}

.code-btn {
  width: 100px;
  background: #f1f4fe;
  color: #8195FC;
  border: 1.5px solid #e2e8f0;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  padding: 12px 0;
  text-align: center;
  display: inline-block;
}

.code-btn:hover {
  background: #e6edff;
  border-color: #8195FC;
}

.btn {
  width: 100%;
  background: #8195FC;
  color: white;
  border: none;
  border-radius: 40px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
  box-shadow: 0 4px 8px rgba(129, 149, 252, 0.25);
}

.btn:hover {
  background: #6a7edb;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(129, 149, 252, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.error {
  color: #f97373;
  font-size: 0.75rem;
  margin-top: 6px;
  padding-left: 10px;
}

.success {
  color: #2b9348;
  text-align: center;
  margin-top: 16px;
}

#avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #8195FC;
  margin-top: 10px;
  background: #f1f5f9;
}

#result {
  font-size: 0.75rem;
  color: #4b5563;
  margin-top: 6px;
}

/* 注册成功页面 & 关闭提示页面 独立卡片居中 */
.success-container,
.closed-container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  background: white;
  border-radius: 32px;
  padding: 40px 32px;
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.success-title {
  color: #8195FC;
  font-size: 28px;
  margin-bottom: 28px;
}

.user-info-card {
  background: #f8fafc;
  border-radius: 24px;
  padding: 20px;
  text-align: left;
  margin: 20px 0;
}

.info-item {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid #eef2ff;
  align-items: center;
  flex-wrap: wrap;
}

.info-label {
  font-weight: 700;
  width: 130px;
  color: #1e293b;
}

.info-value {
  color: #4a5b7a;
  word-break: break-all;
  flex: 1;
}

.avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #8195FC;
  margin: 10px auto;
  display: block;
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  color: #8195FC;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 40px;
  background: #f0f3ff;
  transition: 0.2s;
}

.back-link:hover {
  background: #e2e9ff;
}

.closed-tip {
  color: #f97373;
  font-size: 20px;
  background: #fff0f0;
  padding: 18px;
  border-radius: 60px;
  margin-top: 15px;
}

/* 响应式 */
@media (max-width: 900px) {
  .register-wrapper {
    flex-direction: column;
    border-radius: 28px;
  }
  .register-left {
    padding: 40px 28px;
    text-align: center;
  }
  .left-content h1 {
    font-size: 2rem;
  }
  .feature-list li {
    justify-content: center;
  }
  .music-wave {
    justify-content: center;
  }
  .register-right {
    padding: 40px 24px;
  }
  .register-container {
    max-width: 100%;
  }
  .info-label {
    width: 100%;
    margin-bottom: 6px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 16px;
  }
  .register-right {
    padding: 28px 20px;
  }
  .code-input {
    width: 100%;
    margin-bottom: 12px;
  }
  .code-btn {
    width: 100%;
  }
}