/* ==========================================================================
   全局统一用户登录 / 注册认证弹窗与右上角个人账号浮层样式 (1:1 还原设计稿)
   ========================================================================== */

.euler-auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 32, 58, 0.36);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.euler-auth-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.euler-auth-card {
  position: relative;
  width: 456px;
  max-width: calc(100vw - 28px);
  border-radius: 28px;
  background: linear-gradient(180deg, #e9f2ff 0%, #f5f9ff 30%, #ffffff 62%, #ffffff 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.96);
  box-shadow:
    0 24px 60px rgba(17, 42, 92, 0.18),
    0 4px 16px rgba(24, 97, 255, 0.06);
  padding: 30px 34px 28px;
  box-sizing: border-box;
  overflow: hidden;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.24s cubic-bezier(0.2, 0.85, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.euler-auth-backdrop.is-open .euler-auth-card {
  transform: translateY(0) scale(1);
}

/* 右上角柔和云雾光晕装饰 */
.euler-auth-card::before {
  content: "";
  position: absolute;
  top: -48px;
  right: -36px;
  width: 250px;
  height: 210px;
  background: radial-gradient(circle, rgba(168, 203, 255, 0.42) 0%, rgba(219, 234, 255, 0.12) 60%, transparent 76%);
  pointer-events: none;
}

/* 关闭按钮 */
.euler-auth-close {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 4;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #556277;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.euler-auth-close:hover {
  background: rgba(24, 97, 255, 0.08);
  color: #1e293b;
}

/* 顶部标题 + 右侧 3D AI 机器人插画区 */
.euler-auth-hero {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 124px;
  margin-bottom: 14px;
}

.euler-auth-hero-copy {
  flex: 1 1 auto;
  padding-top: 6px;
  padding-right: 8px;
}

.euler-auth-title-wrap {
  position: relative;
  display: inline-block;
}

.euler-auth-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #142138;
  position: relative;
  z-index: 2;
}

.euler-auth-title-swoosh {
  position: absolute;
  right: -24px;
  bottom: 1px;
  width: 56px;
  height: 12px;
  z-index: 1;
  pointer-events: none;
}

.euler-auth-subtitle {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #708096;
  font-weight: 400;
}

.euler-auth-illustration {
  flex: 0 0 186px;
  width: 186px;
  height: 126px;
  margin-right: -10px;
  margin-top: -4px;
  user-select: none;
  pointer-events: none;
}

.euler-auth-illustration svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* 账号登录 / 注册账号 分段胶囊切换器 */
.euler-auth-tabs {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #edf2fa;
  margin-bottom: 20px;
}

.euler-auth-tab {
  height: 42px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #2b384e;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.euler-auth-tab svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.euler-auth-tab.is-active {
  background: #ffffff;
  color: #1861ff;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(24, 97, 255, 0.1);
}

/* 表单与输入框 */
.euler-auth-form {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.euler-auth-field {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  border-radius: 13px;
  background: #f8faff;
  border: 1.3px solid #dce5f2;
  padding: 0 14px;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.euler-auth-field:focus-within {
  background: #ffffff;
  border-color: #2c72ff;
  box-shadow: 0 0 0 3.5px rgba(24, 97, 255, 0.11);
}

.euler-auth-field-icon {
  width: 20px;
  height: 20px;
  color: #6b788d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  flex-shrink: 0;
}

.euler-auth-field:focus-within .euler-auth-field-icon {
  color: #1861ff;
}

.euler-auth-input {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: #182438;
}

.euler-auth-input::placeholder {
  color: #9aa6b8;
}

.euler-auth-eye-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #8b98ab;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin-left: 6px;
  flex-shrink: 0;
}

.euler-auth-eye-btn:hover {
  color: #475569;
  background: rgba(148, 163, 184, 0.12);
}

/* 记住账号 & 忘记密码行 */
.euler-auth-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -2px;
  padding: 0 2px;
}

.euler-auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #647285;
  cursor: pointer;
  user-select: none;
}

.euler-auth-remember input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  background: #ffffff;
  margin: 0;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: all 0.15s ease;
}

.euler-auth-remember input[type="checkbox"]:checked {
  background: #1861ff;
  border-color: #1861ff;
}

.euler-auth-remember input[type="checkbox"]:checked::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.euler-auth-forgot-btn {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: #1861ff;
  cursor: pointer;
}

.euler-auth-forgot-btn:hover {
  text-decoration: underline;
}

/* 错误或状态提示条 */
.euler-auth-error {
  font-size: 13px;
  line-height: 1.45;
  color: #e11d48;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  padding: 8px 12px;
}

.euler-auth-error[hidden] {
  display: none !important;
}

/* 立即登录 / 立即注册 蓝色渐变大胶囊按钮 */
.euler-auth-submit {
  margin-top: 6px;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #3285ff 0%, #1160ff 100%);
  color: #ffffff;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(24, 97, 255, 0.28);
  transition: transform 0.14s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.euler-auth-submit:hover:not(:disabled) {
  box-shadow: 0 12px 26px rgba(24, 97, 255, 0.36);
  transform: translateY(-1px);
}

.euler-auth-submit:active:not(:disabled) {
  transform: translateY(0);
}

.euler-auth-submit:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

/* 底部 "还没有账号？ 立即注册" 分割线 */
.euler-auth-footer {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13.5px;
  color: #8492a6;
}

.euler-auth-footer-line {
  width: 52px;
  height: 1px;
  background: #e2e8f2;
}

.euler-auth-switch-link {
  border: none;
  background: transparent;
  padding: 0;
  margin-left: 2px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1861ff;
  cursor: pointer;
}

.euler-auth-switch-link:hover {
  text-decoration: underline;
}

/* 右上角已登录用户昵称徽标与迷你个人卡片浮层 */
.euler-user-popover {
  position: fixed;
  top: 58px;
  right: 22px;
  z-index: 9800;
  width: 236px;
  background: #ffffff;
  border: 1px solid #e5edf8;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 35, 72, 0.14);
  padding: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

.euler-user-popover[hidden] {
  display: none !important;
}

.euler-user-pop-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f8;
}

.euler-user-pop-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3285ff, #1460ff);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.euler-user-pop-meta {
  min-width: 0;
  flex: 1;
}

.euler-user-pop-name {
  font-size: 14px;
  font-weight: 700;
  color: #162338;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.euler-user-pop-sub {
  font-size: 12px;
  color: #7c8ba1;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.euler-user-pop-logout {
  margin-top: 10px;
  width: 100%;
  height: 36px;
  border: 1px solid #fee2e2;
  border-radius: 10px;
  background: #fff5f5;
  color: #e11d48;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.euler-user-pop-logout:hover {
  background: #ffe4e6;
}
