/* 站点基础样式（暗色幽灵玻璃主题） */
:root {
  --card: rgba(255, 255, 255, .06);
  --ink: #eeecf7;
  --mut: #a29fae;
  --brand: #8f8fff;
  --brand-dark: #6d6df0;
  --line: rgba(255, 255, 255, .09);
  --sh1: 0 2px 12px rgba(0, 0, 0, .45);
  --sh2: 0 16px 36px rgba(0, 0, 0, .55);
  --r1: 16px;
  --r2: 12px;
  --grad: linear-gradient(135deg, #8f8fff, #c084fc);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", sans-serif;
  background: #07070d;
  background-image:
    radial-gradient(55% 42% at 10% -6%, rgba(124, 92, 255, .26), transparent 62%),
    radial-gradient(46% 38% at 90% 10%, rgba(56, 189, 248, .18), transparent 60%),
    radial-gradient(72% 55% at 50% 112%, rgba(236, 72, 153, .16), transparent 62%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; }

.page {
  max-width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* 顶栏（玻璃） */
.hd {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 16px;
  background: rgba(12, 12, 20, .55);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.hd h1 { font-size: 17px; font-weight: 700; text-align: center; }
.hd-back {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-size: 26px; line-height: 1;
}

/* 轮播 */
.banner { margin: 14px 15px 0; }
.banner-box { position: relative; border-radius: var(--r1); overflow: hidden; box-shadow: var(--sh1); background: rgba(255, 255, 255, .05); }
.banner-track { display: block; white-space: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; font-size: 0; }
.banner-track::-webkit-scrollbar { display: none; }
.banner-slide { display: inline-block; vertical-align: top; width: 100%; scroll-snap-align: start; position: relative; padding-top: 45.45%; }
.banner-slide a { position: absolute; inset: 0; }
.banner-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.banner-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .5); transition: all .25s; }
.banner-dots i.on { width: 16px; border-radius: 3px; background: #fff; }

/* 滚动公告 */
.ticker { margin: 12px 15px 0; }
.ticker-bar {
  display: flex; align-items: center; gap: 10px; overflow: hidden;
  background: var(--card); border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 999px; box-shadow: var(--sh1);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 10px 12px 10px 14px;
}
.ticker-ico { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); }
.ticker-ico::before { content: ""; position: absolute; left: 4px; top: 50%; width: 10px; height: 10px; transform: translateY(-50%); background: #fff; clip-path: polygon(0 30%, 55% 30%, 100% 0, 100% 100%, 55% 70%, 0 70%); }
.ticker-ico::after { content: ""; position: absolute; right: 3px; top: 50%; width: 5px; height: 9px; transform: translateY(-50%); border-right: 1.5px solid #fff; border-radius: 50%; box-shadow: -3px 0 0 -0.5px #fff; }
.ticker-track { flex: 1; overflow: hidden; white-space: nowrap; }
.ticker-run { display: inline-flex; will-change: transform; animation: tick 18s linear infinite; }
.ticker-run span { padding-right: 60px; font-size: 14px; white-space: nowrap; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-bar:hover .ticker-run { animation-play-state: paused; }
.ticker-more {
  flex: none; padding: 7px 11px; border-radius: 999px;
  background: rgba(143, 143, 255, .14); color: var(--brand); font-size: 13px; font-weight: 700;
}

/* 分类与卡片 */
.cats { padding: 0 15px; flex: 1; }
.cat { margin-top: 26px; }
.cat-hd { text-align: center; }
.cat-title { text-align: center; font-size: 21px; font-weight: 700; scroll-margin-top: 76px; }
.cat-sub { text-align: center; font-size: 13px; color: var(--mut); margin: 4px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 14px 8px 12px; border-radius: var(--r1);
  background: var(--card); border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: var(--sh1);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform .25s, box-shadow .25s;
}
.card:active { transform: scale(.97); }
@media (hover: hover) { .card:hover { transform: translateY(-4px); box-shadow: var(--sh2); } }
.card-ico {
  width: 68px; height: 68px; border-radius: 18px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}
.card-ico img { width: 100%; height: 100%; object-fit: cover; }
.card-name { font-size: 15px; font-weight: 600; }
.card-desc {
  font-size: 12px; color: var(--mut); min-height: 2.2em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-btn { margin-top: 2px; padding: 7px 26px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; }

/* 应用详情头部 */
.hero { margin: 16px 15px 0; padding: 26px 20px; text-align: center; border-radius: 22px; background: var(--card); border: 1px solid rgba(255, 255, 255, .07); box-shadow: var(--sh1); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.hero-ico { display: block; width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 22px; overflow: hidden; box-shadow: 0 8px 22px rgba(0, 0, 0, .55); }
.hero-ico img { width: 100%; height: 100%; object-fit: cover; }
.hero-name { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.invite { display: inline-block; margin-bottom: 18px; padding: 6px 16px; border-radius: 999px; background: rgba(143, 143, 255, .14); color: var(--brand); font-size: 14px; font-weight: 600; }
.dl-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dl {
  flex: 1; min-width: 130px; padding: 13px 20px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 600; font-size: 15px; text-align: center;
  transition: transform .2s;
}
.dl:active { transform: scale(.97); }
.dl.alt { background: rgba(255, 255, 255, .1); }
.dl.buy { background: linear-gradient(135deg, #ff375f, #ff9f0a); }

/* 通用面板 */
.panel { margin: 14px 15px; padding: 20px; border-radius: var(--r1); background: var(--card); border: 1px solid rgba(255, 255, 255, .07); box-shadow: var(--sh1); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.panel-hd { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 17px; font-weight: 700; }
.panel-hd::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--grad); }
.panel-body { color: var(--mut); font-size: 15px; line-height: 1.85; }
.panel-body li { position: relative; padding: 7px 0 7px 18px; color: var(--ink); }
.panel-body li::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }

/* 截图 */
.shots { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.shots::-webkit-scrollbar { display: none; }
.shot { flex: none; scroll-snap-align: start; border-radius: 16px; overflow: hidden; box-shadow: var(--sh1); cursor: pointer; }
.shot img { height: 320px; width: auto; }

/* 公告列表 */
.page-head { text-align: center; padding: 26px 20px 4px; }
.page-head h1, .page-head h2 { font-size: 26px; font-weight: 700; }
.page-head p { color: var(--mut); font-size: 14px; margin-top: 6px; }
.nlist { padding: 8px 15px 0; display: flex; flex-direction: column; gap: 12px; }
.nitem { padding: 16px; border-radius: var(--r1); background: var(--card); border: 1px solid rgba(255, 255, 255, .07); box-shadow: var(--sh1); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nitem-top { display: flex; align-items: center; gap: 12px; }
.ndate { flex: none; min-width: 82px; padding: 8px 7px; text-align: center; border-radius: 12px; background: rgba(143, 143, 255, .14); color: var(--brand); font-weight: 700; line-height: 1.1; }
.ndate b { display: block; font-size: 13px; }
.ndate i { display: block; margin-top: 2px; font-size: 11px; font-style: normal; color: var(--mut); }
.nbody { flex: 1; min-width: 0; }
.ntitle { font-size: 16px; font-weight: 700; }
.ndesc { margin-top: 7px; color: var(--mut); font-size: 14px; line-height: 1.75; }
.nmore { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; color: var(--brand); font-size: 14px; font-weight: 600; }

/* 应用内公告预览 */
.anotice { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.anotice .ndate { background: rgba(143, 143, 255, .14); }
.anotice-text { color: var(--ink); font-size: 15px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.anotice-preview .anotice-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nmore-bar { display: flex; justify-content: flex-end; margin-top: 8px; }

/* 底部 */
.ft { text-align: center; padding: 22px 18px 26px; border-top: 1px solid var(--line); color: #6a6a7a; }
.ft-main { color: #8b8b98; font-size: 15px; font-weight: 600; }
.ft-copy { margin-top: 8px; color: #5c5c6a; font-size: 12px; }
.tabbar {
  position: sticky; bottom: 0; z-index: 30; margin-top: auto;
  display: flex; justify-content: center; gap: 40px;
  padding: 9px 0 max(9px, env(safe-area-inset-bottom));
  background: rgba(12, 12, 20, .55);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
.tab { position: relative; padding: 4px 16px; color: var(--mut); font-size: 12px; }
.tab.on { color: var(--brand); }
.tab.on::before { content: ""; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); width: 18px; height: 3px; border-radius: 2px; background: var(--brand); }

/* 图片预览 */
.lightbox { position: fixed; inset: 0; z-index: 99; display: none; align-items: center; justify-content: center; background: rgba(0, 0, 0, .92); }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92%; max-height: 92%; border-radius: 14px; }

/* 响应式 */
@media (max-width: 599px) {
  .dl-row { flex-direction: column; }
  .dl { min-width: 100%; }
  .ndate { min-width: 74px; max-width: 80px; padding: 7px 5px; }
  .shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; overflow: visible; }
  .shot { width: 100%; }
  .shot img { width: 100%; height: auto; }
}
@media (min-width: 600px) {
  .page { max-width: 720px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}
@media (min-width: 900px) {
  .page { max-width: 920px; }
  .grid { grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .panel, .hero { max-width: 760px; margin-left: auto; margin-right: auto; }
}
@media (min-width: 1280px) {
  body { padding: 32px; }
  .page { width: 920px; min-height: calc(100vh - 64px); border-radius: 22px; overflow: hidden; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); box-shadow: 0 24px 70px rgba(0, 0, 0, .6), 0 8px 24px rgba(0, 0, 0, .4); }
}
