* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: #f5f7fb;
  color: #1f2933;
  line-height: 1.7;
  overflow-y: scroll;
}

/* 隐藏浏览器滚动条但保留滚动能力（支持的内核会生效） */
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  scrollbar-width: none; /* Firefox */
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: #f5f7fb;
}

.layout {
  flex: 1;
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: radial-gradient(circle at 0 0, #4f46e5 0, #1d4ed8 40%, #020617 100%);
  color: #e5e7eb;
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35), 0 10px 25px rgba(15, 23, 42, 0.5);
  object-fit: cover;
}

.brand-text-main {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.brand-text-sub {
  font-size: 12px;
  color: #cbd5f5;
  opacity: 0.9;
}

.nav-group-title {
  font-size: 12px;
  color: #a5b4fc;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: -6px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease-out;
  color: #e5e7eb;
}

.nav-item span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background-color: transparent;
  box-shadow: 0 0 0 1px rgba(191, 219, 254, 0.2);
}

.nav-item-badge {
  font-size: 10px;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(15, 23, 42, 0.38);
  color: #e0f2fe;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.22), rgba(191, 219, 254, 0.04));
  color: #f9fafb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.55);
}

.nav-item.active .nav-item-dot {
  background: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.2);
}

.nav-item:hover:not(.active) {
  background: rgba(15, 23, 42, 0.55);
}

.nav-footer {
  margin-top: auto;
  font-size: 11px;
  color: #9ca3af;
  opacity: 0.9;
}

.nav-footer span {
  display: block;
}

.content {
  flex: 1;
  margin-left: 260px;
  padding: 32px 40px 40px;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.08) 0, transparent 55%),
              radial-gradient(circle at bottom right, rgba(251, 191, 36, 0.05) 0, transparent 60%);
}

.content-header {
  margin-bottom: 18px;
}

.content-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.content-subtitle {
  font-size: 13px;
  color: #6b7280;
}

.platform-toggle {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  margin-bottom: 14px;
}

.platform-tab {
  border: none;
  outline: none;
  background: transparent;
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  color: #4b5563;
  transition: all 0.16s ease-out;
}

.platform-tab.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #f9fafb;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}


.content-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  padding: 22px 24px 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(203, 213, 225, 0.9);
  max-width: 100%;
}

.content-meta {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
}

.content-meta strong {
  color: #111827;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  margin-right: 6px;
}

.tag-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.1), #e5e7eb, rgba(226, 232, 240, 0.1));
  margin: 14px 0 18px;
}

.article h2 {
  font-size: 16px;
  margin-top: 16px;
  margin-bottom: 6px;
  color: #111827;
}

.article h3 {
  font-size: 15px;
  margin-top: 14px;
  margin-bottom: 4px;
  color: #111827;
}

.article p {
  font-size: 14px;
  margin-bottom: 6px;
  color: #374151;
}

.article ul {
  padding-left: 20px;
  margin: 4px 0 8px;
}

.article li {
  font-size: 14px;
  margin-bottom: 4px;
  color: #374151;
}

.muted {
  color: #6b7280;
  font-size: 13px;
}

.external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
}

.external-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.external-chip span {
  font-size: 11px;
  color: #6b7280;
}

.app-tutorial {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  min-height: 260px;
}

.app-tutorial-sidebar {
  border-right: 1px solid #e5e7eb;
  padding-right: 12px;
  overflow-y: auto;
  max-height: 520px;
}

.app-tutorial-section {
  margin-bottom: 10px;
}

.app-tutorial-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 4px;
}

.app-tutorial-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  color: #4b5563;
}

.app-tutorial-item.active {
  background: #eff6ff;
  color: #1d4ed8;
}

.app-tutorial-gallery-wrap {
  position: relative;
  min-height: 220px;
}

.app-tutorial-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: rgba(249, 250, 251, 0.9);
  z-index: 2;
}

.spinner-ring {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 4px solid #e5e7eb;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.spinner-segment {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 4px solid transparent;
  border-top-color: #22c55e;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  animation: spinner-rotate 0.9s linear infinite;
}

.spinner-text {
  font-size: 13px;
  color: #6b7280;
}

.app-tutorial-gallery {
  position: relative;
  z-index: 1;
}

.app-tutorial-path {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 10px;
  font-weight: 500;
}

.app-tutorial-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.app-tutorial-img {
  max-height: 260px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}

@keyframes spinner-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.section {
  display: none;
}

.section.active {
  display: block;
}

@media (max-width: 900px) {
  body {
    overflow-y: auto;
  }

  .page {
    display: block;
  }

  .layout {
    margin: 0;
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 16px 16px 14px;
  }

  .nav {
    flex-direction: row;
    margin-top: 0;
  }

  .nav-footer,
  .nav-group-title {
    display: none;
  }

  .content {
    margin-left: 0;
    padding: 18px 16px 20px;
  }
}

