*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #f5f5f5;
  --header-bg: linear-gradient(180deg, #ECA34A 0%, #ca740b 100%);
  --card: #fff;
  --accent: #A51000;
  --accent-light: #ECA34A;
  --text: #333;
  --text-muted: #666;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --max: 600px;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.app-page {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px;
  padding-bottom: 32px;
}

.app-header {
  text-align: center;
  padding: 24px 16px;
  background: var(--header-bg);
  border-radius: var(--radius);
  margin-bottom: 20px;
  color: #fff;
}

.app-header h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: bold;
}

.app-header p {
  margin: 0;
  font-size: 14px;
  opacity: 0.95;
}

.app-versions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.version-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
}

.version-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: #fff5e6;
  border: 1px solid rgba(236, 163, 74, 0.5);
  border-radius: 999px;
  vertical-align: middle;
}

.app-card-version {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.app-card-version span {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  color: var(--accent);
  background: #fff5e6;
  border: 1px solid rgba(236, 163, 74, 0.45);
  border-radius: 999px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--accent);
}

/* FAQ / 子页深色标题栏 */
.page-titlebar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 12px;
  padding-top: env(safe-area-inset-top, 0px);
  min-height: calc(52px + env(safe-area-inset-top, 0px));
  box-sizing: border-box;
  background: #ECA34A;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.page-titlebar-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  margin-right: 4px;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-tap-highlight-color: transparent;
}

.page-titlebar-back:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.page-titlebar-title {
  flex: 1;
  min-width: 0;
  padding-right: 48px;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-page.has-titlebar {
  padding-top: 16px;
}

.section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.section h2 {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--accent);
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.section p {
  margin: 0 0 10px;
  font-size: 15px;
}

.section ul {
  margin: 0;
  padding-left: 20px;
}

.section li {
  margin-bottom: 8px;
  font-size: 15px;
}

.app-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-card {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.app-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.app-card-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: bold;
  color: var(--accent);
}

.app-card-desc {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.app-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #888;
}

.app-card-arrow {
  color: var(--accent-light);
  font-weight: bold;
}

.download-block {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eee;
}

.download-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.download-block h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--text);
}

.download-area {
  text-align: center;
  padding: 8px 0;
}

.btn-download {
  display: inline-block;
  width: 100%;
  max-width: 280px;
  padding: 14px 24px;
  margin: 8px auto;
  font-size: 17px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  color: #fff;
}

.btn-download:hover { text-decoration: none; opacity: 0.92; }

.btn-download.is-downloading {
  opacity: 0.78;
  cursor: default;
  box-shadow: none;
}

.btn-download.is-downloading:hover {
  opacity: 0.78;
}

.btn-android {
  background: linear-gradient(180deg, #3ddc84 0%, #2ca85a 100%);
  box-shadow: 0 4px 12px rgba(61, 220, 132, 0.4);
}

.btn-ios {
  background: linear-gradient(180deg, #5ac8fa 0%, #007aff 100%);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35);
}

.btn-tip {
  margin-top: 12px;
  font-size: 13px;
  color: #888;
}

.qr-wrap {
  margin-top: 12px;
}

.qr-wrap img {
  max-width: 160px;
  height: auto;
}

.tip-warn {
  display: none;
  margin-bottom: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--accent);
  background: #fff5f5;
  border-radius: 8px;
  border: 1px solid #ffd0d0;
}

.tip-warn.show { display: block; }

.tip-info {
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-muted);
  background: #fafafa;
  border-radius: 8px;
  text-align: left;
}

.page-qr {
  text-align: center;
  margin-bottom: 16px;
}

.faq-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-list li {
  margin-bottom: 0;
  border-bottom: 1px solid #eee;
}

.faq-list li:last-child {
  border-bottom: none;
}

.faq-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.faq-list a:hover {
  color: #7a0c00;
  text-decoration: none;
}

.faq-arrow {
  flex-shrink: 0;
  font-weight: 400;
  color: var(--accent-light);
}

.faq-title {
  margin: 0 0 16px;
  font-size: 18px;
  color: var(--accent);
  line-height: 1.4;
}

.faq-content p {
  margin: 0 0 12px;
  font-size: 15px;
}

.faq-content p:last-child {
  margin-bottom: 0;
}

.faq-content ol,
.faq-content ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

.faq-content li {
  margin-bottom: 8px;
  font-size: 15px;
}

.faq-content h3 {
  margin: 18px 0 10px;
  font-size: 16px;
  color: var(--accent);
}

.faq-content h3:first-child {
  margin-top: 0;
}

.faq-note {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-muted);
  background: #fafafa;
  border-radius: 8px;
  border-left: 3px solid var(--accent-light);
}

.feedback-email {
  display: inline-block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
  word-break: break-all;
}

.screenshots-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -20px;
  padding: 0 20px 4px;
  scrollbar-width: none;
}

.screenshots-scroll::-webkit-scrollbar {
  display: none;
}

.screenshots-track {
  display: flex;
  gap: 12px;
  width: max-content;
  padding-bottom: 4px;
}

.screenshot-item {
  flex: 0 0 auto;
  width: 148px;
  margin: 0;
  text-align: center;
}

.screenshot-item img {
  display: block;
  width: 148px;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(236, 163, 74, 0.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: #fff;
}

.screenshot-item figcaption {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

.screenshots-tip {
  margin: 10px 0 0;
  font-size: 12px;
  color: #999;
  text-align: center;
}

.changelog-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.changelog-item {
  margin: 0 0 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid #eee;
}

.changelog-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.changelog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.changelog-ver {
  display: inline-block;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: #fff5e6;
  border: 1px solid rgba(236, 163, 74, 0.5);
  border-radius: 999px;
}

.changelog-meta {
  font-size: 12px;
  color: #1a64f5;
}

.changelog-item ul {
  margin: 0;
  padding-left: 20px;
}

.changelog-item li {
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text);
}

.upgrade-guide-list {
  margin: 0;
  padding: 0 0 0 1.2em;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.upgrade-guide-list li {
  margin: 0 0 10px;
}

.upgrade-guide-list li:last-child {
  margin-bottom: 0;
}

.upgrade-guide-warn {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: #fff5e6;
  border-left: 3px solid var(--accent-light);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  line-height: 1.6;
  color: #5a3a10;
}

@media screen and (min-width: 500px) {
  .app-header h1 { font-size: 26px; }

  .screenshot-item {
    width: 168px;
  }

  .screenshot-item img {
    width: 168px;
  }
}
