/* =====================================================================
   PJ DHAMAKA — FLOATING GLASS HEADER + COMPACT MOBILE POLISH
   Loaded last on every main page. Only the SHAPE of the header changes
   (rounded, floating, blurred glass). Colors, logo and items stay the same.
   ===================================================================== */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

:root:root body header.pj-header,
:root:root body header.pj-tv-header,
:root:root body header.pj-request-header,
:root:root body header.pj-contact-header,
:root:root body header.pj-dmca-header {
    position: sticky !important;
    top: 10px !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
    width: calc(100% - 28px) !important;
    max-width: 1240px !important;
    margin: 10px auto 0 !important;
    min-height: 0 !important;
    height: auto !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 22px !important;
    background: rgba(14, 14, 20, 0.62) !important;
    -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
    backdrop-filter: blur(18px) saturate(150%) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    overflow: visible !important;
}

@media (max-width: 768px) {
    :root:root body header.pj-header,
    :root:root body header.pj-tv-header,
    :root:root body header.pj-request-header,
    :root:root body header.pj-contact-header,
    :root:root body header.pj-dmca-header {
        top: 8px !important;
        width: calc(100% - 20px) !important;
        margin-top: 8px !important;
        border-radius: 20px !important;
        padding: 8px 10px !important;
    }
}

@media (max-width: 380px) {
    :root:root body header.pj-header,
    :root:root body header.pj-tv-header,
    :root:root body header.pj-request-header,
    :root:root body header.pj-contact-header,
    :root:root body header.pj-dmca-header {
        width: calc(100% - 14px) !important;
        border-radius: 18px !important;
        padding: 7px 8px !important;
    }
}

/* Compact server-rendered intro (injected by _worker.js before JS runs) */
.pj-seo-server-intro h1 { font-size: clamp(18px, 5.2vw, 26px); line-height: 1.25; margin: 0 0 6px; }
.pj-seo-server-intro p { font-size: 13px; line-height: 1.5; margin: 0 0 6px; }

/* Very narrow phones: everything in the header shrinks together so it fits */
@media (max-width: 360px) {
    :root:root body header.pj-header { gap: 4px !important; }
    :root:root body header.pj-header .pj-logo { font-size: 17px !important; gap: 4px !important; min-width: 0 !important; flex: 0 1 auto !important; }
    :root:root body header.pj-header .pj-logo .logo-icon { width: 24px !important; height: 24px !important; flex: 0 0 24px !important; font-size: 11px !important; }
    :root:root body header.pj-header .pj-menu-toggle { width: 32px !important; height: 32px !important; flex: 0 0 32px !important; }
    :root:root body header.pj-header .header-right { gap: 4px !important; min-width: 0 !important; }
    :root:root body header.pj-header .header-right button,
    :root:root body header.pj-header .header-right .pj-header-icon,
    :root:root body header.pj-header .pj-header-tools > * { width: 32px !important; height: 32px !important; min-width: 0 !important; }
    :root:root body header.pj-header .header-right a { padding-left: 6px !important; padding-right: 6px !important; font-size: 10px !important; }
}

/* Logo scales with the phone width (only below 360px; wider phones keep the original size) */
@media (max-width: 359px) {
    :root:root body.pj-dhamaka header.pj-header > .pj-logo,
    :root:root body.pj-dhamaka header.pj-header > .pj-logo > span:last-child { font-size: clamp(14px, 4.9vw, 21px) !important; }
    :root:root body.pj-dhamaka header.pj-header > .pj-logo .logo-icon { font-size: clamp(14px, 5.6vw, 19px) !important; width: clamp(14px, 5.6vw, 19px) !important; min-width: 0 !important; height: clamp(14px, 5.6vw, 19px) !important; }
}
