/* 弹窗整体 */
.auth-modal { position: fixed; inset: 0; display: none; z-index: 10000; }
.auth-modal.open { display: block; }
.auth-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); backdrop-filter: blur(2px); }

/* 卡片容器 */
.auth-modal-card {
  position: relative;
  z-index: 1;
  width: min(1200px, 92vw);
  max-width: 90vw;
  max-height: 90vh;
  margin: 5vh auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 3px 8px rgba(0, 0, 0, 0.04);
  background: #fff;
  border: 1px solid #e2e8f0;
  font-family: 'Inter', system-ui, sans-serif;
}

/* 深色主题支持 */
.dark .auth-modal-card {
  background: #16213e;
  border-color: #1e293b;
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #1e293b;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.dark .auth-modal-close {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.dark .auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 左侧学术信息区 */
.auth-card-left {
  position: relative;
  padding: 32px 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #1e40af;
  overflow: hidden;
}

/* 装饰元素 */
.auth-card-left::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 50%;
  background: rgba(15, 118, 110, 0.2);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}

/* 头部品牌信息 */
.auth-brand {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.auth-brand img {
  max-width: 40px;
  height: auto;
  margin-right: 12px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-brand h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  font-family: Georgia, Cambria, serif;
}

/* 欢迎信息 */
.auth-welcome {
  position: relative;
  z-index: 1;
}

.auth-welcome h2 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.2;
  font-family: Georgia, Cambria, serif;
}

.auth-welcome p {
  font-size: 18px;
  margin: 0 0 32px;
  opacity: 0.9;
  max-width: 400px;
}

/* 功能特点 */
.auth-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.auth-features li::before {
  content: "";
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}

.auth-features li:nth-child(1)::before {
  content: "📄";
}

.auth-features li:nth-child(2)::before {
  content: "👥";
}

.auth-features li:nth-child(3)::before {
  content: "🔍";
}

.auth-features li span {
  font-size: 14px;
  opacity: 0.9;
}

/* 学术成就数据 */
.auth-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.auth-stat-item {
  text-align: center;
}

.auth-stat-item .number {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 4px;
}

.auth-stat-item .label {
  font-size: 14px;
  opacity: 0.7;
  margin: 0;
}

/* 右侧表单区 */
.auth-card-right {
  padding: 32px 24px;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.dark .auth-card-right {
  background: #16213e;
}

/* 顶部切换 */
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.auth-tab {
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
}

.auth-tab.active {
  background: #1e40af;
  color: #fff;
}

.dark .auth-tab {
  background: #1e293b;
  color: #94a3b8;
}

.dark .auth-tab.active {
  background: #1e40af;
  color: #fff;
}

/* 主题切换按钮 */
.theme-toggle {
  position: absolute;
  top: 16px;
  right: 64px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.theme-toggle i {
  font-size: 16px;
  transition: opacity 0.3s ease;
}

/* 白天模式 - 黑色月亮 */
.theme-toggle .fa-moon-o {
  opacity: 1;
  color: #1e293b;
}

/* 白天模式 - 隐藏太阳 */
.theme-toggle .fa-sun-o {
  opacity: 0;
  color: #ffffff;
}

/* 夜间模式 - 调整背景 */
.dark .theme-toggle {
  background: #1e293b;
}

/* 夜间模式 - 隐藏月亮 */
.dark .theme-toggle .fa-moon-o {
  opacity: 0;
}

/* 夜间模式 - 白色太阳 */
.dark .theme-toggle .fa-sun-o {
  opacity: 1;
  color: #ffffff;
}

/* 标题样式 */
.auth-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px;
}

.dark .auth-title {
  color: #e2e8f0;
}

.auth-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 24px;
}

.dark .auth-subtitle {
  color: #94a3b8;
}

/* 表单样式 */
.auth-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 输入框带图标 */
.input-with-icon {
  position: relative;
  margin-bottom: 0;
}

.input-with-icon .icon.left {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: #1e293b;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-with-icon input::placeholder {
  color: #94a3b8;
}

.input-with-icon input:focus {
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
  background: #fff;
}

.dark .input-with-icon input {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.dark .input-with-icon input::placeholder {
  color: #64748b;
}

.dark .input-with-icon input:focus {
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
}

/* 表单行 */
.form-row {
  margin-bottom: 0;
}

.form-row.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* 验证码样式 */
.wyqq-captcha {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.wyqq-captcha img {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.dark .wyqq-captcha img {
  border-color: #334155;
}

.wyqq-cap-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  background: #f8fafc;
  transition: all 0.3s ease;
}

.dark .wyqq-cap-input {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.wyqq-cap-input:focus {
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.wyqq-cap-refresh {
  color: #1e40af;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.wyqq-cap-refresh:hover {
  color: #1e3a8a;
}

/* 辅助链接行 */
.helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 24px;
}

.helper-link {
  color: #1e40af;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.3s ease;
}

.helper-link:hover {
  color: #1e3a8a;
}

.dark .helper-link {
  color: #60a5fa;
}

.dark .helper-link:hover {
  color: #3b82f6;
}

/* 提交按钮 */
.submit-btn {
  width: 100%;
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  background: #1e40af;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
}

.submit-btn:hover {
  background: #1e3a8a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(30, 64, 175, 0.2);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 消息提示 */
.form-msg {
  min-height: 20px;
  margin-top: 8px;
  font-size: 13px;
  text-align: center;
}

.form-msg.error {
  color: #ef4444;
}

.form-msg.success {
  color: #10b981;
}

/* 分隔线 */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.dark .auth-divider::before,
.dark .auth-divider::after {
  background: #334155;
}

.auth-divider span {
  padding: 0 16px;
  color: #64748b;
  font-size: 14px;
}

.dark .auth-divider span {
  color: #94a3b8;
}

/* 社交登录 */
.auth-social {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-btn:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

.dark .social-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

.dark .social-btn:hover {
  background: #334155;
}

.social-btn i {
  font-size: 20px;
  margin-bottom: 4px;
}

.social-btn span {
  font-size: 12px;
  font-weight: 500;
}

/* 协议勾选 */
.agree-row {
  margin-top: 16px;
}

.agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #64748b;
  font-size: 14px;
}

.dark .agree {
  color: #94a3b8;
}

.agree input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1e40af;
  margin-top: 2px;
}

.agree a {
  color: #1e40af;
  text-decoration: none;
  font-weight: 500;
}

.agree a:hover {
  text-decoration: underline;
}

.dark .agree a {
  color: #60a5fa;
}

/* 记住我行 */
.form-row.inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #64748b;
}

.dark .remember {
  color: #94a3b8;
}

.remember input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1e40af;
}

/* 底部版权信息 */
.auth-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.dark .auth-footer {
  border-color: #334155;
}

.auth-footer p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

/* 响应式 */
@media (max-width: 960px) {
  .auth-modal-card {
    grid-template-columns: 1fr;
    margin: 2vh auto;
    max-width: 95vw;
  }
  
  .auth-card-left {
    display: none;
  }
  
  .auth-card-right {
    padding: 32px 24px;
  }
  
  .auth-welcome h2 {
    font-size: 24px;
  }
  
  .auth-welcome p {
    font-size: 16px;
  }
  
  .form-row.two-cols {
    grid-template-columns: 1fr;
  }
  
  .auth-tabs {
    justify-content: center;
  }
  
  .helper-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .helper-row .lostpwd-link {
    margin-left: 0;
    margin-top: 4px;
  }
  
  .auth-title {
    text-align: center;
  }
  
  .auth-subtitle {
    text-align: center;
  }
}

/* 动画效果 */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(30, 64, 175, 0.15);
}

/* 视图切换 */
.auth-login-view,
.auth-register-view {
  transition: all 0.3s ease;
}

.auth-login-view.hidden,
.auth-register-view.hidden {
  display: none;
}