/* Keep the native redemption flow; only make its purchase link more visible. */
#root:empty {
  display: grid;
  min-height: 100svh;
  place-items: center;
  background: var(--background, #f8fafc);
  color: var(--muted-foreground, #64748b);
}

#root:empty::before {
  content: '正在加载...';
  font-size: 0.95rem;
  letter-spacing: 0;
}

#root:empty::after {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: '';
  animation: new-api-loading-spin 0.8s linear infinite;
  transform: translateY(2rem);
}

@keyframes new-api-loading-spin {
  to {
    transform: translateY(2rem) rotate(360deg);
  }
}
.border-t:has(#redemption-code) {
  position: relative;
  margin-top: 1rem !important;
  padding: 1.75rem !important;
  overflow: hidden;
  border: 1px solid rgba(20, 184, 166, 0.28) !important;
  border-radius: 1rem !important;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.98), rgba(239, 246, 255, 0.98)) !important;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.08);
}

.dark .border-t:has(#redemption-code) {
  border-color: rgba(45, 212, 191, 0.26) !important;
  background: linear-gradient(135deg, rgba(15, 61, 63, 0.7), rgba(22, 38, 63, 0.82)) !important;
}

.border-t:has(#redemption-code)::before {
  display: block;
  margin-bottom: 0.4rem;
  color: #0f766e;
  content: '充值余额';
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.5;
}

.dark .border-t:has(#redemption-code)::before {
  color: #5eead4;
}

.border-t:has(#redemption-code)::after {
  display: block;
  margin-bottom: 1.35rem;
  color: #0f172a;
  content: '购买兑换码后，在上方输入并兑换';
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.35;
}

.dark .border-t:has(#redemption-code)::after {
  color: #f8fafc;
}

.border-t:has(#redemption-code) > div:first-child {
  display: none !important;
}

.border-t:has(#redemption-code) > div:has(#redemption-code) {
  position: relative;
  z-index: 1;
  margin-top: 0 !important;
}

.border-t:has(#redemption-code) #redemption-code {
  min-height: 3.35rem;
  padding-inline: 1rem;
  border-color: rgba(100, 116, 139, 0.35);
  background: rgba(255, 255, 255, 0.82);
  color: #0f172a !important;
  font-size: 1.1rem;
}

.border-t:has(#redemption-code) #redemption-code::placeholder {
  color: #475569 !important;
  opacity: 1;
}

.dark .border-t:has(#redemption-code) #redemption-code {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: #f8fafc !important;
}

.dark .border-t:has(#redemption-code) #redemption-code::placeholder {
  color: #cbd5e1 !important;
}

.border-t:has(#redemption-code) #redemption-code + button {
  min-height: 3.35rem;
  padding-inline: 1.4rem;
  background: #0f9f96;
  color: #fff;
  font-weight: 800;
}

.border-t:has(#redemption-code) #redemption-code + button:hover {
  background: #0d8b84;
}

.border-t:has(#redemption-code) > p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(100, 116, 139, 0.2);
  color: #475569;
  font-size: 0;
  line-height: 1.4;
}

.dark .border-t:has(#redemption-code) > p {
  color: #cbd5e1;
  border-top-color: rgba(148, 163, 184, 0.2);
}

.border-t:has(#redemption-code) > p::before {
  content: '还没有兑换码？';
  font-size: 1rem;
}

.border-t:has(#redemption-code) > p > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.65rem 1.35rem;
  border-radius: 0.65rem;
  background: #0f9f96;
  color: #fff !important;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none !important;
  white-space: nowrap;
}

.border-t:has(#redemption-code) > p > a:hover {
  background: #0d8b84;
}

.border-t:has(#redemption-code) > p > a > svg {
  display: none;
}

.border-t:has(#redemption-code) > p > a {
  font-size: 0;
}

.border-t:has(#redemption-code) > p > a::before {
  content: '打开购买页面';
  font-size: 1rem;
}

@media (max-width: 640px) {
  .border-t:has(#redemption-code) {
    padding: 1.25rem !important;
  }

  .border-t:has(#redemption-code)::after {
    font-size: 1.2rem;
  }

  .border-t:has(#redemption-code) > p {
    align-items: stretch;
    flex-direction: column;
  }

  .border-t:has(#redemption-code) > p > a {
    width: 100%;
  }
}
