:root {
  --green: #83b735;
  --green-soft: #e8f1d2;
  --text: #242424;
  --muted: #666;
  --line: #e8e8e8;
  --page: #f7f7f7;
  --white: #fff;
  --red: #ff3f32;
  --blue: #3b82ff;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 0;
  max-width: 100vw;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--page);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

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

main,
section,
aside,
div,
form {
  max-width: 100%;
}

img {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.site-header.is-scrolled {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 40px;
  width: min(1230px, calc(100% - 44px));
  height: 58px;
  margin: 0 auto;
}

.brand img {
  display: block;
  width: 155px;
  height: auto;
}

.text-brand {
  display: inline-flex;
  align-items: center;
  min-height: 58px;
  color: #1f1f1f;
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  justify-content: flex-end;
  gap: 30px;
  color: #2c2c2c;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 58px;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--green);
}

.main-nav span {
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
}

.buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  color: #fff;
  background: #0d0d0d;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.buy-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.buy-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: rgba(131, 183, 53, 0.14);
  font-size: 12px;
}

.landing-hero {
  padding: 82px 0 70px;
}

.title-block {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto 54px;
  text-align: center;
}

.big-number {
  height: 105px;
  margin-bottom: -10px;
  color: var(--green);
  font-size: clamp(104px, 12vw, 145px);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -5px;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.6px;
}

.title-block p {
  max-width: 650px;
  margin: 0 auto;
  color: #6f6f6f;
  font-size: 13px;
  line-height: 1.8;
}

.demo-shell {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 34px;
  width: min(1470px, calc(100% - 58px));
  margin: 0 auto;
  align-items: start;
}

.demo-sidebar {
  position: sticky;
  top: 82px;
  z-index: 5;
}

.demo-search {
  display: grid;
  grid-template-columns: 1fr 34px;
  align-items: center;
  height: 36px;
  margin-bottom: 10px;
  border: 1px solid #dcdcdc;
  border-radius: 999px;
  background: var(--white);
  overflow: hidden;
}

.demo-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 0 0 14px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 11px;
}

.demo-search button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  color: #777;
  background: transparent;
}

.demo-search svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.category-list {
  display: grid;
  gap: 2px;
}

.category {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  height: 35px;
  padding: 0 10px 0 14px;
  border: 0;
  border-radius: 999px;
  color: #666;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  transition: color 0.2s ease, background 0.2s ease;
}

.category b {
  display: inline-flex;
  min-width: 28px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #777;
  background: #e7e7e7;
  font-size: 10px;
  font-weight: 800;
}

.category:hover {
  color: #333;
  background: #eee;
}

.category.active {
  color: #3f4b28;
  background: var(--green-soft);
}

.category.active b {
  color: #fff;
  background: var(--green);
}

.demo-content {
  min-width: 0;
}

.notice {
  display: none;
  margin-bottom: 24px;
  padding: 18px 22px;
  border-radius: var(--radius);
  color: #555;
  background: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.notice.is-visible {
  display: block;
}

.demo-grid {
  --demo-columns: 4;
  --demo-gap: 30px;
  display: grid;
  grid-template-columns: repeat(var(--demo-columns), minmax(0, 1fr));
  gap: var(--demo-gap);
}

.demo-card {
  position: relative;
  display: block;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
  opacity: 0;
  transform: translateY(20px);
  animation: cardIn 0.45s ease forwards;
}

.demo-card.is-hidden {
  display: none;
}

.demo-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.demo-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  opacity: 0;
  transform: translateX(-100%);
}

.demo-card:hover .demo-thumb {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.13);
}

.demo-card:hover .demo-thumb::after {
  opacity: 1;
  animation: shine 0.75s ease;
}

.demo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  padding: clamp(6px, 1.5vw, 18px);
  object-fit: contain;
}

.label {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  height: 25px;
  min-width: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
}

.label.new {
  background: var(--blue);
}

.demo-caption {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding-top: 10px;
}

.demo-title-group {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.demo-title {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.demo-series {
  overflow: hidden;
  color: #777;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.live-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  color: #555;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: max-width 0.25s ease, opacity 0.25s ease;
}

.live-preview svg {
  flex: 0 0 auto;
  width: 30px;
  height: 18px;
}

.demo-card:hover .live-preview {
  max-width: 135px;
  opacity: 1;
}

.scroll-top {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 15;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #999;
  background: #fff;
  box-shadow: 0 7px 22px rgba(0, 0, 0, 0.12);
  font-size: 24px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 80px;
  align-items: center;
  gap: 12px;
  padding: 34px;
  background: rgba(18, 18, 18, 0.42);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(1120px, 100%);
  min-width: 0;
  margin: 0;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  opacity: 0;
  transform: scale(0.96) translateY(12px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.lightbox.is-open .lightbox-panel {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.lightbox-stage {
  display: grid;
  width: 100%;
  min-height: min(62vh, 620px);
  place-items: center;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.lightbox-stage img {
  display: block;
  max-width: min(1180px, 100%);
  max-height: calc(100vh - 230px);
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
}

.lightbox-panel figcaption {
  max-width: min(900px, 100%);
  color: #222;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.lightbox-thumbs {
  display: flex;
  width: 100%;
  max-width: 760px;
  gap: 10px;
  padding: 2px 2px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.lightbox-thumbs::-webkit-scrollbar {
  display: none;
}

.lightbox-thumb {
  flex: 0 0 clamp(58px, 10vw, 82px);
  aspect-ratio: 1 / 1;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.08);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.lightbox-thumb:hover {
  transform: translateY(-2px);
}

.lightbox-thumb.is-active {
  border-color: var(--green);
}

.lightbox-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  border: 0;
  color: #222;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease, background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  transform: translateY(-2px);
  background: #fff;
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 24px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.lightbox-nav {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  font-size: 44px;
  line-height: 1;
}

.lightbox-nav.prev {
  justify-self: end;
}

.lightbox-nav.next {
  justify-self: start;
}

body.lightbox-open {
  overflow: hidden;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .main-nav {
    gap: 18px;
  }

  .demo-grid {
    --demo-columns: 3;
  }
}

@media (max-width: 900px) {
  .header-inner {
    width: calc(100% - 28px);
    gap: 18px;
  }

  .main-nav {
    display: none;
  }

  .demo-shell {
    grid-template-columns: 1fr;
    width: calc(100% - 28px);
    max-width: 680px;
  }

  .demo-sidebar {
    position: static;
  }

  .category-list {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding-bottom: 6px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .category {
    flex: 0 0 auto;
    width: auto;
    gap: 14px;
  }
}

@media (max-width: 767px) {
  .site-header {
    width: 100%;
  }

  .header-inner {
    width: min(520px, calc(100vw - 28px));
    height: 54px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .text-brand {
    min-width: 0;
    min-height: 54px;
    overflow: hidden;
    font-size: clamp(15px, 3.8vw, 18px);
    text-overflow: ellipsis;
  }

  .buy-button {
    min-width: auto;
    height: 32px;
    padding: 0 13px;
  }

  .landing-hero {
    width: 100%;
    padding: 46px 0 52px;
  }

  .title-block {
    width: min(430px, calc(100vw - 30px));
    margin-right: auto;
    margin-bottom: 32px;
    margin-left: auto;
    text-align: center;
  }

  .big-number {
    height: auto;
    margin-bottom: 2px;
    font-size: clamp(64px, 18vw, 98px);
    letter-spacing: -3px;
    text-align: center;
  }

  h1 {
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    font-size: clamp(22px, 5.2vw, 28px);
    line-height: 1.16;
    text-align: center;
  }

  .title-block p {
    max-width: 100%;
    text-align: center;
  }

  .demo-shell {
    width: min(520px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .demo-content,
  .demo-sidebar,
  .demo-search,
  .demo-grid {
    width: 100%;
    min-width: 0;
  }

  .demo-search {
    height: 44px;
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .demo-search input {
    font-size: 16px;
  }

  .demo-search button {
    width: 44px;
    height: 44px;
  }

  .category-list {
    width: 100%;
    max-width: 100%;
    scrollbar-width: none;
  }

  .category-list::-webkit-scrollbar {
    display: none;
  }

  .demo-grid {
    --demo-columns: 2;
    --demo-gap: 16px 14px;
  }

  .demo-card {
    width: 100%;
  }

  .demo-thumb {
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 54px;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .text-brand {
    min-width: 0;
    min-height: 54px;
    overflow: hidden;
    font-size: clamp(15px, 4vw, 18px);
    text-overflow: ellipsis;
  }

  .buy-button {
    min-width: auto;
    height: 32px;
    padding: 0 13px;
  }

  .demo-search {
    height: 44px;
    grid-template-columns: 1fr 44px;
  }

  .demo-search input {
    font-size: 16px;
  }

  .demo-search button {
    width: 44px;
    height: 44px;
  }

  .landing-hero {
    padding: 48px 0 52px;
  }

  .title-block {
    width: min(430px, calc(100% - 32px));
    margin-bottom: 34px;
  }

  .big-number {
    height: auto;
    margin-bottom: 2px;
    font-size: clamp(70px, 21vw, 100px);
    letter-spacing: -3px;
  }

  h1 {
    font-size: clamp(22px, 5.7vw, 28px);
    line-height: 1.16;
  }

  .demo-grid {
    --demo-columns: 2;
    --demo-gap: 18px 14px;
  }

  .demo-thumb {
    aspect-ratio: 1 / 1;
  }

  .lightbox {
    grid-template-columns: 1fr;
    padding: 62px 14px 20px;
  }

  .lightbox-nav {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    font-size: 34px;
    transform: translateY(-50%);
  }

  .lightbox-nav:hover {
    transform: translateY(-52%);
  }

  .lightbox-nav.prev {
    left: 12px;
  }

  .lightbox-nav.next {
    right: 12px;
  }

  .lightbox-panel {
    padding: 12px;
  }

  .lightbox-stage {
    min-height: min(54vh, 520px);
  }

  .lightbox-stage img {
    max-height: calc(100vh - 210px);
  }

  .demo-title {
    font-size: 12px;
  }

  .live-preview {
    display: none;
  }
}

@media (max-width: 600px) {
  .title-block {
    width: min(390px, calc(100% - 30px));
    margin-bottom: 30px;
  }

  .big-number {
    font-size: clamp(60px, 20vw, 88px);
    letter-spacing: -2px;
  }

  h1 {
    font-size: clamp(20px, 5.35vw, 25px);
    letter-spacing: -0.3px;
  }

  .title-block p {
    font-size: 12.5px;
    line-height: 1.75;
  }
}

@media (max-width: 420px) {
  .header-inner,
  .demo-shell {
    width: calc(100% - 24px);
  }

  .buy-button {
    padding: 0 11px;
    font-size: 10px;
  }

  .title-block {
    width: calc(100% - 28px);
  }

  .big-number {
    font-size: clamp(56px, 19vw, 76px);
  }

  h1 {
    font-size: clamp(19px, 5.1vw, 22px);
  }
}

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