/* ─────────────────────────────────────────────────────────
   Blog Article Page — blog/assets/css/article.css
───────────────────────────────────────────────────────── */

/* 覆盖 style.css 全局的 overflow:hidden（首页专用），允许普通页面滚动 */
html {
  overflow-x: hidden;
  overflow-y: auto;
}
body {
  overflow: visible;
}

/* ── 文章 Hero ── */
.art-hero {
  background: var(--bg-dark, #09090B);
  padding: 120px 24px 32px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.art-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.art-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.35);
  margin-bottom: 20px;
}
.art-breadcrumb a {
  color: var(--brand-purple, #A78BFA);
  text-decoration: none;
}
.art-breadcrumb a:hover { text-decoration: underline; }
.art-breadcrumb i { font-size: 10px; }

.art-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.art-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--brand-purple, #A78BFA);
  background: rgba(167,139,250,.12);
  border-radius: 6px;
  padding: 3px 10px;
}

.art-date {
  font-size: 13px;
  color: rgba(255,255,255,.35);
}

.art-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  letter-spacing: -.02em;
  margin: 0 0 18px;
}

.art-lead {
  font-size: 1.05rem;
  color: rgba(255,255,255,.55);
  line-height: 1.75;
  margin: 0;
}

.art-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}
.art-tag {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.07);
  border-radius: 6px;
  padding: 3px 10px;
}

/* ── 正文布局 ── */
.art-layout {
  background: var(--bg-dark, #09090B);
  padding: 32px 24px 80px;
}

.art-body {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255,255,255,.78);
  font-size: 15.5px;
  line-height: 1.85;
}

/* ── 正文排版 ── */
.art-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  margin: 2.4em 0 .8em;
  padding-bottom: .4em;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.art-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 1.8em 0 .6em;
}
.art-body h4 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  margin: 1.4em 0 .5em;
}

.art-body p {
  margin: 0 0 1.2em;
}

.art-body a {
  color: var(--brand-purple, #A78BFA);
  text-decoration: none;
}
.art-body a:hover { text-decoration: underline; }

.art-body strong { color: #fff; font-weight: 600; }
.art-body em { color: rgba(255,255,255,.7); }

.art-body ul,
.art-body ol {
  margin: 0 0 1.2em;
  padding-left: 1.6em;
}
.art-body li {
  margin-bottom: .45em;
  overflow-wrap: break-word;
  word-break: break-word;
}

.art-body code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: .88em;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 5px;
  padding: 2px 6px;
  color: #E879F9;
  word-break: break-all;
}

.art-body pre {
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 20px 22px;
  overflow-x: auto;
  margin: 0 0 1.6em;
  -webkit-overflow-scrolling: touch;
}
.art-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: rgba(255,255,255,.85);
  font-size: .875rem;
  line-height: 1.65;
  word-break: normal;
}

.art-body blockquote {
  border-left: 3px solid var(--brand-purple, #A78BFA);
  margin: 1.6em 0;
  padding: 12px 20px;
  background: rgba(167,139,250,.06);
  border-radius: 0 10px 10px 0;
  color: rgba(255,255,255,.6);
}

.art-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.6em;
  font-size: 14px;
}
.art-body th {
  text-align: left;
  color: rgba(255,255,255,.55);
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding: 10px 14px;
  background: rgba(255,255,255,.04);
}
.art-body td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
  vertical-align: top;
}
.art-body tr:last-child td { border-bottom: none; }
.art-body tr:hover td { background: rgba(255,255,255,.025); }

/* ── 提示框 ── */
.art-tip, .art-warn, .art-info {
  border-radius: 10px;
  padding: 14px 18px;
  margin: 1.4em 0;
  font-size: .9rem;
}
.art-tip  { background: rgba(16,185,129,.1);  border: 1px solid rgba(16,185,129,.25);  color: #34D399; }
.art-warn { background: rgba(245,158,11,.1);  border: 1px solid rgba(245,158,11,.25);  color: #FCD34D; }
.art-info { background: rgba(99,102,241,.1);  border: 1px solid rgba(99,102,241,.25);  color: #A5B4FC; }
.art-tip i, .art-warn i, .art-info i { margin-right: 8px; }


/* ── 文章末尾下载引导卡片 ── */
.art-dl-card {
  margin-top: 56px;
  border-radius: 20px;
  background: #0d0c14;
  border: 1px solid rgba(124,58,237,.22);
  box-shadow: 0 0 0 1px rgba(99,102,241,.04), 0 8px 40px rgba(0,0,0,.45);
  display: grid;
  grid-template-columns: 1fr 200px;
  grid-template-rows: auto auto;
  overflow: hidden;
  position: relative;
}

/* Left brand accent bar */
.art-dl-card::before {
  content: '';
  position: absolute;
  left: 0; top: 20px; bottom: 20px;
  width: 3px;
  background: linear-gradient(180deg, #6366F1, #A78BFA, #6366F1);
  border-radius: 0 2px 2px 0;
}

/* Top-left ambient glow */
.art-dl-card::after {
  content: '';
  position: absolute;
  top: -50px; left: -50px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(99,102,241,.1) 0%, transparent 70%);
  pointer-events: none;
}

/* Icon repurposed as right decorative panel */
.art-dl-card-icon {
  grid-column: 2;
  grid-row: 1 / 3;
  width: auto;
  height: auto;
  border-radius: 0;
  background: linear-gradient(145deg, rgba(99,102,241,.1) 0%, rgba(167,139,250,.05) 100%);
  border-left: 1px solid rgba(124,58,237,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 58px;
  color: rgba(99,102,241,.18);
  position: relative;
  overflow: hidden;
}
.art-dl-card-icon::before {
  content: '';
  position: absolute;
  width: 160px; height: 160px;
  border-radius: 50%;
  border: 1px solid rgba(139,92,246,.12);
}
.art-dl-card-icon::after {
  content: '';
  position: absolute;
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 1px solid rgba(139,92,246,.2);
}

.art-dl-card-text {
  grid-column: 1;
  grid-row: 1;
  padding: 36px 32px 14px 52px;
  min-width: 0;
}
.art-dl-card-text h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 9px;
  letter-spacing: -.015em;
}
.art-dl-card-text p {
  font-size: 13.5px;
  color: rgba(255,255,255,.5);
  margin: 0;
  line-height: 1.7;
}

.art-dl-card-actions {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  gap: 10px;
  padding: 14px 32px 36px 52px;
  flex-shrink: 0;
  align-items: center;
}
.art-dl-btn-primary,
.art-body .art-dl-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 10px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: all .2s;
  box-shadow: 0 4px 16px rgba(99,102,241,.35);
}
.art-dl-btn-primary:hover,
.art-body .art-dl-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99,102,241,.52);
  opacity: 1;
}

.art-dl-btn-secondary,
.art-body .art-dl-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.65) !important;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 10px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: all .2s;
}
.art-dl-btn-secondary:hover,
.art-body .art-dl-btn-secondary:hover {
  border-color: rgba(167,139,250,.45);
  color: rgba(255,255,255,.9) !important;
  background: rgba(167,139,250,.07);
}

/* ── 右下角悬浮下载弹窗 ── */
.art-float-cta {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  background: #18181B;
  border: 1px solid rgba(167,139,250,.35);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(167,139,250,.1);
  padding: 18px 20px;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(120%);
  opacity: 0;
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  pointer-events: none;
}
.art-float-cta.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.art-float-cta-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255,255,255,.3);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  transition: color .2s;
}
.art-float-cta-close:hover { color: rgba(255,255,255,.7); }

.art-float-cta-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 20px;
}
.art-float-cta-header i {
  font-size: 22px;
  background: var(--brand-gradient, linear-gradient(135deg,#6366F1,#A78BFA));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.art-float-cta-header span {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.art-float-cta p {
  font-size: 12.5px;
  color: rgba(255,255,255,.45);
  margin: 0;
  line-height: 1.55;
}

.art-float-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366F1, #A78BFA);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity .2s;
}
.art-float-cta-btn:hover { opacity: .88; }

/* ─────────────────────────────────────────────────────────
   响应式
───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .art-hero { padding: 100px 20px 24px; }
  .art-layout { padding: 24px 20px 60px; }
  .art-body { font-size: 15px; }
  .art-body h2 { font-size: 1.25rem; }
  .art-body pre { padding: 16px; }

  .art-dl-card {
    grid-template-columns: 1fr;
  }
  .art-dl-card-icon { display: none; }
  .art-dl-card-text { padding: 28px 24px 12px 36px; }
  .art-dl-card-actions {
    padding: 0 24px 28px 36px;
    flex-direction: column;
  }
  .art-dl-btn-primary,
  .art-dl-btn-secondary { justify-content: center; }

  .art-float-cta {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 16px;
  }
}
