:root {
  --rd-bg-top: #d8e8e0;
  --rd-bg-bottom: #e8dcc8;
  --rd-surface: #ffffff;
  --rd-text: #333333;
  --rd-text-muted: #999999;
  --rd-border: #e0e0e0;
  --rd-btn: #555555;
  --rd-btn-hover: #444444;
  --rd-wechat: #07c160;
  --rd-qq: #12b7f5;
  --rd-error: #dc2626;
  --rd-success: #16a34a;
  --rd-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.rd-member-page {
  font-family: var(--rd-font);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 32px;
  line-height: 1.5;
  color: var(--rd-text);
  background: linear-gradient(180deg, var(--rd-bg-top) 0%, var(--rd-bg-bottom) 100%);
}

.rd-wrap {
  width: 100%;
  max-width: 400px;
}

.rd-card {
  position: relative;
  background: var(--rd-surface);
  border-radius: 4px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  padding: 48px 36px 28px;
}

.rd-auth-avatar {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #333;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.rd-auth-avatar svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.rd-page-title {
  text-align: center;
  font-size: 14px;
  color: var(--rd-text-muted);
  margin-bottom: 24px;
}

.rd-form-hint {
  font-size: 13px;
  color: var(--rd-text-muted);
  line-height: 1.6;
  margin: -12px 0 20px;
  text-align: center;
}

.rd-field { margin-bottom: 14px; }

.rd-field input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--rd-border);
  border-radius: 2px;
  font-size: 14px;
  font-family: inherit;
  color: var(--rd-text);
  background: #fff;
  text-align: right;
}

.rd-field input::placeholder {
  color: #bbb;
  text-align: right;
}

.rd-field input:focus {
  outline: none;
  border-color: #aaa;
}

.rd-captcha-row {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
}

.rd-captcha-row input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--rd-border);
  border-right: none;
  border-radius: 2px 0 0 2px;
  font-size: 14px;
  text-align: right;
  font-family: inherit;
}

.rd-captcha-row input:focus { outline: none; border-color: #aaa; }

.rd-captcha-row img {
  width: 110px;
  height: 42px;
  border: 1px solid var(--rd-border);
  border-radius: 0 2px 2px 0;
  cursor: pointer;
  display: block;
  background: #111;
}

.rd-btn {
  display: block;
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 2px;
}

.rd-btn-dark {
  background: var(--rd-btn);
  color: #fff;
  margin-top: 4px;
}

.rd-btn-dark:hover { background: var(--rd-btn-hover); }

.rd-agreement {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  margin: 14px 0 10px;
  font-size: 12px;
  color: var(--rd-text-muted);
  text-align: right;
}

.rd-agreement input { margin-top: 2px; flex-shrink: 0; }

.rd-agreement a {
  color: var(--rd-text-muted);
  text-decoration: underline;
}

.rd-nav-links {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 13px;
}

.rd-nav-links a {
  color: var(--rd-text-muted);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.rd-nav-links a:hover { color: var(--rd-text); text-decoration: underline; }

.rd-link-action { cursor: pointer; }

.rd-social-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 18px;
  color: var(--rd-text-muted);
  font-size: 13px;
}

.rd-social-divider::before,
.rd-social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rd-border);
}

.rd-social-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 8px;
}

.rd-social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s, opacity 0.15s;
}

.rd-social-btn:hover { transform: scale(1.06); opacity: 0.92; }

.rd-social-btn.wechat { background: var(--rd-wechat); }
.rd-social-btn.qq { background: var(--rd-qq); }

.rd-social-btn .iconfont.icon-weixin {
  width: 26px;
  height: 26px;
  pointer-events: none;
}

.rd-wechat-panel {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rd-border);
}

.rd-wechat-panel.show { display: block; }

.rd-wechat-only-title {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--rd-text);
}

.rd-wechat-area { text-align: center; }

.rd-qr-box {
  width: 200px;
  height: 200px;
  margin: 0 auto 12px;
  border: 1px solid var(--rd-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  overflow: hidden;
}

.rd-qr-box img { width: 100%; height: 100%; object-fit: contain; }

.rd-qr-placeholder { color: var(--rd-text-muted); font-size: 13px; }

.rd-scan-status { font-size: 13px; color: var(--rd-text-muted); margin-bottom: 8px; }
.rd-scan-status.scanning { color: #0188fb; }
.rd-scan-status.error { color: #dc2626; }

.rd-code-display {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--rd-wechat);
  margin: 10px 0;
}

.rd-code-hint {
  font-size: 12px;
  color: var(--rd-text-muted);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto 8px;
}

.rd-msg {
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
}

.rd-msg.show { display: block; }
.rd-msg.error { background: #fef2f2; color: var(--rd-error); border: 1px solid #fecaca; }
.rd-msg.success { background: #f0fdf4; color: var(--rd-success); border: 1px solid #bbf7d0; }

.rd-link-row {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--rd-text-muted);
}

.rd-link-row a { color: var(--rd-text-muted); text-decoration: underline; }

.rd-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--rd-border);
  border-top-color: #666;
  border-radius: 50%;
  animation: rd-spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes rd-spin { to { transform: rotate(360deg); } }

.rd-back-login {
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
}

.rd-back-login a { color: var(--rd-text-muted); }
