/* =====================================================================
   AppBox 首页 · Element Plus 浏览式布局 (默认蓝 #409EFF)
   结构: 顶栏 / 紧凑居中 Hero / 浏览区(左侧固定分类·公告 + 右侧轮播·工具条·网格)
   仅保留 Element Plus 无法直接表达的少量布局/截断样式
   ===================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--el-bg-color-page, #f2f3f5);
  color: var(--el-text-color-primary, #303133);
  font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
body.el-popup-parent--hidden { padding-right: 0 !important; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[v-cloak] { display: none; }

.home-page { min-height: 100vh; }
.home-page > .el-main { padding: 0; overflow: visible; }
.container { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }

.skip-link {
  position: absolute; top: 12px; left: 16px; z-index: 100;
  transform: translateY(-160%); transition: transform .2s ease;
  background: var(--el-color-primary); color: #fff; padding: 10px 16px; border-radius: 6px; font-weight: 600;
}
.skip-link:focus { transform: translateY(0); outline: 2px solid var(--el-color-primary-light-5); outline-offset: 2px; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: auto; padding: 0;
  background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--el-border-color-light);
  backdrop-filter: saturate(150%) blur(10px);
}
.header-inner { min-height: 64px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 700; flex: 0 0 auto; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: var(--el-color-primary); color: #fff; font-size: 21px; }
.brand-name { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-search { flex: 1; max-width: 480px; margin: 0 auto; }
.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.header-actions .el-button span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Hero (居中·紧凑) ---------- */
.hero { padding: 56px 0 44px; text-align: center; background: linear-gradient(180deg, var(--el-color-primary-light-9), transparent); border-bottom: 1px solid var(--el-border-color-lighter); }
.hero-kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--el-color-primary-light-7); color: var(--el-color-primary); font-weight: 600; font-size: 13px; }
.hero h1 { margin: 0 auto; max-width: 18ch; font-size: clamp(28px, 4vw, 42px); line-height: 1.18; font-weight: 800; letter-spacing: -.01em; }
.hero h1 .grad { color: var(--el-color-primary); }
.hero-text { max-width: 54ch; margin: 14px auto 0; color: var(--el-text-color-regular); font-size: 16px; }
.hero-command { margin: 26px auto 0; display: flex; gap: 12px; max-width: 600px; }
.hero-command .el-input { flex: 1; }
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }

/* ---------- 浏览区 ---------- */
.browse { padding: 28px 0 48px; }
.aside-sticky { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head strong { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.panel-head .more { border: 0; background: transparent; color: var(--el-color-primary); font-weight: 600; cursor: pointer; }
.panel-head span { color: var(--el-text-color-secondary); font-size: 13px; }

.cat-menu { border-right: 0; }
.cat-menu .el-menu-item { border-radius: 8px; margin-bottom: 2px; height: 44px; line-height: 44px; }
.cat-menu .el-menu-item i { margin-right: 8px; font-size: 17px; }

/* 公告侧栏 */
.announcement-preview { display: flex; flex-direction: column; }
.announcement-row { display: grid; gap: 4px; width: 100%; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 11px 0; text-align: left; border-top: 1px solid var(--el-border-color-lighter); transition: color .2s ease; }
.announcement-row:first-child { border-top: 0; padding-top: 0; }
.announcement-row:hover { color: var(--el-color-primary); }
.announcement-row span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announcement-row small { color: var(--el-text-color-secondary); }

/* 轮播 */
.ad-card { margin-bottom: 20px; }
.ad-link { display: block; height: 100%; }
.ad-link img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 6px; }

/* 工具条 */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--el-border-color-light); }
.toolbar-title { margin: 0; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.toolbar-title .count { font-size: 13px; font-weight: 500; color: var(--el-text-color-secondary); }
.toolbar-sub { margin: 4px 0 0; color: var(--el-text-color-secondary); font-size: 13px; }

/* ---------- 站长推荐 ---------- */
.recommend { margin-bottom: 22px; }
.recommend-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.recommend-title { margin: 0; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--el-text-color-primary); }
.recommend-title i { color: var(--el-color-warning); }
.recommend-more { border: 0; background: transparent; color: var(--el-color-primary); font-weight: 600; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 2px; }
.recommend-rail { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; }
.recommend-rail::-webkit-scrollbar { height: 6px; }
.recommend-rail::-webkit-scrollbar-thumb { background: var(--el-border-color); border-radius: 999px; }
.recommend-card { flex: 0 0 150px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 16px 12px; background: #fff; border: 1px solid var(--el-border-color-light); border-radius: 14px; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.recommend-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(37, 99, 235, .12); border-color: var(--el-color-primary-light-7); }
.recommend-name { font-size: 14px; font-weight: 600; color: var(--el-text-color-primary); width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recommend-meta { font-size: 12px; color: var(--el-text-color-secondary); width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 应用卡片 ---------- */
.app-card-grid > .el-col { margin-bottom: 16px; }
.app-card { height: 100%; cursor: pointer; }
.app-card .el-card__body { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.app-card-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.app-icon { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--el-color-primary-light-9); color: var(--el-color-primary); border: 1px solid var(--el-color-primary-light-8); font-size: 25px; }
.app-icon-small { width: 42px; height: 42px; border-radius: 10px; font-size: 20px; }
.app-icon-large { width: 68px; height: 68px; border-radius: 14px; font-size: 31px; }
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-info { min-width: 0; }
.app-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.app-title strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-meta { margin-top: 4px; color: var(--el-text-color-secondary); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-summary { margin: 0; color: var(--el-text-color-regular); line-height: 1.6; min-height: 45px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.app-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--el-border-color-lighter); }
.app-card-foot .meta { display: inline-flex; align-items: center; gap: 6px; color: var(--el-text-color-secondary); font-size: 13px; white-space: nowrap; }

.pager { display: flex; justify-content: center; margin-top: 8px; }

/* ---------- 软件详情 ---------- */
.detail-head { display: flex; align-items: flex-start; gap: 16px; }
.detail-title { display: flex; align-items: center; gap: 8px; }
.detail-title strong { font-size: 18px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.detail-copy { max-height: 260px; overflow: auto; color: var(--el-text-color-regular); line-height: 1.8; white-space: pre-wrap; }
.shot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shot-grid img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; border: 1px solid var(--el-border-color-light); }

/* 公告弹窗 */
.announcement-list { max-height: 420px; overflow: auto; }
.announcement-item { padding: 14px 0; border-bottom: 1px solid var(--el-border-color-lighter); }
.announcement-item:last-child { border-bottom: 0; }
.announcement-item strong { display: flex; align-items: center; gap: 8px; }
.announcement-item p { margin: 8px 0 0; color: var(--el-text-color-regular); line-height: 1.7; white-space: pre-wrap; }
.announcement-item span { display: block; margin-top: 8px; color: var(--el-text-color-secondary); font-size: 12px; }

/* ---------- 页脚 ---------- */
.site-footer { height: auto; padding: 22px 0; border-top: 1px solid var(--el-border-color-light); background: #fff; color: var(--el-text-color-secondary); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; }
.footer-inner .footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-inner a { color: var(--el-color-primary); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .aside-sticky { position: static; }
}
@media (max-width: 900px) {
  .header-search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .header-inner { flex-wrap: wrap; padding: 10px 0; }
}
@media (max-width: 768px) {
  .container { width: min(100% - 28px, 1200px); }
  .hero { padding: 36px 0 28px; }
  .hero-command { flex-direction: column; }
  .hero-command .el-button { width: 100%; }
  .toolbar { flex-direction: column; align-items: flex-start; }
  .shot-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
