/* Training video player (assets/player.js). */
.tp { --tp-acc: #f59e0b; position: relative; }
.tp-frame { position: relative; background: #000; border-radius: 14px; overflow: hidden; user-select: none; direction: rtl; }
.tp-frame video { width: 100%; max-height: 72vh; display: block; margin: auto; background: #000; }
.tp-frame:fullscreen video { max-height: 100vh; height: 100vh; }
.tp-big { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: #000a; color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .2s; }
.tp-big.on { opacity: 1; pointer-events: auto; cursor: pointer; }
.tp-big svg { width: 40px; height: 40px; }
.tp-toast { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); background: #000b; color: #fff; padding: 6px 16px; border-radius: 10px; font-size: 15px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.tp-toast.on { opacity: 1; }
.tp-ui { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 6px; background: linear-gradient(transparent, #000c); opacity: 0; transition: opacity .25s; }
.tp.ui .tp-ui, .tp-frame:hover .tp-ui { opacity: 1; }
.tp-bar { position: relative; height: 5px; background: #ffffff33; border-radius: 3px; cursor: pointer; margin-bottom: 6px; touch-action: none; }
.tp-bar:hover { height: 8px; }
.tp-buf, .tp-fill { position: absolute; right: 0; top: 0; bottom: 0; border-radius: 3px; }
.tp-buf { background: #ffffff55; } .tp-fill { background: var(--tp-acc); }
.tp-marks i { position: absolute; top: 0; bottom: 0; width: 3px; background: #000c; transform: translateX(50%); }
.tp-knob { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--tp-acc); transform: translate(50%, -50%); }
.tp-tip { position: absolute; bottom: 16px; transform: translateX(50%); background: #000d; color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; }
.tp-tip.on { opacity: 1; }
.tp-row { display: flex; align-items: center; gap: 4px; color: #fff; font-size: 13px; }
.tp-b { background: none; border: 0; color: #fff; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; padding: 0; }
.tp-b:hover { background: #ffffff22; } .tp-b svg { width: 24px; height: 24px; }
.tp-vol { display: inline-flex; align-items: center; } .tp-vol input { width: 0; opacity: 0; transition: width .2s, opacity .2s; accent-color: var(--tp-acc); }
.tp-vol:hover input { width: 80px; opacity: 1; }
.tp-time { margin: 0 6px; font-variant-numeric: tabular-nums; } .tp-chap { color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30ch; }
.tp-sp { flex: 1; }
.tp-menu-wrap { position: relative; }
.tp-menu { position: absolute; bottom: 44px; left: 0; background: #111827f2; border: 1px solid #ffffff22; border-radius: 12px; padding: 8px; min-width: 170px; display: none; z-index: 5; }
.tp-menu.on { display: block; } .tp-menu h5 { margin: 4px 6px; color: #9ca3af; font-size: 12px; font-weight: 400; }
.tp-menu button { display: block; width: 100%; text-align: right; background: none; border: 0; color: #fff; font: inherit; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.tp-menu button:hover { background: #ffffff1a; } .tp-menu button.on { color: var(--tp-acc); font-weight: 700; }
.tp-mini-bar { display: none; }
/* Mini player: docked to the corner while the page scrolls on. */
.tp-frame.mini { position: fixed; z-index: 50; left: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px)); box-shadow: 0 10px 40px #000c; border: 1px solid #ffffff22; }
.tp-frame.mini video { max-height: 50vh; }
.tp-frame.mini .tp-mini-bar { display: flex; align-items: center; gap: 6px; position: absolute; top: 0; left: 0; right: 0; padding: 4px; background: linear-gradient(#000c, transparent); color: #fff; opacity: 0; transition: opacity .2s; }
.tp-frame.mini:hover .tp-mini-bar { opacity: 1; }
.tp-mini-title { flex: 1; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tp-frame.mini .tp-vol, .tp-frame.mini .tp-chap, .tp-frame.mini .tp-pipb, .tp-frame.mini .tp-back, .tp-frame.mini .tp-fwd { display: none; }
.tp-chapters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tp-chapters h5 { width: 100%; margin: 0; color: #8a96ab; font-size: 13px; font-weight: 400; }
.tp-chapters button { background: #0f1524; border: 1px solid #1e2738; color: #e8edf6; font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 10px; cursor: pointer; display: inline-flex; gap: 8px; }
.tp-chapters button b { color: #f59e0b; font-weight: 400; } .tp-chapters button.cur { border-color: #f59e0b; }
.tp-keys { color: #8a96ab; font-size: 12px; margin-top: 6px; } .tp-keys kbd { background: #1e2738; border-radius: 4px; padding: 0 5px; color: #e8edf6; font-family: inherit; }
@media (max-width: 600px) { .tp-time { font-size: 11px; } .tp-chap { display: none; } .tp-b { width: 34px; height: 34px; } }
