/* Hubs — Persian streamer hub (TeleLive / Twitch / Kick) */

.navbar-live-pill--explore {
    background: rgba(56, 189, 248, 0.15);
}

.explore-cache-banner {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.explore-cache-banner--stale {
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fcd34d;
}

.explore-cache-banner--warn {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #fca5a5;
}

.explore-stale-tag {
    font-size: 0.62rem;
    opacity: 0.85;
    margin-inline-start: 4px;
    text-transform: uppercase;
}

.page-explore .hubs-page,
.page-hubs .hubs-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 16px 56px;
}

.hubs-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hubs-header h1 i {
    color: var(--brand);
}

.hubs-platform-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.hubs-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-elev-1);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text);
}

button.hubs-stat {
    cursor: pointer;
    font: inherit;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

button.hubs-stat:hover {
    background: var(--bg-elev-2);
}

button.hubs-stat.is-active {
    box-shadow: 0 0 0 2px rgba(30, 86, 245, 0.22);
}

.hubs-stat b {
    min-width: 22px;
    text-align: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-elev-2);
    font-size: 0.82rem;
    font-weight: 700;
}

.hubs-stat--all.is-active {
    border-color: rgba(59, 130, 246, 0.55);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(99, 102, 241, 0.12));
}

.hubs-stat--tele { border-color: rgba(30, 86, 245, 0.35); }
.hubs-stat--tele.is-active {
    border-color: rgba(30, 86, 245, 0.65);
    background: rgba(30, 86, 245, 0.12);
}
.hubs-stat--twitch { border-color: rgba(145, 70, 255, 0.35); }
.hubs-stat--twitch i { color: #9146ff; }
.hubs-stat--twitch.is-active {
    border-color: rgba(145, 70, 255, 0.65);
    background: rgba(145, 70, 255, 0.12);
}
.hubs-stat--kick { border-color: rgba(83, 252, 24, 0.35); }
.hubs-stat--kick.is-active {
    border-color: rgba(83, 252, 24, 0.55);
    background: rgba(83, 252, 24, 0.08);
}

.hubs-kick-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: #0a0a0a;
    color: #53fc18;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

.hubs-add-section {
    padding: 18px 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
}

.hubs-add-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hubs-add-hint {
    margin: 0 0 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.hubs-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.hubs-add-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg-elev-2);
    color: var(--text);
    font-size: 0.95rem;
}

.hubs-add-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(30, 86, 245, 0.25);
}

.hubs-add-btn { flex: 0 0 auto; white-space: nowrap; }

.hubs-add-msg { margin: 10px 0 0; font-size: 0.85rem; }
.hubs-add-msg.ok { color: #22c55e; }
.hubs-add-msg.err { color: #f87171; }

.hubs-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
    position: relative;
    z-index: 3;
}

.hubs-search-form {
    max-width: 100%;
    width: 100%;
    min-height: 44px;
    background: var(--bg-elev-1, var(--bg));
    border: 1px solid var(--line);
    border-radius: 12px;
}

/* Override navbar mobile collapse (.search-input { width:0 }) */
.hubs-search-form .search-input {
    width: auto !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    opacity: 1 !important;
    padding: 10px 13px !important;
    color: var(--text, #fff);
}
.hubs-search-form .search-btn {
    width: 44px !important;
    height: auto !important;
    align-self: stretch !important;
    border-radius: 0 12px 12px 0 !important;
    background: var(--bg-elev-3) !important;
}
html[dir="rtl"] .hubs-search-form .search-btn {
    border-radius: 12px 0 0 12px !important;
}
.hubs-search-form:focus-within {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 3px rgba(30, 86, 245, 0.2) !important;
}

.hubs-platform-tabs {
    margin-bottom: 0;
    flex-wrap: wrap;
}

.hubs-categories-scroll {
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.hubs-categories-scroll .categories-scroll-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 6px;
}

.hubs-cat-filter.category-card-scroll {
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    text-align: inherit;
    font: inherit;
    color: inherit;
    background: rgba(30, 30, 38, 0.55);
    padding: 0;
    flex: 0 0 auto;
    width: 76px;
}

.hubs-cat-filter.is-active {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 12px;
}

.hubs-card-admin-del {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    z-index: 4;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #f87171;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    opacity: 0.92;
    transition: background 0.15s ease, color 0.15s ease;
}
.hubs-card-admin-del:hover {
    background: rgba(220, 38, 38, 0.92);
    color: #fff;
}

.hubs-toolbar {
    max-width: 100%;
    min-width: 0;
}

.hubs-page {
    min-width: 0;
}

.hubs-skeleton-card.stream-card--skeleton {
    pointer-events: none;
}

.hubs-grid .hubs-card {
    min-height: 0;
}

.navbar-live-pill--hubs {
    background: rgba(30, 86, 245, 0.18);
}

.hubs-cat-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.hubs-cat-tabs .tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.hubs-cat-count {
    margin-inline-start: 6px;
    opacity: 0.7;
    font-size: 0.78rem;
}

.hubs-grid-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.hubs-grid-head h2 {
    margin: 0;
    font-size: 1.1rem;
}

.hubs-live-sort {
    margin-inline-start: auto;
}

.hubs-live-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    font-size: 0.82rem;
    font-weight: 600;
}

.hubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.hubs-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: var(--bg-elev-1);
}

.hubs-empty i {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
    display: block;
}

.hubs-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-elev-1);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.hubs-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.hubs-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--bg-elev-2);
    overflow: hidden;
}

.hubs-card-thumb img.hubs-card-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.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(180deg, rgba(0,0,0,.35) 0%, transparent 35%, transparent 65%, rgba(0,0,0,.45) 100%);
}

.hubs-live-tag {
    align-self: flex-start;
    background: #ef4444;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 7px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.hubs-live-tag i { font-size: 0.45rem; line-height: 1; }

.hubs-thumb-ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b1224;
    z-index: 0;
}

.hubs-thumb-ph--kick { background: #0a0a0a; }
.hubs-thumb-ph--twitch { background: #18181b; }
.hubs-thumb-ph--tele { background: #0b1224; }

.hubs-thumb-ph-logo {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    padding: 0 !important;
    display: block;
    opacity: 0.95;
}

.hubs-card-thumb-img {
    position: relative;
    z-index: 1;
}

.hubs-viewer-tag {
    align-self: flex-end;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.78rem;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hubs-viewer-badges {
    align-self: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
    max-width: 100%;
    position: relative;
    z-index: 3;
}

.hubs-plat-viewers {
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
}

.hubs-plat-viewers--kick { border: 1px solid rgba(83, 252, 24, 0.45); }
.hubs-plat-viewers--twitch { border: 1px solid rgba(145, 70, 255, 0.5); }
.hubs-plat-viewers--tele { border: 1px solid rgba(30, 86, 245, 0.45); }
.hubs-plat-viewers img { display: block; border-radius: 2px; }

.hubs-card-thumb-img.is-logo-fallback {
    object-fit: contain !important;
    padding: 22% 28%;
    background: #0f0f12;
}

.hubs-card-thumb--kick .hubs-card-thumb-img.is-logo-fallback {
    background: #0a0a0a;
    padding: 26% 30%;
}
.hubs-card-thumb--twitch .hubs-card-thumb-img.is-logo-fallback {
    background: #18181b;
    padding: 26% 30%;
}
.hubs-card-thumb--tele .hubs-card-thumb-img.is-logo-fallback {
    /* default thumb art already fills; don't treat as logo */
    object-fit: cover !important;
    padding: 0;
    background: #080f22;
}

.hubs-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.hubs-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hubs-card-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elev-2);
}

.hubs-card-id {
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hubs-card-viewers {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.hubs-card-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hubs-card-category {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-elev-2);
    border: 1px solid var(--line);
    padding: 3px 10px;
    border-radius: 999px;
}

.hubs-card-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.hubs-plat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.hubs-plat-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    color: #fff;
}

.hubs-plat-btn--kick { background: #53fc18; color: #0a0a0a; }
.hubs-plat-btn--kick:hover { color: #0a0a0a; }
.hubs-plat-btn--twitch { background: #9146ff; }
.hubs-plat-btn--tele { background: var(--brand); }
.hubs-plat-icon { border-radius: 3px; object-fit: contain; }

@media (max-width: 640px) {
    .hubs-grid { grid-template-columns: 1fr; }
    .hubs-add-form { flex-direction: column; }
    .hubs-add-btn { width: 100%; }
}
