* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body {
  background-color: var(--fj-bg-root);
  color: var(--fj-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

.fj-ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] .fj-ambient-glow {
  background: radial-gradient(circle, rgba(255, 107, 53, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
}

.fj-auth-header {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--fj-page-max-width, 1200px));
  box-sizing: border-box;
  padding: 24px var(--fj-page-padding-x, 32px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}
/* 全站顶栏由 fj-site-chrome 接管；以下仅保留旧版 .fj-auth-header 壳（当前登录页未使用） */
.fj-auth-header .fj-logo {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--fj-text-primary);
}
.fj-auth-header .fj-logo-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--fj-border-base);
  background-image: url("/luntan/assets/logo-real.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.fj-auth-header .fj-theme-toggle {
  background: transparent;
  border: none;
  color: var(--fj-text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.2s;
}
.fj-auth-header .fj-theme-toggle:hover { color: var(--fj-text-primary); }

.fj-auth-scene {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  z-index: 1;
}
.fj-auth-card-wrapper {
  width: 100%;
  max-width: 420px;
  min-height: 560px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s var(--fj-ease-flip);
}
.fj-auth-card-wrapper.flipped { transform: rotateY(180deg); }
.fj-auth-face {
  width: 100%;
  min-height: 560px;
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(18, 18, 18, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--fj-border-base);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
[data-theme="light"] .fj-auth-face { background: rgba(255, 255, 255, 0.82); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); }
.fj-auth-back { transform: rotateY(180deg); }

.fj-auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 8px; }
.fj-auth-subtitle { font-size: 0.85rem; text-align: center; color: var(--fj-text-secondary); margin-bottom: 24px; }
.fj-form-group { position: relative; margin-bottom: 16px; }
.fj-input {
  width: 100%;
  background: var(--fj-bg-hover);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--fj-text-primary);
  font-size: 1rem;
  padding: 24px 16px 8px;
  transition: all 0.2s var(--fj-ease-out);
}
.fj-input:focus {
  border-color: var(--fj-orange-500);
  background: var(--fj-bg-surface);
  box-shadow: 0 0 0 2px var(--fj-orange-glow);
}
.fj-floating-label {
  position: absolute;
  left: 16px;
  top: 16px;
  color: var(--fj-text-tertiary);
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.2s var(--fj-ease-out);
  transform-origin: left top;
}
.fj-input:focus ~ .fj-floating-label,
.fj-input:not(:placeholder-shown) ~ .fj-floating-label {
  transform: translateY(-10px) scale(0.75);
  color: var(--fj-text-secondary);
}
.fj-input:focus ~ .fj-floating-label { color: var(--fj-orange-500); }

.fj-form-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -4px;
  margin-bottom: 20px;
  font-size: 0.8rem;
}
.fj-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fj-text-secondary);
}
.fj-check input[type="checkbox"] { accent-color: var(--fj-orange-500); }
.fj-auth-link { color: var(--fj-text-primary); text-decoration: none; cursor: pointer; transition: 0.2s; }
.fj-auth-link:hover { color: var(--fj-orange-500); }

.fj-btn-submit {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--fj-orange-500);
  color: #fff;
  border: none;
  cursor: pointer;
  margin-top: 6px;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px var(--fj-orange-glow);
}
.fj-btn-submit:active { transform: scale(0.96); }
.fj-btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.fj-auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--fj-text-secondary);
}

.fj-forgot-panel {
  margin-top: 12px;
  border: 1px solid var(--fj-border-base);
  border-radius: 10px;
  padding: 10px;
  background: var(--fj-bg-hover);
}
.fj-forgot-panel.is-hidden { display: none; }
.fj-forgot-title { font-size: 12px; color: var(--fj-text-secondary); margin-bottom: 8px; }
.fj-forgot-actions { display: flex; gap: 8px; margin-top: 4px; }
.fj-btn-ghost-sm {
  border: 1px solid var(--fj-border-base);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--fj-text-secondary);
  background: transparent;
  cursor: pointer;
}
.fj-btn-ghost-sm:hover { border-color: var(--fj-orange-500); color: var(--fj-text-primary); }

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

.fj-skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--fj-bg-elevated);
  color: var(--fj-text-primary);
  border: 1px solid var(--fj-border-base);
  border-radius: 6px;
  transform: translateY(-140%);
  transition: transform var(--fj-duration-fast) var(--fj-ease-out);
}
.fj-skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--fj-orange-500);
  outline-offset: 2px;
}

.fj-locale-bar {
  position: absolute;
  top: 12px;
  right: var(--fj-page-padding-x, 32px);
  z-index: 99;
  display: flex;
  gap: 6px;
}
.fj-locale-btn {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--fj-border-base);
  background: var(--fj-bg-surface);
  color: var(--fj-text-secondary);
  cursor: pointer;
}
.fj-locale-btn.is-active {
  color: var(--fj-orange-500);
  border-color: var(--fj-orange-500);
}

.fj-auth-scene .fj-input:focus-visible {
  outline: 2px solid var(--fj-orange-500);
  outline-offset: 2px;
}
