/* OneBlog Admin 登录页 — 移植自 OneImg 登录风格 */
:root {
  --accent: #0d7377;
  --accent-2: #14919b;
  --font: "Outfit", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Fraunces", "Songti SC", "STSong", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.login-body {
  --login-text: #f4faf8;
  --login-muted: rgba(244, 250, 248, 0.78);
  font-family: var(--font);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px 28px;
  overflow: hidden;
  color: var(--login-text);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Dual-layer wallpaper host: solid base + crossfade top layer */
.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  --hero-bg-crossfade-duration: 2s;
  --hero-bg-crossfade-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.login-bg::before,
.login-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  backface-visibility: hidden;
  transform: scale(1.06) translateZ(0);
  transform-origin: center center;
  animation: login-bg-breathing 8s ease-in-out 2s infinite;
}

.login-bg::before {
  background-image: var(--hero-bg-image-1, none);
  opacity: var(--hero-bg-opacity-1, 1);
  z-index: 0;
  transition: none;
}

.login-bg::after {
  background-image: var(--hero-bg-image-2, none);
  opacity: 0;
  z-index: 1;
  will-change: opacity;
  transition: opacity var(--hero-bg-crossfade-duration) var(--hero-bg-crossfade-ease);
}

.login-bg.hero-bg-incoming::after { opacity: 1; }

.login-bg.hero-bg-no-transition::before,
.login-bg.hero-bg-no-transition::after {
  transition: none !important;
}

.login-bg.is-hero-bg-transitioning::before,
.login-bg.is-hero-bg-transitioning::after,
.login-bg.paused::before,
.login-bg.paused::after {
  animation-play-state: paused;
}

.login-bg-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 20, 22, 0.42) 0%, rgba(7, 20, 22, 0.28) 45%, rgba(7, 20, 22, 0.55) 100%),
    radial-gradient(900px 520px at 12% 18%, rgba(232, 223, 208, 0.08), transparent 58%);
}

@keyframes login-bg-breathing {
  0%, 100% { transform: scale(1.06) translateZ(0); }
  50% { transform: scale(1.08) translateZ(0); }
}

@keyframes loginRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  @keyframes login-bg-breathing {
    0%, 100% { transform: scale(1.04) translateZ(0); }
    50% { transform: scale(1.06) translateZ(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-bg::before,
  .login-bg::after { animation: none !important; }
  .login-bg { --hero-bg-crossfade-duration: 0.01s; }
}

.login-stage {
  position: relative;
  z-index: 2;
  width: min(100%, 440px);
  animation: loginRise 0.7s ease both;
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}
.login-brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.16);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f7f3ea;
  animation: loginRise 0.75s ease 0.08s both;
}
.login-brand h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #f7f3ea;
  margin-bottom: 10px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  animation: loginRise 0.75s ease 0.12s both;
}
.login-brand p {
  font-size: 15px;
  color: var(--login-muted);
  letter-spacing: 0.01em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
  animation: loginRise 0.75s ease 0.18s both;
}

.login-panel {
  position: relative;
  padding: 28px 26px 24px;
  border-radius: 20px;
  background: rgba(8, 18, 22, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  animation: loginRise 0.8s ease 0.22s both;
}

.login-panel .input-group { margin-bottom: 18px; }
.login-panel .input-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: rgba(244, 250, 248, 0.82);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.login-panel .input-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  color: #0b1f24;
  background: rgba(247, 243, 234, 0.94);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.login-panel .input-group input::placeholder {
  color: rgba(11, 31, 36, 0.4);
}
.login-panel .input-group input:focus {
  border-color: rgba(15, 110, 106, 0.55);
  box-shadow: 0 0 0 3px rgba(15, 110, 106, 0.22);
  transform: translateY(-1px);
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #14827c 0%, #0d5f5b 100%);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(7, 20, 22, 0.35);
}
.btn-login:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-panel .error-message {
  display: none;
  margin-top: 14px;
  text-align: center;
  color: #ffb4a8;
  font-size: 13px;
}
.login-panel .error-message.countdown { color: #ffd59a; }

.login-footer {
  position: relative;
  z-index: 2;
  margin-top: 28px;
  font-size: 12px;
  color: rgba(244, 250, 248, 0.62);
  text-align: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
  animation: loginRise 0.8s ease 0.3s both;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.login-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.login-footer a:hover {
  color: #f7f3ea;
  border-bottom-color: rgba(247, 243, 234, 0.45);
  text-decoration: none;
}
.login-version {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", "Consolas", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(244, 250, 248, 0.42);
}

@media (max-width: 480px) {
  .login-body { padding: 24px 16px 20px; }
  .login-panel { padding: 24px 20px 20px; }
  .login-panel .input-group input { font-size: 16px; }
}
