/*
  文件作用：AdProf SDK 下载页样式。
  负责功能：顶栏、Sigmob 风格版本卡片、底部版本更新记录。
*/

:root {
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #f4f7fb;
  --card: #ffffff;
  --primary: #2563eb;
  --primary-deep: #1d4ed8;
  --android: #16a34a;
  --ios: #2563eb;
  --warn: #b45309;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 7vw;
  background: #0f172a;
  color: #f8fafc;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f2c14e;
  color: #1d2410;
  font-weight: 700;
}

.brand-name,
.brand-sub {
  margin: 0;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
}

.brand-sub {
  color: #cbd5e1;
  font-size: 13px;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.intro h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
}

.platforms {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 22px;
}

.platform-empty {
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  background: #fff;
}

.platform-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.platform-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  background: #e2e8f0 center/18px 18px no-repeat;
}

.platform-icon.is-ios {
  background-color: #eff6ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232563eb'%3E%3Cpath d='M16.5 3c-2.2 1.5-3.6 3.9-3.4 6.6 2.5.2 4.9-1.3 6.3-3.6-1.8-1.3-3.9-2.2-2.9-3zM19.8 13.1c-.2-2.3 1.9-3.4 2-3.5-1.1-1.6-2.8-1.8-3.4-1.9-1.4-.1-2.8.8-3.5.8-.7 0-1.9-.8-3.1-.8-1.6 0-3 .9-3.8 2.4-1.6 2.8-.4 7 1.2 9.3.8 1.1 1.7 2.4 2.9 2.3 1.2 0 1.6-.8 3-.8 1.4 0 1.8.8 3 .8 1.2 0 2-1.1 2.8-2.2.9-1.3 1.2-2.6 1.2-2.7-.1 0-2.4-.9-2.4-3.6z'/%3E%3C/svg%3E");
}

.platform-icon.is-android {
  background-color: #ecfdf5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2316a34a'%3E%3Cpath d='M17.6 9.5l1.3-2.2c.2-.3.1-.7-.2-.9-.3-.2-.7-.1-.9.2l-1.4 2.3c-1-.5-2.2-.8-3.4-.8s-2.4.3-3.4.8L8.2 6.6c-.2-.3-.6-.4-.9-.2-.3.2-.4.6-.2.9l1.3 2.2C6.4 11.2 5 13.4 5 16v3c0 .6.4 1 1 1h1v-6.5c0-1.9 1.6-3.5 3.5-3.5s3.5 1.6 3.5 3.5V20h2v-6.5c0-1.9 1.6-3.5 3.5-3.5s3.5 1.6 3.5 3.5V20h1c.6 0 1-.4 1-1v-3c0-2.6-1.4-4.8-3.4-6.5z'/%3E%3C/svg%3E");
}

.card-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.version-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.version-label {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.version-field select {
  flex: 1;
  max-width: 220px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  background: #fff;
}

.card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 16px 20px;
  align-items: start;
}

.info-table {
  margin: 0;
  padding: 0;
}

.info-table > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
  align-items: start;
}

.info-table > div:last-child {
  border-bottom: none;
}

.info-table dt {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.info-table dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.info-table dd.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn-primary.is-disabled,
.btn-primary[aria-disabled="true"] {
  background: #cbd5e1;
  border-color: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.btn-outline {
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
}

.btn-outline.is-disabled,
.btn-outline[aria-disabled="true"] {
  border-color: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  pointer-events: none;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.card-links a {
  color: var(--primary-deep);
  text-decoration: none;
}

.card-links a:hover {
  text-decoration: underline;
}

.card-links a.is-disabled {
  color: #94a3b8;
  pointer-events: none;
  text-decoration: none;
}

.card-aside {
  border-left: 1px solid var(--line);
  padding-left: 16px;
  min-height: 100%;
}

.card-aside h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.card-aside ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
}

.card-aside .notes-empty {
  list-style: none;
  margin-left: -18px;
  color: var(--muted);
}

.package-hint {
  margin: 10px 0 0;
  color: var(--warn);
  font-size: 13px;
}

.changelog {
  margin-top: 36px;
}

.changelog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.changelog h2 {
  margin: 0;
  font-size: 22px;
}

.filters {
  display: flex;
  gap: 8px;
}

.filters button {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.filters button[aria-selected="true"] {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.timeline {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.record {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.record-version {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.record-date {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.pill {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill-android {
  background: #ecfdf5;
  color: #15803d;
}

.pill-ios {
  background: #eff6ff;
  color: #1d4ed8;
}

.record ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .card-body {
    grid-template-columns: 1fr;
  }

  .card-aside {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 12px;
  }

  .info-table > div {
    grid-template-columns: 88px minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 14px 16px;
  }

  .page {
    width: calc(100% - 24px);
  }

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