/* ==========================================================================
   sosdk.com — 软件下载与介绍网站 全局样式
   ========================================================================== */

:root {
  /* 品牌主色（各应用详情页可覆盖 --accent / --accent-strong） */
  --accent: #7c3aed;
  --accent-strong: #5b21b6;
  --accent-soft: #f3e8ff;

  /* 中性色 */
  --bg: #f6f7f9;
  --bg-soft: #eef0f4;
  --card: #ffffff;
  --border: #e6e8ed;
  --border-strong: #d5d8df;

  --text: #1b1f27;
  --text-strong: #10131a;
  --muted: #5d6573;
  --muted-2: #8a919e;

  /* 圆角 / 阴影 */
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(16, 19, 26, 0.05);
  --shadow: 0 8px 24px rgba(16, 19, 26, 0.08);
  --shadow-lg: 0 16px 40px rgba(16, 19, 26, 0.14);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;

  --maxw: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4 {
  color: var(--text-strong);
  line-height: 1.3;
  margin: 0;
}

p {
  margin: 0;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-strong);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-block;
  vertical-align: middle;
}

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

.nav-links a {
  color: var(--muted);
  font-size: 14.5px;
  padding: 7px 14px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-strong);
  background: var(--bg-soft);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: center;
  padding: 64px 20px 72px;
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 400px at 50% -10%, rgba(255, 255, 255, 0.18), transparent 60%);
  pointer-events: none;
}

.hero .hero-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  color: #fff;
  font-size: 40px;
  letter-spacing: 0.3px;
  margin-bottom: 14px;
}

.hero p {
  font-size: 17px;
  opacity: 0.94;
  margin: 0 auto;
  max-width: 600px;
}

.hero .badges {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.badge.solid {
  background: #fff;
  color: var(--accent);
  border-color: #fff;
}

/* Hero 内应用图标 */
.hero .app-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 20px;
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  background: #fff;
  padding: 6px;
}

/* ---------- 通用容器 ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.section-title {
  font-size: 26px;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--muted);
  margin-bottom: 32px;
  font-size: 15.5px;
}

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  gap: 22px;
}

.grid.apps-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

a.card {
  color: inherit;
  display: block;
}

a.card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

/* ---------- 应用卡片（首页） ---------- */
.app-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.app-card .app-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-card .app-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.app-card h3 {
  font-size: 19px;
}

.app-card .app-name-sub {
  font-size: 13px;
  color: var(--muted-2);
  margin-top: 2px;
}

.app-card .app-desc {
  color: var(--muted);
  font-size: 14.5px;
  flex: 1;
}

.app-card .platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 6px;
}

.tag.neutral {
  color: var(--muted);
  background: var(--bg-soft);
}

.app-card .card-cta {
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- 特性网格 ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.feature .ico {
  font-size: 26px;
  line-height: 1;
}

.feature h3 {
  font-size: 16.5px;
  margin: 12px 0 6px;
}

.feature p {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 12px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background: var(--accent-strong);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(16, 19, 26, 0.16);
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn.ghost:hover {
  background: var(--accent-soft);
}

.btn.light {
  background: #fff;
  color: var(--accent);
}

.btn.light:hover {
  background: #f0f2f6;
}

.btn.ghost-light {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn.ghost-light:hover {
  background: rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

.btn.sm {
  padding: 9px 18px;
  font-size: 14px;
}

.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Hero 里的按钮 */
.hero .hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- 下载区块 ---------- */
.download-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  margin-bottom: 28px;
  text-align: center;
}

.download-panel h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.download-panel > p {
  color: var(--muted);
  margin-bottom: 22px;
  font-size: 14.5px;
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  text-align: left;
}

.dl-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dl-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.dl-item .dl-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-strong);
}

.dl-item .dl-meta {
  font-size: 12.5px;
  color: var(--muted-2);
  flex: 1;
}

.dl-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted-2);
}

/* ---------- CTA / 信息条 ---------- */
.cta-panel {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  margin-bottom: 28px;
}

.cta-panel h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.cta-panel p {
  color: var(--muted);
  margin-bottom: 18px;
}

/* ---------- 隐私政策页 ---------- */
.privacy-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}

.privacy-head {
  text-align: center;
  margin-bottom: 8px;
}

.privacy-head h1 {
  font-size: 30px;
  margin-bottom: 8px;
}

.privacy-head .meta {
  color: var(--muted);
  font-size: 14px;
}

.privacy section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 18px 0;
}

.privacy section h2 {
  font-size: 18px;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}

.privacy section p {
  color: var(--text);
  margin-bottom: 12px;
}

.privacy section p:last-child {
  margin-bottom: 0;
}

.privacy strong {
  color: var(--text-strong);
}

.privacy ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

.privacy li {
  margin: 6px 0;
}

.privacy table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 14px;
  font-size: 14.5px;
  border-radius: 10px;
  overflow: hidden;
}

.privacy th,
.privacy td {
  border: 1px solid var(--border);
  padding: 11px 13px;
  text-align: left;
  vertical-align: top;
}

.privacy thead th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--text-strong);
}

.privacy tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.privacy .contact {
  background: var(--accent-soft);
  border-color: transparent;
}

.privacy .note {
  text-align: center;
  color: var(--muted-2);
  font-size: 13px;
  margin-top: 24px;
}

.privacy code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.9em;
  color: var(--text-strong);
}

/* ---------- 面包屑 / 返回 ---------- */
.breadcrumb {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px 0;
  font-size: 13.5px;
  color: var(--muted-2);
}

.breadcrumb a {
  color: var(--muted-2);
}

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

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 32px 24px 44px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

.site-footer .footer-links {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer .copyright {
  color: var(--muted-2);
  font-size: 12.5px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .hero {
    padding: 46px 18px 52px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero .app-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
  }

  .wrap {
    padding: 40px 18px 56px;
  }

  .section-title {
    font-size: 22px;
  }

  .nav {
    padding: 0 16px;
  }

  .privacy section {
    padding: 18px 16px;
  }

  .privacy table {
    font-size: 13px;
  }

  .privacy th,
  .privacy td {
    padding: 8px 9px;
  }
}

/* ---------- 双语切换 ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
}

.lang-switch button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font);
  line-height: 1.3;
  transition: all 0.15s ease;
}

.lang-switch button.active {
  background: #fff;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* 语言区块显示控制：默认显示中文，data-lang="en" 时切换为英文 */
.lang-en {
  display: none;
}

html[data-lang="en"] .lang-zh {
  display: none;
}

html[data-lang="en"] .lang-en {
  display: revert;
}

/* Hero 内的语言切换（深色背景上） */
.hero .lang-switch {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
}

.hero .lang-switch button {
  color: rgba(255, 255, 255, 0.9);
}

.hero .lang-switch button.active {
  background: #fff;
  color: var(--accent);
}
