/* 页面作用域：news / 内容观察 */
.page-news {
  --news-glow-pink: 0 0 8px rgba(255, 61, 129, .55), 0 0 28px rgba(184, 41, 255, .25);
  --news-glow-green: 0 0 12px rgba(57, 255, 136, .45);
  --news-panel-bg: rgba(10, 10, 18, .72);
  --news-border: 1px solid rgba(192, 192, 208, .12);
  --news-border-hover: 1px solid rgba(255, 61, 129, .55);
  background:
    radial-gradient(ellipse at 20% -10%, rgba(184, 41, 255, .12), transparent 60%),
    var(--bg-deep);
  overflow: clip;
}

/* ============ 刊头区 ============ */
.page-news .news-masthead {
  position: relative;
  padding: 40px 0 56px;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(255, 61, 129, .16), transparent 60%),
    radial-gradient(ellipse at 15% 80%, rgba(184, 41, 255, .20), transparent 55%),
    linear-gradient(120deg, var(--bg-deep) 20%, var(--bg-night) 90%);
  border-bottom: 1px solid rgba(255, 61, 129, .30);
  overflow: hidden;
}

.page-news .news-masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

.page-news .news-masthead::after {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  top: 62%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-pink), transparent);
  transform: rotate(-4deg);
  opacity: .7;
  filter: blur(1px);
  pointer-events: none;
}

.page-news .news-masthead-inner {
  position: relative;
  z-index: 1;
}

.page-news .news-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-dim);
}

.page-news .news-breadcrumb a {
  color: var(--neon-pink);
  text-decoration: none;
  transition: color .25s ease;
}

.page-news .news-breadcrumb a:hover,
.page-news .news-breadcrumb a:focus-visible {
  color: var(--ice-white);
}

.page-news .news-masthead-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
}

.page-news .news-kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 3px solid var(--neon-green);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--neon-green);
}

.page-news .news-masthead h1 {
  position: relative;
  max-width: 16em;
  margin: 0 0 18px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.7rem, 5vw, 3rem);
  line-height: 1.25;
  color: var(--ice-white);
  text-shadow: 0 0 10px rgba(255, 61, 129, .8), 0 0 30px rgba(184, 41, 255, .45);
  z-index: 1;
}

.page-news .news-masthead h1::before,
.page-news .news-masthead h1::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: .85;
}

.page-news .news-masthead h1::before {
  color: var(--neon-green);
  transform: translate(4px, -2px);
  clip-path: polygon(0 18%, 100% 22%, 100% 28%, 0 24%);
}

.page-news .news-masthead h1::after {
  color: var(--neon-pink);
  transform: translate(-4px, 3px);
  clip-path: polygon(0 62%, 100% 68%, 100% 74%, 0 70%);
}

.page-news .news-masthead-lead {
  max-width: 42em;
  margin: 0 0 20px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-body);
}

.page-news .news-masthead-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-news .news-masthead-side {
  display: none;
}

.page-news .news-vertical-text {
  position: absolute;
  top: 0;
  right: 8px;
  height: 100%;
  writing-mode: vertical-rl;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 61, 129, .4);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .3em;
  color: rgba(192, 192, 208, .5);
}

/* ============ 通用章节标题 ============ */
.page-news .news-observations,
.page-news .news-tags {
  padding: 48px 0;
}

.page-news .news-section-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 61, 129, .25);
}

.page-news .news-section-index {
  flex: 0 0 auto;
  margin-top: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(57, 255, 136, .35);
  border-radius: 4px;
  background: rgba(57, 255, 136, .06);
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--neon-green);
  white-space: nowrap;
}

.page-news .news-section-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--ice-white);
  text-shadow: 0 0 10px rgba(255, 61, 129, .4);
}

.page-news .news-section-head p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--text-dim);
}

/* ============ 最新观察：布局 ============ */
.page-news .news-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.page-news .news-tagfilter {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  background: var(--news-panel-bg);
  border: var(--news-border);
  border-radius: 14px;
  height: fit-content;
}

.page-news .news-tagfilter h3 {
  flex: 0 0 100%;
  margin: 0 0 4px;
  font-family: var(--font-head);
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--neon-pink);
}

.page-news .news-filter-btn {
  display: block;
  margin-bottom: 0;
  padding: 6px 12px;
  border: 1px solid rgba(192, 192, 208, .15);
  border-radius: 999px;
  border-left-width: 1px;
  font-size: .82rem;
  font-family: var(--font-head);
  color: var(--text-body);
  text-decoration: none;
  transition: all .25s ease;
}

.page-news .news-filter-btn:hover,
.page-news .news-filter-btn:focus-visible {
  padding-left: 12px;
  border-left-color: var(--neon-green);
  background: rgba(57, 255, 136, .05);
  color: var(--neon-green);
}

.page-news .news-stream {
  display: grid;
  gap: 18px;
}

/* ============ 文章卡片 ============ */
.page-news .news-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 20px;
  background: var(--news-panel-bg);
  border: var(--news-border);
  border-radius: 14px;
  overflow: hidden;
  scroll-margin-top: 120px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.page-news .news-card:hover,
.page-news .news-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(255, 61, 129, .55);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .45), 0 0 24px rgba(255, 61, 129, .12);
}

.page-news .news-card::before {
  content: attr(data-index);
  position: absolute;
  right: 14px;
  bottom: -4px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 64px;
  line-height: 1;
  color: rgba(192, 192, 208, .05);
  pointer-events: none;
  z-index: 0;
}

.page-news .news-card-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(184, 41, 255, .12);
}

.page-news .news-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.page-news .news-card:hover .news-card-media img {
  transform: scale(1.03);
}

.page-news .news-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(10, 10, 18, .15) 30%, rgba(255, 61, 129, .08) 55%, transparent 80%);
  pointer-events: none;
}

.page-news .news-card-body {
  position: relative;
  z-index: 1;
}

.page-news .news-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.page-news .news-card-time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.page-news .news-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ice-white);
}

.page-news .news-card h3 a {
  color: inherit;
  text-decoration: none;
  transition: color .25s ease, text-shadow .25s ease;
}

.page-news .news-card h3 a:hover,
.page-news .news-card h3 a:focus-visible {
  color: var(--neon-pink);
  text-shadow: 0 0 10px rgba(255, 61, 129, .5);
}

.page-news .news-card p {
  margin: 0 0 12px;
  font-size: .88rem;
  line-height: 1.75;
  color: var(--text-body);
}

.page-news .news-card-more {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--neon-green);
  text-decoration: none;
  transition: color .25s ease, text-shadow .25s ease;
}

.page-news .news-card-more:hover,
.page-news .news-card-more:focus-visible {
  color: var(--ice-white);
  text-shadow: 0 0 8px rgba(57, 255, 136, .6);
}

/* ============ 版本更新日志 ============ */
.page-news .news-changelog {
  position: relative;
  padding: 56px 0 64px;
  background:
    linear-gradient(140deg, rgba(26, 11, 46, .95), rgba(10, 10, 18, .96)),
    var(--bg-night);
  border-top: 1px solid rgba(184, 41, 255, .35);
  border-bottom: 1px solid rgba(184, 41, 255, .35);
  overflow: hidden;
}

.page-news .news-changelog::after {
  content: "";
  position: absolute;
  right: -10%;
  top: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple));
  filter: blur(2px);
  transform: rotate(-3deg);
  pointer-events: none;
}

.page-news .news-changelog .container {
  position: relative;
  z-index: 1;
}

.page-news .news-changelog-content {
  display: grid;
  gap: 24px;
}

.page-news .news-changelog-visual {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(184, 41, 255, .35);
}

.page-news .news-changelog-visual img {
  display: block;
  width: 100%;
  min-height: 180px;
  height: auto;
  object-fit: cover;
}

.page-news .news-timeline {
  position: relative;
  margin: 0;
  padding-left: 30px;
}

.page-news .news-timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--neon-pink), var(--neon-purple), rgba(57, 255, 136, .4));
}

.page-news .news-timeline-item {
  position: relative;
  margin: 0;
  padding: 0 0 34px 18px;
}

.page-news .news-timeline-item:last-child {
  padding-bottom: 0;
}

.page-news .news-timeline-dot {
  position: absolute;
  left: -30px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--bg-deep);
  background: var(--neon-green);
  box-shadow: 0 0 12px rgba(57, 255, 136, .7), 0 0 4px rgba(255, 255, 255, .4);
}

.page-news .news-timeline-item .data-tag {
  display: inline-block;
  margin-bottom: 8px;
}

.page-news .news-timeline-item h3 {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1rem;
  color: var(--ice-white);
}

.page-news .news-timeline-item p {
  margin: 0;
  font-size: .85rem;
  line-height: 1.75;
  color: var(--text-body);
}

/* ============ 故障排查专题 ============ */
.page-news .news-trouble {
  position: relative;
  padding: 56px 0;
  overflow: hidden;
}

.page-news .news-trouble::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(255, 61, 129, .16), transparent 70%);
  pointer-events: none;
}

.page-news .news-trouble .container {
  position: relative;
  z-index: 1;
}

.page-news .news-trouble-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.page-news .news-trouble-media {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(10, 10, 18, .6);
  border: 1px solid rgba(255, 61, 129, .35);
}

.page-news .news-trouble-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.page-news .news-trouble-media figcaption {
  padding: 10px 12px;
  border-top: 1px solid rgba(192, 192, 208, .1);
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-dim);
}

.page-news .news-steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-news .news-step {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: rgba(10, 10, 18, .65);
  border: 1px solid rgba(192, 192, 208, .12);
  border-radius: 12px;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.page-news .news-step:hover {
  border-color: rgba(184, 41, 255, .5);
  box-shadow: 0 0 16px rgba(184, 41, 255, .12);
}

.page-news .news-step-num {
  flex: 0 0 auto;
  min-width: 32px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--neon-green);
  text-shadow: 0 0 8px rgba(57, 255, 136, .5);
}

.page-news .news-step h3 {
  margin: 0 0 6px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: .95rem;
  color: var(--ice-white);
}

.page-news .news-step p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.7;
  color: var(--text-body);
}

/* ============ 标签云 ============ */
.page-news .news-tags {
  padding: 56px 0 72px;
}

.page-news .news-tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(184, 41, 255, .08), transparent 40%),
    rgba(10, 10, 18, .6);
  border: 1px solid rgba(184, 41, 255, .25);
  border-radius: 18px;
}

.page-news .news-tagpill {
  display: inline-block;
  padding: 8px 18px;
  background: rgba(10, 10, 18, .8);
  border: 1px solid rgba(255, 61, 129, .4);
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--neon-pink);
  text-decoration: none;
  transition: all .25s ease;
}

.page-news .news-tagpill:hover,
.page-news .news-tagpill:focus-visible {
  background: rgba(255, 61, 129, .14);
  color: var(--ice-white);
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(255, 61, 129, .35);
}

/* ============ 平板及以上 ============ */
@media (min-width: 720px) {
  .page-news .news-tagfilter {
    position: sticky;
    top: 128px;
    display: block;
    padding: 20px;
  }

  .page-news .news-tagfilter h3 {
    margin-bottom: 16px;
  }

  .page-news .news-filter-btn {
    display: block;
    margin-bottom: 8px;
    padding: 9px 12px;
    border: none;
    border-left: 2px solid rgba(192, 192, 208, .2);
    border-radius: 0;
    font-size: .82rem;
  }

  .page-news .news-filter-btn:hover,
  .page-news .news-filter-btn:focus-visible {
    padding-left: 18px;
    border-left-color: var(--neon-green);
    background: rgba(57, 255, 136, .05);
  }

  .page-news .news-card {
    grid-template-columns: 200px 1fr;
    padding: 16px;
  }

  .page-news .news-card-media {
    align-self: stretch;
    aspect-ratio: auto;
    min-height: 160px;
    margin-bottom: 0;
  }

  .page-news .news-card--plain .news-card-body {
    grid-column: 1 / -1;
  }

  .page-news .news-trouble-grid {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }

  .page-news .news-masthead-side {
    display: block;
    align-self: stretch;
    position: relative;
  }
}

/* ============ 桌面端 ============ */
@media (min-width: 992px) {
  .page-news .news-layout {
    grid-template-columns: 200px 1fr;
  }

  .page-news .news-card {
    grid-template-columns: 220px 1fr;
  }

  .page-news .news-changelog-content {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }

  .page-news .news-vertical-text {
    display: block;
  }
}
