/* Spark · 配对页 */

.pair-page {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #ffe2ec 0%, #fff4ec 50%, #ffe7d6 100%);
  padding: 40px 24px;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.pair-page[hidden] { display: none; }

.pair-illustration {
  width: 260px;
  height: 180px;
  margin-bottom: 24px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}

.pair-dog {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(43, 38, 34, 0.1));
  animation: pairFloat 3s ease-in-out infinite;
}

.pair-dog-right {
  animation-delay: 0.5s;
}

.pair-heart {
  width: 32px;
  height: 32px;
  align-self: center;
  margin: 0 -8px;
  animation: heartbeat 1.6s ease-in-out infinite;
  z-index: 2;
}

.pair-heart svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 6px rgba(255, 138, 154, 0.4));
}

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

.pair-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink-dark);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.pair-subtitle {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 280px;
}

.pair-code-input {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.pair-digit {
  width: 52px;
  height: 60px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(43, 38, 34, 0.08);
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  color: var(--ink-dark);
  font-family: var(--font-cn);
  transition: all 0.2s ease;
  caret-color: var(--accent-coral);
}

.pair-digit:focus {
  outline: none;
  border-color: var(--accent-coral);
  background: white;
  transform: translateY(-2px);
}

.pair-digit.error {
  border-color: #e74c3c;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.pair-button {
  background: linear-gradient(135deg, var(--accent-coral) 0%, var(--accent-warm) 100%);
  color: white;
  padding: 14px 48px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(255, 138, 154, 0.35);
  transition: all 0.25s ease;
}

.pair-button:active {
  transform: scale(0.96);
  box-shadow: 0 4px 10px rgba(255, 138, 154, 0.35);
}

.pair-hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--ink-fade);
  max-width: 280px;
  line-height: 1.6;
}

.pair-hint strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.pair-error {
  color: #e74c3c;
  font-size: 13px;
  margin-bottom: 16px;
  min-height: 18px;
  font-weight: 500;
}