:root {
  --bg: #070a12;
  --bg-soft: #0b1020;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf7;
  --muted: #8b94ac;
  --brand-1: #6366f1;
  --brand-2: #22d3ee;
  --brand-3: #a855f7;
  --accent: #fbbf24;
  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.85);
  --container: 1240px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(99, 102, 241, 0.28), transparent 62%),
    radial-gradient(760px 460px at 92% 4%, rgba(34, 211, 238, 0.2), transparent 60%),
    radial-gradient(700px 500px at 50% 100%, rgba(168, 85, 247, 0.14), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ───────── 顶部导航 ───────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(7, 10, 18, 0.72);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.2px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  display: grid; place-items: center;
  box-shadow: 0 10px 26px -10px rgba(99, 102, 241, 0.9);
  font-size: 16px; font-weight: 800; color: #05070d;
}
.logo small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--muted);
  transition: 0.2s ease;
}
.nav a:hover { color: var(--text); background: var(--surface); }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 16px; min-width: 230px;
  transition: 0.2s ease;
}
.search:focus-within { border-color: rgba(99, 102, 241, 0.7); background: var(--surface-strong); }
.search input { background: none; border: none; outline: none; color: var(--text); width: 100%; font-size: 14px; }
.search input::placeholder { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 10px 20px; font-size: 14px; font-weight: 600;
  transition: 0.2s ease; white-space: nowrap;
}
.btn:hover { background: var(--surface-strong); border-color: var(--border-strong); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border-color: transparent; color: #05070d;
  box-shadow: 0 14px 32px -14px rgba(99, 102, 241, 0.95);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ───────── 宣传大窗 ───────── */
.hero-section { padding: 28px 0 8px; }

.hero-carousel {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  height: 420px; border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--bg-soft);
}
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transform: scale(1.04);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; transform: scale(1); pointer-events: auto; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(7, 10, 18, 0.94) 8%, rgba(7, 10, 18, 0.62) 48%, rgba(7, 10, 18, 0.18) 100%);
}
.hero-content {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(24px, 5vw, 64px); max-width: 660px;
}
.hero-badge {
  align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: 0.6px;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
  background: rgba(34, 211, 238, 0.16); color: #67e8f9; border: 1px solid rgba(34, 211, 238, 0.35);
}
.hero-title { font-size: clamp(26px, 3.6vw, 44px); font-weight: 800; margin: 0 0 10px; letter-spacing: -0.5px; }
.hero-subtitle { color: #b9c1d4; font-size: clamp(14px, 1.4vw, 17px); margin: 0 0 24px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-dots { position: absolute; left: clamp(24px, 5vw, 64px); bottom: 26px; display: flex; gap: 8px; z-index: 3; }
.hero-dots button {
  width: 26px; height: 4px; border-radius: 999px; border: none;
  background: rgba(255, 255, 255, 0.28); padding: 0; transition: 0.3s;
}
.hero-dots button.active { background: linear-gradient(90deg, var(--brand-1), var(--brand-2)); width: 44px; }

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: rgba(7, 10, 18, 0.55);
  backdrop-filter: blur(8px); display: grid; place-items: center; font-size: 16px;
}
.hero-arrow:hover { background: rgba(99, 102, 241, 0.4); }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }

/* ───────── 区块标题 / 分类 ───────── */
.section { padding: 46px 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-title { font-size: 22px; font-weight: 750; margin: 0; letter-spacing: -0.3px; }
.section-desc { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; }

.chips { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  padding: 8px 18px; border-radius: 999px; font-size: 14px; white-space: nowrap; transition: 0.2s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active {
  color: #05070d; font-weight: 700; border-color: transparent;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}

/* ───────── 应用卡片 ───────── */
.app-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}

.app-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); transition: 0.25s ease; position: relative; overflow: hidden;
}
.app-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: 0.3s;
  background: radial-gradient(420px 180px at 80% -20%, rgba(99, 102, 241, 0.22), transparent 70%);
}
.app-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-strong); box-shadow: var(--shadow); }
.app-card:hover::before { opacity: 1; }
.app-card > * { position: relative; z-index: 1; }

.app-card-head { display: flex; gap: 14px; align-items: center; }
.app-icon {
  width: 62px; height: 62px; border-radius: 18px; flex: 0 0 auto;
  object-fit: cover; border: 1px solid var(--border-strong); background: var(--bg-soft);
}
.app-icon-fallback {
  width: 62px; height: 62px; border-radius: 18px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 24px; font-weight: 800; color: #05070d;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.app-meta { min-width: 0; }
.app-name { font-size: 16.5px; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-dev { color: var(--muted); font-size: 12.5px; margin: 2px 0 6px; }
.app-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11.5px; padding: 2px 9px; border-radius: 999px;
  background: rgba(99, 102, 241, 0.16); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.28);
}
.tag-muted { background: rgba(255, 255, 255, 0.06); color: var(--muted); border-color: var(--border); }

.app-summary {
  color: #a9b1c6; font-size: 13.5px; margin: 0; min-height: 42px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.app-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.app-stats { color: var(--muted); font-size: 12px; }

/* ───────── 空状态 / 骨架 ───────── */
.empty {
  grid-column: 1 / -1; text-align: center; padding: 70px 20px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--muted);
}
.empty strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }

.skeleton { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); height: 186px; position: relative; overflow: hidden; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ───────── 公告条 ───────── */
.notice {
  display: flex; align-items: center; gap: 10px; margin-top: 18px;
  padding: 12px 18px; border-radius: var(--radius-sm); font-size: 13.5px;
  background: rgba(251, 191, 36, 0.09); border: 1px solid rgba(251, 191, 36, 0.26); color: #fcd34d;
}
.notice span { color: #fde68a; }

/* ───────── 详情页 ───────── */
.detail-hero {
  display: flex; gap: 26px; align-items: center; flex-wrap: wrap;
  padding: 30px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: linear-gradient(140deg, rgba(99, 102, 241, 0.16), rgba(34, 211, 238, 0.07) 55%, transparent);
  box-shadow: var(--shadow);
}
.detail-hero .app-icon, .detail-hero .app-icon-fallback { width: 100px; height: 100px; border-radius: 26px; font-size: 40px; }
.detail-info { flex: 1; min-width: 240px; }
.detail-info h1 { margin: 0 0 6px; font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; }
.detail-stats { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 18px; }
.detail-stats div { font-size: 12.5px; color: var(--muted); }
.detail-stats strong { display: block; font-size: 17px; color: var(--text); font-weight: 700; }
.detail-cta { display: flex; flex-direction: column; gap: 10px; min-width: 190px; }
.detail-cta .btn { padding: 14px 26px; font-size: 15px; }

.panel {
  padding: 26px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); margin-top: 20px;
}
.panel h2 { font-size: 17px; margin: 0 0 14px; font-weight: 700; }
.panel p { color: #a9b1c6; font-size: 14px; margin: 0 0 10px; white-space: pre-wrap; }

.shots { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.shots img {
  height: 380px; width: auto; border-radius: 18px; border: 1px solid var(--border-strong);
  background: var(--bg-soft); object-fit: cover;
}

.timeline { display: flex; flex-direction: column; gap: 16px; }
.timeline-item { display: flex; gap: 16px; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 8px; flex: 0 0 auto; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); }
.timeline-body { flex: 1; border-bottom: 1px dashed var(--border); padding-bottom: 14px; }
.timeline-body h4 { margin: 0 0 4px; font-size: 14.5px; }
.timeline-body time { font-size: 12px; color: var(--muted); }
.timeline-body pre { margin: 8px 0 0; font-family: inherit; font-size: 13.5px; color: #a9b1c6; white-space: pre-wrap; }

/* ───────── 页脚 ───────── */
.site-footer {
  margin-top: 72px; border-top: 1px solid var(--border);
  padding: 32px 0 46px; color: var(--muted); font-size: 13px;
}
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: rgba(12, 17, 32, 0.96); border: 1px solid var(--border-strong);
  padding: 12px 22px; border-radius: 999px; font-size: 14px; z-index: 90;
  opacity: 0; transition: 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 820px) {
  .nav { display: none; }
  .search { min-width: 150px; }
  .hero-carousel { height: 340px; }
  .hero-arrow { display: none; }
  .detail-hero { padding: 22px; }
  .shots img { height: 300px; }
  .logo small { display: none; }
}