/* =========================================================
 * PawPals login v2 - default theme 登录页专属样式（lh- 前缀作用域）
 * 依据 demoLogin/index2.html：左舞台卡通猫狗 + 右侧登录/注册卡片
 * 配色：白底 / default 橙 #FD560F / 黑色胶囊按钮 / Jost 字体
 * ======================================================= */

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400;
  src: url("../../fonts/jost/Jost-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 500;
  src: url("../../fonts/jost/Jost-Medium.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 600;
  src: url("../../fonts/jost/Jost-SemiBold.ttf") format("truetype");
  font-display: swap;
}

.login-hero {
  --lh-orange: #FD560F;
  --lh-orange-deep: #E64A05;
  --lh-ink: #212529;
  --lh-ink-soft: #6C757D;
  --lh-ink-muted: #9AA0A6;
  --lh-line: #E9ECEF;
  --lh-card: #FFFFFF;
  --lh-danger: #DC3545;
  --lh-radius: 12px;
  --lh-shadow-soft: 0 10px 30px rgba(33, 37, 41, 0.08);
  --lh-shadow-lift: 0 14px 34px rgba(33, 37, 41, 0.14);
}

.lh-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 页面级：Jost 字体 ---------- */
body.page-login,
body.page-forgotten {
  font-family: "Jost", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ---------- Hero 布局 ---------- */
.login-hero {
  position: relative;
  display: flex;
  min-height: 620px;
  margin-bottom: 40px;
  border: 1px solid var(--lh-line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--lh-card);
  box-shadow: var(--lh-shadow-soft);
}

/* ---------- 左舞台 ---------- */
.lh-stage {
  flex: 0 0 52%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #FFFFFF 0%, #FFF4EB 52%, #FFE9DC 100%);
}

.lh-stage-glow {
  position: absolute;
  right: -14%;
  bottom: -24%;
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 86, 15, 0.10), transparent 66%);
  pointer-events: none;
}

.lh-stage-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18%;
  background: linear-gradient(180deg, rgba(253, 86, 15, 0) 0%, rgba(253, 86, 15, 0.08) 100%);
  pointer-events: none;
}

.lh-stage-heading {
  position: absolute;
  top: 8%;
  left: 8%;
  z-index: 1;
  max-width: 460px;
}

.lh-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lh-orange);
}

.lh-stage-title {
  margin: 6px 0 0;
  font-family: "Jost", "Segoe UI", sans-serif;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--lh-ink);
}

.lh-stage-quote {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--lh-ink-soft);
}

/* ---------- 舞台装饰（爪印轨迹 / 地面球） ---------- */
.lh-deco {
  position: absolute;
  z-index: 0;
  opacity: 0.4;
  animation: lh-floatY 6s ease-in-out infinite;
  pointer-events: none;
}

.lh-deco svg {
  display: block;
  width: 100%;
  height: auto;
}

.lh-deco.lh-d1 { top: 9%;  right: 8%; width: 36px; --r: 18deg; }
.lh-deco.lh-d2 { top: 36%; left: 6%;  width: 27px; --r: -20deg; animation-delay: 1.4s; }
.lh-deco.lh-d3 { bottom: 8%; left: 46%; width: 36px; animation-delay: 2.6s; animation-duration: 7s; }
.lh-deco.lh-d4 { top: 26%; left: 34%; width: 31px; --r: 32deg; }
.lh-deco.lh-d5 { top: 35%; left: 45%; width: 23px; --r: 54deg; animation-delay: 1.8s; }

.lh-deco.lh-d3::after {
  content: "";
  position: absolute;
  left: 8%;
  bottom: -5px;
  width: 84%;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(33, 37, 41, 0.13), transparent 70%);
}

@keyframes lh-floatY {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-14px) rotate(var(--r, 0deg)); }
}

/* ---------- 卡通宠物 ---------- */
.lh-pet {
  position: absolute;
  z-index: 2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  outline: none;
}

.lh-pet-cat { left: 7%; bottom: 25%; }
.lh-pet-dog { right: 6%; bottom: 18%; z-index: 1; }

.lh-pet:focus-visible .lh-pet-tag {
  box-shadow: 0 0 0 3px var(--lh-orange), var(--lh-shadow-soft);
}

.lh-pet-svg {
  display: block;
  height: auto;
  filter: drop-shadow(0 12px 16px rgba(33, 37, 41, 0.14));
  transition: transform 0.35s ease;
  will-change: transform;
}

.lh-pet-cat .lh-pet-svg { width: clamp(170px, 18vw, 240px); }
.lh-pet-dog .lh-pet-svg { width: clamp(195px, 20vw, 265px); }

.lh-pet.near .lh-pet-svg {
  transform: translate(var(--lean, 0px), -4px) scale(1.03);
}

.lh-pet.shy .lh-pet-svg {
  transform: translate(-14px, -4px) scale(1.02);
}

.lh-pet-shadow {
  position: absolute;
  bottom: -7px;
  left: 15%;
  width: 70%;
  height: 14px;
  background: radial-gradient(ellipse, rgba(33, 37, 41, 0.13), transparent 70%);
  z-index: -1;
}

.lh-pet-tag {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--lh-card);
  border: 1px solid var(--lh-line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--lh-ink-soft);
  white-space: nowrap;
  box-shadow: var(--lh-shadow-soft);
}

/* —— SVG 部件动画 —— */
.lh-cat-body, .lh-dog-body {
  animation: lh-sway 4.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.lh-cat-head, .lh-dog-head {
  animation: lh-head-sway 4.2s ease-in-out infinite 0.25s;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

@keyframes lh-sway {
  0%, 100% { transform: rotate(-1.2deg); }
  50%      { transform: rotate(1.2deg); }
}

@keyframes lh-head-sway {
  0%, 100% { transform: rotate(-1.6deg); }
  50%      { transform: rotate(1.6deg); }
}

.lh-cat-tail, .lh-dog-tail {
  animation: lh-tail-wag 2.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 0% 90%;
}

.lh-dog-tail { animation-duration: 1.7s; }

.lh-pet.near .lh-cat-tail,
.lh-pet.near .lh-dog-tail { animation-duration: 0.5s; }

.lh-pet.happy .lh-cat-tail,
.lh-pet.happy .lh-dog-tail { animation-duration: 0.35s; }

@keyframes lh-tail-wag {
  0%, 100% { transform: rotate(-6deg); }
  50%      { transform: rotate(12deg); }
}

.lh-ear {
  animation: lh-ear-wiggle 4.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 50% 88%;
}

.lh-ear-dog-l, .lh-ear-dog-r { transform-origin: 50% 12%; }

.lh-ear-cat-l { animation-delay: 0.4s; }
.lh-ear-cat-r { animation-delay: 1.1s; }
.lh-ear-dog-l { animation-delay: 0.7s; }
.lh-ear-dog-r { animation-delay: 1.6s; }

@keyframes lh-ear-wiggle {
  0%, 86%, 100% { transform: rotate(0deg); }
  90%           { transform: rotate(-8deg); }
  95%           { transform: rotate(5deg); }
}

/* —— 眨眼 / 表情 —— */
.lh-eye {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.1s ease, opacity 0.12s ease;
}

.lh-eye-closed, .lh-mouth-open {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.lh-pet.blink .lh-eye { transform: scaleY(0.12); }

.lh-pet.happy .lh-eye,
.lh-pet:hover .lh-eye { opacity: 0; }

.lh-pet.happy .lh-eye-closed,
.lh-pet:hover .lh-eye-closed { opacity: 1; }

.lh-pet.happy .lh-mouth-smile,
.lh-pet:hover .lh-mouth-smile { opacity: 0; }

.lh-pet.happy .lh-mouth-open,
.lh-pet:hover .lh-mouth-open { opacity: 1; }

.lh-pet.shy .lh-eye { opacity: 0; }
.lh-pet.shy .lh-eye-closed { opacity: 1; }

/* —— 语音气泡 / 爱心 / 跳跃 —— */
.lh-speech {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translate(-50%, -100%) scale(0.6);
  background: var(--lh-card);
  color: var(--lh-ink);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--lh-shadow-soft);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34, 0.8, 0.4, 1);
  pointer-events: none;
  z-index: 3;
}

.lh-speech::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--lh-card);
}

.lh-pet.chat .lh-speech {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
}

.lh-heart {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: 4;
  animation: lh-heart-float 1.3s ease-out both;
}

.lh-heart svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: var(--lh-orange);
}

@keyframes lh-heart-float {
  0%   { opacity: 0; transform: translate(0, 12px) scale(0.4) rotate(0deg); }
  18%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), -76px) scale(1.1) rotate(var(--rot, 0deg)); }
}

.lh-pet.jump { animation: lh-pet-jump 0.6s cubic-bezier(0.34, 0.9, 0.5, 1); }

@keyframes lh-pet-jump {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-22px); }
  55%  { transform: translateY(0); }
  75%  { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

/* ---------- 右侧面板 ---------- */
.lh-panel {
  flex: 1 1 48%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 36px;
  background: var(--lh-card);
}

.lh-card {
  width: 100%;
  max-width: 430px;
}

.lh-brand-iframe {
  margin-bottom: 18px;
  text-align: center;
}

.lh-brand-iframe-img {
  display: inline-block;
  height: 30px;
  width: auto;
}

.lh-panel-title {
  margin-bottom: 18px;
  font-family: "Jost", "Segoe UI", sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--lh-ink);
}

.lh-panel-subtitle {
  margin-bottom: 22px;
  font-size: 14px;
  color: var(--lh-ink-soft);
}

/* —— Tab 切换 —— */
.lh-tabs {
  position: relative;
  display: flex;
  background: #F3F4F6;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 22px;
}

.lh-tab {
  flex: 1;
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--lh-ink-soft);
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.25s ease;
}

.lh-tab.active { color: var(--lh-orange); font-weight: 600; }
.lh-tab:focus-visible { outline: 2px solid var(--lh-orange); outline-offset: 2px; }

.lh-tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: var(--lh-card);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(33, 37, 41, 0.12);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.lh-tabs[data-active="register"] .lh-tab-indicator {
  transform: translateX(100%);
}

.lh-form-view { display: none; }

.lh-form-view.active {
  display: block;
  animation: lh-view-in 0.35s ease;
}

@keyframes lh-view-in {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Element UI 字段适配 ---------- */
.lh-panel .el-form-item {
  margin-bottom: 14px;
}

.lh-panel .el-form-item__label {
  padding-bottom: 6px;
  line-height: 1.4;
  font-family: "Jost", "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--lh-ink);
}

.lh-panel .el-input__inner {
  height: 44px;
  line-height: 44px;
  border: 1px solid var(--lh-line);
  border-radius: 8px;
  font-family: inherit;
  color: var(--lh-ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lh-panel .el-input__inner::placeholder { color: var(--lh-ink-muted); }

.lh-panel .el-input__inner:focus {
  border-color: var(--lh-orange);
  box-shadow: 0 0 0 3px rgba(253, 86, 15, 0.14);
}

.lh-panel .el-form-item__error {
  padding-top: 3px;
  font-size: 12px;
  color: var(--lh-danger);
}

/* —— 提交区：固定高度槽位 + 交叉淡化切换 —— */
.lh-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 16px;
}

.lh-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--lh-ink-soft);
  cursor: pointer;
}

.lh-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--lh-orange);
  cursor: pointer;
}

.lh-forgotten-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--lh-orange);
  text-decoration: none;
}

.lh-forgotten-link:hover { color: var(--lh-orange-deep); text-decoration: underline; }

.lh-btn-slot {
  position: relative;
  height: 48px;
}

.lh-btn-slot .btn {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  border: none;
  border-radius: 999px !important;
  padding: 13px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  background-color: var(--lh-ink) !important;
  color: #FFFFFF !important;
  box-shadow: 0 8px 18px rgba(33, 37, 41, 0.22);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.3s ease, opacity 0.18s ease;
}

.lh-btn-slot .btn:hover {
  background-color: #000000 !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(33, 37, 41, 0.28);
}

.lh-btn-slot .btn:active { transform: translateY(0) scale(0.97); }

.lh-btn-slot .btn:focus-visible {
  outline: 2px solid var(--lh-orange);
  outline-offset: 3px;
}

.lh-btn-slot .btn.lh-swap {
  opacity: 0;
  pointer-events: none;
}

.lh-btn-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--lh-ink);
  box-shadow: 0 8px 18px rgba(33, 37, 41, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s ease, background 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.lh-btn-orb.lh-in { opacity: 1; }

.lh-btn-orb.lh-go {
  background: #2E7D4F;
  box-shadow: 0 8px 18px rgba(46, 125, 79, 0.35);
}

/* 加载中：黑色圆 + 白色旋转描边 */
.lh-btn-orb.lh-spin {
  color: transparent;
}

.lh-btn-orb.lh-spin::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: lh-btn-spin 0.7s linear infinite;
}

@keyframes lh-btn-spin {
  to { transform: rotate(360deg); }
}

.lh-btn-orb svg {
  width: 22px;
  height: 22px;
}

.lh-btn-orb path {
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  animation: lh-btn-draw 0.4s ease 0.05s forwards;
}

@keyframes lh-btn-draw {
  to { stroke-dashoffset: 0; }
}

/* —— 第三方登录分隔 —— */
.lh-social {
  margin-top: 20px;
}

.lh-social-title {
  position: relative;
  margin-bottom: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--lh-ink-muted);
}

.lh-social-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: var(--lh-line);
}

.lh-social-title span {
  position: relative;
  padding: 0 10px;
  background: var(--lh-card);
  z-index: 1;
}

.lh-social { text-align: center; }

/* ---------- iframe 弹窗模式 ---------- */
.login-hero.lt-iframe {
  min-height: auto;
  margin-bottom: 30px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: block;
}

.login-hero.lt-iframe .lh-stage { display: none; }

.login-hero.lt-iframe .lh-panel { padding: 30px 34px; }

.login-hero.lt-iframe .lh-btn-orb {
  top: 50%;
  transform: translate(-50%, -50%);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1023px) {
  .login-hero {
    flex-direction: column;
    min-height: auto;
  }

  .lh-stage {
    flex: none;
    width: 100%;
    min-height: 300px;
    padding-bottom: 30px;
  }

  .lh-stage-heading { top: 6%; left: 6%; }
  .lh-stage-title { font-size: 19px; }
  .lh-stage-quote { display: none; }

  .lh-pet-cat { left: 12%; bottom: 9%; }
  .lh-pet-dog { right: 9%;  bottom: 7%; }

  .lh-pet-cat .lh-pet-svg { width: clamp(120px, 28vw, 155px); }
  .lh-pet-dog .lh-pet-svg { width: clamp(140px, 32vw, 175px); }

  .lh-deco.lh-d2 { display: none; }
  .lh-deco.lh-d1 { width: 26px; top: 6%; right: 7%; }
  .lh-deco.lh-d3 { width: 24px; bottom: 6%; left: 48%; }
  .lh-deco.lh-d4 { width: 19px; top: 40%; left: 44%; }
  .lh-deco.lh-d5 { width: 15px; top: 47%; left: 55%; }

  .lh-panel { padding: 24px 20px 30px; }
  .lh-panel-title { font-size: 22px; }
}

/* ---------- 动效减弱 ---------- */
@media (prefers-reduced-motion: reduce) {
  .lh-deco, .lh-pet.jump,
  .lh-cat-body, .lh-dog-body,
  .lh-cat-head, .lh-dog-head,
  .lh-cat-tail, .lh-dog-tail,
  .lh-ear,
  .lh-form-view.active,
  .lh-heart {
    animation: none;
  }

  .lh-pet.near .lh-pet-svg,
  .lh-pet.shy .lh-pet-svg { transform: none; }

  .lh-btn-orb path { stroke-dashoffset: 0; animation: none; }
}
