/* =========================================
   LiveTV BD — প্লেয়ার (lp- প্রিফিক্স)
   ========================================= */

.lp-page { padding: 1rem 1rem 0; max-width: 1760px; margin: 0 auto; }
@media (min-width: 992px) { .lp-page { padding: 1.5rem 2rem 0; } }

.lp-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (min-width: 1100px) { .lp-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; } }
.lp-layout.is-theater { grid-template-columns: minmax(0, 1fr); }

/* সহজ ও নরম গতি */
:root { --lp-ease: cubic-bezier(.22, 1, .36, 1); --lp-ease-io: cubic-bezier(.65, 0, .35, 1); }

/* পেজ বদলের সময় মসৃণ ফেড (Chrome/Edge/Safari-র নতুন ভার্সনে) */
@view-transition { navigation: auto; }
.lp-stage-wrap { view-transition-name: lp-stage; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

/* ---------- স্টেজ ---------- */
.lp-stage-wrap { position: relative; }
.lp-glow {
    position: absolute; inset: -18px; z-index: 0; border-radius: 40px; filter: blur(46px) saturate(1.5); opacity: 0;
    background:
        radial-gradient(60% 70% at 0% 0%, var(--g1, #e63e3e), transparent 70%),
        radial-gradient(60% 70% at 100% 0%, var(--g2, #ff6b35), transparent 70%),
        radial-gradient(60% 70% at 0% 100%, var(--g3, #e63e3e), transparent 70%),
        radial-gradient(60% 70% at 100% 100%, var(--g4, #ff6b35), transparent 70%);
    transition: opacity 1.2s var(--lp-ease-io), background 1s linear; pointer-events: none;
}
.lp-glow.on { opacity: .42; }
.lp-stage-wrap .lp-stage { z-index: 1; }
.lp-stage {
    position: relative; isolation: isolate;
    aspect-ratio: 16 / 9; width: 100%;
    background: #000; border-radius: 18px; overflow: hidden;
    box-shadow: 0 0 0 1px var(--border), 0 24px 60px -24px rgba(0, 0, 0, .8);
    user-select: none; -webkit-user-select: none;
    outline: none;
}
.lp-layout.is-theater .lp-stage { max-height: 82vh; }
.lp-stage:fullscreen, .lp-stage:-webkit-full-screen {
    border-radius: 0; max-height: none; width: 100vw; height: 100vh; aspect-ratio: auto;
}
.lp-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.lp-stage.is-idle { cursor: none; }

/* ---------- শুরুর স্প্ল্যাশ ---------- */
.lp-splash {
    position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; overflow: hidden;
    background: radial-gradient(circle at 50% 45%, #1b2140, #090b13 75%);
    opacity: 0; visibility: hidden; transition: opacity .6s var(--lp-ease-io), visibility 0s .6s; pointer-events: none;
}
.lp-stage.is-starting .lp-splash { opacity: 1; visibility: visible; transition: none; }
.lp-splash-bg { position: absolute; inset: -20%; background-size: cover; background-position: center; filter: blur(50px) saturate(1.6); opacity: .28; transform: scale(1.1); }
.lp-splash-core { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1rem; color: var(--text-secondary); font-size: .9rem; }
.lp-splash-core img { width: 92px; height: 92px; object-fit: contain; background: rgba(255,255,255,.07); border-radius: 22px; padding: 12px; animation: lp-breathe 2.2s ease-in-out infinite; }
.lp-splash-core i { font-size: 3rem; color: var(--accent); animation: lp-breathe 2.2s ease-in-out infinite; }
@keyframes lp-breathe { 0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(230,62,62,.0); } 50% { transform: scale(1.06); box-shadow: 0 0 40px 4px rgba(230,62,62,.28); } }
.lp-stage.is-starting .lp-spinner { display: none; }

/* ---------- টপ বার ---------- */
.lp-top {
    position: absolute; inset: 0 0 auto 0; z-index: 3;
    display: flex; align-items: center; gap: .75rem;
    padding: 1rem 1.1rem 2.5rem;
    background: linear-gradient(to bottom, rgba(5, 7, 12, .78), transparent);
    transition: opacity .45s var(--lp-ease), transform .45s var(--lp-ease); pointer-events: none;
}
.lp-top img { width: 38px; height: 38px; object-fit: contain; background: rgba(255,255,255,.08); border-radius: 9px; padding: 4px; }
.lp-top-name { font-weight: 600; font-size: 1.02rem; color: #fff; line-height: 1.2; }
.lp-chip {
    margin-left: auto; font-family: var(--font-en); font-size: .74rem; font-weight: 600;
    color: #fff; background: rgba(255,255,255,.14); backdrop-filter: blur(8px);
    padding: .22rem .6rem; border-radius: 999px; display: none;
}
.lp-chip.show { display: inline-block; }

/* ---------- কেন্দ্র: বাফারিং / প্লে / এরর ---------- */
.lp-center { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; }
.lp-spinner {
    width: 58px; height: 58px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,.18); border-top-color: var(--accent);
    animation: lp-spin .8s linear infinite; display: none; box-shadow: 0 0 30px rgba(230,62,62,.35);
}
.lp-stage.is-loading .lp-spinner { display: block; }
@keyframes lp-spin { to { transform: rotate(360deg); } }

.lp-bigplay {
    position: absolute; width: 84px; height: 84px; border-radius: 50%; border: 0;
    background: var(--accent); color: #fff; font-size: 2.3rem; display: none; place-items: center;
    box-shadow: 0 0 0 10px rgba(230,62,62,.22), 0 12px 40px rgba(230,62,62,.5);
    pointer-events: auto; cursor: pointer; transition: transform .2s;
}
.lp-bigplay:hover { transform: scale(1.06); }
.lp-bigplay i { margin-left: 4px; }
.lp-stage.is-paused:not(.is-loading):not(.is-error) .lp-bigplay { display: grid; }

.lp-osd {
    position: absolute; top: 18%; left: 50%; transform: translate(-50%, -6px); z-index: 4;
    background: rgba(8,10,18,.82); backdrop-filter: blur(10px); color: #fff;
    padding: .45rem 1rem; border-radius: 999px; font-size: .9rem; font-weight: 500;
    opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap;
}
.lp-osd.show { opacity: 1; transform: translate(-50%, 0); }

.lp-error {
    position: absolute; inset: 0; z-index: 6; display: none; place-items: center; text-align: center;
    background: radial-gradient(circle at 50% 40%, rgba(22,27,46,.92), rgba(5,7,12,.97)); padding: 1.5rem;
}
.lp-stage.is-error .lp-error { display: grid; animation: lp-fade .35s var(--lp-ease); }
@keyframes lp-fade { from { opacity: 0; } }
.lp-error-box { max-width: 380px; }
.lp-error-ico { font-size: 2.6rem; color: var(--accent-2); }
.lp-error h3 { font-size: 1.15rem; margin: .5rem 0 .3rem; color: #fff; }
.lp-error p { color: var(--text-secondary); font-size: .88rem; margin-bottom: 1rem; }
.lp-error-actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.lp-btn {
    border: 1px solid var(--border-hover); background: rgba(255,255,255,.06); color: #fff; font: inherit; font-size: .88rem;
    padding: .5rem 1.05rem; border-radius: 10px; cursor: pointer; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center;
    transition: background .2s, border-color .2s;
}
.lp-btn:hover { background: rgba(255,255,255,.13); color: #fff; }
.lp-btn.primary { background: var(--accent); border-color: var(--accent); }
.lp-btn.primary:hover { background: #f04b4b; }

/* এরর থাকলে ডক ও টপ বার লুকানো */
.lp-stage.is-error .lp-dock, .lp-stage.is-error .lp-top, .lp-stage.is-error .lp-osd { display: none; }

/* ---------- নিচের ডক ---------- */
.lp-dock {
    position: absolute; z-index: 5; left: 12px; right: 12px; bottom: 12px;
    background: rgba(12, 15, 26, .72); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid rgba(255,255,255,.09); border-radius: 16px; padding: .5rem .7rem;
    display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem;
    transition: opacity .45s var(--lp-ease), transform .45s var(--lp-ease);
}
.lp-stage.hide-ui .lp-dock { opacity: 0; transform: translateY(10px); pointer-events: none; }
.lp-stage.hide-ui .lp-top { opacity: 0; transform: translateY(-6px); }

.lp-group { display: flex; align-items: center; gap: .15rem; }
.lp-group.right { margin-left: auto; }
.lp-ib {
    width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: #fff;
    font-size: 1.25rem; border-radius: 10px; cursor: pointer; transition: background .2s, color .2s, transform .15s var(--lp-ease);
}
.lp-ib:active { transform: scale(.88); }
.lp-ib:hover { background: rgba(255,255,255,.12); }
.lp-ib:focus-visible, .lp-btn:focus-visible, .lp-live:focus-visible, .lp-menu button:focus-visible, .lp-bigplay:focus-visible {
    outline: 2px solid #fff; outline-offset: 2px;
}
.lp-ib.main { font-size: 1.5rem; background: rgba(255,255,255,.1); }
.lp-ib[hidden] { display: none; }
.lp-ib.on { color: var(--accent); }

/* লাইভ-এজ পিল: স্বাক্ষর উপাদান */
.lp-live {
    display: inline-flex; align-items: center; gap: .45rem; border: 0; cursor: pointer; font: inherit;
    font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: #fff;
    background: var(--accent); padding: .38rem .8rem; border-radius: 999px; transition: background .25s;
}
.lp-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: lp-pulse 1.4s ease-in-out infinite; }
@keyframes lp-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 50% { box-shadow: 0 0 0 6px rgba(255,255,255,0); } }
.lp-live.behind { background: rgba(255,255,255,.14); }
.lp-live.behind .dot { background: var(--text-secondary); animation: none; }
.lp-live.behind:hover { background: var(--accent); }
.lp-live.behind:hover .dot { background: #fff; }

.lp-seek { flex: 1 1 140px; min-width: 100px; display: none; align-items: center; }
.lp-seek.show { display: flex; }
.lp-live { white-space: nowrap; flex: none; }

/* রেঞ্জ স্টাইল (ভলিউম + সিক) */
.lp-range {
    -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 99px; cursor: pointer; outline: none;
    background: linear-gradient(to right, #fff var(--p, 100%), rgba(255,255,255,.22) var(--p, 100%));
}
.lp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
.lp-range::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.lp-range:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.lp-seek .lp-range { background: linear-gradient(to right, var(--accent) var(--p, 100%), rgba(255,255,255,.22) var(--p, 100%)); }
.lp-range { transition: height .15s var(--lp-ease); }
.lp-seek .lp-range:hover { height: 7px; }
.lp-range::-webkit-slider-thumb { transition: transform .15s var(--lp-ease); }
.lp-range:hover::-webkit-slider-thumb { transform: scale(1.25); }
.lp-vol { width: 0; opacity: 0; transition: width .3s var(--lp-ease), opacity .25s; }
.lp-group:hover .lp-vol, .lp-group:focus-within .lp-vol { width: 84px; opacity: 1; margin: 0 .5rem 0 .2rem; }
@media (hover: none) { .lp-vol { display: none; } .lp-group:has(#lpMute) { display: none; } } /* ফোনে ভলিউম বাটন দিয়েই হয় */

/* কোয়ালিটি মেনু */
.lp-menu-wrap { position: relative; }
.lp-menu {
    position: absolute; right: 0; bottom: 52px; min-width: 150px; padding: .35rem; display: none;
    background: rgba(12,15,26,.96); border: 1px solid var(--border-hover); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.lp-menu.open { display: block; animation: lp-pop .22s var(--lp-ease); transform-origin: bottom right; }
@keyframes lp-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.lp-menu button {
    display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem; border: 0; background: none;
    color: var(--text-primary); font: inherit; font-size: .87rem; padding: .5rem .7rem; border-radius: 8px; cursor: pointer; text-align: left;
}
.lp-menu button:hover { background: rgba(255,255,255,.09); }
.lp-menu button.active { color: var(--accent); font-weight: 600; }
.lp-menu button.active::after { content: "\F26E"; font-family: "bootstrap-icons"; }

@media (max-width: 575.98px) {
    .lp-stage { border-radius: 12px; }
    .lp-dock { left: 6px; right: 6px; bottom: 6px; padding: .35rem .45rem; border-radius: 14px; }
    .lp-ib { width: 36px; height: 36px; font-size: 1.1rem; }
    .lp-ib.main { font-size: 1.3rem; }
    /* সিক বার ডকের উপরে ভাসবে — দেখা/লুকানোয় ডকের উচ্চতা বদলায় না, তাই লাফায় না */
    .lp-seek { position: absolute; left: 10px; right: 10px; bottom: calc(100% + 8px); min-width: 0; padding: 6px 4px;
        background: rgba(12,15,26,.55); backdrop-filter: blur(10px); border-radius: 999px; }
    .lp-dock { flex-wrap: nowrap; justify-content: space-between; gap: .1rem; }
    .lp-group.right { margin-left: 0; }
    .lp-top-name { font-size: .92rem; }
    .lp-bigplay { width: 68px; height: 68px; font-size: 1.9rem; }
}

/* ---------- ইনফো কার্ড ---------- */
.lp-info { margin-top: 1.1rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.lp-info-logo { width: 64px; height: 64px; object-fit: contain; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 8px; }
.lp-info-main { flex: 1 1 260px; min-width: 0; }
.lp-info h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 .3rem; line-height: 1.25; }
.lp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; color: var(--text-secondary); font-size: .86rem; }
.lp-meta .live-tag { display: inline-flex; align-items: center; gap: .35rem; color: var(--live-green); font-weight: 600; }
.lp-meta .live-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live-green); animation: lp-pulse2 1.6s infinite; }
@keyframes lp-pulse2 { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); } }
.lp-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.lp-action {
    display: inline-flex; align-items: center; gap: .45rem; font: inherit; font-size: .85rem; cursor: pointer; text-decoration: none;
    color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: .5rem .9rem;
    transition: border-color .2s, color .2s, background .2s;
}
.lp-action:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-card-hover); }

.lp-keys { margin-top: 1rem; font-size: .78rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.lp-keys kbd { background: var(--bg-card); border: 1px solid var(--border-hover); border-bottom-width: 2px; color: var(--text-secondary); font-family: var(--font-en); font-size: .72rem; padding: .05rem .4rem; border-radius: 5px; }
@media (hover: none) { .lp-keys { display: none; } }

/* ---------- সাইড লিস্ট ---------- */
.lp-side { min-width: 0; }
.lp-side-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .75rem; }
.lp-side-head h2 { font-size: 1.02rem; font-weight: 600; margin: 0; }
.lp-side-head a { font-size: .8rem; color: var(--text-secondary); text-decoration: none; }
.lp-side-head a:hover { color: var(--accent); }
.lp-list { display: flex; flex-direction: column; gap: .4rem; }
@media (min-width: 1100px) { .lp-list { max-height: calc(100vh - 150px); overflow-y: auto; padding-right: 4px; } }
.lp-item {
    display: flex; align-items: center; gap: .75rem; padding: .55rem .7rem; border-radius: 12px; text-decoration: none; color: inherit;
    background: var(--bg-card); border: 1px solid transparent; transition: background .2s, border-color .2s;
}
.lp-item:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }
.lp-item img, .lp-item .ph { width: 46px; height: 46px; flex: none; object-fit: contain; border-radius: 9px; background: var(--bg-input); padding: 5px; display: grid; place-items: center; color: var(--text-muted); }
.lp-item-name { font-size: .92rem; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-item-sub { font-size: .76rem; color: var(--text-secondary); }
.lp-item > div { min-width: 0; }
.lp-item.current { border-color: var(--accent); background: linear-gradient(90deg, rgba(230,62,62,.14), var(--bg-card)); }
.lp-item.current .lp-item-sub { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
    .lp-splash-core img, .lp-splash-core i, .lp-glow { animation: none; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
    .lp-spinner { animation-duration: 2s; }
    .lp-live .dot, .lp-meta .live-tag::before { animation: none; }
    .lp-dock, .lp-top, .lp-osd { transition: none; }
}
