:root {
  --bg-top: #f7faff;
  --bg-bottom: #eef4ff;
  --panel: rgba(255, 255, 255, 0.82);
  --line: rgba(148, 163, 184, 0.22);
  --text: #111827;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --shadow: 0 24px 70px rgba(37, 99, 235, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.14), transparent 34%),
    radial-gradient(circle at bottom right, rgba(191, 219, 254, 0.38), transparent 30%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}

.page-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.18) 0%, rgba(96, 165, 250, 0) 70%);
  filter: blur(18px);
  pointer-events: none;
}

.page-glow-left {
  top: -80px;
  left: -100px;
}

.page-glow-right {
  right: -140px;
  bottom: -140px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.18) 0%, rgba(125, 211, 252, 0) 72%);
}

.redeem-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.redeem-shell {
  width: min(100%, 560px);
  padding: 34px 34px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.redeem-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(37, 99, 235, 0.28), rgba(255, 255, 255, 0.7));
}

.redeem-brand {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding: 4px 0 6px;
}

.brand-badge {
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.redeem-brand h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.05;
  color: var(--text);
  letter-spacing: -0.03em;
}

.code-form {
  display: block;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.field-row:focus-within {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow:
    0 0 0 5px rgba(37, 99, 235, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

.code-input {
  width: 100%;
  height: 58px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0.01em;
}

.code-input::placeholder {
  color: #9ca3af;
}

.code-submit {
  flex: 0 0 122px;
  height: 56px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.24);
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.code-submit:hover {
  filter: brightness(1.04);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
}

.code-submit:active {
  transform: translateY(1px);
}

.form-hint {
  min-height: 20px;
  margin: 2px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.form-hint.is-error {
  color: #d92d20;
}

@media (max-width: 520px) {
  .redeem-shell {
    width: 100%;
    padding: 28px 18px 22px;
  }

  .field-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .code-submit {
    width: 100%;
    flex-basis: auto;
  }
}
