* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, "Microsoft Yahei", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #9c27b0 0%, #c2185b 45%, #e91e63 100%);
  background-size: 200% 200%;
  animation: bgShift 12s ease infinite;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

@keyframes bgShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* 背景浮动光斑 */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 10s ease-in-out infinite;
}
.bg-orb-1 {
  width: 280px;
  height: 280px;
  background: #ff80ab;
  top: -60px;
  left: -40px;
}
.bg-orb-2 {
  width: 220px;
  height: 220px;
  background: #ce93d8;
  bottom: 10%;
  right: -50px;
  animation-delay: -3s;
  animation-duration: 14s;
}
.bg-orb-3 {
  width: 160px;
  height: 160px;
  background: #f48fb1;
  top: 40%;
  left: 15%;
  animation-delay: -6s;
  animation-duration: 11s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -24px) scale(1.08); }
}

.wrap {
  width: 100%;
  max-width: 820px;
  position: relative;
  z-index: 1;
}

.card {
  background: #fcf0f7;
  border-radius: 24px;
  padding: 48px 36px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(80, 0, 60, 0.25);
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-ready .card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 入场错落入场 */
.anim-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0s);
}

body.is-ready .anim-item {
  opacity: 1;
  transform: translateY(0);
}

/* 头部 Logo + 标题 */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.logo-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(145deg, #8b5cf6, #7b42f5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  position: relative;
  box-shadow: 0 8px 20px rgba(123, 66, 245, 0.35);
  animation: logoFloat 3.2s ease-in-out infinite;
}

.logo-icon::before {
  content: "📄";
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.title {
  font-size: 42px;
  color: #7b42f5;
  font-weight: 600;
}

.sub-desc {
  font-size: 18px;
  color: #555;
  margin-bottom: 32px;
  letter-spacing: 1px;
}

/* 红色提示条 */
.tip-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fce4e7;
  color: #d32f2f;
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 17px;
  margin-bottom: 30px;
  animation: tipPulse 2.4s ease-in-out infinite;
}

.tip-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d32f2f;
  animation: dotBlink 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes tipPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
  50% { box-shadow: 0 0 0 6px rgba(211, 47, 47, 0.08); }
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

/* 密码输入框组 */
.input-group {
  display: flex;
  width: 100%;
  max-width: 620px;
  margin: 0 auto 26px;
}

.pwd-input {
  flex: 1;
  height: 64px;
  border: 2px solid transparent;
  border-radius: 12px 0 0 12px;
  padding: 0 22px;
  font-size: 20px;
  outline: none;
  background: #fff;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.pwd-input:focus {
  border-color: #7b42f5;
  box-shadow: 0 0 0 3px rgba(123, 66, 245, 0.15);
}

.pwd-input.input-error {
  border-color: #e03e36;
  animation: inputFlash 0.5s ease;
}

@keyframes inputFlash {
  0%, 100% { background: #fff; }
  50% { background: #ffebee; }
}

.confirm-btn {
  width: 140px;
  height: 64px;
  background: #e03e36;
  color: #fff;
  border: none;
  border-radius: 0 12px 12px 0;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, background 0.25s, box-shadow 0.25s;
}

.confirm-btn:hover {
  background: #c62828;
  box-shadow: 0 6px 16px rgba(224, 62, 54, 0.35);
}

.confirm-btn:active {
  transform: scale(0.97);
}

.confirm-btn.btn-success {
  background: #00a86b;
}

/* 密码大全按钮 */
.pwd-all-btn {
  background: #f29c1f;
  color: #fff;
  border: none;
  padding: 16px 42px;
  border-radius: 12px;
  font-size: 20px;
  cursor: pointer;
  margin-bottom: 24px;
  transition: transform 0.2s, box-shadow 0.25s, background 0.25s;
  box-shadow: 0 4px 14px rgba(242, 156, 31, 0.35);
  animation: btnGlow 2.8s ease-in-out infinite;
}

.pwd-all-btn:hover {
  background: #e08a10;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(242, 156, 31, 0.45);
}

.pwd-all-btn:active,
.pwd-all-btn.btn-tap {
  transform: scale(0.96);
}

.pwd-all-btn .lock-icon {
  display: inline-block;
  animation: lockWiggle 2.5s ease-in-out infinite;
}

@keyframes btnGlow {
  0%, 100% { box-shadow: 0 4px 14px rgba(242, 156, 31, 0.35); }
  50% { box-shadow: 0 6px 22px rgba(242, 156, 31, 0.55); }
}

@keyframes lockWiggle {
  0%, 70%, 100% { transform: rotate(0); }
  75% { transform: rotate(-12deg); }
  85% { transform: rotate(10deg); }
  95% { transform: rotate(-4deg); }
}

.link-tip {
  color: #7b42f5;
  font-size: 17px;
  margin-bottom: 12px;
}

.update-tag {
  display: inline-block;
  background: #e9d8f4;
  color: #7b42f5;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 15px;
  margin-bottom: 36px;
  animation: tagBreath 3s ease-in-out infinite;
}

@keyframes tagBreath {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: 0.9; }
}

/* 底部统计数据行 */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-item {
  background: #fff;
  border-radius: 10px;
  padding: 14px 6px;
  transition: transform 0.25s, box-shadow 0.25s;
  animation: statPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.58s + var(--stat-delay, 0s));
}

body:not(.is-ready) .stat-item {
  animation: none;
  opacity: 0;
}

.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(123, 66, 245, 0.12);
}

@keyframes statPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.stat-num {
  font-size: 22px;
  font-weight: 600;
  color: #5528cc;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: #666;
}

/* 抖动反馈 */
.shake {
  animation: shakeX 0.45s ease;
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

/* 响应式适配手机 */
@media (max-width: 600px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .title {
    font-size: 30px;
  }
  .header {
    flex-direction: column;
  }
  .input-group {
    flex-direction: column;
  }
  .pwd-input,
  .confirm-btn {
    border-radius: 12px;
    width: 100%;
  }
  .confirm-btn {
    margin-top: 8px;
  }
  .card {
    padding: 36px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
