﻿:root {
  --login-bg: #f8fafc;
  --panel-border: #eceff5;
  --panel-shadow: 0 24px 60px rgba(15, 39, 71, 0.08);
  --input-border: #e4e8f0;
  --text-main: #111827;
  --text-muted: #6b7280;
}

* {
  box-sizing: border-box;
}

body.login-page {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--login-bg);
  color: var(--text-main);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(580px, 1.14fr) minmax(420px, 0.86fr);
  background: var(--login-bg);
}

.login-visual-panel {
  position: relative;
  overflow: hidden;
  padding: 34px 56px 28px 58px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(135deg, #b5bac2 0%, #969fac 42%, #828d9b 100%);
}

.login-visual-panel::before,
.login-visual-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.login-visual-panel::before {
  width: 460px;
  height: 460px;
  left: -180px;
  bottom: -150px;
  background: rgba(255, 255, 255, 0.1);
}

.login-visual-panel::after {
  width: 260px;
  height: 260px;
  right: 60px;
  top: 110px;
  background: rgba(255, 255, 255, 0.09);
}

.visual-brand,
.visual-copy,
.character-stage,
.visual-links {
  position: relative;
  z-index: 2;
}

.visual-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
}

.visual-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-weight: 800;
  font-size: 1.1rem;
}

.visual-brand-text strong,
.visual-brand-text em {
  display: block;
  font-style: normal;
}

.visual-brand-text em {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
}

.visual-copy {
  margin-top: 48px;
}

.visual-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.visual-copy h1 {
  margin: 18px 0 0;
  font-size: 4rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.visual-copy p {
  max-width: 510px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.72;
  font-size: 1.02rem;
}

.visual-tags {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.visual-tags span {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.84rem;
  font-weight: 700;
}

.character-stage {
  position: relative;
  width: 550px;
  max-width: 100%;
  height: 400px;
  margin: 0 auto;
}

.stage-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.22;
}

.stage-glow {
  position: absolute;
  border-radius: 50%;
}

.glow-left {
  width: 380px;
  height: 380px;
  left: -100px;
  bottom: -80px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
}

.glow-right {
  width: 280px;
  height: 280px;
  right: 34px;
  top: 36px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
}

.character {
  position: absolute;
  bottom: 0;
  transform-origin: bottom center;
  transition: transform 0.7s ease, height 0.7s ease, left 0.7s ease;
}

.character::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 86%;
  height: 18px;
  transform: translateX(-50%);
  background: rgba(7, 20, 54, 0.18);
  border-radius: 999px;
  filter: blur(6px);
  z-index: -1;
}

.character-purple {
  left: 78px;
  width: 180px;
  height: 400px;
  border-radius: 10px 10px 0 0;
  background: #6c3ff5;
  z-index: 1;
}

.character-black {
  left: 248px;
  width: 120px;
  height: 310px;
  border-radius: 8px 8px 0 0;
  background: #2d2d2d;
  z-index: 2;
}

.character-orange {
  left: 8px;
  width: 240px;
  height: 200px;
  border-radius: 120px 120px 0 0;
  background: #ff9b6b;
  z-index: 3;
}

.character-yellow {
  left: 328px;
  width: 140px;
  height: 230px;
  border-radius: 70px 70px 0 0;
  background: #e8d754;
  z-index: 4;
}

.character-eyes,
.dot-eyes {
  position: absolute;
  display: flex;
  align-items: center;
  transition: all 0.2s ease-out;
}

.character-purple .character-eyes {
  left: 45px;
  top: 40px;
  gap: 32px;
}

.character-black .character-eyes {
  left: 26px;
  top: 32px;
  gap: 24px;
}

.character-orange .dot-eyes {
  left: 82px;
  top: 90px;
  gap: 34px;
}

.character-yellow .dot-eyes {
  left: 52px;
  top: 40px;
  gap: 26px;
}

.eye {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.eye.small {
  width: 16px;
  height: 16px;
}

.pupil {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #2d2d2d;
  transition: transform 0.1s ease-out;
}

.pupil.small {
  width: 6px;
  height: 6px;
}

.dot-eye {
  width: 12px;
  height: 12px;
  display: grid;
  place-items: center;
}

.dot-pupil {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #2d2d2d;
  transition: transform 0.1s ease-out;
}

.mouth-line {
  position: absolute;
  left: 40px;
  top: 88px;
  width: 60px;
  height: 4px;
  border-radius: 999px;
  background: #2d2d2d;
}

.floating-card {
  position: absolute;
  min-width: 196px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 28px rgba(9, 23, 58, 0.18);
  z-index: 6;
}

.floating-card strong,
.floating-card span {
  display: block;
}

.floating-card strong {
  font-size: 0.92rem;
}

.floating-card span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  line-height: 1.5;
}

.floating-card-top {
  top: 12px;
  right: 8px;
}

.floating-card-bottom {
  left: 10px;
  bottom: 18px;
}

.visual-links {
  display: flex;
  gap: 32px;
  align-items: center;
  color: rgba(31, 41, 55, 0.78);
  font-size: 0.92rem;
}

.visual-links a {
  color: rgba(31, 41, 55, 0.78);
  text-decoration: none;
}

.visual-links a:hover {
  color: #111827;
}

.login-form-panel {
  display: grid;
  place-items: center;
  padding: 42px 56px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 42px 38px 36px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-shadow);
}

.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  color: #17345e;
  font-weight: 700;
}

.login-card-header {
  margin-bottom: 28px;
  text-align: center;
}

.login-card-header h2 {
  margin: 0;
  font-size: 2.32rem;
  letter-spacing: -0.04em;
}

.login-card-header p {
  margin: 12px 0 0;
  color: var(--text-muted);
}

.login-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff1f1;
  border: 1px solid #f3c6c6;
  color: #c53a3a;
  font-size: 0.92rem;
}

.login-form {
  display: grid;
  gap: 20px;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field label {
  font-size: 0.92rem;
  font-weight: 700;
}

.login-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: #fff;
  font: inherit;
  color: var(--text-main);
  box-shadow: inset 0 1px 2px rgba(15, 39, 71, 0.03);
}

.login-input:focus {
  outline: none;
  border-color: #8fb4ff;
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.12);
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap .login-input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.toggle-eye {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
  margin: 0 auto;
  border: 2px solid #7a8798;
  border-radius: 999px;
}

.toggle-eye::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #7a8798;
}

.password-toggle.is-open .toggle-eye::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 2px;
  height: 18px;
  transform: translateX(-50%) rotate(45deg);
  background: #7a8798;
}

.login-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: -2px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.meta-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 148px;
  gap: 14px;
  align-items: end;
}

.captcha-image {
  width: 148px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--input-border);
  background: #fff;
  object-fit: cover;
  cursor: pointer;
}

.submit-button {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 54px;
  margin-top: 6px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.submit-text,
.submit-hover {
  transition: all 0.3s ease;
}

.submit-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  opacity: 0;
  transform: translateY(100%);
}

.submit-button:hover .submit-text {
  opacity: 0;
  transform: translateY(-100%);
}

.submit-button:hover .submit-hover {
  opacity: 1;
  transform: translateY(0);
}

.login-card-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #edf2f8;
  text-align: center;
  color: #7a8798;
  font-size: 0.84rem;
}

#character-stage[data-state="watch"] .character-purple,
#character-stage[data-state="cover"] .character-purple {
  height: 440px;
}

#character-stage[data-state="watch"] .character-purple,
#character-stage[data-state="cover"] .character-black {
  transform: skewX(-8deg);
}

#character-stage[data-state="watch"] .character-black {
  transform: skewX(4deg);
}

#character-stage[data-state="watch"] .character-orange,
#character-stage[data-state="watch"] .character-yellow {
  transform: translateY(-4px);
}

#character-stage[data-state="peek"] .character-purple {
  transform: translateX(40px);
}

#character-stage[data-state="peek"] .character-black {
  transform: translateX(14px);
}

#character-stage[data-state="peek"] .character-purple .character-eyes {
  left: 20px;
  top: 35px;
}

#character-stage[data-state="peek"] .character-black .character-eyes {
  left: 10px;
  top: 28px;
}

#character-stage[data-state="peek"] .character-orange .dot-eyes,
#character-stage[data-state="peek"] .character-yellow .dot-eyes {
  transform: translate(-16px, -10px);
}

#character-stage[data-state="cover"] .character-purple {
  transform: skewX(-12deg) translateX(40px);
}

#character-stage[data-state="cover"] .character-black {
  transform: skewX(10deg) translateX(20px);
}

#character-stage[data-state="cover"] .character-orange,
#character-stage[data-state="cover"] .character-yellow {
  transform: translateY(-8px);
}

#character-stage[data-error="true"] .character {
  animation: login-shake 0.52s ease-in-out 2;
}

@keyframes login-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px) rotate(-2deg); }
  40% { transform: translateX(8px) rotate(2deg); }
  60% { transform: translateX(-6px) rotate(-1deg); }
  80% { transform: translateX(6px) rotate(1deg); }
}

@media (max-width: 1180px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-visual-panel {
    min-height: 560px;
    padding: 32px 26px;
  }

  .character-stage {
    width: 460px;
    height: 340px;
  }

  .character-purple {
    left: 62px;
    width: 148px;
    height: 334px;
  }

  .character-black {
    left: 208px;
    width: 100px;
    height: 256px;
  }

  .character-orange {
    width: 196px;
    height: 162px;
    border-radius: 98px 98px 0 0;
  }

  .character-yellow {
    left: 268px;
    width: 120px;
    height: 192px;
    border-radius: 60px 60px 0 0;
  }

  .login-form-panel {
    padding: 24px 20px 36px;
  }
}

@media (max-width: 720px) {
  .visual-copy h1 {
    font-size: 2.6rem;
  }

  .character-stage {
    width: 320px;
    height: 250px;
  }

  .character-purple {
    left: 42px;
    width: 96px;
    height: 236px;
  }

  .character-black {
    left: 132px;
    width: 66px;
    height: 180px;
  }

  .character-orange {
    width: 138px;
    height: 114px;
    border-radius: 69px 69px 0 0;
  }

  .character-yellow {
    left: 174px;
    width: 82px;
    height: 132px;
    border-radius: 41px 41px 0 0;
  }

  .floating-card {
    display: none;
  }

  .visual-links {
    gap: 18px;
    font-size: 0.84rem;
  }

  .captcha-row {
    grid-template-columns: 1fr;
  }

  .captcha-image {
    width: 100%;
  }

  .login-card {
    padding: 28px 22px;
    border-radius: 24px;
  }
}
