/* 发音热榜 · 与学习排行榜同一套深蓝金视觉 */
:root {
  --pr-bg: #060d1c;
  --pr-bg2: #0b1527;
  --pr-card: rgba(255, 255, 255, .045);
  --pr-line: rgba(255, 255, 255, .09);
  --pr-gold: #f3cf7a;
  --pr-gold-2: #e0aa46;
  --pr-text: #eef2f9;
  --pr-muted: rgba(226, 234, 247, .62);
  --pr-radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  color: var(--pr-text);
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(60, 96, 168, .34) 0%, rgba(6, 13, 28, 0) 62%),
    radial-gradient(90% 50% at 90% 100%, rgba(196, 151, 60, .16) 0%, rgba(6, 13, 28, 0) 60%),
    linear-gradient(180deg, var(--pr-bg2) 0%, var(--pr-bg) 100%);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

/* ===== 顶栏 ===== */
.pr-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 13, 28, .72);
  border-bottom: 1px solid var(--pr-line);
}
.pr-topbar-in {
  max-width: 720px;
  margin: 0 auto;
  height: 52px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pr-back, .pr-home {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pr-gold);
  background: rgba(243, 207, 122, .1);
  border: 1px solid rgba(243, 207, 122, .22);
}
.pr-back svg, .pr-home svg { width: 19px; height: 19px; }
.pr-topbar-title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
}
.in-mp .pr-home, .in-mp .pr-back { display: none; }
.in-mp .pr-topbar-title { text-align: left; padding-left: 4px; }

/* ===== 容器 ===== */
.pr-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 12px 8px;
}

/* ===== 头部 ===== */
.pr-hero { padding: 6px 4px 14px; }
.pr-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pr-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--pr-muted);
}
.pr-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, .9);
  animation: prPulse 1.8s ease-in-out infinite;
}
.pr-date { font-size: 11px; color: var(--pr-muted); }
.pr-wordmark {
  margin: 8px 0 6px;
  font-size: clamp(26px, 8vw, 40px);
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff3d4 0%, var(--pr-gold) 45%, var(--pr-gold-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.pr-wordmark span { opacity: .92; }
.pr-sub {
  margin: 0;
  font-size: 12px;
  color: var(--pr-muted);
}

/* ===== 榜单容器 ===== */
.pr-board {
  border-radius: var(--pr-radius);
  border: 1px solid var(--pr-line);
  background: var(--pr-card);
  padding: 12px;
  min-height: 220px;
}

/* 加载 / 错误 / 空态 */
.pr-loading, .pr-error, .pr-empty {
  padding: 44px 12px;
  text-align: center;
  color: var(--pr-muted);
  font-size: 13px;
}
.pr-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-bottom: 10px;
  border-radius: 50%;
  border: 2px solid rgba(243, 207, 122, .25);
  border-top-color: var(--pr-gold);
  animation: prSpin .8s linear infinite;
}
.pr-retry, .pr-empty-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid rgba(243, 207, 122, .4);
  background: linear-gradient(135deg, #f7d78c 0%, var(--pr-gold-2) 100%);
  color: #2c1d05;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.pr-empty-ico { display: block; font-size: 30px; margin-bottom: 8px; }
.pr-empty b { display: block; color: var(--pr-text); font-size: 15px; margin-bottom: 4px; }
.pr-empty p { margin: 0 0 4px; }

/* ===== 前三名圆形奖牌（与全球榜同款） ===== */
.pr-row.is-1 .pr-no,
.pr-row.is-2 .pr-no,
.pr-row.is-3 .pr-no {
  width: 26px; height: 26px; flex-basis: 26px; line-height: 26px;
  margin: 0 4px;
  border-radius: 50%; font-size: 12px;
  color: #2c1d05;
  background: linear-gradient(135deg, #fff1c9, var(--pr-gold) 55%, var(--pr-gold-2));
  box-shadow: 0 3px 10px rgba(245, 184, 61, .3);
}
.pr-row.is-2 .pr-no {
  background: linear-gradient(135deg, #f2f6ff, #b9c6db);
  box-shadow: 0 3px 10px rgba(185, 198, 219, .4);
}
.pr-row.is-3 .pr-no {
  background: linear-gradient(135deg, #f6d6b8, #cd8b52);
  box-shadow: 0 3px 10px rgba(205, 139, 82, .3);
}

/* ===== 列表 ===== */
.pr-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 2px 4px 8px;
}
.pr-list-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--pr-gold);
  letter-spacing: .04em;
}
.pr-list-sub { font-size: 11px; color: var(--pr-muted); }

.pr-list { list-style: none; margin: 0; padding: 0; }
.pr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 6px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.pr-no {
  flex: 0 0 26px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  color: var(--pr-muted);
  font-variant-numeric: tabular-nums;
}
.pr-row-main { flex: 1; min-width: 0; }
.pr-row-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.pr-name {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pr-row-trans {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(226, 234, 247, .45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pr-play-sm {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #1d2b53;
  background: radial-gradient(circle at 32% 28%, #ffffff, #eef3ff 75%);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.pr-play-sm img {
  width: 62%;
  height: 62%;
  object-fit: contain;
  pointer-events: none;
}
.pr-play-sm:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0, 0, 0, .3); }
.pr-play-sm.is-playing { animation: prSpeakPulse .9s ease-in-out infinite; }
.pr-row-plays {
  flex: 0 0 auto;
  min-width: 52px;
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: var(--pr-gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@keyframes prSpeakPulse {
  0%, 100% { box-shadow: 2px 2px 0 rgba(0, 0, 0, .35); }
  50% { box-shadow: 2px 2px 0 rgba(0, 0, 0, .35), 0 0 0 8px rgba(255, 200, 61, .3); }
}

/* 实时刷新时：排名上升 / 新上榜的行闪一下 */
.pr-row.is-up, .pr-row.is-new { animation: prFlashUp 1.4s ease-out; }
.pr-row.is-up .pr-no, .pr-row.is-new .pr-no { color: var(--pr-gold); }
.pr-row.is-new .pr-name::after {
  content: "NEW";
  margin-left: 5px;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
  color: #2c1d05;
  background: linear-gradient(135deg, #f7d78c, var(--pr-gold-2));
  vertical-align: middle;
}
@keyframes prFlashUp {
  0% { background: rgba(243, 207, 122, .18); }
  100% { background: transparent; }
}

/* ===== 底部 ===== */
.pr-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 4px 4px;
}
.pr-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--pr-line);
  background: rgba(255, 255, 255, .04);
  color: var(--pr-muted);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.pr-refresh-ic { font-style: normal; font-size: 13px; }
.pr-refresh-ic.is-spin { animation: prSpin .9s linear infinite; }
.pr-note { font-size: 11px; color: rgba(226, 234, 247, .38); }

@keyframes prSpin { to { transform: rotate(360deg); } }
@keyframes prPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.8); }
}

@media (max-width: 360px) {
  .pr-shell { padding-left: 8px; padding-right: 8px; }
  .pr-board { padding: 9px; }
  .pr-row { padding: 9px 4px; gap: 6px; }
  .pr-no { flex-basis: 22px; font-size: 12px; }
  .pr-row-plays { min-width: 46px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .pr-live, .pr-spinner, .pr-refresh-ic.is-spin { animation: none; }
}

/* 站内榜 / 全球榜 切换 */
.pr-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.pr-switch-cur,
.pr-switch-link {
  font-size: 11px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 100px;
  text-decoration: none;
}
.pr-switch-cur {
  color: #2c1d05;
  background: linear-gradient(135deg, #ffd98f, #f5b83d);
}
.pr-switch-link {
  color: rgba(255, 217, 143, .85);
  border: 1px solid rgba(255, 217, 143, .32);
}
