/* 网页播放器样式（配合 player.js，风格贴近原生 PlayerActivity：黑底、黄accent） */
#hg-player {
  position: fixed; inset: 0; z-index: 400; display: none;
  background: #000; color: #fff; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
#hgp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
#hgp-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: none; }
#hgp-loading {
  position: absolute; inset: 0; display: none; flex-direction: column; gap: 12px;
  align-items: center; justify-content: center; color: #ddd; font-size: 13px; pointer-events: none;
}
#hgp-loading i {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #ffd75b;
  animation: hgp-spin .8s linear infinite;
}
@keyframes hgp-spin { to { transform: rotate(360deg); } }
#hgp-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.8);
  width: 68px; height: 68px; border-radius: 50%; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none;
}
#hgp-center svg { width: 34px; height: 34px; fill: #fff; }
#hgp-center.flash { animation: hgp-flash .35s ease-out; }
@keyframes hgp-flash { 0% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.15); } }
#hgp-gesture-tip {
  position: absolute; left: 50%; top: 18%; transform: translateX(-50%);
  background: rgba(0,0,0,.65); color: #fff; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; opacity: 0; transition: opacity .18s; pointer-events: none; white-space: nowrap;
}
#hgp-gesture-tip.on { opacity: 1; }
#hgp-top {
  position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 22px;
  background: linear-gradient(rgba(0,0,0,.65), transparent);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
#hgp-bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
#hg-player.controls-on #hgp-top, #hg-player.controls-on #hgp-bottom { opacity: 1; pointer-events: auto; }
#hgp-back { background: none; border: 0; color: #fff; width: 38px; height: 38px; padding: 7px; cursor: pointer; flex: none; }
#hgp-titles { display: flex; flex-direction: column; min-width: 0; }
#hgp-titles strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hgp-titles span { font-size: 12px; color: rgba(255,255,255,.75); }
#hgp-seek-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: rgba(255,255,255,.85); }
#hgp-seek { flex: 1; accent-color: #ffd75b; height: 22px; cursor: pointer; }
#hgp-controls { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
#hgp-controls button {
  background: none; border: 0; color: #fff; font-size: 14px; padding: 9px 10px; cursor: pointer; border-radius: 8px;
}
#hgp-controls button:active { background: rgba(255,255,255,.14); }
#hgp-play svg { width: 24px; height: 24px; fill: #fff; display: block; }
#hgp-fs svg { width: 20px; height: 20px; display: block; }
.hgp-spacer { flex: 1; }
#hgp-speed { min-width: 48px; }
#hgp-sheet {
  position: absolute; inset: 0; background: rgba(0,0,0,.5); z-index: 5;
  display: flex; align-items: flex-end;
}
#hgp-sheet[hidden] { display: none; }
#hgp-sheet-card {
  background: #1d2124; width: 100%; max-height: 62%; overflow: auto;
  border-radius: 18px 18px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
}
#hgp-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
#hgp-sheet-head strong { font-size: 16px; }
#hgp-sheet-close { background: none; border: 0; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; padding: 4px 8px; }
#hgp-ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 9px; }
#hgp-ep-grid button {
  background: #2b3034; color: #fff; border: 1px solid transparent; border-radius: 9px;
  padding: 10px 0; font-size: 14px; cursor: pointer;
}
#hgp-ep-grid button.active { border-color: #ffd75b; color: #ffd75b; }
#hgp-speed-row { display: none; gap: 9px; flex-wrap: wrap; }
#hgp-speed-row button {
  background: #2b3034; color: #fff; border: 1px solid transparent; border-radius: 9px;
  padding: 10px 16px; font-size: 14px; cursor: pointer;
}
#hgp-speed-row button.active { border-color: #ffd75b; color: #ffd75b; }
#hgp-error {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; background: rgba(0,0,0,.55); z-index: 6;
}
#hgp-error[hidden] { display: none; }
#hgp-error p { font-size: 15px; color: #eee; margin: 0; padding: 0 24px; text-align: center; }
#hgp-retry {
  background: #ffd75b; color: #221f10; border: 0; border-radius: 999px;
  padding: 10px 28px; font-size: 14px; font-weight: 600; cursor: pointer;
}
