/* 全景盒子 · 播放器样式 */
[hidden] { display: none !important; }

:root {
  --pl-bg: #05070c;
  --pl-fg: #f2f5fb;
  --pl-dim: rgba(232, 238, 250, .62);
  --pl-line: rgba(255, 255, 255, .12);
  --pl-glass: rgba(14, 18, 27, .58);
  --pl-accent: #5b9dff;
}

.pl, .pano-root {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--pl-bg);
  overflow: hidden;
  color: var(--pl-fg);
  -webkit-user-select: none;
  user-select: none;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

.pl-stage {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: grab;
}
.pl-stage.grabbing { cursor: grabbing; }
.pl-canvas, .pl-canvas canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

.pl-fade {
  position: absolute; inset: 0; background: #05070c; opacity: 0;
  pointer-events: none; transition: opacity .42s ease;
}
.pl-fade.on { opacity: 1; }

/* 顶部标题 */
.pl-top {
  position: absolute; top: 0; left: 0; right: 0;
  padding: max(18px, env(safe-area-inset-top)) 24px 46px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 5, 9, .72) 0%, rgba(3, 5, 9, .28) 45%, transparent 100%);
}
.pl-titlebox { max-width: min(62vw, 640px); }
.pl-title {
  font-size: 21px; font-weight: 650; letter-spacing: .2px; line-height: 1.35;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
}
.pl-sub {
  margin-top: 5px; font-size: 13.5px; color: var(--pl-dim); line-height: 1.5;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}
.pl-author {
  margin-top: 8px; font-size: 12px; color: rgba(232, 238, 250, .45);
  letter-spacing: .3px;
}

/* 右侧工具栏 */
.pl-tools {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px; border-radius: 16px;
  background: var(--pl-glass);
  border: 1px solid var(--pl-line);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .35);
  z-index: 30;
}
.pl-tool {
  width: 40px; height: 40px; border-radius: 11px; border: 0;
  background: transparent; color: rgba(240, 245, 255, .82);
  display: grid; place-items: center; cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.pl-tool svg { width: 21px; height: 21px; }
.pl-tool:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.pl-tool:active { transform: scale(.94); }
.pl-tool.on { background: rgba(91, 157, 255, .2); color: #9dc4ff; box-shadow: inset 0 0 0 1px rgba(91, 157, 255, .45); }

/* 缩略图条 */
.pl-thumbs {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 34px 16px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(3, 5, 9, .82) 0%, rgba(3, 5, 9, .4) 55%, transparent 100%);
  z-index: 25;
}
.pl-thumbs-inner {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px;
  scrollbar-width: none; scroll-behavior: smooth;
}
.pl-thumbs-inner::-webkit-scrollbar { display: none; }
.pl-thumb {
  position: relative; flex: 0 0 auto; width: 116px; height: 65px;
  border-radius: 10px; overflow: hidden; border: 0; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
  transition: box-shadow .18s ease, transform .18s ease;
  color: #fff;
}
.pl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .72; transition: opacity .2s, transform .4s; }
.pl-thumb span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 5px;
  font-size: 11px; line-height: 1.25; text-align: left;
  background: linear-gradient(0deg, rgba(0, 0, 0, .82), transparent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pl-thumb:hover img { opacity: .95; transform: scale(1.04); }
.pl-thumb.on { box-shadow: 0 0 0 2px var(--pl-accent), 0 6px 20px rgba(0, 0, 0, .4); }
.pl-thumb.on img { opacity: 1; }

/* 载入 */
.pl-loading {
  position: absolute; inset: 0; display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; z-index: 40;
  background: rgba(4, 6, 10, .5);
  backdrop-filter: blur(2px);
}
.pl-loading.on { display: flex; }
.pl-ring { position: relative; width: 76px; height: 76px; }
.pl-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pl-ring circle { fill: none; stroke-width: 4.5; }
.pl-ring .bg { stroke: rgba(255, 255, 255, .13); }
.pl-ring .fg {
  stroke: var(--pl-accent); stroke-linecap: round;
  stroke-dasharray: 264; stroke-dashoffset: 264;
  transition: stroke-dashoffset .25s ease;
  filter: drop-shadow(0 0 6px rgba(91, 157, 255, .55));
}
.pl-ring b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .9);
  font-variant-numeric: tabular-nums;
}
.pl-loadtag { font-size: 12.5px; letter-spacing: 1.5px; color: var(--pl-dim); }

/* 操作提示 */
.pl-hint {
  position: absolute; left: 50%; bottom: 118px; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 999px; font-size: 12.5px;
  background: rgba(10, 14, 22, .55); border: 1px solid var(--pl-line);
  color: rgba(240, 245, 255, .8); backdrop-filter: blur(10px);
  transition: opacity .6s ease, transform .6s ease; z-index: 20; pointer-events: none;
  white-space: nowrap;
}
.pl-hint.hide { opacity: 0; transform: translateX(-50%) translateY(6px); }

/* 热点 */
.pl-hotspots { position: absolute; inset: 0; pointer-events: none; z-index: 22; }
.pl-hotspots.hidden { display: none; }
.pl-hot {
  position: absolute; top: 0; left: 0; transform-origin: center;
  background: none; border: 0; padding: 0; cursor: pointer;
  pointer-events: auto; display: flex; align-items: center; gap: 7px;
  color: #fff; font: inherit;
  will-change: transform;
}
.pl-hot .dot {
  width: 13px; height: 13px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 3px rgba(91, 157, 255, .9), 0 0 18px rgba(91, 157, 255, .8);
  flex: 0 0 auto; transition: transform .2s ease;
}
.pl-hot .ring {
  position: absolute; left: -9px; top: 50%; margin-top: -14px;
  width: 31px; height: 31px; border-radius: 50%;
  border: 2px solid rgba(120, 175, 255, .85);
  animation: plpulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes plpulse {
  0% { transform: scale(.45); opacity: .95; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}
.pl-hot span {
  font-size: 12.5px; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  background: rgba(9, 13, 20, .68); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
  transform: translateX(6px);
  transition: background .18s, transform .18s;
}
.pl-hot:hover .dot { transform: scale(1.18); }
.pl-hot:hover span { background: rgba(91, 157, 255, .32); transform: translateX(2px); }

/* 信息面板 */
.pl-info {
  position: absolute; right: 74px; top: 50%; width: min(340px, calc(100vw - 36px));
  transform: translateY(-50%) translateX(14px);
  padding: 22px 22px 18px; border-radius: 18px;
  background: rgba(11, 15, 23, .86); border: 1px solid var(--pl-line);
  backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transition: opacity .26s ease, transform .26s ease;
  z-index: 45; font-size: 13px; line-height: 1.7; color: rgba(240, 245, 255, .82);
}
.pl-info.on { opacity: 1; pointer-events: auto; transform: translateY(-50%) translateX(0); }
.pl-info h3 { margin: 0 34px 6px 0; font-size: 17px; color: #fff; font-weight: 650; line-height: 1.4; }
.pl-info-sub { margin: 0 0 10px; color: var(--pl-dim); font-size: 12.5px; }
.pl-info p { margin: 0 0 12px; }
.pl-info dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.pl-info dt { color: rgba(232, 238, 250, .45); }
.pl-info dd { margin: 0; color: rgba(240, 245, 255, .9); }
.pl-info-foot {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--pl-line);
  font-size: 11.5px; color: rgba(232, 238, 250, .4);
  white-space: normal; overflow-wrap: anywhere; line-height: 1.6;
}
.pl-editor .pl-top { display: none; }
.pl-info-x {
  position: absolute; right: 14px; top: 14px; width: 30px; height: 30px;
  border-radius: 9px; border: 0; background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .8); cursor: pointer; display: grid; place-items: center;
}
.pl-info-x svg { width: 16px; height: 16px; }
.pl-info-x:hover { background: rgba(255, 255, 255, .14); }

/* toast */
.pl-toast {
  position: absolute; left: 50%; top: 76px; transform: translate(-50%, -8px);
  padding: 9px 18px; border-radius: 999px; font-size: 13px;
  background: rgba(12, 16, 24, .9); border: 1px solid var(--pl-line); color: #fff;
  opacity: 0; transition: opacity .26s, transform .26s; z-index: 60; pointer-events: none;
  max-width: 80vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pl-toast.on { opacity: 1; transform: translate(-50%, 0); }

.pl-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--pl-dim); font-size: 14px;
}

/* 移动端 */
@media (max-width: 760px) {
  .pl-title { font-size: 17px; }
  .pl-sub { font-size: 12px; }
  .pl-tools {
    right: 10px; gap: 4px; padding: 6px; top: auto; bottom: 108px; transform: none;
    flex-direction: column;
  }
  .pl-tool { width: 38px; height: 38px; }
  .pl-thumb { width: 92px; height: 52px; }
  .pl-thumbs { padding-left: 10px; padding-right: 10px; }
  .pl-hint { bottom: 96px; font-size: 11.5px; padding: 7px 13px; }
  .pl-info { top: auto; bottom: 0; right: 0; left: 0; width: auto; border-radius: 18px 18px 0 0;
    transform: translateY(14px); max-height: 62vh; overflow: auto; }
  .pl-info.on { transform: translateY(0); }
  .pl-top { padding: 14px 14px 40px; }
}
