/**
 * Hell APP 资源下载 — 首页应用卡片网格
 * body.theme-hell-appdl
 */

.theme-hell-appdl .blog-list--appdl .main {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 1rem 0.75rem 1.25rem;
}

.theme-hell-appdl .blog-list--appdl {
  background: #f0f1f4;
}

.theme-hell-appdl main.content.page-width {
  background: #f0f1f4;
}

.theme-hell-appdl .appdl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 1.1rem 1rem;
  align-items: stretch;
}

@media (min-width: 640px) {
  .theme-hell-appdl .appdl-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem 1.1rem;
  }
}

@media (min-width: 1100px) {
  .theme-hell-appdl .appdl-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.theme-hell-appdl .appdl-card {
  position: relative;
  margin-bottom: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 1rem;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.theme-hell-appdl .appdl-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.08),
    0 12px 32px rgba(15, 23, 42, 0.1);
}

.theme-hell-appdl .appdl-card__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.15rem 0.85rem 0.9rem;
  height: 100%;
  box-sizing: border-box;
  color: inherit;
  text-decoration: none;
  justify-content: flex-start;
}

.theme-hell-appdl .appdl-card__icon-wrap {
  width: 4.75rem;
  height: 4.75rem;
  margin: 0 auto 0.85rem;
  border-radius: 1.1rem;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  flex-shrink: 0;
  background: linear-gradient(145deg, #f8fafc, #e2e8f0);
}

.theme-hell-appdl .appdl-card__icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.theme-hell-appdl .appdl-card__name {
  margin: 0 0 0.25rem;
  padding: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
  width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

.theme-hell-appdl .appdl-card__ver {
  margin: 0 0 0.5rem;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: #64748b;
  width: 100%;
}

.theme-hell-appdl .appdl-card__desc {
  margin: 0 0 0.65rem;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #475569;
  width: 100%;
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.35em;
}

.theme-hell-appdl .appdl-card__pf {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.5rem;
  color: #1e293b;
}

.theme-hell-appdl .appdl-card__pf--row {
  flex-wrap: wrap;
  gap: 0.35rem;
}

.theme-hell-appdl .appdl-pf-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.theme-hell-appdl .blog-list--appdl #pagination {
  margin-top: 1.25rem;
}

.theme-hell-appdl .appdl-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #64748b;
}

.theme-hell-appdl .appdl-pf-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  line-height: 1.2;
}

.theme-hell-appdl .appdl-pf-badge--intel {
  background: #e2e8f0;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.theme-hell-appdl .appdl-pf-badge--m {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #f1f5f9;
}

html[data-theme="dark"] .theme-hell-appdl .appdl-pf-badge--intel {
  background: #334155;
  color: #e2e8f0;
  border-color: #475569;
}

html[data-theme="dark"] .theme-hell-appdl .appdl-pf-badge--m {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
}

/* 置顶角标不撑破圆角 */
.theme-hell-appdl .appdl-card .topflg,
.theme-hell-appdl .appdl-card .sortopflg {
  position: absolute;
  z-index: 2;
  top: 0.35rem;
  left: 0.35rem;
}

.theme-hell-appdl .appdl-list-signal {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #fff;
  pointer-events: none;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  animation: appdl-list-signal-pulse 1.2s ease-in-out infinite;
}

.theme-hell-appdl .appdl-list-signal--new {
  background: #16a34a;
}

.theme-hell-appdl .appdl-list-signal--updated {
  background: #dc2626;
}

@keyframes appdl-list-signal-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.78;
  }
}

/* 暗色模式（hell-lite 使用 html data-theme） */
html[data-theme="dark"] .theme-hell-appdl .blog-list--appdl,
html[data-theme="dark"] .theme-hell-appdl main.content.page-width {
  background: var(--hl-body-bg, #1a1a1c);
}

html[data-theme="dark"] .theme-hell-appdl .appdl-card {
  background: var(--hl-box-bg, #252528);
  box-shadow: var(--hl-box-shadow, 0 4px 20px rgba(0, 0, 0, 0.35));
}

html[data-theme="dark"] .theme-hell-appdl .appdl-card__name {
  color: var(--hl-text-color, #e2e8f0);
}

html[data-theme="dark"] .theme-hell-appdl .appdl-card__ver {
  color: var(--hl-text-secondary-color, #94a3b8);
}

html[data-theme="dark"] .theme-hell-appdl .appdl-card__desc {
  color: var(--hl-text-secondary-color, #94a3b8);
}

html[data-theme="dark"] .theme-hell-appdl .appdl-card__pf {
  color: #cbd5e1;
}

html[data-theme="dark"] .theme-hell-appdl .appdl-card__icon-wrap {
  background: linear-gradient(145deg, #334155, #1e293b);
}
