*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --pink: #ff6eb4;
  --purple: #9b59f5;
  --yellow: #ffd93d;
  --cream: #fff8f0;
  --text: #3d2c4f;
  --text-light: #6b5a7a;
  --text-muted: #9585a8;
  --shadow: 0 8px 32px rgba(155, 89, 245, 0.18);
  --radius: 16px;
  --content-width: 720px;
  --header-h: 60px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--purple);
  text-decoration: none;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(155, 89, 245, 0.1);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--purple);
}

.logo-cat {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.header-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-light);
  padding: 6px 12px;
  border-radius: 20px;
  transition: color 0.2s, background 0.2s;
}

.header-nav a:hover {
  color: var(--pink);
  background: rgba(255, 110, 180, 0.08);
}

.header-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 20px 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("assets/hero-bg.png") center top / cover no-repeat;
  z-index: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 248, 240, 0.3) 0%,
    rgba(255, 248, 240, 0.85) 70%,
    var(--cream) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text);
}

.highlight-10 {
  background: linear-gradient(135deg, var(--pink), var(--yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 480px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 28px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: #fff;
  color: var(--purple);
  border: 2px solid rgba(155, 89, 245, 0.3);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.hero-mascot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cat-float {
  width: min(280px, 60vw);
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 12px 24px rgba(155, 89, 245, 0.25));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  gap: 8px;
  margin-top: -20px;
}

.demo-cell {
  position: relative;
  width: 64px;
  height: 64px;
  animation: pop-in 0.6s ease backwards;
  animation-delay: calc(var(--cell) * 0.1s);
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

.demo-cell > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.demo-num {
  position: absolute;
  inset: 0;
  width: 55%;
  height: 55%;
  margin: auto;
  object-fit: contain;
}

.demo-sum {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--pink);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Sections */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 20px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 40px;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-icon {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 16px;
}

.feature-icon img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.feature-icon-10 {
  gap: 2px;
}

.feature-num-fallback {
  font-size: 2rem;
  font-weight: 900;
  color: var(--pink);
  line-height: 1;
}

.cells-preview img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.feature-cat {
  height: 64px !important;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-light);
}

/* Preview board */
.preview {
  text-align: center;
}

.preview-board {
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 36px;
}

.board-row {
  display: flex;
  gap: 10px;
}

.board-cell {
  position: relative;
  width: 72px;
  height: 72px;
}

.board-cell img:first-child {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.board-num {
  position: absolute;
  inset: 0;
  width: 50%;
  height: 50%;
  margin: auto;
  object-fit: contain;
}

.board-cell.highlight {
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15) drop-shadow(0 0 8px rgba(255, 110, 180, 0.5)); }
}

.board-sum {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--pink);
}

.howto-steps {
  list-style: none;
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}

.howto-steps li {
  padding: 12px 0;
  border-bottom: 1px dashed rgba(155, 89, 245, 0.2);
  color: var(--text-light);
}

.howto-steps strong {
  color: var(--purple);
}

/* Download */
.download-card {
  background: linear-gradient(135deg, rgba(255, 110, 180, 0.12), rgba(155, 89, 245, 0.12));
  border-radius: 24px;
  padding: 48px;
  display: flex;
  align-items: center;
  gap: 40px;
  box-shadow: var(--shadow);
}

.download-cat {
  width: 140px;
  flex-shrink: 0;
}

.download-card h2 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.download-card p {
  color: var(--text-light);
  margin-bottom: 20px;
}

.download-note {
  font-size: 0.85rem !important;
  margin-top: 12px !important;
  margin-bottom: 0 !important;
}

/* Footer */
.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 20px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.footer-cat {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--pink);
}

.footer-contact {
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.65);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-mascot {
    order: -1;
  }

  .cat-float {
    width: 200px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .download-card {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .header-nav {
    gap: 12px;
    font-size: 0.85rem;
  }

  .board-cell {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  body:not(.subpage) .header-nav a:nth-child(2),
  body:not(.subpage) .header-nav a:nth-child(4) {
    display: none;
  }
}

/* ========== Subpages — homepage-style centered layout ========== */
body.subpage {
  background: var(--cream);
}

.page-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-bg {
  position: fixed;
  inset: 0;
  background: url("assets/hero-bg.png") center top / cover no-repeat;
  z-index: 0;
  pointer-events: none;
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 248, 240, 0.55) 0%,
    rgba(255, 248, 240, 0.82) 45%,
    rgba(255, 248, 240, 0.92) 100%
  );
}

.page-center {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 28px) 20px 48px;
}

.page-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 12px 48px rgba(155, 89, 245, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.page-card-head {
  text-align: center;
  padding: 36px 36px 28px;
  background: linear-gradient(180deg, rgba(255, 110, 180, 0.06), transparent);
  border-bottom: 1px dashed rgba(155, 89, 245, 0.15);
}

.page-card-head h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  color: var(--text);
  margin: 12px 0 8px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--text-light);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

.page-body {
  padding: 32px 36px 40px;
}

.page-body > p {
  font-size: 0.96rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 0;
}

.page-body > p + p:not(.page-meta) {
  margin-top: 8px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(155, 89, 245, 0.1);
  color: var(--text-muted);
  font-size: 0.93rem;
}

.page-body h2 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
  margin: 32px 0 14px;
  padding: 10px 0 10px 14px;
  border-left: 4px solid var(--pink);
  background: linear-gradient(90deg, rgba(255, 110, 180, 0.08), transparent);
  border-radius: 0 8px 8px 0;
  line-height: 1.4;
}

.page-body h2:first-child {
  margin-top: 0;
}

.page-body p,
.page-body li {
  line-height: 1.8;
}

.page-body ul {
  padding-left: 1.1rem;
  margin: 8px 0 20px;
}

.page-body li {
  color: var(--text-light);
  margin-bottom: 14px;
}

.page-body li strong {
  color: var(--purple);
  font-weight: 700;
}

.page-body li br {
  display: block;
  margin-top: 6px;
}

.page-body code {
  background: rgba(155, 89, 245, 0.08);
  color: var(--purple);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.88em;
}

.page-meta {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--purple);
  background: rgba(155, 89, 245, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.page-meta em {
  font-style: normal;
  font-weight: 600;
}

.contact-box {
  background: linear-gradient(135deg, rgba(255, 110, 180, 0.1), rgba(155, 89, 245, 0.1));
  border-radius: 12px;
  padding: 24px 26px;
  margin: 20px 0 8px;
  border: 1px solid rgba(155, 89, 245, 0.15);
}

.contact-box p {
  margin-bottom: 8px !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
}

.contact-box a {
  font-weight: 700;
  color: var(--purple);
}

.doc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.doc-list li {
  margin-bottom: 12px;
}

.doc-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(255, 110, 180, 0.06), rgba(155, 89, 245, 0.06));
  border-radius: 12px;
  font-weight: 700;
  color: var(--purple);
  border: 1px solid rgba(155, 89, 245, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}

.doc-list a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--pink);
}

.doc-list a::before {
  content: "";
  width: 36px;
  height: 36px;
  background: url("assets/cellBg/cell1.png") center / contain no-repeat;
  flex-shrink: 0;
}

.faq-list {
  list-style: none;
  padding: 0;
}

.faq-list li {
  padding: 18px 0;
  border-bottom: 1px dashed rgba(155, 89, 245, 0.15);
  line-height: 1.75;
}

.faq-list li:last-child {
  border-bottom: none;
}

.faq-list strong {
  color: var(--purple);
}

.faq-list li br {
  display: block;
  margin-top: 8px;
}

.support-intro {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px dashed rgba(155, 89, 245, 0.15);
}

.support-intro p {
  border-bottom: none !important;
  margin-bottom: 12px !important;
  padding-bottom: 0 !important;
}

.support-cat {
  width: 88px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(155, 89, 245, 0.2));
}

.url-box {
  background: rgba(155, 89, 245, 0.06);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
  font-size: 0.92rem;
  line-height: 1.6;
  border: 1px solid rgba(155, 89, 245, 0.1);
}

.url-box a {
  word-break: break-all;
}

body.subpage .site-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  background: rgba(61, 44, 79, 0.92);
  backdrop-filter: blur(8px);
}

@media (max-width: 768px) {
  .page-center {
    padding: calc(var(--header-h) + 16px) 14px 32px;
  }

  .page-card-head {
    padding: 28px 20px 22px;
  }

  .page-body {
    padding: 24px 20px 32px;
  }

  .support-intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
