/* =========================================================
   HurryDeer Browser — Registration / Login Page Styles
   独立注册页（register.html）与独立登录页（login.html）共用：
   顶栏品牌 + 居中卡片表单。复用 styles.css 的变量与表单控件。
   ========================================================= */

body.reg-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
}

/* ---------- 顶栏 ---------- */
.reg-header {
  position: relative;
  z-index: 2;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.reg-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-primary);
}

.reg-brand img {
  width: 34px;
  height: 34px;
}

.reg-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reg-login-hint {
  display: none;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.reg-login-hint a {
  font-weight: 700;
  color: var(--brand-600);
}

.reg-login-hint a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

/* 顶栏「下载软件」按钮：跳转首页下载区域锚点（index.html#download） */
.reg-open-btn {
  padding: 0.4375rem 1rem;
  font-size: 0.875rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.reg-open-btn:hover {
  color: #fff;
}

@media (min-width: 768px) {
  .reg-login-hint { display: inline; }
}

/* ---------- 主区域与背景装饰 ---------- */
.reg-main {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem 4rem;
  overflow: hidden;
}

.reg-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.reg-bg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}

.reg-bg .blob-1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -100px;
  background: var(--brand-200);
}

.reg-bg .blob-2 {
  width: 380px;
  height: 380px;
  bottom: -140px;
  right: -80px;
  background: #cffafe;
}

[data-theme="dark"] .reg-bg .blob-1 { background: rgba(59, 130, 246, 0.25); }
[data-theme="dark"] .reg-bg .blob-2 { background: rgba(6, 182, 212, 0.18); }

/* ---------- 注册卡片 ---------- */
.reg-card {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
}

.reg-card h1 {
  font-size: 1.625rem;
  font-weight: 800;
  margin-bottom: 0.375rem;
}

.reg-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.75rem;
}

/* ---------- 密码输入（带显示切换） ---------- */
.reg-password-wrap {
  position: relative;
}

.reg-password-wrap input {
  padding-right: 2.75rem;
}

.reg-eye {
  position: absolute;
  top: 50%;
  right: 0.625rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.reg-eye:hover {
  color: var(--text-primary);
  background: var(--bg-soft);
}

.reg-eye svg {
  width: 18px;
  height: 18px;
}

/* 密码强度 */
.reg-strength {
  display: flex;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.reg-strength i {
  flex: 1;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--border);
  transition: background var(--transition-fast);
}

.reg-strength.s1 i:nth-child(1) { background: var(--accent-rose); }
.reg-strength.s2 i:nth-child(-n+2) { background: #f59e0b; }
.reg-strength.s3 i { background: #22c55e; }

.reg-strength-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ---------- 条款勾选 ---------- */
.reg-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
}

.reg-terms input[type="checkbox"] {
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-top: 0.2rem;
  accent-color: var(--brand-600);
  cursor: pointer;
}

.reg-terms a {
  font-weight: 600;
  color: var(--brand-600);
}

.reg-terms a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

/* ---------- 提交按钮 ---------- */
.reg-card .btn-large {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
}

/* 卡片底部：移动端登录入口 */
.reg-switch {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.reg-switch a {
  font-weight: 700;
  color: var(--brand-600);
}

.reg-switch a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .reg-switch { display: none; }
}

/* ---------- 卡片下方卖点 ---------- */
.reg-benefits {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 1.75rem;
  width: min(100%, 560px);
}

.reg-benefit {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
}

.reg-benefit svg {
  width: 14px;
  height: 14px;
  color: #22c55e;
}

/* ---------- 轻提示 ---------- */
.reg-toast {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 300;
  display: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  background: #16a34a;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
}

.reg-toast.visible {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 页脚 ---------- */
.reg-footer {
  position: relative;
  z-index: 1;
  padding: 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
