/* Guangyi podcast player v2.1 -- styles (ASCII only on purpose: pages are GB2312) */
#gy-audio-player.gy-ap {
  --gy-ap-accent: #e80000;
  --gy-ap-bg: rgba(255,255,255,0.66);
  --gy-ap-fg: #232838;
  --gy-ap-mute: #6b7488;
  --gy-ap-line: rgba(230,233,242,0.7);
  --gy-ap-rate-bg: rgba(255,255,255,0.55);
  --gy-ap-dl-bg: rgba(255,255,255,1);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: var(--gy-ap-bg);
  color: var(--gy-ap-fg);
  border: 1px solid var(--gy-ap-line);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(23, 28, 46, .10);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  z-index: 2147483000;
}
#gy-audio-player.gy-ap * { box-sizing: border-box; }

/* floating (old articles, no #gy-player-slot) */
#gy-audio-player.gy-ap-float {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 32px));
}
/* inline (new articles, mounted into #gy-player-slot) */
#gy-audio-player.gy-ap-inline {
  position: relative;
  margin: 22px 0 8px;
  max-width: 720px;
}

#gy-audio-player .gy-ap-btn {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: var(--gy-ap-accent); color: #fff;
  cursor: pointer; transition: transform .15s ease, filter .15s ease;
}
#gy-audio-player .gy-ap-btn:hover { filter: brightness(1.08); transform: scale(1.04); }
#gy-audio-player .gy-ap-btn:active { transform: scale(.96); }

#gy-audio-player .gy-ap-main { flex: 1 1 auto; min-width: 0; }
#gy-audio-player .gy-ap-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 6px;
}

/* ---- title: default = article title, scrolls when too long ---- */
#gy-audio-player .gy-ap-title {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 600; font-size: 13px;
  text-overflow: clip;
}
#gy-audio-player .gy-ap-title .gy-ap-txt {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}
/* ping-pong marquee: scroll right->left, hold, then back. Never cuts the title off. */
#gy-audio-player .gy-ap-title.is-scroll {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}
#gy-audio-player .gy-ap-title.is-scroll .gy-ap-txt {
  animation: gy-ap-marquee var(--gy-dur, 10s) ease-in-out infinite;
}
@keyframes gy-ap-marquee {
  0%,   9%   { transform: translateX(0); }
  45%,  55%  { transform: translateX(calc(-1 * var(--gy-shift, 0px))); }
  91%,  100% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  #gy-audio-player .gy-ap-title.is-scroll .gy-ap-txt { animation: none; text-overflow: ellipsis; }
}

#gy-audio-player .gy-ap-time {
  flex: 0 0 auto; font-size: 11px; color: var(--gy-ap-mute);
  font-variant-numeric: tabular-nums;
}

#gy-audio-player .gy-ap-bar {
  position: relative; height: 5px; border-radius: 999px;
  background: #eceef6; cursor: pointer; overflow: visible;
}
#gy-audio-player .gy-ap-buf,
#gy-audio-player .gy-ap-fill {
  position: absolute; left: 0; top: 0; height: 100%; border-radius: 999px;
}
#gy-audio-player .gy-ap-buf { width: 0; background: #dfe3ef; }
#gy-audio-player .gy-ap-fill { width: 0; background: var(--gy-ap-accent); }
#gy-audio-player .gy-ap-dot {
  position: absolute; top: 50%; left: 0;
  width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  border-radius: 50%; background: #fff;
  border: 2px solid var(--gy-ap-accent);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

#gy-audio-player .gy-ap-rate {
  flex: 0 0 auto;
  border: 1px solid var(--gy-ap-line); background: var(--gy-ap-rate-bg); color: var(--gy-ap-mute);
  border-radius: 999px; padding: 5px 9px; font-size: 11px; cursor: pointer;
  font-family: inherit;
}
#gy-audio-player .gy-ap-rate:hover { color: var(--gy-ap-fg); border-color: #cfd6e6; }

#gy-audio-player .gy-ap-dl {
  flex: 0 0 auto; width: 26px; height: 26px; line-height: 24px; text-align: center;
  border-radius: 50%; text-decoration: none; font-size: 14px;
  color: var(--gy-ap-mute); border: 1px solid var(--gy-ap-line); background: var(--gy-ap-dl-bg);
}
#gy-audio-player .gy-ap-dl:hover { color: var(--gy-ap-fg); }

#gy-audio-player .gy-ap-close {
  flex: 0 0 auto;
  width: 26px; height: 26px; line-height: 1;
  border: none; background: transparent; color: var(--gy-ap-mute);
  font-size: 18px; cursor: pointer; border-radius: 50%;
}
#gy-audio-player .gy-ap-close:hover { background: #f2f4fa; color: var(--gy-ap-fg); }

#gy-audio-player audio { display: none !important; }

@media (max-width: 560px) {
  #gy-audio-player.gy-ap { gap: 8px; padding: 9px 10px; }
  #gy-audio-player .gy-ap-rate, #gy-audio-player .gy-ap-dl { display: none; }
  #gy-audio-player .gy-ap-btn { width: 36px; height: 36px; }
}
