/* BitDone 应用详情页共用样式 —— 单屏布局，不滚动 */

:root {
  --bg: #ffffff;
  --fg: #18191a;
  --muted: #6b7075;
  --line: #e6e8ea;
  --accent: #0a6cff;
  --card: #f6f7f8;
  --shot-gap: clamp(10px, 1.4vw, 18px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1011;
    --fg: #eceded;
    --muted: #9aa0a6;
    --line: #2c2e30;
    --accent: #4d94ff;
    --card: #1b1d1f;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Microsoft Yahei",
               "Hiragino Sans GB", sans-serif;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;          /* 单屏，不出现滚动条 */
}

/* 整页一屏：左侧信息 + 右侧截图 */
.page {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 3vh, 32px) clamp(20px, 5vw, 64px);
  gap: clamp(12px, 2vh, 24px);
}

.site-header a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.site-header a:hover { color: var(--fg); }

.main {
  flex: 1;
  min-height: 0;             /* 允许子项在剩余高度内收缩 */
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
}

/* 左栏 */
.info {
  flex: 0 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vh, 18px);
}
.title { display: flex; align-items: center; gap: 16px; }
.title img {
  width: clamp(64px, 9vh, 92px);
  height: clamp(64px, 9vh, 92px);
  border-radius: 25.5%;
  flex-shrink: 0;
  background: var(--card);
}
h1 {
  font-size: clamp(22px, 3.4vh, 32px);
  font-weight: 600;
  line-height: 1.25;
}
.tagline {
  color: var(--muted);
  font-size: clamp(14px, 1.9vh, 17px);
  margin-top: 2px;
}
.desc {
  color: var(--muted);
  font-size: clamp(13px, 1.75vh, 15px);
  line-height: 1.6;
}

ul.features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}
ul.features li {
  font-size: clamp(12px, 1.6vh, 14px);
  color: var(--fg);
  background: var(--card);
  border-radius: 980px;
  padding: 5px 13px;
  white-space: nowrap;
}

.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 9px 24px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.btn:hover { opacity: .85; }
.meta { color: var(--muted); font-size: 13px; }

/* 右栏截图：宽度按剩余空间均分，高度受视口限制，两边都不溢出 */
.shots {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--shot-gap);
}
/* 截图宽度按剩余空间均分（所以横向永远放得下），高度由 9:16 比例得出；
   再用 max-width 反向限制高度不超过 74vh，纵向也不会溢出。 */
.shots img {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  max-width: min(41.6vh, 300px);
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
}
/* 窄一点的屏幕先藏掉第三张，再藏第二张，保证一屏放得下 */
@media screen and (max-width: 1100px) { .shots img:nth-child(3) { display: none; } }
@media screen and (max-width: 860px)  { .shots img:nth-child(2) { display: none; } }

/* 没有截图时的替代内容 */
.panel {
  flex: 1 1 300px;
  background: var(--card);
  border-radius: 16px;
  padding: clamp(18px, 3vh, 28px);
  max-height: min(72vh, 620px);
  overflow: hidden;
}
.panel h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.panel p { color: var(--muted); font-size: clamp(12px, 1.6vh, 14px); line-height: 1.9; }

footer {
  color: var(--muted);
  font-size: 12px;
}
footer a { color: var(--muted); }

/* 手机：竖向排列，截图缩小，整体仍然一屏 */
@media screen and (max-width: 720px) {
  .main { flex-direction: column; align-items: stretch; justify-content: center; gap: clamp(12px, 2vh, 20px); }
  .info { flex: 0 0 auto; }
  .shots { flex: 0 0 auto; justify-content: center; }
  .shots img { max-width: min(18vh, 40vw); }   /* 高度约 32vh，给左侧文字留够空间 */
  .shots img:nth-child(2) { display: block; }
  .shots img:nth-child(3) { display: none; }
  .panel { flex: 0 0 auto; max-height: 32vh; overflow: hidden; }
}
/* 屏幕更小时只留一张截图和最重要的几个标签 */
@media screen and (max-width: 420px) {
  .shots img:nth-child(2) { display: none; }
  .shots img { max-width: min(22vh, 46vw); }
  ul.features li:nth-child(n + 7) { display: none; }
}
