/* ==========================================================================
   CBUDJ · 热门榜单（站点 top_music 页面专用）
   只作用于 #page[data-page="top_music"]，不影响其他页面。
   ========================================================================== */

#page[data-page="top_music"] .ma_page_content {
  background:
    radial-gradient(120% 42% at 88% -4%, rgba(20, 132, 78, .16), transparent 62%),
    #04070a;
}

#page[data-page="top_music"] .cpudj-rank-page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 7px 158px;
  color: #f2f4f3;
  -webkit-font-smoothing: antialiased;
}

#page[data-page="top_music"] .cpudj-rank-page *,
#page[data-page="top_music"] .cpudj-rank-page *::before,
#page[data-page="top_music"] .cpudj-rank-page *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------- 头图 */
#page[data-page="top_music"] .cpudj-rank-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 98px;
  padding: 10px 4px 10px 2px;
  overflow: hidden;
}

#page[data-page="top_music"] .cpudj-rank-hero-copy {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

#page[data-page="top_music"] .cpudj-rank-hero-crown {
  flex: none;
  width: 38px;
  height: 31px;
  margin-top: -2px;
  color: #f6c94f;
  filter: drop-shadow(0 0 9px rgba(245, 195, 62, .55)) drop-shadow(0 2px 5px rgba(0, 0, 0, .6));
  animation: cpudjCrownFloat 5s ease-in-out infinite;
}

@keyframes cpudjCrownFloat {
  0%, 100% { transform: translateY(0) }
  50% { transform: translateY(-2px) }
}

#page[data-page="top_music"] .cpudj-rank-hero-text { min-width: 0; }

#page[data-page="top_music"] .cpudj-rank-hero-text h2 {
  margin: 0;
  font-family: "SF Pro Display", "Helvetica Neue", "PingFang SC", "Montserrat", sans-serif;
  font-size: 36px;
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: .5px;
  color: #fbfdfb;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .65);
  white-space: nowrap;
}

#page[data-page="top_music"] .cpudj-rank-hero-text h2 span {
  color: #2ee06e;
  text-shadow: 0 0 18px rgba(46, 224, 110, .42), 0 2px 12px rgba(0, 0, 0, .5);
}

#page[data-page="top_music"] .cpudj-rank-hero-text p {
  margin: 4px 0 0 2px;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: .9px;
  color: #c6cac6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .8);
  white-space: nowrap;
}

/* 频谱柱 */
#page[data-page="top_music"] .cpudj-rank-eq {
  position: absolute;
  z-index: 1;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 180px;
  height: 84px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 2.6px;
  padding-right: 2px;
  opacity: .95;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 32%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 32%, #000 94%, transparent 100%);
  pointer-events: none;
}

#page[data-page="top_music"] .cpudj-rank-eq::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: -18px;
  width: 150px;
  height: 92px;
  background: radial-gradient(60% 60% at 50% 60%, rgba(38, 230, 120, .26), transparent 70%);
  filter: blur(8px);
}

#page[data-page="top_music"] .cpudj-rank-eq i {
  position: relative;
  display: block;
  width: 2.4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #7dffb4 0%, #2ee06e 38%, #0d7a42 100%);
  box-shadow: 0 0 6px rgba(46, 224, 110, .55);
  transform-origin: 50% 100%;
  animation: cpudjEqPulse var(--d, 1.6s) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}

@keyframes cpudjEqPulse {
  from { transform: scaleY(.55); opacity: .55; }
  to   { transform: scaleY(1); opacity: 1; }
}

/* ---------------------------------------------------------------- 榜单 */
#page[data-page="top_music"] .cpudj-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#page[data-page="top_music"] .cpudj-rank-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px 54px minmax(0, 1fr) 32px 15px;
  align-items: center;
  gap: 8px;
  min-height: 68px;
  padding: 5px 10px 5px 2px;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 9px;
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(255, 255, 255, .025), transparent 55%),
    linear-gradient(112deg, #0d1315 0%, #0a0f11 62%, #080c0e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .025),
    0 5px 16px rgba(0, 0, 0, .28);
}

#page[data-page="top_music"] .cpudj-rank-row.is-playing {
  border-color: rgba(46, 224, 110, .34);
  background:
    radial-gradient(100% 160% at 0% 0%, rgba(46, 224, 110, .1), transparent 55%),
    linear-gradient(112deg, #0f1717 0%, #0b1112 65%, #090d0f 100%);
}

/* 第一名金色 */
#page[data-page="top_music"] .cpudj-rank-row.is-gold {
  border-color: rgba(230, 184, 66, .55);
  background:
    radial-gradient(58% 180% at 0% 55%, rgba(247, 201, 75, .20) 0%, rgba(140, 103, 22, .10) 36%, transparent 62%),
    linear-gradient(104deg, rgba(42, 33, 13, .62) 0%, #141310 34%, #0b1010 64%, #090d0e 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 120, .05),
    inset 0 0 26px rgba(240, 190, 70, .04),
    0 6px 20px rgba(0, 0, 0, .35),
    0 0 22px rgba(216, 163, 40, .07);
}

#page[data-page="top_music"] .cpudj-rank-row.is-gold::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  width: 2px;
  height: 76%;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, rgba(255, 213, 96, .65), transparent);
  opacity: .8;
}

/* 排名 */
#page[data-page="top_music"] .cpudj-rank-no {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  user-select: none;
}

#page[data-page="top_music"] .cpudj-rank-crown {
  display: none;
  width: 18px;
  height: 14px;
  margin-bottom: 1px;
  color: #f6c94f;
  filter: drop-shadow(0 0 6px rgba(255, 200, 60, .55));
}

#page[data-page="top_music"] .cpudj-rank-row.is-gold .cpudj-rank-crown { display: block; }

#page[data-page="top_music"] .cpudj-rank-num {
  display: block;
  font-family: "SF Pro Display", "Helvetica Neue", "Montserrat", Arial, sans-serif;
  font-size: 29px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: .92;
  letter-spacing: -.5px;
  background: linear-gradient(180deg, #ffffff 6%, #f0f4f6 40%, #c6d0d6 78%, #a8b3ba 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55));
}

#page[data-page="top_music"] .cpudj-rank-row:nth-child(n+10) .cpudj-rank-num {
  font-size: 23px;
  letter-spacing: -1.4px;
}

#page[data-page="top_music"] .cpudj-rank-row.is-silver .cpudj-rank-num {
  background-image: linear-gradient(180deg, #ffffff 4%, #f2f6f8 30%, #b9c4cb 72%, #8e9aa2 100%);
}

#page[data-page="top_music"] .cpudj-rank-row.is-bronze .cpudj-rank-num {
  background-image: linear-gradient(180deg, #ffd2a1 0%, #ff8b3d 48%, #cf4f12 100%);
  filter: drop-shadow(0 0 8px rgba(255, 100, 30, .28));
}

#page[data-page="top_music"] .cpudj-rank-row.is-gold .cpudj-rank-num {
  font-size: 31px;
  background-image: linear-gradient(180deg, #fff6c9 0%, #ffd75f 36%, #e2a01c 76%, #a96d07 100%);
  filter: drop-shadow(0 0 8px rgba(255, 198, 60, .5));
}

/* 封面 */
#page[data-page="top_music"] .cpudj-rank-cover {
  position: relative;
  display: block;
  width: 54px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  background: #11171a;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .06);
}

#page[data-page="top_music"] .cpudj-rank-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#page[data-page="top_music"] .cpudj-rank-row.is-gold .cpudj-rank-cover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 220, 130, .18);
}

#page[data-page="top_music"] .cpudj-rank-cover-bars {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(3, 8, 6, .55);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}

#page[data-page="top_music"] .cpudj-rank-row.is-playing .cpudj-rank-cover-bars { display: flex; }

#page[data-page="top_music"] .cpudj-rank-cover-bars i {
  width: 2.5px;
  height: 14px;
  border-radius: 2px;
  background: #6dffab;
  box-shadow: 0 0 6px rgba(46, 224, 110, .7);
  animation: cpudjCoverBar .8s ease-in-out infinite alternate;
}

#page[data-page="top_music"] .cpudj-rank-cover-bars i:nth-child(2) { animation-delay: .18s; height: 20px; }
#page[data-page="top_music"] .cpudj-rank-cover-bars i:nth-child(3) { animation-delay: .36s; height: 11px; }
#page[data-page="top_music"] .cpudj-rank-cover-bars i:nth-child(4) { animation-delay: .52s; height: 17px; }

@keyframes cpudjCoverBar { from { transform: scaleY(.28); } to { transform: scaleY(1); } }

/* 文本 */
#page[data-page="top_music"] .cpudj-rank-body { min-width: 0; align-self: center; }

#page[data-page="top_music"] .cpudj-rank-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

#page[data-page="top_music"] .cpudj-rank-link h4 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: .1px;
  color: #f4f5f2;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

#page[data-page="top_music"] .cpudj-rank-link p {
  margin: 1px 0 0;
  font-size: 11.5px;
  line-height: 1.3;
  color: #9aa0a3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#page[data-page="top_music"] .cpudj-rank-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  min-width: 0;
  overflow: hidden;
}

#page[data-page="top_music"] .cpudj-rpill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 17px;
  padding: 0 4.5px;
  border: 1px solid;
  border-radius: 3.5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#page[data-page="top_music"] .cpudj-rpill-fmt {
  color: #b6bcc0;
  border-color: #3b4247;
  background: rgba(255, 255, 255, .025);
}

#page[data-page="top_music"] .cpudj-rpill-rate {
  color: #38dd80;
  border-color: #1c6e48;
  background: rgba(30, 180, 100, .06);
}

#page[data-page="top_music"] .cpudj-rpill-bpm {
  color: #e0b85e;
  border-color: #6d5522;
  background: rgba(190, 145, 40, .055);
}

#page[data-page="top_music"] .cpudj-rank-dur {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
  margin-left: 1px;
  font-size: 10.5px;
  font-weight: 500;
  color: #a4aaae;
  font-variant-numeric: tabular-nums;
}

#page[data-page="top_music"] .cpudj-rank-dur svg { width: 12px; height: 12px; opacity: .8; }

/* 播放键 */
#page[data-page="top_music"] .cpudj-rank-play {
  position: relative;
  width: 32px;
  height: 32px;
  flex: none;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(46, 224, 110, .92);
  background: radial-gradient(circle at 50% 45%, rgba(46, 224, 110, .12), rgba(46, 224, 110, .02) 70%);
  box-shadow: 0 0 10px rgba(46, 224, 110, .13), inset 0 0 8px rgba(46, 224, 110, .08);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}

#page[data-page="top_music"] .cpudj-rank-play:hover {
  box-shadow: 0 0 15px rgba(46, 224, 110, .26), inset 0 0 10px rgba(46, 224, 110, .12);
}

#page[data-page="top_music"] .cpudj-rank-play:active { transform: scale(.92); }

#page[data-page="top_music"] .cpudj-ic-play {
  display: block;
  width: 10px;
  height: 12px;
  margin-left: 1.5px;
  fill: #fff;
}

#page[data-page="top_music"] .cpudj-ic-pause {
  display: none;
  width: 10px;
  height: 11px;
  fill: #fff;
}

#page[data-page="top_music"] .cpudj-rank-row.is-playing .cpudj-rank-play {
  border-color: #6dffab;
  box-shadow: 0 0 18px rgba(46, 224, 110, .32);
}

#page[data-page="top_music"] .cpudj-rank-row.is-playing .cpudj-ic-play { display: none; }
#page[data-page="top_music"] .cpudj-rank-row.is-playing .cpudj-ic-pause { display: block; }

/* 更多 */
#page[data-page="top_music"] .cpudj-rank-more {
  display: grid;
  place-items: center;
  width: 15px;
  height: 30px;
  color: #9aa2a8;
  text-decoration: none;
  opacity: .95;
}

#page[data-page="top_music"] .cpudj-rank-more svg { width: 14px; height: 20px; fill: currentColor; }
#page[data-page="top_music"] .cpudj-rank-more:active { color: #fff; }

/* 底部说明 */
#page[data-page="top_music"] .cpudj-rank-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 16px 0 10px;
  font-size: 10.5px;
  letter-spacing: .3px;
  color: #6f777c;
}

#page[data-page="top_music"] .cpudj-rank-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2ee06e;
  box-shadow: 0 0 8px rgba(46, 224, 110, .8);
  animation: cpudjLive 2.4s ease-in-out infinite;
}

@keyframes cpudjLive { 0%, 100% { opacity: .45 } 50% { opacity: 1 } }

/* 专辑区：保留站点原有数据，排在榜单后面 */
#page[data-page="top_music"] .cpudj-rank-albums {
  margin-top: 24px;
  padding: 0 1px;
}

#page[data-page="top_music"] .cpudj-rank-albums-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: #f2f5f2;
}

#page[data-page="top_music"] .cpudj-rank-albums-title a {
  font-size: 11px;
  font-weight: 500;
  color: #59ea99;
  text-decoration: none;
}

/* ---------------------------------------------------------------- 响应式 */
@media (min-width: 1190px) {
  #page[data-page="top_music"] .cpudj-rank-page {
    margin-left: 320px;
    margin-right: auto;
    max-width: 860px;
  }
}

@media (max-width: 420px) {
  #page[data-page="top_music"] .cpudj-rank-page { padding-left: 6px; padding-right: 6px; }
  #page[data-page="top_music"] .cpudj-rank-hero-text h2 { font-size: 34px; }
  #page[data-page="top_music"] .cpudj-rank-hero-crown { width: 35px; height: 29px; }
  #page[data-page="top_music"] .cpudj-rank-eq { width: 160px; }
  #page[data-page="top_music"] .cpudj-rank-row {
    grid-template-columns: 36px 52px minmax(0, 1fr) 31px 14px;
    gap: 7px;
    padding-right: 9px;
  }
  #page[data-page="top_music"] .cpudj-rank-cover { width: 52px; height: 52px; }
  #page[data-page="top_music"] .cpudj-rank-num { font-size: 27px; }
  #page[data-page="top_music"] .cpudj-rank-row.is-gold .cpudj-rank-num { font-size: 29px; }
  #page[data-page="top_music"] .cpudj-rank-row:nth-child(n+10) .cpudj-rank-num { font-size: 21px; }
  #page[data-page="top_music"] .cpudj-rank-link h4 { font-size: 15px; }
  #page[data-page="top_music"] .cpudj-rank-link p { font-size: 11px; }
  #page[data-page="top_music"] .cpudj-rpill { font-size: 9.5px; padding: 0 4px; }
  #page[data-page="top_music"] .cpudj-rank-dur { font-size: 10px; }
}

@media (max-width: 365px) {
  #page[data-page="top_music"] .cpudj-rank-row {
    grid-template-columns: 33px 48px minmax(0, 1fr) 29px 13px;
    gap: 6px;
    padding-right: 8px;
  }
  #page[data-page="top_music"] .cpudj-rank-cover { width: 48px; height: 48px; }
  #page[data-page="top_music"] .cpudj-rank-row.is-gold .cpudj-rank-num { font-size: 27px; }
  #page[data-page="top_music"] .cpudj-rpill { font-size: 9px; padding: 0 3px; }
  #page[data-page="top_music"] .cpudj-rank-meta { gap: 3px; }
  #page[data-page="top_music"] .cpudj-rank-dur { font-size: 9.5px; }
  #page[data-page="top_music"] .cpudj-rank-play { width: 29px; height: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  #page[data-page="top_music"] .cpudj-rank-eq i,
  #page[data-page="top_music"] .cpudj-rank-hero-crown,
  #page[data-page="top_music"] .cpudj-rank-cover-bars i,
  #page[data-page="top_music"] .cpudj-rank-dot { animation: none !important; }
}
