/* =====================================================
   PJ SPORTS — sports.css (Premium Animated v4)
   Default theme: Royal Violet
   Change theme: <html data-theme="teal | rose | lime">
   ===================================================== */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap");

@property --ang { syntax: "<angle>"; inherits: false; initial-value: 135deg; }

/* ---------- 1. THEMES ---------- */
:root {
    color-scheme: dark;

    --bg: #08060f;       --bg-rgb: 8, 6, 15;
    --p1: #1a1330;       --p2: #0e0a1c;
    --a1: #c4a6ff;       --a2: #7a43ff;
    --ink: #14082e;      --rgb: 196, 166, 255;
    --lv: #ff5cae;       --lv-rgb: 255, 92, 174;

    --text: #f3f0fa;
    --muted: #9b97ad;
    --faint: #6b6780;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --grad: linear-gradient(135deg, #ffffff, var(--a1) 42%, var(--a2));

    --radius-card: 18px;
    --header-h: 58px;
    --gutter: clamp(12px, 3vw, 28px);
    --cols: 1;
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto,
        "Noto Sans Bengali", "Hind Siliguri", Arial, sans-serif;

    /* legacy names */
    --surface: var(--p1);
    --surface-2: var(--p2);
    --surface-3: var(--p1);
    --orange: var(--a2);
    --orange-light: var(--a1);
    --accent: var(--a2);
    --accent-light: var(--a1);
    --live: var(--lv);
    --red: var(--lv);
    --card: var(--p1);
    --border: var(--line);
}

:root[data-theme="teal"] {
    --bg: #04090b; --bg-rgb: 4, 9, 11; --p1: #102229; --p2: #09141a;
    --a1: #5eead4; --a2: #0e9aa7; --ink: #032226; --rgb: 94, 234, 212;
    --lv: #ffc65c; --lv-rgb: 255, 198, 92;
}

:root[data-theme="rose"] {
    --bg: #0a0708; --bg-rgb: 10, 7, 8; --p1: #2a1a1d; --p2: #160e10;
    --a1: #f6c3b2; --a2: #c9776a; --ink: #2c120d; --rgb: 246, 195, 178;
    --lv: #7ef0c5; --lv-rgb: 126, 240, 197;
}

:root[data-theme="lime"] {
    --bg: #060804; --bg-rgb: 6, 8, 4; --p1: #171d0e; --p2: #0d1108;
    --a1: #d4ff4a; --a2: #7bd10a; --ink: #102000; --rgb: 212, 255, 74;
    --lv: #ff6b9a; --lv-rgb: 255, 107, 154;
}

/* ---------- 2. RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 74px; }

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

/* slow drifting colour glow behind everything */
body::before {
    content: "";
    position: fixed;
    inset: -25%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 18%, rgba(var(--rgb), 0.16), transparent 38%),
        radial-gradient(circle at 82% 72%, rgba(var(--rgb), 0.10), transparent 40%);
}

@keyframes drift { to { transform: translate3d(6%, 5%, 0) scale(1.08); } }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.muted { color: var(--muted); }

:focus-visible { outline: 2px solid var(--a1); outline-offset: 2px; }

@keyframes ripple {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3.6); opacity: 0; }
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.8); }
}

@keyframes spin { to { --ang: 360deg; } }

@keyframes rise {
    from { opacity: 0; transform: translateY(26px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 0 rgba(var(--rgb), 0); }
    50% { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 28px rgba(var(--rgb), 0.28); }
}

@keyframes shimmer {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}

/* ---------- 3. HEADER ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    min-height: var(--header-h);
    padding: 8px var(--gutter);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(var(--bg-rgb), 0.94);
    border-bottom: 1px solid var(--line);
}

.topbar > nav { display: none; }

.header-left { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.menu-trigger {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.menu-trigger span { width: 17px; height: 2px; border-radius: 2px; background: var(--a1); transition: width 0.2s ease; }
.menu-trigger:hover { border-color: var(--a1); }
.menu-trigger:hover span:nth-child(2) { width: 11px; }
.menu-trigger:active { transform: scale(0.92); }

.pj-dhamaka-top {
    display: none;
    height: 40px;
    padding: 0 14px;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(var(--rgb), 0.4);
    border-radius: 12px;
    color: var(--a1);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.pj-dhamaka-top:hover { background: rgba(var(--rgb), 0.12); }

.brand { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.brand > span:last-child { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; line-height: 1; }
.brand > span:last-child b { font-weight: 800; }

/* your favicon.png as the logo (crops the black margin) */
.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: block;
    overflow: hidden;
    border-radius: 11px;
    background: #000 url("/favicon.png") center / 152% no-repeat;
    color: transparent;
    font-size: 0;
    line-height: 0;
    box-shadow: 0 0 0 1px rgba(var(--rgb), 0.4);
}

@keyframes logoGlow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(var(--rgb), 0.35), 0 0 10px rgba(var(--rgb), 0.15); }
    50% { box-shadow: 0 0 0 1px rgba(var(--rgb), 0.6), 0 0 22px rgba(var(--rgb), 0.45); }
}

.top-actions {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.search-wrap { position: relative; min-width: 0; flex: 1; max-width: 300px; }

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--faint);
    pointer-events: none;
    transition: color 0.2s ease;
}

.search-wrap:focus-within .search-icon { color: var(--a1); }

.search-wrap input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 38px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    outline: 0;
    font-size: 13.5px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-wrap input::placeholder { color: var(--faint); }
.search-wrap input:focus { border-color: var(--a1); box-shadow: 0 0 0 4px rgba(var(--rgb), 0.12); }

.live-action {
    height: 40px;
    padding: 0 14px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 12px;
    background: var(--lv);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 18px rgba(var(--lv-rgb), 0.45);
    transition: filter 0.2s ease, transform 0.15s ease;
}

.live-action:hover { filter: brightness(1.1); }
.live-action:active { transform: scale(0.95); }

.live-action-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.live-action-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #fff; animation: ripple 1.7s ease-out infinite; }
.live-action-arrow { display: none; }

.admin-link {
    height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
}

.admin-link:hover { color: #fff; border-color: var(--a1); }

/* ---------- 4. SIDE MENU ---------- */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(var(--bg-rgb), 0.8);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.menu-overlay.is-open { opacity: 1; visibility: visible; }

.sports-menu {
    width: min(84vw, 360px);
    height: 100%;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--p1), var(--p2));
    border-right: 1px solid rgba(var(--rgb), 0.3);
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.menu-overlay.is-open .sports-menu { transform: translateX(0); }

.sports-menu-head {
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.menu-kicker { color: var(--a1); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; }
.sports-menu-head h2 { font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.sports-menu-head h2 span { color: var(--a1); }
.sports-menu-head p { color: var(--muted); font-size: 12.5px; }

.menu-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 21px;
    line-height: 1;
    transition: transform 0.25s ease, border-color 0.2s ease;
}

.menu-close:hover { border-color: var(--a1); color: var(--a1); transform: rotate(90deg); }

.menu-links { display: flex; flex-direction: column; }

.menu-link {
    padding: 14px 4px;
    display: grid;
    grid-template-columns: 30px 1fr auto auto;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateX(-16px);
    transition: padding 0.2s ease, color 0.2s ease;
}

.menu-overlay.is-open .menu-link { animation: menuIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.menu-overlay.is-open .menu-link:nth-child(1) { animation-delay: 0.10s; }
.menu-overlay.is-open .menu-link:nth-child(2) { animation-delay: 0.16s; }
.menu-overlay.is-open .menu-link:nth-child(3) { animation-delay: 0.22s; }
.menu-overlay.is-open .menu-link:nth-child(4) { animation-delay: 0.28s; }
.menu-overlay.is-open .menu-link:nth-child(5) { animation-delay: 0.34s; }

@keyframes menuIn { to { opacity: 1; transform: none; } }

.menu-link:hover, .menu-link:focus-visible { padding-left: 10px; color: var(--a1); }

.menu-number { color: var(--faint); font-size: 11.5px; font-weight: 700; }
.menu-link-name { font-size: 18px; font-weight: 700; }
.menu-link-arrow { color: var(--a1); font-size: 15px; }

.menu-live-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--lv); animation: dotPulse 1.3s ease-in-out infinite; }

.pj-dhamaka-card {
    margin-top: 20px;
    padding: 12px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(var(--rgb), 0.4);
    border-radius: 14px;
    background: rgba(var(--rgb), 0.08);
    transition: background 0.2s ease;
}

.pj-dhamaka-card:hover { background: rgba(var(--rgb), 0.16); }

.pj-dhamaka-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--grad);
    color: var(--ink);
    font-size: 16px;
    font-weight: 800;
}

.pj-dhamaka-copy { display: flex; flex-direction: column; min-width: 0; }
.pj-dhamaka-copy strong { font-size: 14px; }
.pj-dhamaka-copy small { color: var(--muted); font-size: 11.5px; }
.pj-dhamaka-arrow { color: var(--a1); font-size: 17px; }

.sports-menu-footer {
    margin-top: auto;
    padding-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--faint);
    font-size: 10.5px;
    letter-spacing: 0.08em;
}

.sports-menu-footer span:first-child { color: var(--muted); font-weight: 700; }
.sports-menu-footer i { width: 7px; height: 7px; margin-right: 6px; display: inline-block; border-radius: 50%; background: var(--a1); }

/* ---------- 5. HOME LAYOUT ---------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter) 36px; }

/* All / Live / Upcoming tabs */
.view-tabs {
    position: relative;
    margin: 14px 0 0;
    padding: 4px;
    display: flex;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
}

.view-tabs button {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 9px 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.view-tabs button b { margin-left: 4px; font-weight: 700; opacity: 0.7; font-variant-numeric: tabular-nums; }
.view-tabs button.on { color: var(--ink); }

.view-ind {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / 3);
    border-radius: 10px;
    background: var(--grad);
    box-shadow: 0 4px 16px rgba(var(--rgb), 0.4);
    transition: transform 0.45s cubic-bezier(0.3, 1.3, 0.5, 1);
}

.view-tabs[data-i="1"] .view-ind { transform: translateX(100%); }
.view-tabs[data-i="2"] .view-ind { transform: translateX(200%); }

.container[data-view="live"] > .section:not(#live),
.container[data-view="upcoming"] > .section:not(#upcoming) { display: none; }

.section { margin-top: 24px; }

.section-head {
    margin-bottom: 14px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.eyebrow {
    margin-bottom: 2px;
    display: block;
    color: var(--a1);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.section-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(20px, 5vw, 26px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-head h2::before {
    content: "";
    width: 3px;
    height: 20px;
    border-radius: 3px;
    background: linear-gradient(var(--a1), var(--a2));
    box-shadow: 0 0 14px rgba(var(--rgb), 0.7);
    animation: barBeat 2.4s ease-in-out infinite;
}

@keyframes barBeat { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.55); } }

.section-note { display: none; color: var(--muted); font-size: 12px; }

.live-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--lv); }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--lv); animation: ripple 1.7s ease-out infinite; }

/* ---------- 6. MATCH CARDS ---------- */
.match-grid {
    padding-top: 10px;
    display: grid;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    gap: 28px 14px;
}

.match-card {
    position: relative;
    min-width: 0;
    border: 1.5px solid transparent;
    border-radius: var(--radius-card);
    background:
        linear-gradient(180deg, var(--p1), var(--p2)) padding-box,
        linear-gradient(135deg,
            rgba(var(--rgb), 0.7), rgba(var(--rgb), 0.12) 40%, rgba(var(--rgb), 0.5)) border-box;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    transition: transform 0.25s ease;
}

@media (hover: hover) {
    .match-card:hover { transform: translateY(-3px); }
}

.match-card:active { transform: scale(0.985); }

/* live: static soft glow (no animation = smooth scrolling) */
.match-card.is-live { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 22px rgba(var(--rgb), 0.22); }

.match-card.is-finished { opacity: 0.68; }

/* entrance: cards rise one by one (first paint only) */
.match-grid.is-entering > .match-card {
    animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: min(calc(var(--i, 0) * 60ms), 900ms);
}

.pj-match-card-link { display: block; padding: 14px 12px 22px; }

.pj-league {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #d6d0e6;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pj-league-icon { font-size: 13px; line-height: 1; }
.pj-league-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pj-teams-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
}

.pj-team { min-width: 0; display: flex; align-items: center; gap: 9px; }
.pj-team-away { flex-direction: row-reverse; text-align: right; }

.pj-team-image {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1.5px solid transparent;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.16), var(--p2)) padding-box,
        linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08)) border-box;
}


@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

.pj-team-flag { width: 100%; height: 100%; object-fit: cover; }
.pj-club-logo { padding: 6px; object-fit: contain; }
.pj-team-flag-fallback { font-size: 20px; line-height: 1; }

.pj-team-name {
    min-width: 0;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.pj-versus { min-width: 84px; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.2; }

.pj-live-mark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--lv);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.pj-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.pj-eq u { display: block; width: 2px; height: 11px; border-radius: 1px; background: var(--lv); transform-origin: bottom; transform: scaleY(0.3); animation: eq 1s ease-in-out infinite; }
.pj-eq u:nth-child(2) { animation-delay: -0.35s; }
.pj-eq u:nth-child(3) { animation-delay: -0.7s; }

@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

.pj-score { margin-top: 2px; display: flex; align-items: center; font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pj-score em { font-style: normal; }
.pj-score s { margin: 0 4px; color: var(--faint); text-decoration: none; font-weight: 500; }

.pj-kick-time {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(180deg, #ffffff, var(--a1));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.pj-kick-date { margin-top: 2px; color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.pj-ended-mark { color: var(--muted); font-size: 12px; font-weight: 700; }

/* pill sitting on the bottom edge */
.pj-pill {
    position: absolute;
    left: 50%;
    bottom: -12px;
    max-width: calc(100% - 28px);
    padding: 4px 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(-50%);
    border: 1px solid rgba(var(--rgb), 0.5);
    border-radius: 999px;
    background: var(--bg);
    color: var(--a1);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.pj-pill.live { border-color: rgba(var(--lv-rgb), 0.55); color: var(--lv); }

/* HOT badge (top-left) */
.pj-hot-badge {
    position: absolute;
    top: -10px;
    left: 16px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: 999px;
    background: linear-gradient(110deg, var(--a2) 0%, #ffffff 45%, var(--a1) 60%, var(--a2) 100%);
    background-size: 240% 100%;
    color: var(--ink);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(var(--rgb), 0.45);
    animation: shimmer 3s linear infinite;
}

/* viewers (top-right, live only) */
.pj-viewers {
    position: absolute;
    top: -10px;
    right: 16px;
    z-index: 2;
    padding: 3px 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(var(--lv-rgb), 0.55);
    border-radius: 999px;
    background: var(--bg);
    color: var(--lv);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}

.pj-viewers svg { flex: none; animation: blink 3.4s ease-in-out infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }

[data-viewers].tick { display: inline-block; animation: tick 0.4s ease; }
@keyframes tick { from { transform: translateY(7px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 7. EMPTY & FOOTER ---------- */
.empty-state {
    padding: 30px 18px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 13.5px;
    text-align: center;
}

.match-grid > .empty-state { grid-column: 1 / -1; }
.empty-state h3 { margin-bottom: 6px; color: var(--text); font-size: 16px; }
.empty-state p { color: var(--muted); font-size: 12.5px; }

.footer {
    padding: 22px var(--gutter);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.footer strong { color: var(--text); }

/* ---------- 8. WATCH PAGE ---------- */
.watch-page {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px var(--gutter) 36px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.back-link {
    justify-self: start;
    min-height: 38px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--a1);
    font-size: 12.5px;
    font-weight: 700;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.back-link:hover { border-color: var(--a1); transform: translateX(-3px); }

.watch-heading,
.instruction-card,
.watch-info {
    padding: 16px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-card);
    background:
        linear-gradient(180deg, var(--p1), var(--p2)) padding-box,
        linear-gradient(135deg, rgba(var(--rgb), 0.7), rgba(var(--rgb), 0.06) 40%, rgba(var(--rgb), 0.4)) border-box;
}

.watch-top { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }

.watch-status {
    padding: 4px 11px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(var(--lv-rgb), 0.45);
    border-radius: 999px;
    background: rgba(var(--lv-rgb), 0.1);
    color: var(--lv);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.4;
}

.watch-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lv); animation: dotPulse 1.3s ease-in-out infinite; }

.watch-viewers {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--lv);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.watch-viewers svg { animation: blink 3.4s ease-in-out infinite; }

.watch-heading h1 {
    margin-bottom: 4px;
    font-size: clamp(21px, 5.5vw, 34px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.watch-heading p { color: var(--muted); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }

.player-section { position: relative; }

.player-topline { margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.player-topline strong { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 800; }
.player-topline strong::before { content: ""; width: 3px; height: 15px; border-radius: 3px; background: linear-gradient(var(--a1), var(--a2)); }

.player-live-label {
    padding: 3px 10px;
    border: 1px solid rgba(var(--rgb), 0.4);
    border-radius: 999px;
    background: rgba(var(--rgb), 0.1);
    color: var(--a1);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.4;
    white-space: nowrap;
}

/* the player: strict 16:9, video fills everything, nothing written on it */
.player-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(var(--rgb), 0.4);
    border-radius: 14px;
    background: #000;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6), 0 0 28px rgba(var(--rgb), 0.12);
}

.player-box iframe,
.player-box video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0 !important;
    border: 0;
    background: #000;
}

.player-box:fullscreen { border: 0; border-radius: 0; }

.player-box.pj-pseudo-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 300;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
}

.player-placeholder {
    position: absolute;
    inset: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--muted);
    text-align: center;
    background: radial-gradient(circle at 50% 40%, rgba(var(--rgb), 0.14), var(--p2) 70%);
}

.player-placeholder .play-icon {
    position: relative;
    width: clamp(44px, 11vw, 58px);
    height: clamp(44px, 11vw, 58px);
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--grad);
    color: var(--ink);
    font-size: clamp(16px, 4.4vw, 22px);
}

.player-placeholder .play-icon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--a1); animation: ripple 2s ease-out infinite; z-index: -1; }
.player-placeholder strong { color: var(--text); font-size: clamp(13px, 3.4vw, 15px); }

.player-placeholder p {
    max-width: 34ch;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: clamp(11px, 2.8vw, 12.5px);
}

/* countdown screen (match not started yet) */
.pj-countdown-screen {
    position: absolute;
    inset: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    background: radial-gradient(circle at 50% 45%, rgba(var(--rgb), 0.2), var(--p2) 70%);
}

.pj-cs-label { color: var(--muted); font-size: clamp(11px, 3vw, 13px); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }

.pj-cs-time {
    font-size: clamp(28px, 10vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: csPulse 2s ease-in-out infinite;
}

@keyframes csPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }
.pj-countdown-screen p { max-width: 34ch; color: var(--muted); font-size: clamp(11px, 2.8vw, 12.5px); }

/* controls UNDER the player */
.player-tools { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }

.fs-btn {
    min-height: 40px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 12.5px;
    font-weight: 700;
    transition: transform 0.15s ease, border-color 0.2s ease;
}

.fs-btn:hover { border-color: var(--a1); }
.fs-btn:active { transform: scale(0.94); }
.fs-btn.primary { border-color: transparent; background: var(--grad); color: var(--ink); box-shadow: 0 5px 16px rgba(var(--rgb), 0.3); }

/* stream sources: separate boxes in ONE swipeable row */
.source-heading { margin: 16px 2px 8px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 800; }
.source-heading::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, rgba(var(--rgb), 0.4), transparent); }

.source-list, #sourceList {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 2px 2px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

#sourceList::-webkit-scrollbar { display: none; }
#sourceList > .muted, #sourceList > p { flex: 1 0 100%; }
#sourceList .muted { color: var(--muted); font-size: 13px; }

#sourceList button {
    min-width: 116px;
    max-width: 210px;
    min-height: 46px;
    padding: 7px 15px 7px 8px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 9px;
    scroll-snap-align: start;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.05);
    color: #ece8f6;
    font-size: 12.5px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

#sourceList button::before {
    content: "";
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c4a6ff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 11px no-repeat,
        rgba(var(--rgb), 0.16);
}

#sourceList button:hover { border-color: var(--a1); }
#sourceList button:active { transform: scale(0.94); }

#sourceList button.pj-source-button-active {
    outline: 0;
    border-color: transparent;
    background: linear-gradient(110deg, var(--a2) 0%, #ffffff 45%, var(--a1) 60%, var(--a2) 100%);
    background-size: 240% 100%;
    color: var(--ink);
    box-shadow: 0 5px 18px rgba(var(--rgb), 0.35);
    animation: shimmer 3.4s linear infinite;
}

#sourceList button.pj-source-button-active::before {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2314082e'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 11px no-repeat,
        rgba(0, 0, 0, 0.14);
    animation: beat 1.4s ease-in-out infinite;
}

@keyframes beat { 50% { transform: scale(1.18); } }

.watch-error { margin-top: 10px; }

.watch-error:not(:empty) {
    padding: 11px 13px;
    border: 1px solid rgba(var(--lv-rgb), 0.4);
    border-radius: 12px;
    background: rgba(var(--lv-rgb), 0.08);
    color: #f1d9e3;
    font-size: 12.5px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

/* match ended (overrides the teal style injected by watch.js) */
#playerBox .pj-match-ended {
    position: absolute;
    inset: 0;
    width: auto;
    min-height: 0;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: radial-gradient(circle at 50% 40%, rgba(var(--rgb), 0.1), var(--p2) 70%);
    color: #fff;
    text-align: center;
}

#playerBox .pj-match-ended-icon { margin-bottom: 6px; font-size: clamp(26px, 8vw, 40px); line-height: 1.1; }
#playerBox .pj-match-ended h2 { margin: 0 0 5px; font-size: clamp(18px, 5vw, 26px); font-weight: 800; letter-spacing: 0.04em; }
#playerBox .pj-match-ended p { max-width: 36ch; margin: 0; color: #c9c4d8; font-size: clamp(11.5px, 3vw, 13.5px); line-height: 1.55; }

.watch-page:has(.pj-match-ended) .watch-status { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); color: var(--muted); }
.watch-page:has(.pj-match-ended) .watch-status::before { background: var(--faint); animation: none; }
.watch-page:has(.pj-match-ended) .source-heading { display: none; }

.instruction-heading { margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }

.instruction-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--grad);
    color: var(--ink);
    font-size: 16px;
}

.instruction-heading h2 { font-size: 16px; font-weight: 800; line-height: 1.3; }
.instruction-heading span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

.instruction-steps { display: grid; gap: 12px; list-style: none; counter-reset: step; }

.instruction-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #d8d3e6;
    font-size: 13.5px;
    line-height: 1.8;
    counter-increment: step;
}

.instruction-steps li::before {
    content: counter(step);
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(var(--rgb), 0.18);
    color: var(--a1);
    font-size: 12px;
    font-weight: 800;
}

.instruction-note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.8; }

.watch-info h2 { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; }
.watch-info h2::before { content: ""; width: 3px; height: 18px; border-radius: 3px; background: linear-gradient(var(--a1), var(--a2)); }
.watch-info p { color: #cfcade; font-size: 13.5px; line-height: 1.9; overflow-wrap: anywhere; white-space: pre-line; }

.pj-promo {
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid rgba(var(--rgb), 0.4);
    border-radius: var(--radius-card);
    background: linear-gradient(135deg, rgba(var(--rgb), 0.14), rgba(var(--rgb), 0.03));
}

.pj-promo-content { min-width: 0; }

.pj-promo-kicker {
    margin-bottom: 6px;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--grad);
    color: var(--ink);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.pj-promo h2 { margin-bottom: 6px; font-size: clamp(21px, 5vw, 28px); font-weight: 800; letter-spacing: -0.02em; }
.pj-promo p { max-width: 60ch; color: #cfcade; font-size: 13px; line-height: 1.85; }

.pj-promo-button {
    width: 100%;
    min-height: 44px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 12px;
    background: var(--grad);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 800;
    transition: transform 0.15s ease, filter 0.2s ease;
}

.pj-promo-button:hover { filter: brightness(1.08); }
.pj-promo-button:active { transform: scale(0.97); }

/* ---------- 9. RESPONSIVE ---------- */
@media (max-width: 420px) {
    .brand > span:last-child { display: none; }
    .live-action { padding: 0 11px; }
}

@media (min-width: 720px) {
    :root { --cols: 2; }
    .section-note { display: block; }
    .pj-dhamaka-top { display: inline-flex; }
    .watch-heading, .instruction-card, .watch-info { padding: 22px; }

    .pj-promo {
        padding: 22px 26px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
    }

    .pj-promo-button { width: auto; }
}

@media (min-width: 900px) {
    .watch-page { gap: 18px; padding-top: 22px; }
}

@media (min-width: 1040px) {
    :root { --cols: 3; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .menu-link { opacity: 1; transform: none; }
}


/* =====================================================
   v5 ADDITIONS: loading skeleton, "Show more",
   source names that stay inside their box, admin tag
   ===================================================== */

/* grey placeholder cards while the first load runs */
.match-card.pj-skel {
    padding: 14px 12px 22px;
    min-height: 104px;
    border-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, var(--p1), var(--p2));
    box-shadow: none;
    pointer-events: none;
}

.pj-skel-line { display: block; width: 55%; height: 10px; margin: 0 auto 18px; border-radius: 6px; }
.pj-skel-row { display: grid; grid-template-columns: 44px 1fr 44px; gap: 14px; align-items: center; }
.pj-skel-row i { display: block; height: 44px; border-radius: 50%; }
.pj-skel-row b { display: block; height: 12px; border-radius: 6px; }

.pj-skel-line,
.pj-skel-row i,
.pj-skel-row b {
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.11) 50%, rgba(255, 255, 255, 0.04) 70%);
    background-size: 220% 100%;
    animation: shimmer 1.3s linear infinite;
}

/* "Show more" under a long list */
.pj-more {
    grid-column: 1 / -1;
    justify-self: center;
    min-height: 42px;
    padding: 0 26px;
    border: 1px solid rgba(var(--rgb), 0.4);
    border-radius: 999px;
    background: rgba(var(--rgb), 0.1);
    color: var(--a1);
    font-size: 13px;
    font-weight: 700;
    transition: transform 0.15s ease, background 0.2s ease;
}

.pj-more:hover { background: rgba(var(--rgb), 0.2); }
.pj-more:active { transform: scale(0.95); }

/* stream source boxes: fixed width, long names scroll INSIDE the box */
#sourceList button {
    width: 156px;
    min-width: 156px;
    max-width: 156px;
}

#sourceList button .pj-src-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

#sourceList button .pj-src-name > span { display: inline-block; }

#sourceList button .pj-src-name.is-long {
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
    mask-image: linear-gradient(90deg, #000 82%, transparent);
}

#sourceList button .pj-src-name.is-long > span {
    animation: srcScroll var(--t, 6s) ease-in-out infinite alternate;
}

@keyframes srcScroll {
    0%, 18% { transform: translateX(0); }
    82%, 100% { transform: translateX(var(--d, 0px)); }
}

/* sources added from the admin panel come first, with a star */
.pj-src-tag {
    flex: none;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(var(--lv-rgb), 0.18);
    color: var(--lv);
    font-size: 8.5px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.08em;
}

#sourceList button.pj-source-admin::before {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c4a6ff'%3E%3Cpath d='M12 2l3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z'/%3E%3C/svg%3E") center / 12px no-repeat,
        rgba(var(--rgb), 0.16);
}

#sourceList button.pj-source-admin.pj-source-button-active::before {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2314082e'%3E%3Cpath d='M12 2l3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z'/%3E%3C/svg%3E") center / 12px no-repeat,
        rgba(0, 0, 0, 0.14);
}

#sourceList button.pj-source-button-active .pj-src-tag {
    background: rgba(0, 0, 0, 0.16);
    color: var(--ink);
}