:root {
  color-scheme: light;
  --ink: #171c2b;
  --ink-soft: #3a4152;
  --muted: #727a8d;
  --muted-light: #9aa2b3;
  --line: #e7e9f0;
  --surface: #ffffff;
  --background: #f7f7fb;
  --accent: #6055df;
  --accent-soft: #efedff;
  --teal: #159b89;
  --gold: #c58d2e;
  --danger: #d95c55;
  --shadow-lg: 0 26px 70px rgba(32, 39, 62, 0.1);
  --shadow-md: 0 14px 35px rgba(32, 39, 62, 0.08);
  --shadow-sm: 0 6px 18px rgba(32, 39, 62, 0.06);
  --font-sans: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--background); -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 20px 22px 24px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 4%, rgba(96, 85, 223, 0.1), transparent 28rem),
    radial-gradient(circle at 94% 10%, rgba(21, 155, 137, 0.09), transparent 27rem),
    radial-gradient(circle at 74% 92%, rgba(197, 141, 46, 0.075), transparent 28rem),
    linear-gradient(180deg, #fbfaff 0%, #f5f7fb 100%);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(79, 91, 122, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 91, 122, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid rgba(96, 85, 223, 0.28); outline-offset: 4px; }

.page-glow { position: fixed; z-index: -1; width: 380px; height: 380px; border-radius: 50%; pointer-events: none; filter: blur(22px); }
.page-glow--one { top: -190px; left: 41%; background: rgba(96, 85, 223, 0.07); }
.page-glow--two { right: -190px; bottom: 10%; background: rgba(21, 155, 137, 0.07); }
.page-glow--three { bottom: -190px; left: 15%; background: rgba(197, 141, 46, 0.065); }
.home-shell { width: min(100%, 1180px); margin: 0 auto; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 7px); grid-template-rows: repeat(2, 7px); gap: 4px; width: 42px; height: 42px; place-content: center; border: 1px solid rgba(96, 85, 223, 0.14); border-radius: 13px; background: rgba(255, 255, 255, 0.77); box-shadow: var(--shadow-sm); }
.brand-mark i { display: block; border-radius: 3px; background: var(--accent); }
.brand-mark i:nth-child(2) { background: var(--teal); }
.brand-mark i:nth-child(3) { background: var(--gold); }
.brand-mark i:nth-child(4) { background: var(--danger); }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font-size: 0.95rem; letter-spacing: 0.03em; }
.brand-copy small { color: var(--muted-light); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.17em; }

.collection-chip { display: flex; min-height: 42px; padding: 8px 14px; align-items: center; gap: 7px; border: 1px solid rgba(22, 32, 51, 0.07); border-radius: 999px; background: rgba(255, 255, 255, 0.72); color: var(--muted); font-size: 0.73rem; box-shadow: 0 6px 20px rgba(31, 42, 68, 0.04); backdrop-filter: blur(12px); }
.collection-chip strong { color: var(--ink); font-family: var(--font-mono); font-size: 0.86rem; }
.collection-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(21, 155, 137, 0.1); }

.hero { display: grid; margin: 64px 0 72px; grid-template-columns: minmax(0, 1.08fr) minmax(350px, 0.92fr); gap: 42px; align-items: center; }
.hero-copy { max-width: 650px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; color: #5148c8; font-size: 0.7rem; font-weight: 750; letter-spacing: 0.12em; }
.eyebrow > span { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px rgba(21, 155, 137, 0.1); }
.hero h1 { margin: 0; font-size: clamp(3.45rem, 7.1vw, 6.2rem); font-weight: 800; letter-spacing: -0.075em; line-height: 0.98; }
.hero h1 em { color: var(--accent); font-style: normal; background: linear-gradient(110deg, #5f54dd, #477ee2 45%, #159b89); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { max-width: 590px; margin: 25px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.85; }
.hero-stats { display: flex; margin-top: 28px; gap: 28px; }
.hero-stats > div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong { color: var(--ink); font-family: var(--font-mono); font-size: 1.25rem; font-weight: 650; }
.hero-stats span { color: var(--muted-light); font-size: 0.65rem; }
.hero-action { display: inline-flex; min-height: 48px; margin-top: 31px; padding: 0 22px; align-items: center; gap: 14px; border-radius: 14px; background: linear-gradient(135deg, #655be6, #5147c7); color: #fff; font-size: 0.8rem; font-weight: 700; box-shadow: 0 12px 28px rgba(81, 71, 199, 0.24); transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease; }
.hero-action:hover { filter: brightness(1.04); box-shadow: 0 15px 34px rgba(81, 71, 199, 0.3); transform: translateY(-2px); }
.hero-action span { font-family: var(--font-mono); font-size: 0.9rem; }

.hero-art { position: relative; width: min(100%, 440px); aspect-ratio: 1; justify-self: end; }
.orbit { position: absolute; top: 50%; left: 50%; border: 1px solid rgba(96, 85, 223, 0.1); border-radius: 50%; transform: translate(-50%, -50%); }
.orbit--outer { width: 94%; height: 94%; border-style: dashed; animation: orbit-spin 34s linear infinite; }
.orbit--middle { width: 69%; height: 69%; border-color: rgba(21, 155, 137, 0.11); }
.orbit--inner { width: 43%; height: 43%; border-color: rgba(197, 141, 46, 0.12); }
.core-badge { position: absolute; top: 50%; left: 50%; display: flex; width: 142px; height: 142px; align-items: center; justify-content: center; flex-direction: column; gap: 2px; border: 1px solid rgba(255, 255, 255, 0.88); border-radius: 38%; background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 237, 255, 0.9)); color: var(--accent); box-shadow: 0 24px 55px rgba(79, 70, 183, 0.2), inset 0 1px 0 #fff; transform: translate(-50%, -50%) rotate(-3deg); }
.core-badge strong { font-size: 1.35rem; letter-spacing: -0.045em; }
.core-badge small { color: var(--muted-light); font-size: 0.55rem; font-weight: 700; letter-spacing: 0.16em; }
.float-chip { position: absolute; display: grid; min-width: 48px; height: 48px; padding: 0 10px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.85); border-radius: 15px; background: rgba(255, 255, 255, 0.87); color: var(--ink-soft); font-family: var(--font-mono); font-size: 1rem; font-weight: 700; box-shadow: 0 13px 28px rgba(31, 42, 68, 0.1); backdrop-filter: blur(10px); }
.float-chip--one { top: 8%; left: 39%; color: #5f56db; transform: rotate(-6deg); }
.float-chip--two { top: 24%; right: 4%; color: var(--teal); transform: rotate(7deg); }
.float-chip--three { right: 15%; bottom: 10%; color: #bd5b2b; transform: rotate(-5deg); }
.float-chip--four { bottom: 2%; left: 32%; color: var(--danger); transform: rotate(5deg); }
.float-chip--five { top: 43%; left: -1%; color: var(--teal); transform: rotate(-8deg); }
.float-chip--six { bottom: 36%; right: -2%; color: #bd8623; transform: rotate(9deg); }

@keyframes orbit-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.games-section { scroll-margin-top: 24px; }
.section-heading { display: flex; margin-bottom: 24px; align-items: flex-end; justify-content: space-between; gap: 30px; }
.section-kicker { margin: 0 0 6px; color: var(--accent); font-size: 0.64rem; font-weight: 750; letter-spacing: 0.13em; }
.section-heading h2 { margin: 0; font-size: clamp(1.75rem, 3.2vw, 2.4rem); letter-spacing: -0.045em; }
.section-heading > p { max-width: 360px; margin: 0 0 4px; color: var(--muted); font-size: 0.76rem; line-height: 1.65; text-align: right; }

.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.game-card { --game-accent: var(--accent); --game-soft: var(--accent-soft); position: relative; display: flex; min-width: 0; min-height: 318px; padding: 18px; overflow: hidden; flex-direction: column; border: 1px solid rgba(22, 32, 51, 0.065); border-radius: 25px; background: rgba(255, 255, 255, 0.88); box-shadow: var(--shadow-md); backdrop-filter: blur(16px); transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.game-card::before { position: absolute; top: -80px; right: -70px; width: 190px; height: 190px; border-radius: 50%; background: color-mix(in srgb, var(--game-accent) 8%, transparent); content: ""; pointer-events: none; transition: transform 220ms ease; }
.game-card::after { position: absolute; right: 18px; bottom: 0; left: 18px; height: 3px; border-radius: 999px 999px 0 0; background: linear-gradient(90deg, var(--game-accent), color-mix(in srgb, var(--game-accent) 25%, transparent)); content: ""; opacity: 0.55; transform: scaleX(0.25); transform-origin: left; transition: transform 220ms ease, opacity 220ms ease; }
.game-card:hover { border-color: color-mix(in srgb, var(--game-accent) 24%, var(--line)); box-shadow: 0 28px 68px rgba(31, 42, 68, 0.13); transform: translateY(-4px); }
.game-card:hover::before { transform: translate(-10px, 10px) scale(1.08); }
.game-card:hover::after { opacity: 1; transform: scaleX(1); }
.game-card--schulte { --game-accent: #5362df; --game-soft: #eef0ff; }
.game-card--stroop { --game-accent: #d95d67; --game-soft: #fdeef1; }
.game-card--flanker { --game-accent: #df7245; --game-soft: #fff0e9; }
.game-card--mole { --game-accent: #4b9e65; --game-soft: #edf8f0; }
.game-card--nback { --game-accent: #6e5de0; --game-soft: #efedff; }
.game-card--dual { --game-accent: #6d61da; --game-soft: #f0eeff; }
.game-card--switch { --game-accent: #7362d8; --game-soft: #f1efff; }
.game-card--trail { --game-accent: #d47e3c; --game-soft: #fff1e7; }
.game-card--hanoi { --game-accent: #a46e2d; --game-soft: #fff3df; }
.game-card--signal { --game-accent: #269b70; --game-soft: #eaf8ef; }

.card-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.game-index { color: color-mix(in srgb, var(--game-accent) 70%, var(--ink)); font-family: var(--font-mono); font-size: 0.67rem; font-weight: 800; letter-spacing: 0.08em; }
.game-type { padding: 5px 8px; border: 1px solid color-mix(in srgb, var(--game-accent) 14%, var(--line)); border-radius: 999px; background: var(--game-soft); color: color-mix(in srgb, var(--game-accent) 80%, var(--ink)); font-size: 0.58rem; font-weight: 700; }
.game-visual { position: relative; z-index: 1; display: grid; height: 122px; margin: 14px 0 12px; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--game-accent) 9%, var(--line)); border-radius: 17px; background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.88), var(--game-soft)); }
.card-content { position: relative; z-index: 2; }
.card-content h3 { margin: 0; font-size: 1.26rem; letter-spacing: -0.035em; }
.card-content p { margin: 7px 0 0; color: var(--muted); font-size: 0.74rem; line-height: 1.62; }
.card-tags { display: flex; margin-top: 11px; flex-wrap: wrap; gap: 6px; }
.card-tags span { padding: 4px 7px; border-radius: 6px; background: color-mix(in srgb, var(--game-accent) 7%, #fff); color: color-mix(in srgb, var(--game-accent) 70%, var(--muted)); font-size: 0.58rem; }
.card-enter { position: relative; z-index: 2; display: inline-flex; margin-top: auto; padding-top: 15px; align-items: center; gap: 6px; color: var(--game-accent); font-size: 0.67rem; font-weight: 750; }
.card-enter i { font-style: normal; transition: transform 160ms ease; }
.game-card:hover .card-enter i { transform: translateX(4px); }

.mini-grid { display: grid; width: 94px; height: 94px; padding: 6px; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 16px; background: rgba(83, 98, 223, 0.09); box-shadow: 0 10px 24px rgba(72, 84, 180, 0.12); transform: rotate(-2deg); }
.mini-grid i { display: grid; place-items: center; border-radius: 6px; background: rgba(255, 255, 255, 0.92); color: #5362df; font-family: var(--font-mono); font-size: 0.52rem; font-style: normal; font-weight: 700; }
.mini-grid i:nth-child(3) { background: #5362df; color: #fff; }
.stroop-demo { display: flex; align-items: center; flex-direction: column; }
.stroop-demo strong { color: #4876dc; font-size: 2.3rem; line-height: 1; }
.stroop-demo > span { margin-top: 5px; color: var(--muted-light); font-size: 0.57rem; letter-spacing: 0.08em; }
.color-dots { display: flex; margin-top: 9px; gap: 5px; }
.color-dots i { width: 10px; height: 10px; border-radius: 50%; background: #d95d67; }
.color-dots i:nth-child(2) { background: #4876dc; }
.color-dots i:nth-child(3) { background: #2a9e7c; }
.color-dots i:nth-child(4) { background: #d2a020; }
.flanker-demo { display: flex; align-items: center; gap: 5px; color: #9aa3b0; font-family: var(--font-mono); font-size: 1.8rem; font-weight: 800; }
.flanker-demo strong { color: #df7245; font-size: 2.3rem; }
.flanker-demo i { font-style: normal; opacity: 0.68; }
.mole-demo { display: grid; width: 110px; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.mole-demo > span { aspect-ratio: 1; border-radius: 50%; }
.mini-hole { position: relative; background: radial-gradient(ellipse at 50% 42%, #26312b 0 50%, #738174 100%); box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.35); }
.mini-hole.is-active { background: #f3eadf; }
.mini-hole.is-active i { position: absolute; inset: 18%; border-radius: 50%; background: #a66e48; box-shadow: inset 0 -5px 5px rgba(77, 42, 25, 0.2); }
.mini-bomb { background: radial-gradient(circle at 36% 30%, #5f6874, #151b22 70%); box-shadow: 0 3px 6px rgba(18, 24, 31, 0.2); }
.nback-demo { display: flex; align-items: center; gap: 6px; }
.nback-demo span, .nback-demo strong { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: #fff; color: #6e5de0; font-family: var(--font-mono); font-size: 0.75rem; box-shadow: 0 4px 10px rgba(73, 62, 183, 0.09); }
.nback-demo strong { background: #6e5de0; color: #fff; }
.nback-demo i { color: #bbb7d9; font-style: normal; }
.nback-demo small { margin-left: 3px; color: var(--muted-light); font-family: var(--font-mono); font-size: 0.54rem; }
.dual-demo { display: flex; align-items: center; gap: 10px; }
.dual-number { display: grid; width: 55px; height: 68px; place-items: center; border-radius: 14px; background: #fff; color: #6d61da; font-family: var(--font-mono); font-size: 2rem; font-weight: 700; box-shadow: 0 10px 21px rgba(82, 70, 191, 0.12); }
.dual-plus { color: #b5b1ca; font-family: var(--font-mono); }
.dual-shape { width: 45px; height: 45px; border-radius: 50%; background: #269b8c; box-shadow: 0 8px 17px rgba(38, 155, 140, 0.17); }
.switch-demo { display: flex; align-items: center; gap: 8px; }
.switch-symbol { display: block; width: 37px; height: 37px; }
.switch-symbol--circle { border-radius: 50%; background: #7362d8; }
.switch-symbol--square { border-radius: 9px; background: #269b8c; }
.switch-arrow { color: #a6a0c8; font-family: var(--font-mono); font-size: 1.2rem; }
.switch-demo small { position: absolute; bottom: 17px; left: 50%; color: var(--muted-light); font-size: 0.53rem; transform: translateX(-50%); white-space: nowrap; }
.trail-demo { display: flex; align-items: center; }
.trail-demo span { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid rgba(212, 126, 60, 0.12); border-radius: 9px; background: #fff; color: #bd6b31; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; box-shadow: 0 4px 9px rgba(143, 84, 35, 0.07); }
.trail-demo i { width: 25px; height: 3px; background: linear-gradient(90deg, #e9a06b, #7fa49d); }
.hanoi-demo { display: flex; width: 160px; height: 86px; align-items: flex-end; justify-content: space-between; }
.mini-peg { position: relative; width: 45px; height: 80px; border-bottom: 7px solid #9b704d; border-radius: 0 0 6px 6px; }
.mini-peg::before { position: absolute; bottom: 7px; left: 50%; width: 4px; height: 66px; border-radius: 999px; background: #a87d58; content: ""; transform: translateX(-50%); }
.mini-peg i { position: absolute; bottom: 7px; left: 50%; display: block; height: 11px; border-radius: 999px; background: #4b9d8a; transform: translateX(-50%); }
.mini-peg i:nth-child(1) { width: 42px; }
.mini-peg i:nth-child(2) { bottom: 19px; width: 32px; background: #d39a32; }
.mini-peg i:nth-child(3) { bottom: 31px; width: 23px; background: #df7245; }
.signal-demo { display: flex; width: 66px; height: 92px; padding: 9px; align-items: center; flex-direction: column; gap: 7px; border-radius: 18px; background: #20282b; box-shadow: 0 11px 23px rgba(23, 34, 36, 0.2); }
.mini-light { width: 25px; height: 25px; border: 3px solid rgba(255, 255, 255, 0.06); border-radius: 50%; opacity: 0.24; }
.mini-light--red { background: #d95d55; }
.mini-light--green { background: #36b97a; }
.mini-light.is-on { opacity: 1; box-shadow: 0 0 14px rgba(54, 185, 122, 0.75); }
.signal-demo small { color: rgba(255, 255, 255, 0.76); font-family: var(--font-mono); font-size: 0.4rem; letter-spacing: 0.05em; }


.page-footer { display: flex; margin-top: 23px; padding: 0 4px; justify-content: space-between; gap: 16px; color: var(--muted-light); font-size: 0.64rem; }

@media (max-width: 940px) {
  .hero { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; margin-top: 48px; }
  .hero-art { width: min(100%, 350px); }
  .game-grid { gap: 14px; }
  .game-card { min-height: 310px; }
}

@media (max-width: 780px) {
  .hero { display: block; margin: 44px 0 55px; }
  .hero-copy { max-width: 680px; }
  .hero-art { display: none; }
  .hero h1 { font-size: clamp(3.3rem, 13vw, 5.2rem); }
  .game-grid { grid-template-columns: 1fr; }
  .game-card { min-height: 300px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .section-heading > p { text-align: left; }
}

@media (max-width: 680px) {
  body { padding: 14px 14px 20px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
  .collection-chip { min-height: 38px; padding: 7px 11px; }
  .collection-chip > span:last-child { display: none; }
  .hero { margin: 38px 0 48px; }
  .eyebrow { margin-bottom: 13px; font-size: 0.62rem; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.3rem); }
  .hero-lead { margin-top: 19px; font-size: 0.88rem; line-height: 1.75; }
  .hero-stats { margin-top: 21px; gap: 22px; }
  .hero-action { margin-top: 25px; }
  .section-heading h2 { font-size: 1.7rem; }
  .game-card { min-height: 292px; padding: 15px; border-radius: 21px; }
  .game-visual { height: 116px; margin: 12px 0 10px; }
  .card-content h3 { font-size: 1.16rem; }
  .page-footer { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 390px) {
  .hero h1 { font-size: 3rem; }
  .hero-stats { gap: 17px; }
  .game-card { min-height: 282px; }
  .card-content p { font-size: 0.71rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
