:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #f0f3f8;
  --text: #171a23;
  --muted: #5d6473;
  --border: rgba(17,24,39,.10);
  --accent: #6366f1;
  --accent-2: #22c7e8;
  --shadow: 0 12px 28px rgba(2,6,23,.10);
  --shadow-hover: 0 18px 36px rgba(2,6,23,.16);
  --radius: 20px;
}

html[data-theme="dark"] {
  --bg: #262936;
  --surface: #171c2a;
  --surface-2: #0e1421;
  --text: #f3f4f6;
  --muted: #c5cbd6;
  --border: rgba(148,163,184,.16);
  --accent: #6b6ff8;
  --accent-2: #42c9df;
  --shadow: 0 12px 28px rgba(0,0,0,.28);
  --shadow-hover: 0 18px 38px rgba(0,0,0,.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  transition: background .25s ease, color .25s ease;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(1500px, calc(100% - 48px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}
.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand img { width: 225px; max-height: 50px; display: block; }
.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-links > a {
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--muted);
}
.nav-links > a:hover,
.nav-links > a.active { background: rgba(99,102,241,.14); color: var(--text); }
.nav-links .join { background: rgba(148,163,184,.22); color: var(--text); }
.theme-toggle {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 27px;
  cursor: pointer;
  padding: 7px;
}

.hero {
  text-align: center;
  padding: 52px 0 36px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(42px, 5.1vw, 74px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -2px;
}
/* Hero 动态渐变（模板完整细节）见文件末尾 xy-* 规则 */
.hero-subtitle {
  margin: 0 auto;
  max-width: 920px;
  color: var(--muted);
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 1.55;
}

.resource-shell {
  margin-top: 8px;
  padding: 28px 0 36px;
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(900px 380px at 10% -150px, rgba(99,102,241,.12), transparent 70%),
    radial-gradient(900px 380px at 90% -150px, rgba(16,185,129,.08), transparent 70%),
    color-mix(in srgb, var(--bg) 80%, var(--surface) 20%);
}
.intro-copy { margin: 0 0 26px; color: var(--muted); }
.intro-copy p { margin: 0 0 11px; font-size: clamp(15px, 1.18vw, 18px); line-height: 1.72; }
.tool-group { margin-top: 18px; }
.tool-group h2 {
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(24px, 2.1vw, 34px);
  font-weight: 900;
}
.dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(99,102,241,.18);
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.tool-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tool-card:hover {
  transform: translateY(-3px) scale(1.012);
  box-shadow: var(--shadow-hover);
  border-color: rgba(99,102,241,.35);
}
.tool-card img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 17px;
  display: block;
  background: rgba(255,255,255,.05);
  box-shadow: inset 0 0 0 1px var(--border);
}
.tool-card strong {
  font-size: clamp(14px, 1vw, 17px);
  line-height: 1.2;
  font-weight: 850;
}
.tool-card span {
  color: var(--muted);
  font-size: clamp(12px, .86vw, 14px);
  line-height: 1.35;
}
.bottom-section { padding: 64px 0 100px; }
.bottom-section h2 { margin: 0 0 10px; }
.bottom-section p { color: var(--muted); }

@media (max-width: 1180px) { .tool-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 920px) {
  .container { width: min(100% - 30px, 1500px); }
  .brand img { width: 180px; }
  .nav-links > a:not(.join) { display: none; }
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  .nav { min-height: 66px; }
  .brand img { width: 145px; }
  .join { font-size: 13px; padding: 8px 10px !important; }
  .hero { padding: 38px 0 28px; }
  .hero h1 { letter-spacing: -1px; }
  .resource-shell { border-radius: 22px 22px 0 0; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tool-card { border-radius: 17px; }
}
@media (max-width: 430px) { .tool-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* ===== 模板缺失 UI 细节：Hero 动态渐变 ===== */
/* =========================================================
   XY-Lab Hero visual details restored from the captured page
   ========================================================= */

.xy-hero {
  padding: 32px 0 26px;
  text-align: center;
  font-family:
    'SF Pro Display',
    'Inter',
    'PingFang SC',
    -apple-system,
    BlinkMacSystemFont,
    'Helvetica Neue',
    Arial,
    sans-serif;
  transition: background 0.3s ease, color 0.3s ease;
}

.xy-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  vertical-align: middle;
}

.xy-tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #22c55e, #16a34a);
  box-shadow: 0 0 0 4px rgba(34,197,94,.22);
}

.xy-title {
  margin: 0;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.12;
  font-weight: 820;
  letter-spacing: -0.01em;
  transition: color 0.3s ease, background 0.3s ease, filter 0.3s ease;
  display: inline-block;
  vertical-align: middle;
  margin-left: 14px;
  position: relative;
  isolation: isolate;

  background-image: linear-gradient(
    100deg,
    #ff2d55 0%,
    #bf5af2 22%,
    #5e5ce6 42%,
    #0a84ff 64%,
    #64d2ff 84%,
    #a78bfa 100%
  );
  background-size: 220% 100%;
  background-position: 30% 50%;

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

  -webkit-text-stroke: 0.6px rgba(2,6,23,.10);

  filter:
    saturate(1.06)
    brightness(1.03)
    drop-shadow(0 18px 36px rgba(10,132,255,.12))
    drop-shadow(0 14px 30px rgba(191,90,242,.10))
    drop-shadow(0 3px 10px rgba(2,6,23,.10));

  text-shadow:
    0 1px 0 rgba(2,6,23,.07),
    0 0 10px rgba(2,6,23,.04);

  animation: xyGradSlide 7.2s ease-in-out infinite;
}

.xy-title .xy-insert {
  color: #94a3b8;
  -webkit-text-fill-color: currentColor;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-stroke: 0.6px rgba(2,6,23,.08);
}

.xy-title::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -8%;
  height: 52%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      70% 100% at 50% 100%,
      rgba(255,255,255,.28),
      rgba(255,255,255,0) 62%
    );
  filter: blur(10px);
  opacity: .85;
  transform: translateZ(0);
}

.xy-sub {
  margin: 14px auto 0;
  max-width: 750px;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 400;
  color: #64748b;
  transition: color 0.3s ease;
}

.xy-tag {
  background: rgba(148,163,184,0.15);
  color: #64748b;
}

/* Dark-mode-compatible selectors from the captured implementation */
:is(
  html.dark,
  body.dark,
  html[data-theme="dark"],
  body[data-theme="dark"],
  html[data-theme="synthwave"],
  body[data-theme="synthwave"],
  html[data-theme="halloween"],
  body[data-theme="halloween"],
  html[data-theme="forest"],
  body[data-theme="forest"],
  html[data-theme="aqua"],
  body[data-theme="aqua"],
  html[data-theme="black"],
  body[data-theme="black"],
  html[data-theme="luxury"],
  body[data-theme="luxury"],
  html[data-theme="dracula"],
  body[data-theme="dracula"],
  html[data-theme="business"],
  body[data-theme="business"],
  html[data-theme="night"],
  body[data-theme="night"],
  html[data-theme="coffee"],
  body[data-theme="coffee"],
  html[data-theme="dim"],
  body[data-theme="dim"],
  html[data-theme="sunset"],
  body[data-theme="sunset"]
) .xy-title {
  background-image: linear-gradient(
    100deg,
    #ff375f 0%,
    #bf5af2 22%,
    #5e5ce6 42%,
    #0a84ff 64%,
    #64d2ff 84%,
    #a78bfa 100%
  );
  background-size: 220% 100%;
  background-position: 30% 50%;

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

  -webkit-text-stroke: 0.6px rgba(255,255,255,.10);

  filter:
    saturate(1.03)
    brightness(1.06)
    drop-shadow(0 20px 42px rgba(10,132,255,.14))
    drop-shadow(0 16px 34px rgba(191,90,242,.10))
    drop-shadow(0 6px 18px rgba(0,0,0,.35));

  text-shadow: 0 0 14px rgba(191,219,254,.08);

  animation: xyGradSlide 7.2s ease-in-out infinite;
}

:is(
  html.dark,
  body.dark,
  html[data-theme="dark"],
  body[data-theme="dark"],
  html[data-theme="synthwave"],
  body[data-theme="synthwave"],
  html[data-theme="halloween"],
  body[data-theme="halloween"],
  html[data-theme="forest"],
  body[data-theme="forest"],
  html[data-theme="aqua"],
  body[data-theme="aqua"],
  html[data-theme="black"],
  body[data-theme="black"],
  html[data-theme="luxury"],
  body[data-theme="luxury"],
  html[data-theme="dracula"],
  body[data-theme="dracula"],
  html[data-theme="business"],
  body[data-theme="business"],
  html[data-theme="night"],
  body[data-theme="night"],
  html[data-theme="coffee"],
  body[data-theme="coffee"],
  html[data-theme="dim"],
  body[data-theme="dim"],
  html[data-theme="sunset"],
  body[data-theme="sunset"]
) .xy-title .xy-insert {
  color: #cbd5e1;
  -webkit-text-stroke: 0.6px rgba(255,255,255,.08);
}

:is(
  html.dark,
  body.dark,
  html[data-theme="dark"],
  body[data-theme="dark"],
  html[data-theme="synthwave"],
  body[data-theme="synthwave"],
  html[data-theme="halloween"],
  body[data-theme="halloween"],
  html[data-theme="forest"],
  body[data-theme="forest"],
  html[data-theme="aqua"],
  body[data-theme="aqua"],
  html[data-theme="black"],
  body[data-theme="black"],
  html[data-theme="luxury"],
  body[data-theme="luxury"],
  html[data-theme="dracula"],
  body[data-theme="dracula"],
  html[data-theme="business"],
  body[data-theme="business"],
  html[data-theme="night"],
  body[data-theme="night"],
  html[data-theme="coffee"],
  body[data-theme="coffee"],
  html[data-theme="dim"],
  body[data-theme="dim"],
  html[data-theme="sunset"],
  body[data-theme="sunset"]
) .xy-title::after {
  opacity: .45;
  filter: blur(12px);
  background:
    radial-gradient(
      70% 100% at 50% 100%,
      rgba(255,255,255,.16),
      rgba(255,255,255,0) 62%
    );
}

:is(
  html.dark,
  body.dark,
  html[data-theme="dark"],
  body[data-theme="dark"],
  html[data-theme="dracula"],
  body[data-theme="dracula"],
  html[data-theme="night"],
  body[data-theme="night"],
  html[data-theme="dim"],
  body[data-theme="dim"]
) .xy-sub,
:is(
  html.dark,
  body.dark,
  html[data-theme="dark"],
  body[data-theme="dark"],
  html[data-theme="dracula"],
  body[data-theme="dracula"],
  html[data-theme="night"],
  body[data-theme="night"],
  html[data-theme="dim"],
  body[data-theme="dim"]
) .xy-sub span {
  color: #d1d5db !important;
}

@keyframes xyGradSlide {
  0%   { background-position: 20% 50%; }
  50%  { background-position: 80% 50%; }
  100% { background-position: 20% 50%; }
}

@media (max-width: 640px) {
  .xy-title {
    display: block;
    margin-left: 0;
    margin-top: 12px;
  }

  .xy-tag {
    margin-bottom: 14px;
  }
}

@media (min-width: 641px) {
  .xy-tag {
    margin-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xy-title {
    animation: none !important;
    filter: none !important;
  }

  .xy-title::after {
    display: none !important;
  }
}

/* cyxwork 适配 */
.xy-title { margin-left: 0; }
.nav-links .join { display: inline-flex; align-items: center; gap: 6px; }
.nav-links .join svg { width: 16px; height: 16px; }
