/* 会员登录/注册页独立样式（novelnexus_5）- 不依赖 qidian.css 是否含 nx-auth 段 */

:root {
  --qd-red: #BF2C24;
  --qd-bg: #faf9f5;
  --qd-text: #1b1c1a;
  --qd-muted: #5f5e5e;
  --qd-border: #e9e8e4;
}

* { box-sizing: border-box; }

.nx-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 80px;
  margin: 0;
  background: var(--qd-bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--qd-text);
}
.nx-auth-page a { color: inherit; text-decoration: none; }
.nx-auth-page a:hover { color: var(--qd-red); }

.nx-auth-card {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: row;
  background: #fff;
  border: 1px solid var(--qd-border);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
.nx-auth-brand {
  display: none;
  width: 50%;
  flex-shrink: 0;
  position: relative;
  padding: 48px;
  background: #1a1a1a;
  color: #fff;
  flex-direction: column;
  justify-content: space-between;
  min-height: 560px;
}
@media (min-width: 768px) {
  .nx-auth-brand { display: flex; }
}
.nx-auth-brand-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(26,26,26,0.95) 0%, rgba(26,26,26,0.4) 45%, rgba(26,26,26,0.7) 100%),
    url("https://images.unsplash.com/photo-1481627834876-b7833e8f5570?w=800&q=80") center/cover no-repeat;
  filter: grayscale(0.6);
  opacity: 0.55;
}
.nx-auth-brand-inner,
.nx-auth-brand-foot { position: relative; z-index: 1; }
.nx-auth-brand-logo {
  margin: 0 0 8px;
  font: 700 28px/1.3 "Noto Serif", "PingFang SC", serif;
  color: var(--qd-red);
}
.nx-auth-brand-tag {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
}
.nx-auth-brand-copy h2 {
  margin: 0 0 16px;
  font: 700 40px/1.2 "Noto Serif", "PingFang SC", serif;
}
.nx-auth-brand-copy p {
  margin: 0;
  max-width: 280px;
  font-size: 15px;
  line-height: 1.7;
  color: #aaa;
}
.nx-auth-brand-foot {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nx-auth-avatars { display: flex; }
.nx-auth-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #1a1a1a;
  margin-left: -8px;
}
.nx-auth-avatar:first-child { margin-left: 0; }
.nx-auth-avatar.a { background: linear-gradient(135deg, #8b7355, #c4a882); }
.nx-auth-avatar.b { background: linear-gradient(135deg, #5a403d, #9c7b78); }
.nx-auth-brand-stat { margin: 0; font-size: 12px; color: #999; }
.nx-auth-brand-stat strong { color: #fff; font-weight: 700; }

.nx-auth-main {
  flex: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
@media (min-width: 768px) {
  .nx-auth-main { padding: 48px; }
}
.nx-auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}
.nx-auth-tabs { display: flex; gap: 32px; }
.nx-auth-tab {
  padding: 0 0 8px;
  border: none;
  background: none;
  font: 600 20px/1.3 "Noto Serif", "PingFang SC", serif;
  color: var(--qd-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.nx-auth-tab.on {
  color: var(--qd-red);
  border-bottom-color: var(--qd-red);
}
.nx-auth-head-m {
  display: block;
  font: 600 18px/1 "Noto Serif", serif;
  color: var(--qd-red);
}
@media (min-width: 768px) {
  .nx-auth-head-m { display: none; }
}

.nx-auth-panel { flex: 1; display: flex; flex-direction: column; }
.nx-auth-panel.hidden,
.nx-auth-panel[hidden] { display: none !important; }
.nx-auth-mode-label {
  margin: 0 0 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--qd-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--qd-red);
}
.nx-auth-fields { display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; }
.nx-auth-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--qd-muted);
}
.nx-auth-field input {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 2px solid #e9e8e4;
  background: transparent;
  font-size: 15px;
  outline: none;
}
.nx-auth-field input:focus { border-bottom-color: var(--qd-red); }
.nx-auth-field input::placeholder { color: #ccc; }
.nx-auth-pwd-wrap { position: relative; }
.nx-auth-pwd-wrap input { padding-right: 40px; }
.nx-auth-pwd-toggle {
  position: absolute;
  right: 0;
  bottom: 10px;
  border: none;
  background: none;
  padding: 4px;
  cursor: pointer;
  color: var(--qd-muted);
}
.nx-auth-pwd-toggle:hover { color: var(--qd-red); }

.nx-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 12px;
}
.nx-auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--qd-muted);
}
.nx-auth-check input { width: 16px; height: 16px; accent-color: var(--qd-red); }
.nx-auth-muted-link { color: var(--qd-muted); font-size: 12px; }
.nx-auth-muted-link:hover { color: var(--qd-red); }

.nx-auth-submit {
  width: 100%;
  padding: 16px;
  border: none;
  background: var(--qd-red);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.nx-auth-submit:hover { background: #920408; }
.nx-auth-submit:active { transform: scale(0.98); }
.nx-auth-msg {
  margin: 12px 0 0;
  min-height: 20px;
  font-size: 13px;
  color: var(--qd-red);
  text-align: center;
}
.nx-auth-agree {
  margin: 0 0 24px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--qd-muted);
}
.nx-auth-agree a { color: var(--qd-red); }

.nx-auth-social { margin-top: 48px; }
.nx-auth-social-hd {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.nx-auth-social-hd::before,
.nx-auth-social-hd::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--qd-border);
}
.nx-auth-social-hd span {
  font-size: 12px;
  color: var(--qd-muted);
  white-space: nowrap;
}
.nx-auth-social-btns {
  display: flex;
  justify-content: center;
  gap: 32px;
}
.nx-auth-social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  cursor: not-allowed;
  opacity: 0.55;
  font-size: 10px;
  color: var(--qd-muted);
}
.nx-auth-social-btn .ico {
  width: 40px;
  height: 40px;
  border: 1px solid var(--qd-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.nx-auth-social-btn .ico.wx::before { content: "微"; font-size: 14px; font-weight: 600; color: #666; }
.nx-auth-social-btn .ico.qq::before { content: "Q"; font-size: 14px; font-weight: 700; color: #666; }
.nx-auth-social-btn .ico.wb::before { content: "博"; font-size: 13px; font-weight: 600; color: #666; }

.nx-auth-footer {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: var(--qd-muted);
  pointer-events: none;
}
.nx-auth-footer a { pointer-events: auto; color: var(--qd-muted); }
.nx-auth-footer a:hover { color: var(--qd-red); }
@media (max-width: 767px) {
  .nx-auth-footer { display: none; }
}

.nx-ico {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  opacity: .7;
}
.nx-ico-eye {
  width: 20px;
  height: 20px;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z'/%3E%3C/svg%3E");
}
.nx-ico-eye-off {
  width: 20px;
  height: 20px;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z'/%3E%3C/svg%3E");
}
