body {
        height: 100vh;
        overflow: hidden;
    }

    .hub-center, .hub-hero, .hub-cards, .hub-search-input, .hub-search-btn {
        font-family: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    @media (max-width: 768px) {
        body { overflow: auto; height: auto; }
    }

    /* ── Hub variables ── */
    :root {
        --hub-line: rgba(255,255,255,0.065);
        --hub-card: var(--card);
        --hub-card-hover: var(--dark);
        --hub-border: rgba(255,255,255,0.085);
        --hub-text: #ffffff;
        --hub-dim: #777777;
    }

    @media (min-width: 769px) {
        .hub-layout {
            width: 100% !important;
            height: calc(100vh - 66px) !important;
            margin-left: 0 !important;
            position: relative;
            overflow: hidden;
        }

        .hub-center {
            position: absolute !important;
            top: 0 !important;
            left: 50% !important;
            margin-left: -750px !important;
            flex: none !important;
            width: 1500px !important;
            min-width: 1500px !important;
            height: 650px !important;
            overflow: hidden !important;
            transform: scale(var(--hub-desktop-scale, 1));
            transform-origin: top center;
        }

        .hub-center .deco {
            margin-left: -10px;
        }

        /* Stickers 1 and 2 are inside the hero (so phones place them from the
           heading); on the desktop canvas they are still placed from .hub-center.
           (.hub-center in the selector: it must beat the plain .hub-hero rule below.) */
        .hub-center .hub-hero {
            position: static;
        }
    }

    /* ── AD LAYOUT ── */
    .hub-layout {
        display: flex;
        align-items: flex-start;
        width: 100vw;
        margin-left: calc(-1 * ((100vw - 100%) / 2));
        height: calc(100vh - 50px);
    }

    /* deco stickers */
    .deco {
        position: absolute;
        height: auto;
        pointer-events: none;
        user-select: none;
    }


    .ad-sidebar {
        width: 150px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 1.25rem;
    }

    .ad-placeholder {
        background: repeating-linear-gradient(
            45deg,
            rgba(255,255,255,0.012),
            rgba(255,255,255,0.012) 10px,
            rgba(255,255,255,0.03) 10px,
            rgba(255,255,255,0.03) 20px
        );
        border: 1px dashed rgba(255,255,255,0.07);
        border-radius: 6px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
        color: rgba(255,255,255,0.12);
        font-size: 0.58rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .ad-placeholder-side { width: 130px; height: 560px; }

    .hub-center {
        flex: 1;
        min-width: 0;
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        background: var(--bg);
        position: relative;
    }

    /* ── HERO ── */
    .hub-hero {
        position: relative;
        padding: 1.5rem 2rem 1.25rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        overflow: visible;
        flex-shrink: 0;
    }

    .hub-hero::after {
        content: '';
        position: absolute;
        top: 0; left: 50%;
        transform: translateX(-50%);
        width: 700px;
        height: 280px;
        background: radial-gradient(ellipse at 50% 0%, rgba(var(--primary-rgb), 0.06) 0%, transparent 70%);
        pointer-events: none;
    }

    .hub-eyebrow {
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 2.8px;
        text-transform: uppercase;
        color: var(--hub-dim);
        margin-bottom: 1rem;
        position: relative;
        z-index: 1;
    }

    .hub-eyebrow .ey-accent { color: var(--primary); }

    .hub-logo-text {
        font-family: 'Barlow Condensed', sans-serif;
        font-size: clamp(3rem, 6.5vw, 5.5rem);
        font-weight: 900;
        margin: 0;
        color: var(--hub-text);
        letter-spacing: 2px;
        line-height: 0.88;
        text-transform: uppercase;
        position: relative;
        z-index: 1;
    }

    .hub-logo-text .accent-dot { color: var(--primary); }

    .hub-tagline {
        margin-top: 0.6rem;
        font-size: 0.83rem;
        font-weight: 500;
        color: var(--hub-dim);
        max-width: 420px;
        line-height: 1.5;
        position: relative;
        z-index: 1;
    }

    /* ── SEARCH ── */
    .hub-search-wrap {
        width: 100%;
        max-width: 600px;
        margin-top: 1rem;
        position: relative;
        z-index: 1;
    }

    .hub-search-icon {
        position: absolute;
        left: 1.1rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--hub-dim);
        pointer-events: none;
        display: flex;
    }
    .hub-search-icon svg { width: 16px; height: 16px; }

    .hub-search-input {
        width: 100%;
        box-sizing: border-box;
        background: var(--hub-card);
        border: 1px solid var(--hub-border);
        border-radius: 9px;
        padding: 0.95rem 4rem 0.95rem 2.75rem;
        color: var(--hub-text);
        font-family: 'Barlow', sans-serif;
        font-size: 0.95rem;
        font-weight: 500;
        outline: none;
        transition: border-color 0.18s, box-shadow 0.18s;
    }

    .hub-search-input::placeholder { color: var(--hub-dim); }

    .hub-search-input:focus {
        border-color: rgba(var(--primary-rgb), 0.45);
        box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.06);
    }

    .hub-search-btn {
        position: absolute;
        right: 0.45rem;
        top: 50%;
        transform: translateY(-50%);
        background: var(--primary);
        color: var(--bg);
        border: none;
        border-radius: 7px;
        padding: 0.45rem 1.1rem;
        font-family: 'Barlow Condensed', sans-serif;
        font-size: 0.9rem;
        font-weight: 800;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        cursor: pointer;
        white-space: nowrap;
        transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
        box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.35);
    }

    .hub-search-btn:hover {
        background: color-mix(in srgb, var(--primary) 85%, white);
        box-shadow: 0 4px 18px rgba(var(--primary-rgb), 0.55);
        transform: translateY(calc(-50% - 1px));
    }
    .hub-search-btn:active {
        transform: translateY(calc(-50% + 1px));
        box-shadow: 0 1px 6px rgba(var(--primary-rgb), 0.3);
    }

    /* ── SUGGEST DROPDOWN ── */
    .hub-suggest-box {
        position: absolute;
        top: calc(100% + 5px);
        left: 0; right: 0;
        background: var(--card);
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: 10px;
        overflow-y: auto;
        max-height: 184px;
        z-index: 200;
        display: none;
        box-shadow: 0 16px 48px rgba(0,0,0,0.65);
        scrollbar-width: thin;
        scrollbar-color: rgba(var(--primary-rgb),0.3) transparent;
    }
    .hub-suggest-box::-webkit-scrollbar { width: 4px; }
    .hub-suggest-box::-webkit-scrollbar-track { background: transparent; }
    .hub-suggest-box::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb),0.3); border-radius: 4px; }
    .hub-suggest-box::-webkit-scrollbar-thumb:hover { background: rgba(var(--primary-rgb),0.5); }
    .hub-suggest-item {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.55rem 0.85rem;
        cursor: pointer;
        text-decoration: none;
        color: var(--text);
        border-bottom: 1px solid rgba(255,255,255,0.05);
        transition: background 0.1s;
    }
    .hub-suggest-item:last-child { border-bottom: none; }
    .hub-suggest-item:hover,
    .hub-suggest-item.sg-active { background: rgba(255,255,255,0.07); }
    .hub-suggest-icon {
        width: 30px; height: 30px;
        border-radius: 6px; object-fit: contain;
        flex-shrink: 0; background: rgba(255,255,255,0.05);
    }
    .hub-suggest-name { font-size: 0.88rem; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hub-suggest-tag  { font-size: 0.7rem; color: var(--hub-dim); margin-top: 1px; }
    .hub-suggest-troph { font-size: 0.75rem; color: var(--hub-dim); display: flex; align-items: center; gap: 3px; flex-shrink: 0; }

    /* ── CARDS SECTION ── */
    .hub-cards {
        padding: 1.4rem 2rem 1rem;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
        max-width: 780px;
        width: 100%;
        align-self: center;
    }

    .hub-section-label { grid-column: 1 / -1; }

    .hub-section-label {
        font-size: 0.58rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 2px;
        color: var(--hub-dim);
        margin-bottom: 0.15rem;
    }

    /* ── ESPORT CARD ── */
    .hub-esport-card {
        display: flex;
        flex-direction: column;
        background: var(--hub-card);
        border: 1px solid var(--hub-border);
        border-radius: 8px;
        text-decoration: none;
        color: inherit;
        overflow: hidden;
        transition: background 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.18s;
        position: relative;
    }

    .hub-esport-card:hover {
        background: var(--hub-card-hover);
        border-color: rgba(255,255,255,0.18);
        transform: translateY(-3px);
        box-shadow: 0 12px 40px rgba(0,0,0,0.65), 0 0 0 1px rgba(var(--primary-rgb),0.15);
    }

    .hub-esport-img {
        width: 100%;
        height: 82px;
        background: rgba(255,255,255,0.025);
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        flex-shrink: 0;
    }

    .hub-esport-img img {
        height: 90%;
        width: auto;
        max-width: 100%;
        object-fit: contain;
        display: block;
        transition: transform 0.3s ease;
        filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
    }

    .hub-esport-card:hover .hub-esport-img img { transform: scale(1.08) translateY(-2px); }

    .hub-esport-img-fallback {
        display: none;
        align-items: center;
        justify-content: center;
        color: rgba(255,255,255,0.1);
        position: absolute;
        inset: 0;
    }
    .hub-esport-img-fallback svg { width: 34px; height: 34px; }

    .hub-esport-body {
        flex: 1;
        min-width: 0;
        padding: 0.65rem 0.85rem;
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }

    .hub-esport-text { flex: 1; min-width: 0; }

    .hub-esport-title {
        font-family: 'Barlow Condensed', sans-serif;
        font-size: 1rem;
        font-weight: 800;
        margin: 0;
        color: var(--hub-text);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        line-height: 1.1;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }
    .hub-beta-tag {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        font-size: 0.55rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        background: rgba(var(--primary-rgb), 0.18);
        color: var(--primary);
        border: 1px solid rgba(var(--primary-rgb), 0.35);
        border-radius: 5px;
        padding: 0.15rem 0.45rem;
        flex-shrink: 0;
    }

    .hub-esport-sub {
        font-size: 0.67rem;
        color: var(--hub-dim);
        margin-top: 0.18rem;
        line-height: 1.45;
    }

    .hub-esport-arrow {
        flex-shrink: 0;
        color: var(--hub-dim);
        transition: color 0.18s, transform 0.18s;
    }
    .hub-esport-card:hover .hub-esport-arrow {
        color: var(--hub-text);
        transform: translateX(3px);
    }
    .hub-esport-arrow svg { width: 14px; height: 14px; }

    /* ── PROFILE STRIP ── */
    .hub-profiles-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.9rem 2rem 0;
        width: 100%;
    }

    .hub-profiles-label {
        font-size: 0.57rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 2px;
        color: var(--hub-dim);
        width: 100%;
        max-width: 600px;
        margin-bottom: 0.4rem;
        /* Reserve space so it doesn't cause layout shift when JS shows it */
        min-height: 1em;
        visibility: hidden;
    }

    .hub-profiles {
        display: flex;
        gap: 0.5rem;
        width: 100%;
        max-width: 600px;
    }

    .hub-pcard {
        flex: 1;
        min-width: 0;
        background: var(--hub-card);
        border: 1px solid var(--hub-border);
        border-radius: 8px;
        padding: 0.6rem 0.75rem;
        text-decoration: none;
        color: inherit;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        transition: background 0.15s, border-color 0.15s, transform 0.15s;
    }

    .hub-pcard:hover {
        background: var(--hub-card-hover);
        border-color: rgba(255,255,255,0.18);
        transform: translateY(-1px);
    }

    .hub-pcard-icon {
        width: 32px; height: 32px;
        border-radius: 6px;
        object-fit: contain;
        background: rgba(255,255,255,0.05);
        flex-shrink: 0;
    }

    .hub-pcard-name {
        font-size: 0.8rem;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
    }

    .hub-pcard-trophy {
        font-size: 0.66rem;
        color: #f5c518;
        font-weight: 700;
    }

    .hub-pcard-loading { opacity: 0.45; pointer-events: none; }

    /* ── MOBILE ── */
    @media (max-width: 768px) {
        .hub-layout { flex-direction: column !important; height: auto !important; width: 100% !important; margin-left: 0 !important; }
        .ad-sidebar { display: none; }
        /* stretch so children fill full viewport width — align-items:center shrinks items to content width */
        .hub-center { height: auto; align-items: stretch; width: 100%; }
        .hub-hero, .hub-profiles-wrap, .hub-cards, footer { width: 100%; box-sizing: border-box; }
        body, html { overflow-x: hidden; }
        .hub-hero { padding: 1.75rem 1rem 1.25rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
        .hub-logo-text { font-size: clamp(2.6rem, 13vw, 4.5rem); }
        .hub-tagline { font-size: 0.82rem; max-width: 100%; }
        .hub-cards {
            padding: 1rem 0.85rem;
            grid-template-columns: repeat(3, 1fr);
            max-width: 100%;
            gap: 0.4rem;
        }
        .hub-esport-img { height: 60px; }
        .hub-esport-title { font-size: 0.8rem; }
        .hub-esport-sub { font-size: 0.6rem; }
        .hub-esport-body { padding: 0.5rem 0.55rem; gap: 0.3rem; }
        .hub-esport-arrow svg { width: 11px; height: 11px; }
        .hub-profiles-wrap { padding: 0.75rem 0.85rem 0; }
        .hub-profiles { flex-direction: row; gap: 0.35rem; }
        .hub-pcard { padding: 0.5rem 0.55rem; gap: 0.35rem; }
        .hub-pcard-icon { width: 26px; height: 26px; }
        .hub-pcard-name { font-size: 0.72rem; }
        .hub-pcard-trophy { font-size: 0.6rem; }
        .deco { display: none; }
        /* Stickers flanking the Brawlytics heading */
        .deco-mobile-1 {
            display: block !important;
            top: 36px !important;
            left: 6px !important;
            width: 62px !important;
            transform: rotate(-22deg) !important;
        }
        .deco-mobile-2 {
            display: block !important;
            top: 24px !important;
            left: auto !important;
            right: 22px !important;
            width: 60px !important;
            transform: rotate(9deg) !important;
        }
        .hub-search-wrap { max-width: 100%; }
        .hub-search-input { font-size: 1rem; padding: 0.9rem 5rem 0.9rem 2.75rem; }
        /* Fix footer overflowing on narrow screens */
        footer { padding: 0.65rem 1rem 0 !important; }
        footer > div:first-child {
            flex-wrap: wrap !important;
            white-space: normal !important;
            justify-content: center !important;
            gap: 0.4rem 0.7rem !important;
            text-align: center;
        }
        footer > div:first-child span:first-child {
            white-space: normal !important;
            text-align: center;
        }
        /* Suggest dropdown: ensure it stays within viewport */
        .hub-suggest-box { max-height: 220px; }
    }

    @media (max-width: 400px) {
        .hub-logo-text { font-size: clamp(2.2rem, 12vw, 3rem); }
        .hub-search-btn { padding: 0.45rem 0.75rem; font-size: 0.82rem; }
        .deco-mobile-1 {
            width: 50px !important;
            top: 32px !important;
            left: 4px !important;
        }
        .deco-mobile-2 {
            width: 48px !important;
            top: 30px !important;
            right: 4px !important;
        }
    }
