:root {
  --bg0: #0a0b0f;
  --bg1: rgba(255, 255, 255, 0.02);
  --stroke0: rgba(255, 255, 255, 0.08);
  --stroke1: rgba(255, 255, 255, 0.06);

  --text0: #f5f5f0;
  --text1: #e2e8f0;
  --text2: #94a3b8;
  --text3: #64748b;
  --text4: #475569;

  --amber: #f59e0b;
  --amber2: rgba(245, 158, 11, 0.12);
  --green: #10b981;
  --green2: rgba(16, 185, 129, 0.12);
  --violet: #8b5cf6;
  --violet2: rgba(139, 92, 246, 0.12);

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Liberation Sans", sans-serif;
  --serif: ui-serif, Georgia, "Times New Roman", Times, serif;
}

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

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.25;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.45;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg0);
  color: var(--text1);
  font-family: var(--sans);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:hover {
  filter: brightness(1.12);
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.page {
  width: 100%;
  min-height: 100vh;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-inner {
  position: relative;
  width: 100%;
  max-width: 760px;
  text-align: center;
  animation: fadeUp 450ms ease-out both;
}

.glow {
  position: absolute;
  top: 32%;
  left: 50%;
  width: 560px;
  height: 560px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
  animation: glowPulse 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.icon {
  font-size: 44px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 48px;
  color: var(--text0);
  letter-spacing: -0.02em;
  margin: 0 0 12px 0;
  position: relative;
  z-index: 1;
}

.sub {
  margin: 0 auto 44px auto;
  max-width: 520px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text2);
  position: relative;
  z-index: 1;
}

.steps {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.card {
  flex: 1 1 220px;
  max-width: 250px;
  background: var(--bg1);
  border: 1px solid var(--stroke1);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: left;
}

.num {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.card-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text0);
}

.card-desc {
  margin: 0 0 14px 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text3);
}

.foot {
  margin-top: 44px;
  font-size: 12px;
  color: var(--text4);
  font-style: italic;
  position: relative;
  z-index: 1;
}

.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 650;
  border: 1px solid var(--stroke0);
  background: transparent;
  color: var(--text2);
}

.btn-amber {
  background: var(--amber2);
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.25);
}

.btn-green {
  background: var(--green2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}

.btn-violet {
  background: var(--violet2);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.25);
}

.btn-done {
  background: var(--green2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}

.back {
  margin-top: 18px;
}

.signup {
  max-width: 460px;
}

.email {
  width: 100%;
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text1);
  font-size: 15px;
  text-align: center;
}

.trust-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--text3);
  font-size: 11px;
}

.mcp-box {
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--stroke0);
  border-radius: 12px;
  padding: 18px;
}

.mcp-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 0 0 6px 0;
}

.mcp-code {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.12);
  font-family: var(--mono);
  font-size: 12px;
  color: #a78bfa;
  word-break: break-all;
  line-height: 1.5;
}

.guide {
  margin-top: 18px;
  text-align: left;
}

.guide-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text2);
  margin: 0 0 10px 0;
}

.guide-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--stroke1);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.guide-row > .name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text0);
}

.guide-row > .text {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--text3);
}

/* Demo */
.demo {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--stroke1);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.demo-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-name {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--text0);
}

.badge {
  font-size: 10px;
  color: var(--text3);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 999px;
}

.tag {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
}

.api-pill {
  font-size: 10px;
  color: var(--text3);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--stroke1);
}

.api-pill.ok {
  color: var(--green);
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.18);
}

.api-pill.bad {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.18);
}

.hbtn {
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  border: 1px solid var(--stroke0);
  background: transparent;
  color: var(--text2);
}

.demo-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 310px;
  min-height: 0;
}

.chat {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.6;
  font-size: 14px;
  white-space: pre-wrap;
  border: 1px solid var(--stroke1);
}

.bubble.user {
  align-self: flex-end;
  border-radius: 16px 16px 4px 16px;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.15);
  color: var(--text0);
}

.bubble.assistant {
  align-self: flex-start;
  border-radius: 16px 16px 16px 4px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.chat-inputbar {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--stroke1);
  display: flex;
  gap: 10px;
}

.chat-input {
  flex: 1;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--stroke0);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text1);
  font-size: 14px;
}

.send {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--amber);
  font-size: 16px;
  font-weight: 900;
}

.mem {
  border-left: 1px solid var(--stroke1);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.01);
}

.mem-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--stroke1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mem-title {
  font-size: 11px;
  font-weight: 900;
  color: var(--text2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.keep {
  font-size: 10px;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 5px 10px;
}

.mem-list {
  padding: 10px;
  overflow: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.piece {
  border-radius: 12px;
  border: 1px solid var(--stroke1);
  padding: 12px 12px 10px 12px;
  background: rgba(255, 255, 255, 0.02);
}

.piece-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.emo {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.time {
  font-size: 11px;
  color: var(--text3);
}

.what {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--text0);
}

.thus {
  margin: 0;
  font-size: 12px;
  color: var(--text3);
  line-height: 1.55;
}

.mem-bot {
  padding: 14px;
  border-top: 1px solid var(--stroke1);
  text-align: center;
  color: var(--text3);
  font-size: 12px;
}

.mono {
  font-family: var(--mono);
}

@media (max-width: 940px) {
  .demo-main {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  .mem {
    border-left: none;
    border-top: 1px solid var(--stroke1);
    height: 260px;
  }
  .bubble {
    max-width: 92%;
  }
}
