/* 满分星球 PC 登录页 — 设计稿：设计初稿/登陆页面.html */

.font-mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
  background: #fffcf9;
  color: #4b5563;
}

@media (min-width: 1024px) {
  .login-page {
    flex-direction: row;
  }
}

/* 左侧星空 */
.login-aside {
  display: none;
  position: relative;
  flex: 7;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 80px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.login-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(234, 88, 12, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(79, 70, 229, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

@media (min-width: 1024px) {
  .login-aside {
    display: flex;
  }
}

.login-star-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@keyframes login-star-flicker {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

.login-star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: login-star-flicker var(--d, 3s) infinite ease-in-out;
}

.login-aside-inner {
  position: relative;
  z-index: 2;
  max-width: 48rem;
  text-align: left;
}

.login-aside-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.2);
  color: #fb923c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.login-aside-title {
  margin: 0 0 40px;
  font-size: clamp(2rem, 4vw, 3.75rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.login-aside-title span.gradient {
  background: linear-gradient(to right, #fb923c, #ea580c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-feature-list {
  display: grid;
  gap: 32px;
  max-width: 36rem;
}

.login-feature {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.login-feature-icon {
  font-size: 1.875rem;
  flex-shrink: 0;
}

.login-feature h4 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.login-feature p {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

.login-aside-footer {
  position: absolute;
  bottom: 40px;
  left: 80px;
}

.login-aside-footer p {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #64748b;
  line-height: 1.7;
}

.login-aside-footer a {
  color: #f97316;
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-aside-footer a:hover {
  color: #ea580c;
}

.login-aside-footer a:focus-visible {
  outline: 2px solid rgba(249, 115, 22, 0.35);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 右侧表单区 */
.login-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* 初稿 main: p-12 → 48px */
  padding: 48px;
  position: relative;
  background: #fff;
  min-height: 100vh;
}

@media (min-width: 1024px) {
  .login-main {
    flex: 3;
    min-height: 0;
  }
}

.login-main-inner {
  width: 100%;
  /* 初稿 w-full max-w-sm → 24rem */
  max-width: 384px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}

.login-brand-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(to bottom right, #f97316, #ea580c);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 24px -8px rgba(234, 88, 12, 0.5);
  transition: transform 0.2s;
}

.login-brand-logo:hover {
  transform: scale(1.05);
}

.login-brand h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-style: italic;
}

.login-brand h1 .dark {
  color: #0f172a;
}

.login-brand h1 .accent {
  color: #ea580c;
}

.login-brand-sub {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 900;
  color: #94a3b8;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

/* 登录方式标题：对齐初稿 tab 行 text-xs font-black + mb-8 border-b + active 下划线 */
.login-mode-title {
  position: relative;
  margin: 0 0 32px;
  padding: 8px 0 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  color: #ea580c;
  border-bottom: 1px solid #f8fafc;
}

.login-mode-title::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: #ea580c;
  border-radius: 999px;
}

.login-panel {
  display: none;
}

/* 必须用 flex，否则 .login-panel-stack 的 gap 不生效（勿用 block 盖住 flex） */
.login-panel.is-active {
  display: flex;
  flex-direction: column;
}

/* 初稿 section-sms: space-y-4 → 16px */
.login-panel-stack {
  gap: 16px;
}

/* Inputs */
.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 48px;
}

.login-input-wrap .login-input-icon {
  position: absolute;
  left: 16px;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.3s;
  z-index: 1;
}

.login-input {
  width: 100%;
  height: 48px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding-left: 46px;
  padding-right: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  outline: none;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

/* 占位符：设计稿为灰色（slate-400），与输入正文区分 */
.login-input::placeholder {
  color: #94a3b8;
  font-weight: 700;
  opacity: 1;
}

.login-input::-webkit-input-placeholder {
  color: #94a3b8;
  font-weight: 700;
}

.login-input::-moz-placeholder {
  color: #94a3b8;
  font-weight: 700;
  opacity: 1;
}

.login-input:focus {
  border-color: #ea580c;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.08);
}

.login-input:focus ~ .login-input-icon,
.login-input-wrap:focus-within .login-input-icon {
  color: #ea580c;
}

/* 初稿: flex items-center gap-2 h-[48px] */
.login-row-2 {
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: 48px;
}

.login-row-2 .login-input-wrap {
  flex: 1;
  min-height: 0;
}

/* 初稿 w-28 shrink-0 h-full → 7rem=112px，验证码图 object-contain 避免裁切 */
.login-captcha-box,
.login-sms-btn {
  flex-shrink: 0;
  width: 112px;
  height: 48px;
  box-sizing: border-box;
}

.login-captcha-box {
  background: #f8fafc;
  /* rounded-xl */
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 2px;
}

.login-captcha-box img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.login-sms-btn {
  background: #f8fafc;
  border-radius: 12px;
  /* 初稿 text-[11px] font-bold text-slate-400 */
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
  transition: color 0.2s, background 0.2s;
  padding: 0 2px;
  line-height: 1.2;
}

.login-sms-btn:hover:not(:disabled) {
  color: #ea580c;
  background: #fff7ed;
}

.login-sms-btn:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.login-submit-wrap {
  padding-top: 16px;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border-radius: 9999px;
  background: #ea580c;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-submit:hover:not(:disabled) {
  background: #f97316;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(234, 88, 12, 0.2);
}

.login-submit:active:not(:disabled) {
  transform: scale(0.96);
}

.login-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* 协议 */
.login-agree {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-agree input {
  width: 14px;
  height: 14px;
  accent-color: #ea580c;
}

.login-agree label {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
}

.login-agree-sep {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
}

button.legal-link {
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #fb923c;
  cursor: pointer;
  text-decoration: none;
}

button.legal-link:hover {
  text-decoration: underline;
}

.login-agree-error {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #dc2626;
  margin-top: 8px;
  min-height: 16px;
}

.login-agree-error:empty {
  display: none;
}

/* 法务弹窗 */
.legal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.legal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.legal-modal {
  background: #fff;
  width: 100%;
  max-width: 36rem;
  height: 560px;
  max-height: 90vh;
  border-radius: 48px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.legal-overlay.is-open .legal-modal {
  transform: scale(1);
}

.legal-modal-head {
  padding: 40px 40px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.legal-modal-head h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.legal-modal-bar {
  width: 8px;
  height: 24px;
  background: #ea580c;
  border-radius: 999px;
}

.legal-modal-close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  transition: color 0.2s;
}

.legal-modal-close:hover {
  color: #ea580c;
}

.legal-modal-body-wrap {
  flex: 1;
  min-height: 0;
  padding: 16px 40px;
  position: relative;
}

.legal-modal-body {
  height: 100%;
  overflow-y: auto;
  padding-right: 16px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
}

.legal-modal-body::-webkit-scrollbar {
  width: 6px;
}

.legal-modal-body::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 10px;
}

.legal-modal-body::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}

.legal-modal-foot {
  padding: 32px 40px;
  flex-shrink: 0;
}

.legal-modal-foot button {
  box-sizing: border-box;
  width: 100%;
  max-height: 48px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ea580c;
  color: #fff;
  border: none;
  border-radius: 16px;
  font-weight: 900;
  font-size: 15px;
  line-height: 1.25;
  box-shadow: 0 10px 15px -3px rgba(234, 88, 12, 0.15);
  transition: background 0.2s, transform 0.15s;
}

.legal-modal-foot button:hover {
  background: #f97316;
}

.legal-modal-foot button:active {
  transform: scale(0.98);
}

.legal-section h4 {
  margin: 0 0 8px;
  font-weight: 900;
  color: #1e293b;
  text-decoration: underline;
  text-decoration-color: rgba(234, 88, 12, 0.3);
  text-underline-offset: 4px;
}

.legal-section p {
  margin: 0 0 24px;
}

/* 动效 */
@keyframes login-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

.login-shake-once {
  animation: login-shake 0.45s ease;
}

.login-field-error {
  border-color: #f87171 !important;
}
