:root,
[data-theme="sunny"] {
  --bg-page: #f5f4f0;
  --bg-card: #ffffff;
  --bg-soft: #f0eee8;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --text-primary: #18181b;
  --text-secondary: #5e5d58;
  --text-muted: #8c8b84;
  --border-soft: rgba(24, 24, 27, 0.08);
  --border-strong: rgba(24, 24, 27, 0.14);
  --accent: #ff6b4a;
  --accent-hover: #f25937;
  --accent-soft: rgba(255, 107, 74, 0.12);
  --mint: #2eb872;
  --shadow-card: 0 12px 34px -14px rgba(24, 24, 27, 0.09);
  --shadow-glow: 0 10px 26px -8px rgba(255, 107, 74, 0.45);
  --orb-1: rgba(255, 107, 74, 0.14);
  --orb-2: rgba(255, 179, 71, 0.14);
  --cat-fur: #ffffff;
  --cat-stroke: #1c1c21;
  --cat-shadow: rgba(24, 24, 27, 0.09);
  --kb-body: #222229;
  --kb-key: #f5f4f0;
}

[data-theme="starry"] {
  --bg-page: #0f0f14;
  --bg-card: #171720;
  --bg-soft: #20202c;
  --bg-glass: rgba(23, 23, 32, 0.84);
  --text-primary: #f5f4f0;
  --text-secondary: #b4b2c4;
  --text-muted: #7b798f;
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #ff745c;
  --accent-hover: #ff8772;
  --accent-soft: rgba(255, 116, 92, 0.16);
  --mint: #38d388;
  --shadow-card: 0 16px 40px -16px rgba(0, 0, 0, 0.58);
  --shadow-glow: 0 12px 28px -8px rgba(255, 116, 92, 0.45);
  --orb-1: rgba(255, 116, 92, 0.16);
  --orb-2: rgba(114, 137, 255, 0.14);
  --cat-fur: #f8f7f3;
  --cat-stroke: #121218;
  --cat-shadow: rgba(0, 0, 0, 0.45);
  --kb-body: #2c2c3a;
  --kb-key: #e6e5ef;
}

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

html {
  scroll-behavior: smooth;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
  position: relative;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 6px;
}

/* Soft ambient orbs */
.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.bg-orb-1 {
  width: 440px;
  height: 440px;
  top: -120px;
  left: -80px;
  background: var(--orb-1);
}

.bg-orb-2 {
  width: 420px;
  height: 420px;
  top: 220px;
  right: -120px;
  background: var(--orb-2);
}

/* ==================== NAVBAR ==================== */
.navbar-wrap {
  position: sticky;
  top: 14px;
  z-index: 40;
  padding: 0 20px;
  margin-top: 14px;
}

.navbar {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px 8px 10px;
  border-radius: 999px;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 6px;
}

.brand-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--border-soft);
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-domain {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-pill {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-pill:hover {
  background: var(--bg-soft);
  color: var(--text-primary);
}

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

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
  transform: scale(1.05);
  border-color: var(--border-strong);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

[data-theme="sunny"] .icon-sun {
  display: none;
}
[data-theme="starry"] .icon-moon {
  display: none;
}

/* ==================== BUTTONS ==================== */
.btn-primary,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 22px;
  cursor: pointer;
  border: none;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn-primary svg,
.btn-soft svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff895c);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  opacity: 0.94;
}

.btn-soft {
  background: var(--bg-soft);
  color: var(--text-primary);
  border: 1px solid var(--border-soft);
}

.btn-soft:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12.5px;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 14.5px;
}

/* ==================== LAYOUT & CARDS ==================== */
.container {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==================== HERO ==================== */
.hero-grid {
  display: grid;
  grid-template-columns: 1.28fr 0.92fr;
  gap: 18px;
  align-items: stretch;
}

.hero-main {
  padding: 34px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(46, 184, 114, 0.22);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: 0.72; }
}

.hero-title {
  font-size: clamp(32px, 4.4vw, 46px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.accent-text {
  background: linear-gradient(135deg, var(--accent), #ff9f43);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-bio {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 22px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  padding: 6px 12px;
  border-radius: 999px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Interactive Cat Card */
.hero-cat-card {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.cat-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.cat-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px 4px;
  border-radius: 22px;
  background: var(--bg-soft);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  transition: transform 0.16s ease;
}

.cat-stage:active {
  transform: scale(0.985);
}

.cat-speech {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.12);
  margin-bottom: 4px;
  transition: transform 0.2s ease;
}

.desk-cat-svg {
  width: 226px;
  height: auto;
  display: block;
}

.cat-eyes-happy {
  display: none;
}

.cat-stage.is-petted .cat-eyes-open {
  display: none;
}

.cat-stage.is-petted .cat-eyes-happy {
  display: block;
}

.cat-paw {
  transition: transform 0.12s ease;
}

.cat-stage:hover .paw-left {
  animation: pawTap 0.55s ease-in-out infinite alternate;
}

.cat-stage:hover .paw-right {
  animation: pawTap 0.55s 0.25s ease-in-out infinite alternate;
}

@keyframes pawTap {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

.cat-pops {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.float-pop {
  position: absolute;
  font-size: 15px;
  animation: floatUp 0.9s ease-out forwards;
}

@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0) scale(0.8); }
  100% { opacity: 0; transform: translateY(-46px) scale(1.25); }
}

.mini-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-stat {
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-stat strong {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mini-stat span {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==================== SECTIONS ==================== */
.section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-margin-top: 86px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 4px;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.version-pill {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: var(--mint);
  padding: 5px 13px;
  border-radius: 999px;
}

.text-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.text-link:hover {
  text-decoration: underline;
}

/* Flagship Project Hero Card */
.project-hero {
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.app-badge-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.app-icon-lg {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--border-soft);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.25);
}

.app-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.app-sub {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.project-desc {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 780px;
  margin-bottom: 22px;
}

.project-desc strong {
  color: var(--text-primary);
  font-weight: 600;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Quickstart collapsible */
.quickstart-box {
  display: none;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 20px 22px;
}

.quickstart-box.open {
  display: block;
}

.quickstart-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.quickstart-list {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.quickstart-list strong {
  color: var(--text-primary);
}

/* 6 Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.fi-coral { background: rgba(255, 107, 74, 0.14); color: #ff6b4a; }
.fi-pink { background: rgba(244, 114, 182, 0.16); color: #ec4899; }
.fi-amber { background: rgba(255, 159, 67, 0.16); color: #f59e0b; }
.fi-mint { background: rgba(46, 184, 114, 0.16); color: #2eb872; }
.fi-blue { background: rgba(75, 168, 255, 0.16); color: #3b82f6; }
.fi-purple { background: rgba(168, 85, 247, 0.16); color: #a855f7; }

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
}

.feature-card p {
  font-size: 13px;
  line-height: 1.68;
  color: var(--text-secondary);
}

/* ==================== CHANGELOG ==================== */
.changelog-card {
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.log-item + .log-item {
  border-top: 1px solid var(--border-soft);
  padding-top: 20px;
}

.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.log-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-primary);
}

.log-tag-latest {
  background: var(--accent-soft);
  color: var(--accent);
}

.log-date {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.log-list {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--text-secondary);
}

/* ==================== LAB ==================== */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.lab-card {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lab-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.lab-badge-alt {
  background: var(--bg-soft);
  color: var(--text-secondary);
}

.lab-card h3 {
  font-size: 17px;
  font-weight: 700;
}

.lab-card p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ==================== FOOTER & SECRET PAW ==================== */
.footer {
  position: relative;
  z-index: 1;
  padding: 18px 20px 44px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-sep {
  opacity: 0.4;
}

.secret-paw {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.55;
  padding: 4px 6px;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.secret-paw:hover {
  opacity: 1;
  transform: scale(1.18) rotate(-8deg);
  background: var(--accent-soft);
}

/* ==================== EASTER EGG MODAL ==================== */
.egg-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 10, 16, 0.56);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.egg-backdrop[hidden] {
  display: none;
}

.egg-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 30px;
  padding: 32px 28px 26px;
  text-align: center;
  box-shadow: 0 28px 60px -16px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  animation: popIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.egg-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.egg-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: var(--bg-soft);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
}

.egg-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.egg-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}

.egg-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.egg-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  background: #18181b;
  color: #f5f4f0;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

[data-theme="starry"] .toast {
  background: #f5f4f0;
  color: #18181b;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lab-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero-main,
  .project-hero,
  .changelog-card {
    padding: 22px 20px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .brand-domain {
    display: none;
  }
}
