/* Explore — match home / browse stream cards + compact chrome (no glass) */

/* Share home ambient (body::before glows/dots) — never paint a flat solid over it */
body.page-explore {
    background: transparent;
    overflow-x: clip;
}
body.page-explore .main-content,
body.page-explore .tl-page-content {
    background: transparent !important;
}
/* Soft home-band tint so Explore doesn't read as flat black */
body.page-explore #tlExplorePage.hubs-page,
body.page-explore #tlExploreBootSk.explore-page {
    position: relative;
    isolation: isolate;
}
body.page-explore #tlExplorePage.hubs-page::before,
body.page-explore #tlExploreBootSk.explore-page::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(30, 86, 245, 0.07) 0%, rgba(82, 128, 255, 0.03) 55%, transparent 100%);
    border-top: 1px solid rgba(30, 86, 245, 0.08);
    border-bottom: 1px solid rgba(30, 86, 245, 0.05);
}

/* Keep .container horizontal gutters (14–18px) — never zero padding-inline */
.page-explore #tlExplorePage.hubs-page,
.page-explore #tlExploreBootSk.explore-page {
    max-width: none;
    width: min(1400px, 100%);
    margin: 0 auto;
    padding-top: 12px;
    padding-bottom: 56px;
    padding-inline: 16px;
    box-sizing: border-box;
    overflow-x: clip;
    min-width: 0;
}

@media (min-width: 769px) {
    .page-explore #tlExplorePage.hubs-page,
    .page-explore #tlExploreBootSk.explore-page {
        padding-inline: 18px;
    }
}

@media (max-width: 768px) {
    .page-explore #tlExplorePage.hubs-page,
    .page-explore #tlExploreBootSk.explore-page {
        padding-inline: 14px;
    }
}

#tlExplorePage .tl-explore-page-head,
#tlExploreBootSk .tl-explore-page-head {
    display: block;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    background: none;
}

#tlExplorePage .tl-explore-page-head .tl-hl-title,
#tlExploreBootSk .tl-explore-page-head .tl-hl-title {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: clamp(1.15rem, 2.2vw, 1.35rem);
    font-weight: 800;
    color: #fff;
    margin: 0;
}

#tlExplorePage .tl-explore-page-desc {
    margin: 6px 0 0;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--text-muted, #9ca3af);
    max-width: 48ch;
}

#tlExplorePage .tl-page-hero,
#tlExplorePage .explore-hero,
#tlExplorePage .explore-registered-count {
    display: none !important;
}

/* Toolbar */
#tlExplorePage .hubs-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

/* Search — own control, no navbar .search-form collisions */
#tlExplorePage .tl-explore-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
}

#tlExplorePage .tl-explore-search:focus-within {
    border-color: rgba(107, 159, 255, 0.45);
    background: rgba(255, 255, 255, 0.06);
}

#tlExplorePage .tl-explore-search__icon {
    flex: 0 0 auto;
    color: #8f8f9b;
    font-size: 0.9rem;
}

#tlExplorePage .tl-explore-search__input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100% !important;
    height: 42px;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    outline: 0;
    background: transparent !important;
    color: #fff;
    font-size: 0.92rem;
    opacity: 1 !important;
    box-shadow: none !important;
}

#tlExplorePage .tl-explore-search__input::placeholder {
    color: #8f8f9b;
}

/* Add streamer — always-open field */
#tlExplorePage .tl-explore-add {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

#tlExplorePage .tl-explore-add__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 0.92rem;
    box-sizing: border-box;
}

#tlExplorePage .tl-explore-add__input:focus {
    outline: 0;
    border-color: rgba(107, 159, 255, 0.45);
}

#tlExplorePage .tl-explore-add__btn {
    flex: 0 0 auto;
    height: 44px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

#tlExplorePage .hubs-add-msg {
    margin: 0;
    font-size: 0.82rem;
}

#tlExplorePage .hubs-platform-stats {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

#tlExplorePage .hubs-platform-stats::-webkit-scrollbar { display: none; }

#tlExplorePage .hubs-stat {
    display: inline-flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    font-size: 0.78rem;
    white-space: nowrap;
}

#tlExplorePage .hubs-stat__logo {
    display: inline-block;
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
    vertical-align: middle;
}

#tlExplorePage .hubs-stat__logo--tele {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

#tlExplorePage .hubs-stat__logo--kick {
    width: 15px;
    height: 15px;
}

#tlExplorePage .hubs-stat__logo--twitch {
    color: #9146ff;
    font-size: 0.95rem;
    width: auto;
    height: auto;
}

#tlExplorePage .hubs-stat b {
    min-width: 18px;
    padding: 1px 6px;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.06);
}

#tlExplorePage button.hubs-stat.is-active {
    box-shadow: none;
}

#tlExplorePage .hubs-stat--all.is-active {
    background: rgba(30, 86, 245, 0.18);
    border-color: rgba(107, 159, 255, 0.35);
}

/* Categories — stay inside page gutter (no bleed past Live now / search) */
#tlExplorePage #tlExploreCatSection,
#tlExplorePage .hubs-categories-scroll {
    margin: 0 0 22px !important;
    padding: 0 !important;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    overflow-x: clip;
    box-sizing: border-box;
    position: relative;
}

#tlExplorePage #tlExploreCatSection .tl-hc-head {
    margin-bottom: 14px;
    padding-inline: 0;
}

/* Like home: no horizontal scroll — JS clips cards that don't fully fit */
#tlExplorePage #tlExploreCatSection .categories-scroll-row,
#tlExplorePage .hubs-categories-scroll .categories-scroll-row,
#tlExplorePage #tlExploreCatSection .categories-scroll-row.is-cat-fit-clip {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    scroll-snap-type: none;
    padding: 4px 0 12px;
    margin: 0;
    box-sizing: border-box;
    cursor: default;
    touch-action: pan-y;
}

#tlExplorePage #tlExploreCatSection .category-card-scroll.is-cat-clipped,
#tlExplorePage #tlExploreCatSection .category-card-scroll[hidden] {
    display: none !important;
}

#tlExplorePage #tlExploreCatSection .tl-hc-nav {
    display: none !important;
}

#tlExplorePage .hubs-cat-filter.category-card-scroll {
    flex: 0 0 132px !important;
    width: 132px !important;
    max-width: 132px !important;
    min-width: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    #tlExplorePage .hubs-cat-filter.category-card-scroll {
        flex: 0 0 94px !important;
        width: 94px !important;
        max-width: 94px !important;
    }
}

#tlExplorePage .hubs-cat-filter .category-box-art-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    background: #121316;
    box-sizing: border-box;
}

#tlExplorePage .hubs-cat-filter .category-info {
    position: static !important;
    inset: auto !important;
    padding: 8px 2px 0 !important;
    background: transparent !important;
    pointer-events: none;
    max-width: 100%;
    overflow: hidden;
}

#tlExplorePage .hubs-cat-filter .category-info h3 {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 800;
    color: #efeff1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

#tlExplorePage .hubs-cat-filter .category-info .cat-live-info,
#tlExplorePage .hubs-cat-filter .category-info > span {
    display: none !important;
}

@media (max-width: 768px) {
    #tlExplorePage .hubs-cat-filter .category-info {
        padding: 6px 2px 0 !important;
    }
    #tlExplorePage .hubs-cat-filter .category-info h3 {
        font-size: 0.66rem;
    }
}

/* Active ring inside the card — outline-offset was painting past the section clip */
#tlExplorePage .hubs-cat-filter.is-active {
    outline: none;
}

#tlExplorePage .hubs-cat-filter.is-active .category-box-art-wrap {
    box-shadow: 0 0 0 2px var(--brand, #1e56f5);
}

#tlExplorePage .category-box-art-wrap--empty {
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Search sits under Live now header */
#tlExplorePage .hubs-grid-section > .tl-explore-search {
    margin: 0 0 14px;
}

/* Live head + sort */
#tlExplorePage .hubs-grid-section {
    margin-bottom: 28px;
    padding: 0;
}

#tlExplorePage .hubs-grid-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding: 0;
    border: 0;
}

#tlExplorePage .hubs-grid-head .tl-hl-title { margin: 0; }

#tlExplorePage .hubs-live-count.tl-hl-count {
    min-width: 0;
    height: auto;
    background: rgba(30, 86, 245, 0.14);
    border: 1px solid rgba(30, 86, 245, 0.38);
    color: #7aa3ff;
}

#tlExplorePage .browse-live-sort,
#tlExplorePage .hubs-live-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-inline-start: 0;
    padding: 3px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#tlExplorePage .browse-live-sort__btn {
    min-width: 44px;
    height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted, #adadb8);
    font-size: 0.74rem;
    font-weight: 700;
}

#tlExplorePage .browse-live-sort__btn.is-active {
    border-color: rgba(107, 159, 255, 0.35);
    background: rgba(30, 86, 245, 0.18);
    color: var(--brand-soft, #6b9fff);
    box-shadow: none;
}

/* Grid — beat style.css !important 1-col */
#tlExplorePage .hubs-grid.streams-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
}

@media (max-width: 1180px) {
    #tlExplorePage .hubs-grid.streams-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 860px) {
    #tlExplorePage .hubs-grid.streams-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
}

/* Cards — home stream-card silhouette */
#tlExplorePage .hubs-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible;
    transition: transform 0.2s ease;
}

#tlExplorePage .hubs-card:hover {
    transform: translateY(-2px);
}

#tlExplorePage .hubs-card-thumb-wrap {
    position: relative;
}

#tlExplorePage .hubs-card-media {
    display: block;
    text-decoration: none;
    color: inherit;
}

#tlExplorePage .hubs-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    border: 1px solid transparent;
    overflow: hidden;
    isolation: isolate;
    background: #14151a;
    transition: border-color 0.2s ease;
}

#tlExplorePage .hubs-card:hover .hubs-card-thumb {
    border-color: rgba(107, 159, 255, 0.35);
}

#tlExplorePage .hubs-card-thumb img.hubs-card-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

#tlExplorePage .hubs-card:hover .hubs-card-thumb img.hubs-card-thumb-img {
    transform: scale(1.03);
}

#tlExplorePage .hubs-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, transparent 42%);
}

#tlExplorePage .hubs-card-overlay__top {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Platform logo + that platform's viewers (not total) */
#tlExplorePage .hubs-viewer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    max-width: 100%;
    pointer-events: none;
}

#tlExplorePage .hubs-plat-viewers {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.78) !important;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}

#tlExplorePage .hubs-plat-viewers--kick {
    border: 1px solid rgba(83, 252, 24, 0.45);
}

#tlExplorePage .hubs-plat-viewers--twitch {
    border: 1px solid rgba(145, 70, 255, 0.5);
}

#tlExplorePage .hubs-plat-viewers--tele {
    border: 1px solid rgba(30, 86, 245, 0.45);
}

#tlExplorePage .hubs-plat-viewers img {
    display: block;
    width: 11px;
    height: 11px;
    object-fit: contain;
    border-radius: 2px;
}

#tlExplorePage .hubs-plat-viewers .fa-twitch {
    font-size: 0.72rem;
    color: #9146ff;
}

#tlExplorePage .hubs-viewer-total.viewer-tag,
#tlExplorePage .viewer-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.78) !important;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}

/* Placeholder logo only when thumb fails — keep hidden while real thumb shows */
#tlExplorePage .hubs-card-thumb .hubs-thumb-ph-logo {
    pointer-events: none;
}

#tlExplorePage .hubs-card-thumb .hubs-thumb-ph[style*="display: none"],
#tlExplorePage .hubs-card-thumb .hubs-thumb-ph[hidden] {
    display: none !important;
}

#tlExplorePage .hubs-card-admin-del {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

#tlExplorePage .hubs-card:hover .hubs-card-admin-del,
#tlExplorePage .hubs-card:focus-within .hubs-card-admin-del {
    opacity: 0.92;
    pointer-events: auto;
}

@media (hover: none) {
    #tlExplorePage .hubs-card-admin-del {
        opacity: 0.75;
        pointer-events: auto;
    }
}

/* Meta — same grid as home (avatar | details | category art). Force here so
   explore stays correct even if home-live.css fails to load. */
#tlExplorePage .hubs-card .stream-info {
    min-width: 0;
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) !important;
    gap: 9px !important;
    align-items: start;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
}

#tlExplorePage .hubs-card .stream-info--has-cat {
    grid-template-columns: 36px minmax(0, 1fr) 42px !important;
}

#tlExplorePage .hubs-card .stream-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50%;
    object-fit: cover;
}

#tlExplorePage .hubs-card .stream-category-art {
    width: 42px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    grid-column: 3;
    grid-row: 1;
}

@media (max-width: 600px) {
    #tlExplorePage .hubs-card .stream-info {
        grid-template-columns: 28px minmax(0, 1fr) !important;
        gap: 7px !important;
        margin-top: 8px !important;
    }
    #tlExplorePage .hubs-card .stream-info--has-cat {
        grid-template-columns: 28px minmax(0, 1fr) 34px !important;
    }
    #tlExplorePage .hubs-card .stream-avatar {
        width: 28px !important;
        height: 28px !important;
    }
    #tlExplorePage .hubs-card .stream-category-art {
        width: 34px;
        height: 45px;
        border-radius: 6px;
    }
}

#tlExplorePage .hubs-card .stream-title a {
    color: inherit;
    text-decoration: none;
}

#tlExplorePage .hubs-card .stream-title a:hover {
    color: var(--brand-soft, #6b9fff);
}

#tlExplorePage .hubs-card-platforms {
    display: none !important;
}

/* Kill any leftover glass on explore chrome */
#tlExplorePage .tl-explore-search,
#tlExplorePage .tl-explore-add__input,
#tlExplorePage .hubs-stat,
#tlExplorePage .browse-live-sort,
#tlExplorePage .hubs-live-sort,
#tlExplorePage .viewer-tag,
#tlExplorePage .viewer-live-badge,
#tlExplorePage .hubs-plat-viewers {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#tlExplorePage .hubs-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted, #9ca3af);
}

#tlExplorePage .hubs-empty i {
    font-size: 1.6rem;
    color: #71717a;
}

@media (max-width: 640px) {
    #tlExplorePage .tl-explore-add__btn span {
        display: none;
    }
    #tlExplorePage .tl-explore-add__btn {
        width: 44px;
        padding: 0;
        justify-content: center;
    }
}
