/* 积木复盘官网。布局与层次对齐 Monster Search Hero：
   金黄公告条、白双层顶栏、深紫居中搜索、青标签、折下白底双栏。
   色值：主体紫 #6E46AE，次体金 #F5A623，点缀青 #00B6B4。 */

:root {
  --purple: #6e46ae;
  --purple-deep: #5a3896;
  --hero: #3a1d73;
  --hero-2: #2b1458;
  --chip: #4a2a86;
  --gold: #f5a623;
  --gold-ink: #3a2a08;
  --cyan: #00b6b4;
  --white: #fff;
  --paper: #fff;
  --ink: #1a1228;
  --muted: #5a5268;
  --line: #e6e1ef;
  --foot: #f4f2f8;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Outfit", "Noto Sans SC", sans-serif;
  --r: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}

button, input { font-family: inherit; }
a { color: inherit; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 80;
}
.skip:focus { left: 8px; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hidden, [hidden] { display: none !important; }

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

/* —— 金黄公告条（Monster 顶栏） —— */
.promo {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 8px 16px;
  background: var(--gold);
  color: var(--gold-ink);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.promo a {
  color: var(--gold-ink);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* —— 白顶栏：Logo + 注册/登录 —— */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--purple);
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 6px;
}

.mast-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-solid {
  background: var(--purple);
  color: var(--white);
}
.btn-solid:hover { background: var(--purple-deep); }
.btn-ghost {
  background: var(--white);
  color: var(--purple);
  border: 1px solid var(--purple);
}
.btn-ghost:hover { background: #f6f2fb; }

.menubar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 28px 6px;
  border-top: 1px solid var(--line);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
}
.nav-links a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 0;
}
.nav-links a:hover { color: var(--purple); }
.menubar-aside {
  display: none;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 6px;
  padding: 6px 12px;
}

.btn-gold {
  background: var(--gold);
  color: var(--gold-ink);
}
.btn-gold:hover { background: #e09714; }
.btn-on-dark {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.55);
}
.btn-on-dark:hover { background: rgba(255, 255, 255, 0.1); }

/* —— 深紫广告板：文案 + 实图 —— */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, var(--hero) 0%, var(--hero-2) 72%);
  color: var(--white);
  padding: 40px 0 0;
}
.hero::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -60px;
  top: -80px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.12;
  pointer-events: none;
}
.hero-board {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 40px;
  align-items: stretch;
  min-height: 420px;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0 56px;
  text-align: left;
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.18;
  text-wrap: balance;
}
.hero .lede {
  max-width: 22em;
  margin: 18px 0 0;
  font-size: 17px;
  color: #d8ccec;
  line-height: 1.6;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
}
.hero-cta .btn { height: 44px; padding: 0 20px; font-size: 15px; }
.hero-copy .chips {
  justify-content: flex-start;
  margin-top: 32px;
}
.hero-copy .chips a {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.hero-copy .chips a:hover {
  background: rgba(255, 255, 255, 0.18);
}
.hero-shot {
  margin: 0;
  align-self: end;
  width: min(100%, 640px);
  height: 400px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 0;
  box-shadow: 0 22px 48px rgba(8, 2, 24, 0.4);
  background: var(--white);
}
.hero-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.search {
  max-width: 860px;
  margin: 0 auto;
}
.search-bar {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr 1fr auto;
  background: var(--white);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(20, 8, 48, 0.28);
  text-align: left;
}
.search-bar.is-login {
  grid-template-columns: 1.2fr 1fr auto;
}
.cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 0 14px;
}
.cell input {
  height: 58px;
  border: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  width: 100%;
}
.cell input::placeholder { color: #8a8196; }
.cell input:focus {
  outline: none;
}
.search-bar:focus-within {
  box-shadow: 0 10px 28px rgba(20, 8, 48, 0.28), 0 0 0 2px var(--gold);
}
.search-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  height: 58px;
  padding: 0 18px;
  border: 0;
  background: var(--purple);
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.search-go:hover { background: var(--purple-deep); }
.search-go:active { transform: none; filter: brightness(0.95); }
.search-go:disabled { opacity: 0.65; cursor: wait; }

.search-hint {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}
.search-hint button {
  border: 0;
  background: transparent;
  color: var(--purple);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}
.search-hint button[aria-selected="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--gold);
}

.auth-panel {
  padding: 40px 0 56px;
  background: var(--white);
  border-top: 1px solid var(--line);
}
.auth-panel h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  color: var(--purple);
}
.auth-panel .search-bar {
  border: 1px solid var(--line);
  box-shadow: none;
}
.auth-msg {
  margin: 10px 0 0;
  font-size: 13px;
  color: #b4232c;
}
.auth-msg.ok { color: var(--cyan-deep, var(--cyan)); }

.auth-in {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ink);
}
.auth-in p { margin: 0; font-size: 16px; }
.auth-in-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.text-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--chip);
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.chips a:hover { background: #563496; }
.chips i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  flex-shrink: 0;
}

/* —— 折下：白底双栏产品卡 —— */
.pair {
  padding: 56px 0 40px;
  background: var(--white);
}
.pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.pair-grid.trio {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pair article h2 {
  margin: 16px 0 8px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
}
.pair article p {
  margin: 0 0 12px;
  color: var(--muted);
  max-width: 42em;
}
.pair article a {
  color: var(--purple);
  font-weight: 700;
  text-decoration: none;
}
.pair article a:hover { color: var(--purple-deep); }
.pair figure {
  margin: 0;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--foot);
  border: 1px solid var(--line);
}
.pair img {
  display: block;
  width: 100%;
  height: auto;
}

/* —— 三列价值，不用 01 长清单 —— */
.values {
  padding: 24px 0 56px;
  background: var(--white);
}
.values h2 {
  margin: 0 0 24px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.value-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.value-cols h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--purple);
}
.value-cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.value-cols li {
  position: relative;
  padding: 8px 0 8px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.value-cols li:first-child { border-top: 0; padding-top: 0; }
.value-cols li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}
.value-cols li:first-child::before { top: 8px; }

/* —— 用法：四格，无连线装饰 —— */
.howto {
  padding: 8px 0 72px;
  background: var(--foot);
}
.howto h2 {
  margin: 0 0 22px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.howto ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.howto ol.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.howto li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 16px 20px;
  counter-increment: step;
}
.howto li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 8px;
}
.howto b {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}
.howto p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* —— 浅底页脚 —— */
.foot {
  background: var(--foot);
  border-top: 1px solid var(--line);
  padding: 32px 0;
  font-size: 14px;
  color: var(--muted);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.4fr;
  gap: 20px;
  align-items: start;
}
.foot-brand {
  margin: 0;
  color: var(--purple);
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.foot-brand img { display: block; border-radius: 6px; }
.foot ul { margin: 0; padding: 0; list-style: none; }
.foot li { margin: 0 0 6px; }
.foot a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.foot a:hover { color: var(--purple); }
.foot p { margin: 0; }

@media (max-width: 860px) {
  .masthead, .menubar { padding-left: 16px; padding-right: 16px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 16px 16px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(26, 18, 40, 0.08);
  }
  .nav-links.open { display: flex; }
  .menubar { position: relative; }
  .hero-board,
  .search-bar,
  .search-bar.is-login,
  .pair-grid,
  .value-cols,
  .howto ol,
  .foot-grid {
    grid-template-columns: 1fr;
  }
  .hero { padding: 20px 0 0; }
  .hero-board { min-height: 0; gap: 20px; }
  .hero-copy { padding: 12px 0 8px; }
  .hero-shot { width: 100%; height: 280px; align-self: stretch; }
  .cell { border-right: 0; border-bottom: 1px solid var(--line); }
  .search-go { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
