/* =====================================================================
   player.css —?custom video player (controls, seek, volume, speed, fs)
   ===================================================================== */
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; user-select: none; -webkit-user-select: none; font-family: var(--font); color: #fff; }
.player.tall { aspect-ratio: 9 / 14; max-height: 70vh; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .pl-poster { position: absolute; inset: 0; background: #000 center/cover no-repeat; z-index: 1; transition: opacity .4s; }
.player .pl-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .55), transparent 45%, rgba(0, 0, 0, .25)); }
.player.playing .pl-poster, .player.started .pl-poster { opacity: 0; pointer-events: none; }
.player:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; }
.player:fullscreen video { object-fit: contain; }

/* Center play button */
.pl-big { position: absolute; left: 50%; top: 50%; z-index: 4; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1.5px solid rgba(255, 255, 255, .45); box-shadow: 0 10px 40px rgba(0, 0, 0, .5), 0 0 0 0 rgba(255, 61, 127, .6); transition: transform .25s var(--spring), opacity .25s; animation: pl-breathe 2.4s ease-in-out infinite; }
.pl-big svg { width: 32px; height: 32px; margin-left: 4px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .6)); }
.pl-big:active { transform: scale(.9); }
.player.playing .pl-big, .player.loading .pl-big { opacity: 0; pointer-events: none; transform: scale(.7); }
@keyframes pl-breathe { 0%, 100% { box-shadow: 0 10px 40px rgba(0, 0, 0, .5), 0 0 0 0 rgba(255, 61, 127, .55); } 50% { box-shadow: 0 10px 40px rgba(0, 0, 0, .5), 0 0 0 14px rgba(255, 61, 127, 0); } }

/* Locked overlay (guest) */
.pl-lock { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(5, 5, 12, .45); backdrop-filter: blur(3px); }
.pl-lock .lk-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); color: var(--gold); animation: breathe-lock 2.2s ease-in-out infinite; }
.pl-lock .lk-ic svg { width: 26px; height: 26px; }
.player.is-locked .pl-ctl, .player.is-locked .pl-big, .player.is-locked .pl-tap { display: none; }
.pl-lock b { font-size: 15px; font-weight: 800; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }

/* Loading spinner / error */
.pl-spin { position: absolute; left: 50%; top: 50%; z-index: 4; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--primary); animation: spin .8s linear infinite; opacity: 0; pointer-events: none; transition: opacity .2s; }
.player.loading .pl-spin { opacity: 1; }
.pl-err { position: absolute; inset: 0; z-index: 6; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(5, 5, 12, .7); font-size: 13.5px; color: #FCA5A5; text-align: center; padding: 16px; }
.player.error .pl-err { display: flex; }

/* Tap feedback (double-tap seek) */
.pl-tap { position: absolute; top: 0; bottom: 0; width: 34%; z-index: 3; display: grid; place-items: center; opacity: 0; pointer-events: none; font-weight: 800; font-size: 14px; background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%); transition: opacity .2s; }
.pl-tap.l { left: 0; } .pl-tap.r { right: 0; }
.pl-tap.show { opacity: 1; }

/* Controls bar */
.pl-ctl { position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; padding: 30px 12px 10px; background: linear-gradient(0deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, .35) 60%, transparent); transition: opacity .3s, transform .3s; }
.player.hide-ctl .pl-ctl { opacity: 0; transform: translateY(8px); pointer-events: none; }
.pl-seek { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; margin-bottom: 4px; }
.pl-seek .track { position: relative; width: 100%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: visible; transition: height .15s; }
.pl-seek.active .track, .pl-seek:hover .track { height: 6px; }
.pl-seek .buf { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.pl-seek .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: var(--grad-brand); box-shadow: 0 0 10px rgba(255, 61, 127, .7); }
.pl-seek .knob { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 61, 127, .4), 0 2px 8px rgba(0, 0, 0, .5); transform: scale(0); transition: transform .15s; }
.pl-seek.active .knob, .pl-seek:hover .knob { transform: scale(1); }
.pl-seek .tip { position: absolute; bottom: 22px; transform: translateX(-50%); padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .8); font-size: 11px; font-family: var(--font-num); opacity: 0; pointer-events: none; }
.pl-seek.active .tip { opacity: 1; }
.pl-row { display: flex; align-items: center; gap: 4px; }
.pl-btn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; transition: background .2s, transform .15s; flex: none; }
.pl-btn:active { background: rgba(255, 255, 255, .15); transform: scale(.92); }
.pl-btn svg { width: 20px; height: 20px; }
.pl-time { font-family: var(--font-num); font-size: 12px; color: rgba(255, 255, 255, .85); padding: 0 6px; white-space: nowrap; }
.pl-time em { font-style: normal; color: rgba(255, 255, 255, .55); }
.pl-sp { flex: 1; }
.pl-rate { min-width: 44px; font-family: var(--font-num); font-size: 12.5px; font-weight: 700; padding: 0 6px; }
.pl-menu { position: absolute; right: 10px; bottom: 56px; z-index: 8; display: none; flex-direction: column; min-width: 90px; padding: 6px; border-radius: 12px; background: rgba(20, 20, 36, .95); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); animation: pop-in .2s var(--ease-out) both; }
.pl-menu.open { display: flex; }
.pl-menu button { height: 34px; padding: 0 12px; border-radius: 8px; text-align: left; font-size: 13px; font-family: var(--font-num); font-weight: 600; color: var(--muted); }
.pl-menu button.on { color: #fff; background: rgba(255, 61, 127, .25); }
.pl-vol { display: flex; align-items: center; gap: 4px; }
.pl-vol .vol-track { width: 0; overflow: hidden; height: 20px; display: flex; align-items: center; transition: width .25s var(--ease-out); cursor: pointer; touch-action: none; }
.pl-vol:hover .vol-track, .pl-vol.open .vol-track { width: 64px; }
.pl-vol .vol-bar { position: relative; width: 60px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
.pl-vol .vol-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: #fff; }
.pl-badge { position: absolute; top: 10px; left: 10px; z-index: 6; display: flex; gap: 6px; }
