:root {
  --bg: #eef7f8;
  --ink: #0b2e2b;
  --muted: #5b7471;
  --teal: #0f766e;
  --teal-deep: #115e59;
  --coral: #e11d48;
  --sand: #fff7ed;
  --line: rgba(15, 118, 110, 0.14);
  --panel: rgba(255, 255, 255, 0.78);
  --shadow: 0 24px 60px rgba(15, 61, 56, 0.12);
  --radius: 22px;
  --font-display: "Outfit", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.page-home {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(160deg, #e8f8f6 0%, #f7fbfc 42%, #fff4ec 100%);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.7;
  animation: drift 12s ease-in-out infinite;
}
.blob-a {
  width: 420px; height: 420px;
  left: -120px; top: -80px;
  background: #99f6e4;
}
.blob-b {
  width: 360px; height: 360px;
  right: -80px; top: 10%;
  background: #fecdd3;
  animation-delay: -4s;
}
.blob-c {
  width: 280px; height: 280px;
  left: 35%; bottom: -60px;
  background: #fde68a;
  animation-delay: -7s;
}
.grid-noise {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(15, 118, 110, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 75%);
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(18px, -22px) scale(1.06); }
}

.stage {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 20px 56px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero {
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}

.hero-copy {
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-art {
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

.brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--teal-deep);
  letter-spacing: 0.02em;
}
.brand-kicker img {
  width: 28px;
  height: 28px;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  background: linear-gradient(120deg, #0b2e2b 20%, #0f766e 70%, #be123c 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0 0 28px;
  max-width: 34ch;
  font-size: 17px;
  color: var(--muted);
}

.redeem-box {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(10px);
}
.redeem-box label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  font-family: var(--font-display);
}

.input-row {
  display: flex;
  gap: 10px;
}
.input-row input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-row input::placeholder { color: #9bb0ad; }
.input-row input:focus {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.input-row button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 0 20px;
  background: linear-gradient(180deg, #14b8a6, var(--teal-deep));
  color: #ecfeff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.28);
  transition: transform 0.18s ease, filter 0.18s ease;
}
.input-row button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.input-row button:active { transform: translateY(1px); }
.input-row button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.tips {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.tips li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  color: var(--muted);
}
.tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f43f5e;
}

.result-panel {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.18);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
}
.result-panel.show {
  animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.result-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.result-badge strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
}
.result-badge p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.result-content {
  margin: 0 0 12px;
  white-space: pre-wrap;
  word-break: break-all;
  background: #f0fdfa;
  border: 1px dashed rgba(15, 118, 110, 0.28);
  border-radius: 14px;
  padding: 14px;
  font-size: 14px;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  color: var(--ink);
}
.copy-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  background: #fff1f2;
  color: var(--coral);
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
}
.copy-btn:hover { background: #ffe4e6; }

.hero-art { display: flex; justify-content: center; }
.art-frame {
  position: relative;
  width: min(100%, 520px);
}
.art-main {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 28px 40px rgba(15, 61, 56, 0.16));
  animation: floaty 5.5s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 50;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.toast.ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #99f6e4;
}
.toast.err {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

@media (max-width: 900px) {
  .stage { padding: 28px 16px 40px; align-items: flex-start; }
  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-art { order: -1; }
  .art-frame { width: min(100%, 380px); }
  .hero-copy h1 { font-size: clamp(34px, 10vw, 48px); }
  .lead { max-width: none; margin-bottom: 20px; }
}

@media (max-width: 560px) {
  .input-row { flex-direction: column; }
  .input-row button {
    width: 100%;
    justify-content: center;
    padding: 14px 18px;
  }
}
