:root {
  color-scheme: light;
  --ink: #18201d;
  --muted: #59645f;
  --paper: #f4f7f5;
  --white: #ffffff;
  --line: #ced7d3;
  --accent: #087f70;
  --accent-dark: #056357;
  --focus: #e6a63b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 30;
  top: 10px;
  left: 10px;
  padding: 8px 12px;
  color: var(--white);
  background: var(--accent-dark);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.brand {
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 26px;
}

nav a {
  font-size: 0.9rem;
  text-underline-offset: 5px;
}

.hero {
  position: relative;
  display: flex;
  min-height: 320px;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: #171c1a url("/assets/app-settings.png") center / cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(13, 18, 16, 0.82);
}

.hero-content {
  position: relative;
  width: min(1080px, 90vw);
  margin: 62px auto 0;
  padding: 48px 0;
}

.eyebrow,
.product-category {
  margin: 0 0 6px;
  color: var(--focus);
  font-size: 0.8rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 3.2rem;
  line-height: 1.1;
}

.hero-content > p:last-child {
  margin: 14px 0 0;
  color: #dce5e1;
}

.section-inner {
  width: min(1080px, 90vw);
  margin: 0 auto;
  padding: 48px 0 72px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: 1.8rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* 软件网格卡片布局 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.product-version {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
}

.product-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.product-summary {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  background: #e6efe3;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 4px;
}

.view-detail-btn {
  width: 100%;
  padding: 10px 16px;
  color: var(--white);
  background: var(--accent);
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.view-detail-btn:hover {
  background: var(--accent-dark);
}

/* 详情 Modal 样式 */
.detail-modal {
  padding: 0;
  border: none;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  max-width: 680px;
  width: 90vw;
}

.detail-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.modal-content {
  position: relative;
  padding: 32px;
  background: var(--white);
}

.close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: #eaf0ed;
  color: var(--ink);
  font-size: 1.1rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  background: var(--line);
}

.modal-header h2 {
  margin: 4px 0 0;
  font-size: 1.8rem;
}

.modal-version {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.modal-body {
  margin-top: 24px;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section h3 {
  font-size: 1.1rem;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.modal-summary {
  margin: 0;
  color: var(--ink);
  white-space: pre-wrap;
}

.download-package-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pkg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pkg-info strong {
  display: block;
  font-size: 1rem;
}

.pkg-info span {
  font-size: 0.85rem;
  color: var(--muted);
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  color: var(--white);
  background: var(--accent);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.download-link:hover {
  background: var(--accent-dark);
}

.notes-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.notes-list li {
  margin-bottom: 6px;
}

/* 页脚样式 */
.site-footer {
  color: #c8d3ce;
  background: #171c1a;
  padding: 48px 5vw 24px;
  border-top: 1px solid #28322e;
}

.footer-inner {
  width: min(1080px, 90vw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #28322e;
}

.footer-brand strong {
  font-size: 1.1rem;
  color: var(--white);
}

.footer-brand p {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: #92a39c;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #c8d3ce;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-bottom {
  width: min(1080px, 90vw);
  margin: 20px auto 0;
  text-align: center;
  font-size: 0.82rem;
  color: #73857e;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.footer-meta-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.8rem;
  color: #a0b2aa;
}

.footer-meta-info strong {
  color: var(--white);
  font-weight: 600;
}

.meta-sep {
  color: #43544d;
}

.footer-beian {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 4px;
}

.beian-link {
  color: #8fa099;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.beian-link:hover {
  color: var(--white);
  text-decoration: underline;
}

.gongan-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
}

/* 面包屑导航样式 */
.breadcrumb-container {
  max-width: 1080px;
  margin: 1.5rem auto 0;
  padding: 0 5vw;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--ink);
}

.breadcrumb .sep {
  color: var(--line);
}

.breadcrumb .current {
  color: var(--ink);
  font-weight: 600;
}

/* 详情页主体布局 */
.software-detail-container {
  max-width: 1080px;
  margin: 1.5rem auto 3rem;
  padding: 0 5vw;
}

.detail-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
}

.detail-header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.detail-title {
  font-size: 2.25rem;
  margin: 0;
  color: var(--ink);
}

/* 详情双栏响应式网格 */
.detail-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 2rem;
}

.detail-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.detail-section h2 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--ink);
}

.detail-summary-text {
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* 侧边栏辅助提示 */
.safety-tips {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--muted);
}

.safety-tips li {
  margin-bottom: 8px;
}

/* 打赏支持区块样式 */
.reward-section {
  text-align: center;
  background: var(--white);
  padding: 24px;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-top: 24px;
}

.reward-desc {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 16px;
}

.reward-qrcode-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.reward-qrcode {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--line);
}

.reward-tip {
  font-size: 0.85rem;
  color: var(--muted);
}

/* 响应式适配 */
@media (max-width: 768px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
  
  .detail-sidebar {
    display: none; /* 移动端屏蔽冗余的侧边栏提示 */
  }
}

@media (max-width: 680px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }

  .footer-inner {
    flex-direction: column;
  }

  .pkg-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .download-link {
    width: 100%;
    justify-content: center;
  }

  .footer-beian {
    flex-direction: column;
    gap: 8px;
  }
}