/* 极简全屏竖屏播放器。手机竖屏铺满；iPad/横屏居中完整显示，背景用封面虚化。 */
:root { color-scheme: dark; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #000; color: #fff; overflow: hidden; overscroll-behavior: none;
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }

.feed { position: fixed; inset: 0; overflow-y: scroll; scroll-snap-type: y mandatory; overscroll-behavior: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.feed::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100vh; height: 100dvh; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; background: #000; }

.poster, .poster-fg { position: absolute; inset: 0; background: var(--poster) center / cover no-repeat; }
.poster-fg { display: none; }
.poster.blur { filter: blur(22px) brightness(.45); transform: scale(1.15); }
.vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; opacity: 0; transition: opacity .15s; }
.vid.ready { opacity: 1; }

.meta { position: absolute; inset-inline: 16px 76px; bottom: calc(22px + var(--safe-b)); text-shadow: 0 1px 3px rgba(0,0,0,.7); pointer-events: none; }
.meta .title { font-weight: 700; font-size: 17px; }
.meta .ep { opacity: .85; font-size: 14px; margin-top: 2px; }

.share-btn { position: fixed; inset-inline-end: 12px; bottom: calc(96px + var(--safe-b)); width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.35); color: #fff; display: grid; place-items: center; z-index: 5; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.share-btn svg { width: 26px; height: 26px; }
.share-btn:active { transform: scale(.92); }

.hint { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; pointer-events: none;
  padding: 12px 20px; border-radius: 999px; background: rgba(0,0,0,.55); font-weight: 600; white-space: nowrap; animation: pulse 1.6s ease-in-out infinite; }
.paused { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; pointer-events: none; font-size: 64px; opacity: .8; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
@keyframes pulse { 50% { opacity: .65; } }

.bar-track { position: fixed; left: 0; right: 0; bottom: var(--safe-b); height: 3px; background: rgba(255,255,255,.18); z-index: 5; pointer-events: none; }
.bar { height: 100%; background: rgba(255,255,255,.9); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .bar { transform-origin: right; }

.panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(86vw, 380px); text-align: center; }
.panel.error { position: fixed; color: #ddd; }
.lock-ico { font-size: 44px; }
.panel-title { margin-top: 8px; font-weight: 700; opacity: .8; }
.panel h2 { font-size: 22px; line-height: 1.3; margin: 10px 0 8px; text-wrap: balance; }
.panel p { margin: 0 0 22px; opacity: .8; }
.cta { appearance: none; border: 0; border-radius: 999px; padding: 15px 28px; min-width: 70%; font: inherit; font-size: 17px; font-weight: 700;
  color: #000; background: #fff; box-shadow: 0 6px 24px rgba(255,255,255,.18); }
.cta:active { transform: scale(.97); }
.panel .cta { display: block; width: 82%; margin-inline: auto; text-decoration: none; text-align: center; }
.panel .cta + .cta { margin-top: 12px; }
.cta.secondary { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.75); box-shadow: none; }

/* 引导去 Safari：箭头指向应用内浏览器右上角的 ⋯ 菜单 */
.menu-arrow { position: absolute; top: calc(6px + var(--safe-t)); inset-inline-end: 18px; font-size: 44px; font-weight: 800;
  text-shadow: 0 2px 8px rgba(0,0,0,.6); animation: nudge 1.1s ease-in-out infinite; pointer-events: none; }
@keyframes nudge { 50% { translate: 0 -8px; } }

.toast { position: fixed; left: 50%; top: calc(18px + var(--safe-t)); transform: translateX(-50%); z-index: 9; max-width: 90vw;
  padding: 10px 18px; border-radius: 999px; background: rgba(255,255,255,.95); color: #000; font-weight: 600; text-align: center; }

.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 22px 18px calc(22px + var(--safe-b)); background: #161616;
  border-radius: 18px 18px 0 0; text-align: center; box-shadow: 0 -8px 30px rgba(0,0,0,.6); }
.sheet input { width: 100%; padding: 12px; margin: 6px 0 16px; border-radius: 10px; border: 1px solid #333; background: #000; color: #fff;
  font: inherit; -webkit-user-select: text; user-select: text; }
.sheet-close { position: absolute; top: 8px; inset-inline-end: 10px; border: 0; background: none; color: #aaa; font-size: 28px; }

/* iPad、横屏、电脑：完整显示竖屏视频，两侧是虚化封面 */
@media (min-aspect-ratio: 13/20) {
  .slide.ep .poster { filter: blur(22px) brightness(.45); transform: scale(1.15); }
  .slide.ep .poster-fg { display: block; background-size: contain; }
  .vid { object-fit: contain; }
  .meta { inset-inline-start: max(16px, calc(50% - 28dvh + 16px)); }
}
