:root {
  color-scheme: dark;
  --bg: #0a0b0f;
  --bg-soft: #101218;
  --surface: #13151d;
  --surface-2: #181b24;
  --line: #292d39;
  --line-soft: #20232d;
  --text: #f2f3f7;
  --muted: #989dac;
  --dim: #656a78;
  --accent: #a8ff35;
  --accent-2: #7df9ff;
  --purple: #b596ff;
  --yellow: #ffd166;
  --danger: #ff6b81;
  --header-bg: rgba(10, 11, 15, 0.82);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --radius: 18px;
  --mono: "DM Mono", Consolas, monospace;
  --sans: "Manrope", "Microsoft YaHei", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4ef;
  --bg-soft: #eceee7;
  --surface: #ffffff;
  --surface-2: #f6f7f2;
  --line: #d8dbd1;
  --line-soft: #e4e6df;
  --text: #181a1f;
  --muted: #696e76;
  --dim: #979b9f;
  --accent: #6ec400;
  --accent-2: #008c95;
  --purple: #7754ce;
  --yellow: #b66c00;
  --header-bg: rgba(243, 244, 239, 0.86);
  --shadow: 0 24px 70px rgba(30, 36, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 27rem),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.noise {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 72px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line-soft);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  width: max-content;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.12em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-size: 15px;
  letter-spacing: -0.12em;
}

.main-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  position: relative;
  padding: 9px 15px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.nav-link.is-active::after {
  position: absolute;
  right: 15px;
  bottom: 1px;
  left: 15px;
  height: 2px;
  border-radius: 3px;
  background: var(--accent);
  content: "";
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.icon-button,
.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: border 0.2s ease, transform 0.2s ease;
}

.icon-button {
  width: 38px;
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.github-link {
  gap: 9px;
  padding: 0 13px;
  font-family: var(--mono);
  font-size: 14px;
}

.icon-button:hover,
.github-link:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

main {
  min-height: calc(100vh - 170px);
}

.page {
  display: none;
}

.page.is-active {
  display: block;
  animation: page-in 0.35s ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  gap: 70px;
  align-items: center;
  width: min(1240px, calc(100% - 48px));
  min-height: 620px;
  margin: auto;
  padding: 76px 0 66px;
}

.hero-glow {
  position: absolute;
  z-index: -1;
  top: 80px;
  left: -180px;
  width: 500px;
  height: 360px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  filter: blur(100px);
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  gap: 10px;
  align-items: center;
  letter-spacing: 0.08em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}

.hero h1 {
  margin: 22px 0;
  font-size: clamp(50px, 5.3vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-intro {
  max-width: 620px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
}

.global-search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 610px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.17);
}

.global-search:focus-within {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.global-search > svg,
.library-search svg {
  width: 20px;
  fill: none;
  stroke: var(--dim);
  stroke-linecap: round;
  stroke-width: 1.7;
}

.global-search > svg {
  margin-left: 18px;
}

.global-search input,
.library-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.global-search input {
  height: 100%;
  padding: 0 14px;
}

input::placeholder,
textarea::placeholder {
  color: var(--dim);
}

kbd {
  margin-right: 13px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
}

.search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-result {
  display: flex;
  gap: 13px;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.search-result:hover {
  background: var(--surface-2);
}

.search-result b {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
}

.search-result small {
  color: var(--muted);
}

.search-result-type {
  min-width: 48px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  color: var(--dim);
  font-size: 13px;
}

.quick-tags button {
  padding: 5px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}

.quick-tags button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-terminal {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0d0f14;
  box-shadow: var(--shadow);
  transform: perspective(1200px) rotateY(-3deg) rotateX(1deg);
}

.terminal-top,
.terminal-foot {
  display: flex;
  align-items: center;
  height: 45px;
  padding: 0 16px;
  border-bottom: 1px solid #252935;
  color: #7d8493;
  font-family: var(--mono);
  font-size: 12px;
}

.terminal-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6375;
}

.terminal-dots i:nth-child(2) { background: #ffc65c; }
.terminal-dots i:nth-child(3) { background: #80e36f; }

.terminal-state {
  justify-self: end;
  color: #80e36f;
  font-size: 10px;
  letter-spacing: 0.13em;
}

.hero-terminal pre {
  min-height: 305px;
  margin: 0;
  padding: 30px 25px;
  color: #e2e5eb;
  font: 12px/2 var(--mono);
  white-space: pre-wrap;
}

.code-dim { color: #4c5260; }
.code-purple { color: #bd93f9; }
.code-green { color: #96e072; }
.code-blue { color: #78dce8; }
.code-yellow { color: #ffd866; }

.terminal-foot {
  justify-content: space-between;
  border-top: 1px solid #252935;
  border-bottom: 0;
}

.terminal-foot span:first-child {
  color: #80e36f;
}

.terminal-foot i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #80e36f;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface);
}

.stats-bar div {
  display: flex;
  gap: 11px;
  align-items: baseline;
  justify-content: center;
  padding: 23px;
  border-right: 1px solid var(--line-soft);
}

.stats-bar div:last-child {
  border-right: 0;
}

.stats-bar strong {
  font-family: var(--mono);
  font-size: 22px;
}

.stats-bar span {
  color: var(--muted);
  font-size: 14px;
}

.content-section {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 110px 0 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin: 10px 0 8px;
  font-size: 33px;
  letter-spacing: -0.04em;
}

.section-heading p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.section-heading a {
  padding-bottom: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.section-heading a span {
  margin-left: 7px;
  color: var(--accent);
}

.effect-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.effect-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.effect-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
  transform: translateY(-5px);
}

.effect-preview {
  position: relative;
  display: grid;
  place-items: center;
  height: 190px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    var(--bg-soft);
  background-size: 24px 24px;
}

.effect-preview::after {
  position: absolute;
  right: 10px;
  bottom: 9px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--dim);
  content: "PREVIEW";
  font: 7px var(--mono);
  letter-spacing: 0.12em;
}

.effect-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 18px;
}

.local-resource-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  padding: 3px 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 5px;
  color: var(--accent);
  font: 9px var(--mono);
  vertical-align: middle;
}

.local-resource-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.local-delete {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
}

.local-delete:hover {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 9%, transparent);
}

.effect-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.effect-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.card-arrow {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--accent);
  transition: background 0.2s ease;
}

.effect-card:hover .card-arrow {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.preview-button {
  position: relative;
  padding: 13px 25px;
  overflow: hidden;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.preview-button::before {
  position: absolute;
  inset: 0;
  background: var(--accent);
  content: "";
  transform: translateX(-102%);
  transition: transform 0.3s ease;
}

.effect-card:hover .preview-button::before {
  transform: translateX(0);
}

.preview-button span {
  position: relative;
  z-index: 1;
  mix-blend-mode: difference;
}

.preview-loader {
  width: 45px;
  height: 45px;
  border: 3px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.preview-card {
  width: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 8px 8px 0 color-mix(in srgb, var(--accent) 22%, transparent);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.effect-card:hover .preview-card {
  box-shadow: 13px 13px 0 color-mix(in srgb, var(--accent) 30%, transparent);
  transform: translate(-4px, -4px);
}

.preview-card i,
.preview-card b {
  display: block;
  border-radius: 4px;
  background: var(--line);
}

.preview-card i { width: 45px; height: 7px; margin-bottom: 12px; }
.preview-card b { width: 100%; height: 5px; margin-top: 6px; }
.preview-card b:last-child { width: 68%; }

.preview-text {
  position: relative;
  color: var(--text);
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.preview-text::after {
  position: absolute;
  right: -7px;
  bottom: 2px;
  width: 2px;
  height: 29px;
  background: var(--accent);
  content: "";
  animation: blink 0.8s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.preview-toggle {
  position: relative;
  width: 68px;
  height: 36px;
  border-radius: 30px;
  background: color-mix(in srgb, var(--accent) 32%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, var(--line));
}

.preview-toggle::after {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  transition: transform 0.25s ease;
}

.effect-card:hover .preview-toggle::after {
  transform: translateX(32px);
}

.preview-rings {
  position: relative;
  width: 66px;
  height: 66px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}

.preview-rings::before,
.preview-rings::after {
  position: absolute;
  inset: 9px;
  border: 1px solid var(--accent-2);
  border-radius: inherit;
  content: "";
  animation: pulse 1.6s ease-out infinite;
}

.preview-rings::after {
  inset: 19px;
  background: var(--accent);
  animation-delay: 0.3s;
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(0.75); }
  100% { opacity: 0; transform: scale(1.35); }
}

.preview-gradient {
  width: 150px;
  height: 78px;
  border-radius: 15px;
  background: linear-gradient(125deg, var(--accent), var(--accent-2), var(--purple));
  background-size: 200% 200%;
  box-shadow: 0 12px 35px color-mix(in srgb, var(--purple) 25%, transparent);
  animation: gradient-move 3s ease infinite;
}

@keyframes gradient-move {
  50% { background-position: 100% 100%; }
}

.preview-dots {
  display: flex;
  gap: 8px;
}

.preview-dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounce 0.8s ease-in-out infinite alternate;
}

.preview-dots i:nth-child(2) { animation-delay: 0.15s; }
.preview-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce { to { transform: translateY(-14px); opacity: 0.45; } }

.preview-menu {
  display: flex;
  gap: 7px;
  flex-direction: column;
  width: 48px;
}

.preview-menu i {
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.effect-card:hover .preview-menu i:first-child { transform: translateY(10px) rotate(45deg); }
.effect-card:hover .preview-menu i:nth-child(2) { opacity: 0; }
.effect-card:hover .preview-menu i:last-child { transform: translateY(-10px) rotate(-45deg); }

.preview-tooltip {
  position: relative;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font: 11px var(--mono);
  animation: float 1.7s ease-in-out infinite alternate;
}

.preview-tooltip::after {
  position: absolute;
  bottom: -6px;
  left: calc(50% - 6px);
  width: 12px;
  height: 12px;
  background: inherit;
  content: "";
  transform: rotate(45deg);
}

@keyframes float { to { transform: translateY(-8px); } }

.preview-input {
  position: relative;
  width: 170px;
  padding: 15px 13px 9px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font: 11px var(--mono);
}

.preview-input::before {
  position: absolute;
  top: -7px;
  left: 9px;
  padding: 0 5px;
  background: var(--surface);
  color: var(--accent);
  content: "Email";
  font-size: 10px;
}

.preview-glow {
  padding: 13px 22px;
  border: 1px solid var(--accent-2);
  border-radius: 9px;
  color: var(--accent-2);
  font: 12px var(--mono);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent-2) 30%, transparent), inset 0 0 8px color-mix(in srgb, var(--accent-2) 18%, transparent);
  animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
  to { box-shadow: 0 0 22px color-mix(in srgb, var(--accent-2) 60%, transparent), inset 0 0 15px color-mix(in srgb, var(--accent-2) 25%, transparent); }
}

.preview-skeleton {
  width: 170px;
}

.preview-skeleton i {
  display: block;
  height: 10px;
  margin: 9px 0;
  overflow: hidden;
  border-radius: 7px;
  background: var(--line);
}

.preview-skeleton i:first-child { width: 58%; height: 14px; }
.preview-skeleton i:last-child { width: 80%; }

.preview-skeleton i::after {
  display: block;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 14%, transparent), transparent);
  content: "";
  animation: shimmer 1.3s infinite;
}

@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-bottom: 110px;
}

.home-panel {
  padding: 28px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 23px;
}

.section-heading.compact h2 {
  margin-bottom: 0;
  font-size: 25px;
}

.mini-cdn-list {
  display: grid;
  gap: 9px;
}

.mini-cdn {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--bg-soft);
}

.mini-cdn:hover {
  border-color: var(--line);
}

.library-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--icon-bg, var(--line));
  color: var(--icon-color, var(--text));
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}

.mini-cdn strong {
  display: block;
  font-size: 14px;
}

.mini-cdn small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.mini-copy,
.copy-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  cursor: pointer;
}

.mini-copy {
  padding: 7px 9px;
  font-size: 11px;
}

.mini-copy:hover,
.copy-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mini-tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mini-tool {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--bg-soft);
  cursor: pointer;
}

.mini-tool:hover {
  border-color: var(--accent);
}

.mini-tool-icon {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 18px;
}

.mini-tool strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.mini-tool small {
  color: var(--muted);
  font-size: 11px;
}

.library-page {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 75px 0 110px;
}

.page-hero {
  margin-bottom: 45px;
}

.page-hero-actions {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
}

.page-hero h1 {
  margin: 11px 0 12px;
  font-size: clamp(40px, 5vw, 62px);
  letter-spacing: -0.055em;
}

.page-hero p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.library-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.library-search {
  display: flex;
  gap: 11px;
  align-items: center;
  width: min(340px, 100%);
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.filter-button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--accent);
}

.result-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 17px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.full-effect-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cdn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cdn-card {
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: var(--surface);
  transition: border 0.2s ease, transform 0.2s ease;
}

.cdn-card:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  transform: translateY(-2px);
}

.cdn-card-head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 13px;
  align-items: center;
  margin-bottom: 17px;
}

.cdn-card .library-icon {
  width: 44px;
  height: 44px;
}

.cdn-card h3 {
  margin: 0 0 3px;
  font-size: 16px;
}

.cdn-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.version-tag {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  font: 9px var(--mono);
}

.cdn-code-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 7px;
  align-items: center;
}

.cdn-url {
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--muted);
  font: 9px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  padding: 9px 10px;
  font-size: 11px;
}

.empty-state {
  padding: 70px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.tool-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
}

.tool-sidebar,
.tool-workspace {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

.tool-sidebar {
  align-self: start;
  padding: 9px;
}

.tool-nav-button {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.tool-nav-button:hover,
.tool-nav-button.is-active {
  background: var(--surface-2);
  color: var(--text);
}

.tool-nav-button.is-active {
  box-shadow: inset 2px 0 var(--accent);
}

.tool-nav-button span {
  min-width: 27px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
}

.tool-nav-button strong {
  font-size: 13px;
}

.tool-workspace {
  min-height: 520px;
  padding: 25px;
}

.tool-title-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.tool-title-row h2 {
  margin: 0 0 6px;
  font-size: 25px;
}

.tool-title-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.privacy-badge {
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 7px;
  color: var(--accent);
  font: 8px var(--mono);
  letter-spacing: 0.08em;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.editor-box label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font: 9px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-textarea,
.tool-input,
.tool-output {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--bg-soft);
  color: var(--text);
  font: 11px/1.7 var(--mono);
}

.tool-textarea {
  min-height: 300px;
  padding: 14px;
  resize: vertical;
}

.tool-textarea:focus,
.tool-input:focus {
  border-color: var(--accent);
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.primary-button,
.secondary-button {
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #10140a;
}

.secondary-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.secondary-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.single-tool {
  max-width: 720px;
}

.tool-input {
  min-height: 48px;
  padding: 0 13px;
}

.tool-output {
  min-height: 120px;
  margin-top: 13px;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-all;
}

.uuid-output {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 18px;
}

.uuid-output code {
  flex: 1;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--accent);
  font: 13px var(--mono);
  word-break: break-all;
}

.color-tool {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
}

.color-preview {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #a8ff35;
}

.color-controls {
  display: grid;
  gap: 12px;
  align-content: start;
}

.color-controls input[type="color"] {
  width: 100%;
  height: 48px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
}

.builder-page {
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto;
  padding: 75px 0 110px;
}

.builder-hero {
  display: flex;
  gap: 30px;
  align-items: flex-end;
  justify-content: space-between;
}

.builder-top-actions,
.builder-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-builder {
  display: grid;
  grid-template-columns: 240px minmax(420px, 1fr) 280px;
  gap: 14px;
  align-items: start;
}

.builder-panel,
.builder-output {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

.builder-panel {
  overflow: hidden;
}

.builder-panel-head {
  display: flex;
  gap: 11px;
  align-items: center;
  min-height: 64px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
}

.builder-panel-head > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 8px;
  color: var(--accent);
  font: 9px var(--mono);
}

.builder-panel-head strong,
.builder-panel-head small {
  display: block;
}

.builder-panel-head strong {
  margin-bottom: 3px;
  font-size: 13px;
}

.builder-panel-head small {
  color: var(--muted);
  font-size: 10px;
}

.builder-panel-head em {
  margin-left: auto;
  color: var(--dim);
  font: normal 8px var(--mono);
}

.component-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}

.component-item {
  display: grid;
  gap: 7px;
  place-items: center;
  min-height: 74px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 11px;
  cursor: grab;
  user-select: none;
  transition: border 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.component-item:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

.component-item:active {
  cursor: grabbing;
}

.component-item i {
  color: var(--accent);
  font: normal 17px var(--mono);
}

.builder-canvas-panel {
  min-height: 640px;
}

.form-canvas {
  min-height: 574px;
  padding: 20px;
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    var(--bg-soft);
  background-size: 24px 24px;
  transition: box-shadow 0.2s ease;
}

.form-canvas.is-dragover {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.canvas-empty {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 530px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.canvas-empty b {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--accent);
  font: 25px/1 var(--mono);
}

.canvas-empty strong {
  font-size: 14px;
}

.canvas-empty span {
  color: var(--dim);
  font-size: 11px;
}

.canvas-form {
  display: grid;
  gap: 12px;
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.canvas-field {
  position: relative;
  padding: 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.canvas-field:hover,
.canvas-field.is-selected {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.canvas-field.is-dragging {
  opacity: 0.35;
}

.canvas-field .fb-control,
.canvas-field .fb-select,
.canvas-field .fb-textarea,
.canvas-field .fb-choice,
.canvas-field .fb-switch,
.canvas-field .fb-submit {
  opacity: 1;
  pointer-events: none;
}

.canvas-field-tools {
  position: absolute;
  z-index: 2;
  top: -10px;
  right: 9px;
  display: none;
  gap: 4px;
}

.canvas-field:hover .canvas-field-tools,
.canvas-field.is-selected .canvas-field-tools {
  display: flex;
}

.canvas-field-tools button {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font: 9px var(--mono);
  cursor: pointer;
}

.canvas-field-tools button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.fb-field {
  display: grid;
  gap: 7px;
}

.fb-field > label,
.fb-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.fb-required {
  margin-left: 3px;
  color: var(--danger);
}

.fb-control,
.fb-select,
.fb-textarea,
.property-control {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 13px;
}

.fb-control,
.fb-select {
  height: 42px;
  padding: 0 12px;
}

.fb-textarea {
  min-height: 90px;
  padding: 11px 12px;
  resize: vertical;
}

.fb-control:focus,
.fb-select:focus,
.fb-textarea:focus,
.property-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 9%, transparent);
}

.fb-select-wrap {
  position: relative;
}

.fb-select-wrap::after {
  position: absolute;
  top: 50%;
  right: 13px;
  color: var(--accent);
  content: "⌄";
  pointer-events: none;
  transform: translateY(-55%);
}

.fb-select {
  appearance: none;
  padding-right: 35px;
}

.fb-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.fb-choice {
  position: relative;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.fb-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fb-choice-mark {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.fb-choice input[type="radio"] + .fb-choice-mark {
  border-radius: 50%;
}

.fb-choice input:checked + .fb-choice-mark {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--surface);
}

.fb-choice input:checked ~ span:last-child {
  color: var(--text);
}

.fb-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
}

.fb-switch {
  position: relative;
  width: 46px;
  height: 25px;
}

.fb-switch input {
  position: absolute;
  opacity: 0;
}

.fb-switch span {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: var(--line);
  cursor: pointer;
  transition: 0.2s ease;
}

.fb-switch span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform 0.2s ease;
}

.fb-switch input:checked + span {
  background: var(--accent);
}

.fb-switch input:checked + span::after {
  transform: translateX(21px);
}

.fb-submit {
  min-height: 43px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  color: #121709;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.property-editor {
  min-height: 574px;
  padding: 15px;
}

.property-empty {
  display: grid;
  place-items: center;
  min-height: 300px;
  color: var(--dim);
  font-size: 12px;
  text-align: center;
}

.property-form {
  display: grid;
  gap: 14px;
}

.property-group {
  display: grid;
  gap: 7px;
}

.property-group label {
  color: var(--muted);
  font: 8px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.property-control {
  min-height: 39px;
  padding: 8px 10px;
}

textarea.property-control {
  min-height: 86px;
  resize: vertical;
}

.property-check {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.property-help {
  margin: -4px 0 0;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.6;
}

.builder-output {
  margin-top: 16px;
  overflow: hidden;
}

.builder-output-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 19px 21px;
  border-bottom: 1px solid var(--line-soft);
}

.builder-output-head h2 {
  margin: 7px 0 0;
  font-size: 21px;
}

.builder-code-tabs {
  display: flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-soft);
}

.builder-code-tabs button {
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: 9px var(--mono);
  cursor: pointer;
}

.builder-code-tabs button.is-active {
  background: var(--surface);
  color: var(--accent);
}

.builder-output-actions {
  justify-content: flex-end;
}

.generated-code {
  display: block;
  width: 100%;
  min-height: 300px;
  padding: 22px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: #0d0f14;
  color: #dfe2e8;
  font: 11px/1.75 var(--mono);
  tab-size: 2;
}

.swiper-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gsap-intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 76px;
}

.gsap-intro-grid article,
.gsap-tutorial {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

.gsap-intro-grid article {
  padding: 22px;
}

.gsap-intro-grid span {
  color: var(--accent);
  font: 11px var(--mono);
}

.gsap-intro-grid h3 {
  margin: 11px 0 8px;
  font-size: 20px;
}

.gsap-intro-grid p,
.gsap-intro-grid li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.gsap-intro-grid pre {
  margin: 14px 0 0;
  padding: 14px;
  overflow: auto;
  border-radius: 10px;
  background: #0d0f14;
  color: #dfe2e8;
  font: 12px/1.65 var(--mono);
}

.gsap-intro-grid ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.gsap-demo-heading {
  margin-bottom: 18px;
}

.gsap-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gsap-demo-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease;
}

.gsap-demo-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  transform: translateY(-4px);
}

.gsap-demo-visual {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 52px);
  gap: 13px;
  place-content: center;
  height: 190px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 40% 45%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 48%),
    var(--bg-soft);
}

.gsap-demo-visual i {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent);
  box-shadow: 0 18px 45px color-mix(in srgb, var(--accent) 24%, transparent);
  animation: gsap-preview-bounce 1.2s ease-in-out infinite alternate;
}

.gsap-demo-visual i:nth-child(2) {
  animation-delay: 0.12s;
}

.gsap-demo-visual i:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes gsap-preview-bounce {
  to { transform: translateY(-28px) rotate(18deg); opacity: 0.72; }
}

.gsap-tutorial {
  margin-top: 80px;
  padding: 28px;
}

.gsap-tutorial ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: gsap-step;
}

.gsap-tutorial li {
  position: relative;
  min-height: 88px;
  padding: 18px 18px 18px 56px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  counter-increment: gsap-step;
}

.gsap-tutorial li::before {
  position: absolute;
  top: 18px;
  left: 18px;
  color: var(--accent);
  content: counter(gsap-step, decimal-leading-zero);
  font: 11px var(--mono);
}

.gsap-tutorial strong {
  color: var(--text);
}

.gsap-dialog {
  width: min(1180px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.gsap-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.swiper-demo-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease;
}

.swiper-demo-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  transform: translateY(-4px);
}

.swiper-demo-visual {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  height: 190px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    var(--bg-soft);
}

.swiper-demo-visual i {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 64%;
  height: 120px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 13px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 26%, var(--surface)), var(--surface));
  color: var(--accent);
  font: normal 13px var(--mono);
  box-shadow: var(--shadow);
}

.swiper-demo-visual.is-cards i {
  width: 27%;
  height: 110px;
}

.swiper-demo-visual.is-cards i:nth-child(2) {
  transform: translateY(-8px);
}

.swiper-demo-visual.is-coverflow i {
  width: 38%;
  transform: perspective(300px) rotateY(24deg) scale(0.85);
}

.swiper-demo-visual.is-coverflow i:nth-child(2) {
  z-index: 2;
  transform: scale(1);
}

.swiper-demo-visual.is-coverflow i:nth-child(3) {
  transform: perspective(300px) rotateY(-24deg) scale(0.85);
}

.swiper-demo-card-body {
  padding: 18px;
}

.swiper-demo-card-body h3 {
  margin: 0 0 7px;
  font-size: 16px;
}

.swiper-demo-card-body p {
  min-height: 36px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.swiper-demo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--dim);
  font: 8px var(--mono);
}

.swiper-demo-meta span:last-child {
  color: var(--accent);
}

.swiper-dialog {
  width: min(1180px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.swiper-dialog::backdrop,
.form-preview-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.swiper-dialog-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(780px, calc(100vh - 30px));
}

.swiper-studio {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(350px, 0.85fr);
  min-height: 0;
}

.swiper-frame {
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  min-height: 360px;
  margin: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f1117;
}

.form-preview-dialog {
  width: min(900px, calc(100% - 30px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.resource-dialog {
  width: min(860px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.resource-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.resource-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 30px);
}

.resource-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding: 22px;
  overflow-y: auto;
}

.resource-field {
  display: grid;
  gap: 7px;
}

.resource-field.is-wide {
  grid-column: 1 / -1;
}

.resource-field label {
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.resource-input,
.resource-textarea,
.resource-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--bg-soft);
  color: var(--text);
  font: 13px/1.65 var(--mono);
}

.resource-input,
.resource-select {
  min-height: 44px;
  padding: 0 12px;
}

.resource-textarea {
  min-height: 150px;
  padding: 12px;
  resize: vertical;
  tab-size: 2;
}

.resource-input:focus,
.resource-textarea:focus,
.resource-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 9%, transparent);
}

.form-preview-shell {
  display: grid;
  grid-template-rows: auto minmax(500px, 70vh);
}

#formPreviewFrame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f4f5f0;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1240px, calc(100% - 48px));
  min-height: 100px;
  margin: auto;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.site-footer > span {
  justify-self: end;
  font-family: var(--mono);
}

.footer-brand {
  color: var(--muted);
  font-size: 13px;
}

.footer-brand .brand-mark {
  width: 29px;
  height: 29px;
  font-size: 12px;
}

.effect-dialog {
  width: min(1180px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.effect-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.dialog-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(780px, calc(100vh - 30px));
  max-height: calc(100vh - 30px);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 21px 23px;
  border-bottom: 1px solid var(--line-soft);
}

.dialog-header h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.dialog-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dialog-category {
  color: var(--accent);
  font: 9px var(--mono);
  letter-spacing: 0.1em;
}

.dialog-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dialog-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}

.effect-studio {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(350px, 0.85fr);
  min-height: 0;
}

.studio-preview-panel,
.studio-editor-panel {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.studio-preview-panel {
  border-right: 1px solid var(--line-soft);
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    var(--bg-soft);
  background-size: 24px 24px;
}

.studio-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 13px 0 17px;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--muted);
  font: 9px var(--mono);
  letter-spacing: 0.08em;
}

.studio-panel-head span {
  display: flex;
  gap: 7px;
  align-items: center;
}

.studio-panel-head i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.effect-frame {
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  min-height: 360px;
  margin: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f1117;
}

.code-tabs {
  display: flex;
  gap: 3px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
}

.code-tabs button {
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: 9px var(--mono);
  cursor: pointer;
}

.code-tabs button.is-active {
  background: var(--surface);
  color: var(--accent);
}

.effect-editor {
  width: 100%;
  height: 100%;
  min-height: 360px;
  padding: 20px;
  resize: none;
  border: 0;
  outline: 0;
  background: #0d0f14;
  color: #dfe2e8;
  font: 11px/1.8 var(--mono);
  tab-size: 2;
}

.effect-editor:focus {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
}

.studio-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 11px 15px 11px 22px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-2);
}

.studio-actions > span {
  color: var(--dim);
  font: 9px var(--mono);
}

.studio-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  padding: 11px 15px;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  border-radius: 9px;
  background: var(--surface);
  color: var(--accent);
  font: 10px var(--mono);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .main-nav {
    justify-content: center;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 45px;
    padding-top: 65px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-terminal {
    width: min(640px, 100%);
    transform: none;
  }

  .effect-grid,
  .full-effect-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section {
    grid-template-columns: 1fr;
  }

  .effect-studio {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .studio-preview-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .effect-frame,
  .effect-editor {
    min-height: 320px;
  }

  .form-builder {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .property-panel {
    grid-column: 1 / -1;
  }

  .property-editor {
    min-height: 0;
  }

  .property-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .builder-output-head {
    grid-template-columns: 1fr auto;
  }

  .builder-output-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .swiper-demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gsap-intro-grid,
  .gsap-demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gsap-tutorial ol {
    grid-template-columns: 1fr;
  }

  .swiper-studio {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .swiper-frame {
    min-height: 330px;
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
    height: auto;
    min-height: 64px;
    padding: 12px 18px;
  }

  .main-nav {
    position: fixed;
    z-index: 50;
    right: 12px;
    bottom: 12px;
    left: 12px;
    justify-content: space-around;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--header-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
  }

  .nav-link {
    padding: 9px 10px;
    font-size: 13px;
  }

  .nav-link.is-active::after {
    right: 10px;
    left: 10px;
  }

  .github-link {
    display: none;
  }

  .hero,
  .content-section,
  .stats-bar,
  .library-page,
  .builder-page,
  .site-footer {
    width: min(100% - 30px, 1240px);
  }

  .hero {
    min-height: 0;
    padding: 55px 0 45px;
  }

  .hero h1 {
    font-size: clamp(43px, 13vw, 62px);
  }

  .hero-intro {
    font-size: 16px;
  }

  kbd {
    display: none;
  }

  .hero-terminal pre {
    min-height: 270px;
    padding: 22px 18px;
    font-size: 12px;
  }

  .stats-bar {
    grid-template-columns: 1fr 1fr;
  }

  .stats-bar div:nth-child(2) {
    border-right: 0;
  }

  .stats-bar div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line-soft);
  }

  .content-section {
    padding-top: 75px;
  }

  .effect-grid,
  .full-effect-grid,
  .cdn-grid {
    grid-template-columns: 1fr;
  }

  .library-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .page-hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-fields {
    grid-template-columns: 1fr;
  }

  .resource-field.is-wide {
    grid-column: auto;
  }

  .library-search {
    width: 100%;
  }

  .filter-group {
    justify-content: flex-start;
  }

  .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-sidebar {
    display: flex;
    overflow-x: auto;
  }

  .tool-nav-button {
    flex: 0 0 auto;
    width: auto;
  }

  .editor-grid,
  .color-tool {
    grid-template-columns: 1fr;
  }

  .tool-title-row {
    flex-direction: column;
  }

  .builder-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-builder {
    grid-template-columns: 1fr;
  }

  .component-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .property-panel {
    grid-column: auto;
  }

  .property-form,
  .builder-output-head {
    grid-template-columns: 1fr;
  }

  .builder-code-tabs {
    width: max-content;
  }

  .swiper-demo-grid {
    grid-template-columns: 1fr;
  }

  .gsap-intro-grid,
  .gsap-demo-grid {
    grid-template-columns: 1fr;
  }

  .swiper-dialog-shell {
    height: calc(100vh - 16px);
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 9px;
    align-content: center;
    padding-bottom: 80px;
    text-align: center;
  }

  .footer-brand,
  .site-footer > span {
    justify-self: center;
  }

  .effect-dialog {
    max-height: calc(100vh - 16px);
  }

  .dialog-shell {
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }

  .dialog-header {
    align-items: flex-start;
    padding: 15px;
  }

  .dialog-header-actions .secondary-button {
    display: none;
  }

  .studio-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 11px;
  }

  .studio-actions > div {
    justify-content: flex-start;
  }
}

@media (max-width: 470px) {
  .mini-tool-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
  }

  .effect-preview {
    height: 175px;
  }

  .cdn-code-row {
    grid-template-columns: 1fr auto;
  }

  .cdn-code-row .cdn-url {
    grid-column: 1 / -1;
  }

  .component-list {
    grid-template-columns: 1fr 1fr;
  }

  .canvas-form {
    padding: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
