/*
 * PPT集市 下载中转页样式。
 *
 * 依赖 app.css（在其后加载），复用同一套 :root 变量与卡片语言，
 * 让下载页看起来仍是本站的页面 —— 而不是跳到了别的地方。
 */

/* ============================================================ 容器 */
/* 1230px 与全站一致（内容宽 1198px）—— 相关推荐的 5 列网格因此也是 230×130，和首页完全对齐。 */
.dlw {
  max-width: var(--wrap);
  padding-bottom: 40px;
}

/* ============================================================ 广告位 */
/* 容器刻意"隐形"：只有左上角一个「广告」标识，
   广告本身长什么样（图片 / iframe / 文字链）都不受影响。 */
.dlad {
  position: relative;
  margin: 20px 0;
  text-align: center;
}
.dlad-tag {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  font-size: 11px;
  line-height: 16px;
  padding: 0 6px;
  color: #6b7686;
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: 4px;
  letter-spacing: .5px;
}
.dlad img,
.dlad iframe,
.dlad ins {
  margin: 0 auto;
  max-width: 100%;
}

/* ============================================================ 主卡片 */
.dlcard {
  background: #fff;
  border-radius: var(--r);
  box-shadow: var(--sh);
  overflow: hidden;
  margin: 16px 0 0;
}

.dlcard-hd {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.dlcard-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #dfe8f2;
}
.dlcard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dlcard-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.dlcard-info h1 {
  font-size: 21px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -.3px;
  margin: 0;
}
.dlcard-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink3);
}
.dlcard-meta .tag {
  background: var(--blue-l);
  color: var(--blue-d);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12.5px;
}

/* 快速三连（页数 / 大小 / 格式） */
.dlquick {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
}
.dlquick li {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--ink2);
}

/* ============================================================ 下载区 */
.dlcard-body {
  padding: 24px 22px 20px;
}

/* 状态行：呼吸的小圆点 + 文案 */
.dlgo-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  color: var(--ink2);
  margin-bottom: 14px;
}
.dlgo-state b {
  font-weight: 500;
}
.dlgo-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0 rgba(37, 148, 240, .5);
  animation: ppts-breathe 1.4s ease-out infinite;
}
@keyframes ppts-breathe {
  0%   { box-shadow: 0 0 0 0 rgba(37, 148, 240, .45); }
  70%  { box-shadow: 0 0 0 9px rgba(37, 148, 240, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 148, 240, 0); }
}

/* 进度条：duration 由模板内联指定，与等待秒数一致 */
.dlgo-bar {
  height: 6px;
  background: var(--blue-l);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 0 20px;
}
.dlgo-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-d));
  animation-name: ppts-fill;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
@keyframes ppts-fill {
  from { width: 0; }
  to   { width: 100%; }
}

/* 大按钮 */
.dlgo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(37, 148, 240, .32);
  transition: background .2s ease, box-shadow .2s ease, transform .12s ease;
}
.dlgo-btn:hover {
  background: var(--blue-d);
  box-shadow: 0 8px 22px rgba(37, 148, 240, .42);
}
.dlgo-btn:active {
  transform: translateY(1px);
}
.dlgo-btn + .dlgo-btn {
  margin-top: 10px;
}

/* 等待态：灰掉，但保持可点（无障碍：不让键盘用户卡住） */
.dlgo-btn.is-waiting {
  background: #eef3f9;
  color: var(--ink3);
  box-shadow: none;
  cursor: wait;
}
.dlgo-btn.is-waiting:hover {
  background: #eef3f9;
  box-shadow: none;
}

/* 就绪：轻微脉冲两次，明确告诉访客"现在可以点了" */
.dlgo-btn.is-ready {
  animation: ppts-pulse 1.5s ease-out 2;
}
@keyframes ppts-pulse {
  0%   { box-shadow: 0 6px 18px rgba(37, 148, 240, .32), 0 0 0 0 rgba(37, 148, 240, .45); }
  100% { box-shadow: 0 6px 18px rgba(37, 148, 240, .32), 0 0 0 16px rgba(37, 148, 240, 0); }
}

/* 404 页上的朴素按钮 */
.dlgo-btn.is-plain {
  width: auto;
  display: inline-flex;
  padding: 11px 26px;
  font-size: 15px;
  margin: 0 4px;
}

.dlgo-note {
  text-align: center;
  font-size: 13px;
  color: var(--ink3);
  line-height: 1.8;
  margin: 14px 0 0;
}

.dlgo-back {
  text-align: center;
  margin: 16px 0 0;
  font-size: 13.5px;
}
.dlgo-back a {
  color: var(--ink3);
}
.dlgo-back a:hover {
  color: var(--blue-d);
}

/* ============================================================ 区块 */
.dlsec {
  margin-top: 30px;
}

/* 宽版参数表：1000px 单栏下一行一项太浪费，改成两列 */
.spec--wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 30px;
  margin: 0;
  padding: 8px 22px;
  border-top: 0;
  background: #fff;
  border-radius: var(--r);
  box-shadow: var(--sh);
}
.spec--wide li {
  display: flex;
  padding: 12px 0;
  font-size: 14px;
  border-bottom: 1px dashed #f0f4f9;
}
.spec--wide li b {
  flex: 0 0 96px;
}
.spec--wide li span {
  color: #2c3849;
  word-break: break-all;
}

/* 相关推荐网格：沿用 app.css 的 --gcols 变量，5 列 = 230×130，与首页完全一致。 */
.grid--dl {
  --gcols: 5;
}

/* ============================================================ 响应式 */
/* 断点与 app.css 第 12 节保持一致，避免首页 4 列、下载页却 3 列的错位。 */
@media (max-width: 1180px) {
  .grid--dl { --gcols: 4; }
}

@media (max-width: 900px) {
  .grid--dl { --gcols: 3; }
}

@media (max-width: 820px) {
  .dlcard-hd {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }
  .dlcard-info h1 { font-size: 18px; }
  .dlcard-body { padding: 20px 16px 18px; }
  .dlgo-btn { font-size: 16px; padding: 15px; }
  .spec--wide { grid-template-columns: minmax(0, 1fr); padding: 6px 18px; }
  .grid--dl { --gcols: 2; }
}

@media (max-width: 480px) {
  .grid--dl { --gcols: 1; }
  .dlquick { gap: 6px; }
  .dlquick li { font-size: 12.5px; padding: 3px 10px; }
}
