/* =====================================================================
   Quem Joga Hoje — main.css
   Compatible: GeneratePress (free) + LiteSpeed + Cloudflare
   Strategy: Scope mọi rule trong .qjh-* để không xung đột theme.
   Style: Verde-Amarelo (Brasil) + flat cards (border thay shadow) + Inter.
   ===================================================================== */

:root {
    /* Brasil Verde-Amarelo palette — verde Seleção + amarelo + branco */
    --qjh-bg:        #f7faf7;  /* off-white ngả xanh nhẹ — sạch, không sun-amber */
    --qjh-bg-card:   #ffffff;
    --qjh-bg-soft:   #e8f5ec;  /* mint xanh nhẹ cho legend/sidebar */
    --qjh-bg-hover:  #d6efdd;
    --qjh-bar:       #d6efdd;  /* header nhóm liga */
    --qjh-border:    #cfe5d4;  /* viền card mặc định — xanh nhẹ */
    --qjh-border-strong: #00874f; /* viền card hover/active — verde Seleção */
    --qjh-text:      #0f1f17;  /* đen xanh đậm */
    --qjh-muted:     #5c6b62;
    --qjh-primary:   #00874f;  /* verde Seleção Brasil */
    --qjh-primary-dark: #006039;
    --qjh-accent:    #ffd700;  /* vàng Brasil */
    --qjh-navy:      #0d2818;  /* xanh rừng cho top nav background */
    --qjh-navy-soft: #143822;
    --qjh-danger:    #dc2626;
    --qjh-warning:   #d97706;
    --qjh-radius:    8px;      /* nhỏ hơn cho cảm giác sharp/flat */
    /* Flat style — bỏ shadow, dùng border 1px dày hơn. Vẫn giữ var để legacy code không lỗi */
    --qjh-shadow:    none;
    --qjh-shadow-md: none;
    /* Border width chuẩn cho card */
    --qjh-border-w:  1px;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark mode — green-dark (verde rừng + xanh đen) */
        --qjh-bg:        #0c1812;
        --qjh-bg-card:   #131f17;
        --qjh-bg-soft:   #16261d;
        --qjh-bg-hover:  #1d3326;
        --qjh-bar:       #1a2e21;
        --qjh-border:    #25422f;
        --qjh-border-strong: #2ea366;
        --qjh-text:      #e8f3ec;
        --qjh-muted:     #95a89c;
        --qjh-primary:      #2ea366;
        --qjh-primary-dark: #1e7a4a;
        --qjh-accent:    #ffd700;
        --qjh-navy:      #0a1410;
        --qjh-navy-soft: #14201a;
        --qjh-danger:    #f87171;
        --qjh-warning:   #fbbf24;
        --qjh-shadow:    none;
        --qjh-shadow-md: none;
    }
}

.qjh-page {
    color: var(--qjh-text);
    background: var(--qjh-bg);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    width: 100%;
    min-height: 70vh;
    /* Tối ưu data-heavy: tabular nums cho số liệu nhất quán */
    font-feature-settings: "cv11", "ss03";
}

/* Auto-suficiência: no dark mode do SO, pinta a ÁREA DE CONTEÚDO do tema
   (não o body/cabeçalho/rodapé) p/ evitar faixas brancas ao redor do plugin
   sem quebrar o cabeçalho claro de temas que não têm dark mode. */
@media (prefers-color-scheme: dark) {
    /* Pinta o viewport inteiro (body) escuro p/ eliminar as faixas brancas
       ao redor da coluna de 600px no modo escuro. */
    body.qjh-fullwidth,
    body.qjh-fullwidth #page,
    body.qjh-fullwidth .site,
    body.qjh-fullwidth #main,
    body.qjh-fullwidth .site-content,
    body.qjh-fullwidth .content-area {
        background: var(--qjh-bg);
    }
}

/* Títulos/links do plugin sempre usam a paleta própria (impede que o tema
   force cores escuras sobre fundo escuro). */
.qjh-page h1,
.qjh-page h2,
.qjh-page h3,
.qjh-page-title { color: var(--qjh-text); }

/* ★ Reset GeneratePress sidebar/grid để plugin chiếm full width */
body .qjh-page .inside-article,
body .qjh-page .site-content,
body .qjh-page .content-area {
    padding: 0 !important;
    margin: 0 !important;
}

body.qjh-fullwidth #primary,
body.qjh-fullwidth #main,
body.qjh-fullwidth .site-content > .content-area,
body.qjh-fullwidth .qjh-page {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.qjh-fullwidth #right-sidebar,
body.qjh-fullwidth #left-sidebar {
    display: none !important;
}

/* Thu header + nav của GeneratePress về cùng khung 600px (căn giữa) cho cân đối với nội dung */
body.qjh-fullwidth .inside-header,
body.qjh-fullwidth .inside-navigation {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.qjh-container {
    max-width: 600px; /* khớp khung 600px của site (content + menu date-tabs + footer) */
    margin: 0 auto;
    padding: 0.85rem 1rem;
    width: 100%;
    box-sizing: border-box;
}

.qjh-page-title {
    margin: 0 0 0.25rem;
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qjh-page-subtitle {
    margin: 0 0 0.5rem;
    color: var(--qjh-muted);
    font-size: 0.95rem;
}

/* Page head — title + ngày + mô tả SEO */
.qjh-page-head {
    margin-bottom: 0.85rem;
}

.qjh-page-title {
    flex-wrap: wrap;
}

/* Ngày tháng bên cạnh tiêu đề */
.qjh-page-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--qjh-muted);
    text-transform: capitalize;
}
.qjh-page-date::before {
    content: '·';
    margin-right: 0.4rem;
    color: var(--qjh-border);
}

/* Đoạn mô tả từ khóa dưới tiêu đề — full chiều rộng container */
.qjh-page-desc {
    margin: 0.35rem 0 0;
    color: var(--qjh-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Thẻ đỏ báo ngoài match card */
.qjh-card__red {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    margin-left: 0.35rem;
    flex-shrink: 0;
    color: #dc2626;
}
.qjh-card__red-count {
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}
/* Đội khách: badge thẻ đỏ nằm BÊN TRÁI tên (đội nhà giữ bên phải) */
.qjh-card__team--away .qjh-card__red {
    margin-left: 0;
    margin-right: 0.35rem;
}

/* CTA khi trang ao vivo trống → quay về lịch hôm nay */
.qjh-empty-cta {
    text-align: center;
    margin-top: 1rem;
}
.qjh-empty-cta[hidden] { display: none; }
.qjh-btn-link {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--qjh-primary);
    border-radius: 99px;
    color: var(--qjh-primary);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.qjh-btn-link:hover {
    background: var(--qjh-primary);
    color: #fff;
}

/* Wrapper date-tabs toàn cục (render qua wp_body_open) — sticky bên dưới topnav.
   top được set dynamicaly bởi JS theo chiều cao thực của .qjh-topnav (vì padding
   font có thể thay đổi). Fallback CSS: 56px (tương đương 36px content + padding). */
.qjh-datetabs-wrap {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    position: sticky;
    top: var(--qjh-topnav-h, 56px);
    z-index: 95;
    background: var(--qjh-bg);
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}
.qjh-datetabs-wrap.is-stuck {
    border-bottom-color: var(--qjh-border-strong);
    box-shadow: none; /* flat */
}

/* Legenda dos ícones (trang chi tiết trận) */
.qjh-legend {
    margin: 0 0 1rem;
    background: var(--qjh-bg-soft);
    border: 1px solid var(--qjh-border);
    border-radius: var(--qjh-radius);
    padding: 0.5rem 0.9rem;
}
.qjh-legend__title {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--qjh-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    list-style: none;
}
.qjh-legend__title::-webkit-details-marker { display: none; }
.qjh-legend__list {
    list-style: none;
    margin: 0.7rem 0 0.1rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
}
.qjh-legend__item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--qjh-text);
}
.qjh-legend__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Legenda de status (1 linha) — explica as abreviações dos cards */
.qjh-status-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.9rem;
    margin: 0 0 1rem;
    padding: 0.5rem 0.9rem;
    background: var(--qjh-bg-soft);
    border: 1px solid var(--qjh-border);
    border-radius: var(--qjh-radius);
    font-size: 0.8rem;
    color: var(--qjh-muted);
    line-height: 1.4;
}
.qjh-status-legend__title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.72rem;
}
.qjh-status-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}
.qjh-status-legend__key {
    font-weight: 700;
    color: var(--qjh-text);
}
.qjh-status-legend__key.qjh-status--live { color: var(--qjh-primary); }
.qjh-status-legend__key.qjh-status--ht   { color: var(--qjh-warning); }

/* =====================================================================
   Section
   ===================================================================== */
.qjh-section {
    margin-bottom: 2rem;
}

.qjh-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--qjh-border);
}

.qjh-section__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qjh-section__count {
    background: var(--qjh-bg-soft);
    color: var(--qjh-muted);
    padding: 0.1rem 0.5rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
}

.qjh-section--live .qjh-section__count {
    background: var(--qjh-primary);
    color: #ffffff;
}

.qjh-section__link {
    color: var(--qjh-primary);
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 600;
}
.qjh-section__link:hover { text-decoration: underline; }

.qjh-section__dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--qjh-primary);
    display: inline-block;
}

.qjh-section__dot--pulse {
    animation: qjh-pulse 1.4s infinite;
}

@keyframes qjh-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.9); }
}

/* =====================================================================
   Empty / Error states
   ===================================================================== */
.qjh-empty, .qjh-error {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--qjh-muted);
    background: var(--qjh-bg-soft);
    border-radius: var(--qjh-radius);
}
.qjh-error { color: var(--qjh-danger); }

/* =====================================================================
   League group
   ===================================================================== */
.qjh-group {
    margin-bottom: 1.25rem;
    background: var(--qjh-bg);
    border: 1px solid var(--qjh-border);
    border-radius: var(--qjh-radius);
    overflow: hidden;
}

.qjh-group__header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline; /* tên giải + vòng đấu cùng đường chân chữ */
    justify-content: flex-start; /* căn TRÁI */
    gap: 0.1rem 0.5rem;
    padding: 0.55rem 0.875rem;
    background: var(--qjh-bar);
    border-bottom: 1px solid var(--qjh-border);
}

/* Tên giải (căn trái) — baseline để vòng đấu cùng đường chân chữ */
.qjh-group__main {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
}

.qjh-group__title-link, .qjh-group__title {
    color: var(--qjh-text);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qjh-group__title-link:hover { color: var(--qjh-primary); text-decoration: underline; }

/* Vòng đấu / giai đoạn — nằm cạnh tên giải, chữ nhỏ hơn */
.qjh-group__round {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--qjh-muted);
}
.qjh-group__round::before { content: '· '; }

.qjh-group__sep { opacity: 0.5; }

.qjh-group__list {
    display: flex;
    flex-direction: column;
}

/* =====================================================================
   Match card
   ===================================================================== */
.qjh-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--qjh-bg-card, #ffffff);
    border-top: 1px solid var(--qjh-border);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.qjh-card:first-child { border-top: none; }

.qjh-card:hover {
    background: var(--qjh-bg-hover);
    text-decoration: none;
}

/* Sunset accent — trận live có border-left amber dày, hover nhấc nhẹ */
.qjh-card--live {
    border-left: 3px solid var(--qjh-primary);
}
.qjh-card--live:hover {
    transform: translateX(1px);
}

.qjh-card--final {
    opacity: 0.9;
}
/* Khi cursor đặt vào, khôi phục độ tương phản đầy đủ (đặc biệt quan trọng ở dark mode) */
.qjh-card--final:hover {
    opacity: 1;
}

/* Hàng thẻ trận: [trạng thái | tên 2 đội xếp dọc | tỉ số xếp dọc] */
.qjh-card__row {
    display: grid;
    grid-template-columns: 2.7rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem 0.75rem;
    padding: 0.5rem 1rem;
}

/* Cột trạng thái (trái) — base + bù giờ xếp dọc cho gọn */
.qjh-card__state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--qjh-muted);
}
.qjh-card__state-main { display: inline-flex; align-items: center; gap: 0.2rem; white-space: nowrap; }
.qjh-card__state-stop { font-size: 0.66rem; opacity: 0.85; }
.qjh-card__state.qjh-status--live      { color: var(--qjh-primary); }
.qjh-card__state.qjh-status--ht        { color: var(--qjh-warning); }
.qjh-card__state.qjh-status--susp      { color: var(--qjh-warning); }
.qjh-card__state.qjh-status--ft        { color: var(--qjh-muted); }
.qjh-card__state.qjh-status--cancelled { color: var(--qjh-muted); }
.qjh-card__state.qjh-status--ns        { color: var(--qjh-muted); }

/* Tên 2 đội xếp dọc — full chiều ngang, không cắt bằng "…" */
.qjh-card__names {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}
.qjh-card__team-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}
.qjh-card__team-name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4rem; /* khớp chiều cao dòng với tỉ số để 2 cột thẳng hàng */
    overflow-wrap: anywhere;
}

/* Tỉ số xếp dọc tương ứng (NS để trống) */
.qjh-card__scores {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-end;
    min-width: 1.1rem;
    font-weight: 700;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}
.qjh-card__score-line { line-height: 1.4rem; }
.qjh-card__pen { font-size: 0.7rem; color: var(--qjh-muted); font-weight: 600; margin-left: 0.15rem; }

.qjh-card__dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--qjh-primary);
    box-shadow: 0 0 0 0 var(--qjh-primary);
}
.qjh-card__dot--pulse {
    animation: qjh-pulse 1.4s infinite;
}

/* =====================================================================
   Match detail page
   ===================================================================== */
.qjh-breadcrumb {
    font-size: 0.85rem;
    color: var(--qjh-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.qjh-breadcrumb a { color: var(--qjh-muted); text-decoration: none; }
.qjh-breadcrumb a:hover { color: var(--qjh-primary); }

.qjh-match__hero {
    background: var(--qjh-bg);
    border: 1px solid var(--qjh-border);
    border-radius: var(--qjh-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.qjh-match__league-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--qjh-muted);
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.qjh-match__round {
    text-transform: none;
}

.qjh-match__teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start; /* logo + DÒNG ĐẦU tên 2 đội căn bằng nhau khi tên dài xuống dòng */
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.qjh-match__team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.qjh-match__logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.qjh-match__team-name {
    margin: 0;
    font-size: 1rem;
    text-align: center;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.qjh-match__center {
    text-align: center;
    min-height: 64px; /* canh placar ngang tầm logo (logo top-align) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qjh-match__score-big {
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.qjh-match__score-sep {
    color: var(--qjh-muted);
}

.qjh-match__pen-score {
    font-size: 0.95rem;
    color: var(--qjh-muted);
    font-weight: 600;
    margin-top: 0.25rem;
}

.qjh-match__kickoff-big {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--qjh-text);
}

.qjh-match__status {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--qjh-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.qjh-match__status.is-live { color: var(--qjh-danger); }

.qjh-match__meta {
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--qjh-border);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--qjh-muted);
}

.qjh-match__meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.qjh-icon { vertical-align: middle; }

/* =====================================================================
   Events timeline
   ===================================================================== */
.qjh-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--qjh-border);
    margin-left: 1.5rem;
}

.qjh-timeline__item {
    display: grid;
    grid-template-columns: 60px 32px 1fr;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0 0.6rem 1rem;
    position: relative;
    margin-left: -2px;
    border-left: 2px solid transparent;
}

.qjh-timeline__item--home {
    border-left-color: var(--qjh-primary);
}

.qjh-timeline__item--away {
    border-left-color: var(--qjh-warning);
}

.qjh-timeline__time {
    font-size: 0.8rem;
    color: var(--qjh-muted);
    font-weight: 600;
    text-align: right;
}

.qjh-timeline__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qjh-timeline__detail {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.9rem;
}

.qjh-timeline__sub {
    font-size: 0.75rem;
    color: var(--qjh-muted);
}

/* =====================================================================
   Events timeline — phase dividers + 2 cột (home/away) + icon-only
   ===================================================================== */
.qjh-timeline2 {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

/* Phase divider (1ª Tempo / Intervalo / 2ª Tempo / Prorrogação / Pênaltis) */
.qjh-tl-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin: 1rem 0 0.5rem;
    background: var(--qjh-bg-soft);
    border: 1px dashed var(--qjh-border);
    border-radius: var(--qjh-radius);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--qjh-muted);
}

.qjh-tl-divider__sub {
    background: var(--qjh-warning);
    color: #fff;
    padding: 0.1rem 0.5rem;
    border-radius: 99px;
    font-size: 0.7rem;
    text-transform: none;
    letter-spacing: 0;
}

/* Tỉ số tại mốc kết thúc hiệp (HT / fim do tempo normal / fim da prorrogação) */
.qjh-tl-divider__score {
    background: var(--qjh-navy);
    color: var(--qjh-accent);
    padding: 0.1rem 0.6rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: none;
}

/* Row 3 cột — home | axis | away */
.qjh-tl-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: stretch;
    min-height: 56px;
}

.qjh-tl-side {
    display: flex;
    align-items: center;
    min-width: 0;
}

.qjh-tl-side--home {
    justify-content: flex-end;
}

.qjh-tl-side--away {
    justify-content: flex-start;
}

/* Event card */
.qjh-tl-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--qjh-bg);
    border: 1px solid var(--qjh-border);
    border-radius: var(--qjh-radius);
    padding: 0.6rem 0.85rem;
    box-shadow: var(--qjh-shadow);
    max-width: 100%;
}

.qjh-tl-row.is-home .qjh-tl-card {
    border-left: 3px solid var(--qjh-primary);
}

.qjh-tl-row.is-away .qjh-tl-card {
    border-right: 3px solid var(--qjh-warning);
}

.qjh-tl-row.is-home .qjh-tl-card__text {
    text-align: right;
}

.qjh-tl-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qjh-tl-card__text {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    font-size: 0.9rem;
    min-width: 0;
    line-height: 1.25;
}

/* Primary actor (scorer / sub-in) — đậm */
.qjh-tl-card__primary {
    color: var(--qjh-text);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Secondary actor (assist / sub-out) — nhạt */
.qjh-tl-card__secondary {
    color: var(--qjh-muted);
    font-size: 0.8rem;
    font-weight: 400;
}

/* Note (pen / gol contra) — nhỏ hơn, italic */
.qjh-tl-card__note {
    color: var(--qjh-muted);
    font-size: 0.7rem;
    font-style: italic;
    opacity: 0.8;
    text-transform: lowercase;
}

/* Axis trung tâm */
.qjh-tl-axis {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.qjh-tl-axis::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--qjh-border);
    transform: translateX(-50%);
}

.qjh-tl-time {
    position: relative;
    z-index: 2;
    background: var(--qjh-bg);
    border: 2px solid var(--qjh-border);
    border-radius: 99px;
    padding: 0.2rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--qjh-muted);
    min-width: 44px;
    text-align: center;
}

@media (max-width: 640px) {
    .qjh-tl-row { gap: 0.4rem; }
    .qjh-tl-card { padding: 0.4rem 0.55rem; gap: 0.45rem; }
    .qjh-tl-card__text { font-size: 0.8rem; }
    .qjh-tl-card__secondary { font-size: 0.7rem; }
    .qjh-tl-axis { min-width: 44px; }
    .qjh-tl-time { font-size: 0.7rem; padding: 0.15rem 0.45rem; min-width: 36px; }
}

/* =====================================================================
   Lineups
   ===================================================================== */
.qjh-lineups {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.qjh-lineups__team h4 {
    font-size: 0.85rem;
    color: var(--qjh-muted);
    text-transform: uppercase;
    margin: 1rem 0 0.5rem;
    letter-spacing: 0.4px;
}

.qjh-lineups__header {
    padding: 0.5rem;
    text-align: center;
    background: var(--qjh-bg-soft);
    border-radius: var(--qjh-radius);
    margin-bottom: 1rem;
}

.qjh-lineups__formation {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--qjh-primary);
}

.qjh-lineups__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.qjh-lineups__list li {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    background: var(--qjh-bg-soft);
    border-radius: 4px;
    font-size: 0.85rem;
}

.qjh-lineups__num {
    font-weight: 700;
    color: var(--qjh-primary);
    text-align: center;
}

.qjh-lineups__name {
    font-weight: 500;
}

.qjh-lineups__pos {
    font-size: 0.75rem;
    color: var(--qjh-muted);
}

.qjh-lineups__list--subs li {
    opacity: 0.75;
}

.qjh-lineups__coach {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--qjh-muted);
}

/* =====================================================================
   Statistics bars
   ===================================================================== */
.qjh-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.qjh-stat-row {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    gap: 1rem;
}

.qjh-stat-row__value {
    font-weight: 700;
    font-size: 0.95rem;
}
.qjh-stat-row__value--home { text-align: left; }
.qjh-stat-row__value--away { text-align: right; }

.qjh-stat-row__label {
    text-align: center;
    font-size: 0.75rem;
    color: var(--qjh-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.25rem;
}

.qjh-stat-row__bar {
    display: flex;
    height: 8px;
    background: var(--qjh-bg-soft);
    border-radius: 4px;
    overflow: hidden;
}

.qjh-stat-row__bar-home {
    background: var(--qjh-primary);
}

.qjh-stat-row__bar-away {
    background: var(--qjh-warning);
}

/* =====================================================================
   Prediction
   ===================================================================== */
.qjh-prediction__bar {
    display: flex;
    height: 36px;
    border-radius: var(--qjh-radius);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.qjh-prediction__seg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    transition: width 0.3s ease;
}

.qjh-prediction__seg--home { background: var(--qjh-primary); }
.qjh-prediction__seg--draw { background: var(--qjh-muted); }
.qjh-prediction__seg--away { background: var(--qjh-warning); }

.qjh-prediction__legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--qjh-muted);
    margin-bottom: 1rem;
}

.qjh-prediction__advice {
    padding: 1rem;
    background: var(--qjh-bg-soft);
    border-radius: var(--qjh-radius);
    font-size: 0.95rem;
}

/* =====================================================================
   Tables (standings + topscorers)
   ===================================================================== */
.qjh-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--qjh-border);
    border-radius: var(--qjh-radius);
    background: var(--qjh-bg);
}

.qjh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.qjh-table th,
.qjh-table td {
    padding: 0.6rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--qjh-border);
}

.qjh-table th {
    background: var(--qjh-bg-soft);
    font-weight: 600;
    color: var(--qjh-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.4px;
}

.qjh-table tbody tr:hover {
    background: var(--qjh-bg-hover);
}

.qjh-table tr:last-child td { border-bottom: none; }

.qjh-col-team {
    text-align: left !important;
    min-width: 140px;
}
.qjh-col-team img {
    vertical-align: middle;
    margin-right: 0.4rem;
}

.qjh-col-points {
    color: var(--qjh-primary);
}

.qjh-group-subtitle {
    margin: 1.5rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--qjh-muted);
}

/* =====================================================================
   League page header
   ===================================================================== */
.qjh-league-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--qjh-bg);
    border: 1px solid var(--qjh-border);
    border-radius: var(--qjh-radius);
    margin-bottom: 2rem;
}

.qjh-league-header__logo {
    flex-shrink: 0;
    object-fit: contain;
}

.qjh-league-header__info {
    flex: 1;
}

/* =====================================================================
   Top nav: Logo + site name (trái) + Ao Vivo badge (phải)
   STICKY: cố định lên đầu khi scroll qua, thêm class .is-stuck khi đã stick
   ===================================================================== */
.qjh-topnav {
    max-width: 600px;
    margin: 0 auto;
    background: var(--qjh-navy);
    border: 1px solid var(--qjh-navy);
    border-top: none;
    border-radius: 0 0 var(--qjh-radius) var(--qjh-radius);
    box-shadow: none; /* flat */
    /* Sticky: dính lên đầu khi scroll. z-index cao hơn datetabs (95). */
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.18s ease, border-bottom-color 0.18s ease;
    will-change: box-shadow;
}
/* Khi đã cuộn qua → JS gắn class .is-stuck → thêm shadow nhẹ + dải accent dày hơn */
.qjh-topnav.is-stuck {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.qjh-topnav.is-stuck::after {
    height: 3px;
}
/* Đường viền vàng Brasil mảnh ở đáy nav — accent rất rõ */
.qjh-topnav::after {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg, var(--qjh-primary) 0%, var(--qjh-accent) 100%);
    transition: height 0.18s ease;
}

.qjh-topnav__inner {
    max-width: 600px; /* khớp khung 600px của site */
    margin: 0 auto;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.qjh-topnav__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
    color: #fef7ed;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.2px;
}

.qjh-topnav__brand:hover { color: var(--qjh-accent); }

.qjh-topnav__brand-icon {
    display: inline-flex;
    align-items: center;
    color: var(--qjh-primary);
}

.qjh-topnav__brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 50%;
}

.qjh-topnav__live {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
    color: var(--qjh-accent) !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.4rem 0.85rem;
    border-radius: 99px;
    border: 1.5px solid transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.qjh-topnav__live:hover,
.qjh-topnav__live.is-active {
    border-color: var(--qjh-accent);
    background: rgba(250, 204, 21, 0.12);
}

.qjh-topnav__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.qjh-topnav__tg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #229ED2;
    text-decoration: none !important;
    border: 1.5px solid transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.qjh-topnav__tg:hover {
    border-color: #229ED2;
    background: rgba(34, 158, 210, 0.08);
}

.qjh-topnav__dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--qjh-primary);
    box-shadow: 0 0 0 0 var(--qjh-primary);
    animation: qjh-pulse 1.4s infinite;
}

.qjh-topnav__count {
    background: var(--qjh-primary);
    color: #ffffff;
    padding: 0.05rem 0.55rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .qjh-topnav__brand-name { font-size: 0.95rem; }
    .qjh-topnav__live-label { display: none; } /* Mobile: chỉ icon + count */
}

/* =====================================================================
   Date tabs (3 link Ontem/Hoje/Amanhã, segment control trước H1)
   ===================================================================== */
.qjh-datetabs {
    display: flex;
    gap: 0;
    background: var(--qjh-bar);
    border: 1px solid var(--qjh-border);
    border-radius: 99px;
    padding: 4px;
    margin-bottom: 0.85rem;
    overflow: hidden;
}

.qjh-datetabs__tab {
    flex: 1;
    text-align: center;
    padding: 0.7rem 1rem;
    text-decoration: none !important;
    color: var(--qjh-muted);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 99px;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.qjh-datetabs__tab:hover {
    color: var(--qjh-text);
}

.qjh-datetabs__tab.is-active {
    background: var(--qjh-primary);
    color: #ffffff;
    box-shadow: none; /* flat */
}

@media (max-width: 640px) {
    .qjh-datetabs__tab {
        font-size: 0.85rem;
        padding: 0.6rem 0.5rem;
    }
}

/* =====================================================================
   Nav menu enhancement (inject vào theme nav nếu có)
   ===================================================================== */
.qjh-nav-live a {
    color: var(--qjh-primary) !important;
    font-weight: 700;
}

.qjh-nav-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--qjh-primary);
    margin-right: 0.3rem;
    animation: qjh-pulse 1.4s infinite;
}

.qjh-nav-live-count {
    background: var(--qjh-primary);
    color: #ffffff;
    padding: 0.05rem 0.4rem;
    border-radius: 99px;
    font-size: 0.75rem;
    margin-left: 0.3rem;
    font-weight: 700;
}

/* =====================================================================
   Floating live button (bottom-right)
   ===================================================================== */
.qjh-float-live {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--qjh-primary);
    color: #ffffff !important;
    border: 2px solid var(--qjh-primary-dark); /* flat: dùng border thay shadow */
    border-radius: 99px;
    box-shadow: none;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform 0.15s ease, background 0.15s ease;
}
.qjh-float-live:hover {
    transform: translateY(-2px);
    background: var(--qjh-primary-dark);
    color: #ffffff !important;
}

.qjh-float-live__dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--qjh-accent); /* vàng Brasil — đối lập với verde primary */
    animation: qjh-pulse 1.4s infinite;
}

.qjh-float-live__count {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    padding: 0.05rem 0.5rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

/* =====================================================================
   Home live banner (clickable Ao Vivo header)
   ===================================================================== */
.qjh-live-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    /* Verde-amarelo gradient: verde nhạt + vàng nhạt */
    background: linear-gradient(90deg, rgba(0, 135, 79, 0.10), rgba(255, 215, 0, 0.08));
    border: 1px solid var(--qjh-border);
    border-left: 3px solid var(--qjh-primary);
    border-radius: var(--qjh-radius);
    text-decoration: none !important;
    color: var(--qjh-text) !important;
    margin-bottom: 1rem;
    transition: background 0.15s ease, transform 0.15s ease;
}
.qjh-live-banner:hover {
    background: linear-gradient(90deg, rgba(0, 135, 79, 0.18), rgba(255, 215, 0, 0.14));
    transform: translateX(1px);
}

.qjh-live-banner__dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--qjh-primary);
}

.qjh-live-banner__label {
    font-weight: 700;
    color: var(--qjh-primary-dark);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qjh-live-banner__count {
    background: var(--qjh-primary);
    color: #ffffff;
    padding: 0.1rem 0.6rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.qjh-live-banner__arrow {
    margin-left: auto;
    color: var(--qjh-primary-dark);
    font-weight: 600;
    font-size: 0.85rem;
}

/* =====================================================================
   SEO content block ("Como ler" — cuối 5 trang chính trước footer)
   ===================================================================== */
.qjh-howto {
    margin: 2rem 0 1rem;
    padding: 1.25rem 1.1rem 1rem;
    background: var(--qjh-bg-card);
    border: 1px solid var(--qjh-border);
    border-left: 3px solid var(--qjh-accent);
    border-radius: var(--qjh-radius);
    line-height: 1.65;
}
.qjh-howto__h2 {
    margin: 0 0 0.75rem;
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--qjh-text);
    letter-spacing: -0.2px;
}
.qjh-howto__h3 {
    margin: 1.3rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--qjh-primary-dark);
}
.qjh-howto p {
    margin: 0 0 0.7rem;
    color: var(--qjh-text);
    font-size: 0.95rem;
}
.qjh-howto__list {
    margin: 0 0 0.9rem;
    padding-left: 1.2rem;
    list-style: disc;
}
.qjh-howto__list li {
    margin-bottom: 0.3rem;
    color: var(--qjh-text);
    font-size: 0.93rem;
}
.qjh-howto strong {
    color: var(--qjh-primary-dark);
    font-weight: 700;
}

@media (max-width: 640px) {
    .qjh-howto { padding: 1rem 0.9rem 0.85rem; }
    .qjh-howto__h2 { font-size: 1.08rem; }
    .qjh-howto__h3 { font-size: 0.96rem; margin-top: 1.1rem; }
    .qjh-howto p, .qjh-howto__list li { font-size: 0.9rem; }
}

/* =====================================================================
   Tabs (match detail)
   ===================================================================== */
.qjh-tabs {
    margin-top: 1.5rem;
}

.qjh-tabs__nav {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--qjh-border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.qjh-tabs__btn {
    appearance: none;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.65rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--qjh-muted);
    cursor: pointer;
    margin-bottom: -2px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.qjh-tabs__btn:hover {
    color: var(--qjh-text);
}

.qjh-tabs__btn.is-active {
    color: var(--qjh-primary);
    border-bottom-color: var(--qjh-primary);
}

.qjh-tabs__count {
    background: var(--qjh-bg-soft);
    color: var(--qjh-muted);
    padding: 0.05rem 0.45rem;
    border-radius: 99px;
    font-size: 0.75rem;
}

.qjh-tabs__btn.is-active .qjh-tabs__count {
    background: var(--qjh-primary);
    color: #fff;
}

.qjh-tabs__panels {
    min-height: 100px;
}

.qjh-tabs__panel {
    display: none;
}

.qjh-tabs__panel.is-active {
    display: block;
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 768px) {
    .qjh-container { padding: 1rem 0.75rem; }
    .qjh-page-title { font-size: 1.4rem; }
    .qjh-match__teams { gap: 0.75rem; }
    .qjh-match__logo { width: 48px; height: 48px; }
    .qjh-match__center { min-height: 48px; }
    .qjh-match__team-name { font-size: 0.85rem; }
    .qjh-match__score-big { font-size: 2rem; }
    .qjh-lineups { grid-template-columns: 1fr; gap: 1rem; }
    .qjh-card__row { grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: 0.35rem 0.5rem; padding: 0.5rem 0.75rem; }
    .qjh-card__state { font-size: 0.68rem; }
    .qjh-card__team-name { font-size: 0.92rem; }
    .qjh-card__scores { font-size: 1rem; }
    .qjh-float-live {
        bottom: 16px;
        right: 16px;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .qjh-page-title { font-size: 1.2rem; }
    .qjh-stat-row { grid-template-columns: 40px 1fr 40px; gap: 0.5rem; }
    .qjh-stat-row__value { font-size: 0.85rem; }
    .qjh-timeline__item { grid-template-columns: 50px 28px 1fr; }
}


/* =====================================================================
   Palpites (trang dự đoán)
   ===================================================================== */
.qjh-palpites { display: flex; flex-direction: column; gap: 0.85rem; }

.qjh-palpite {
    background: var(--qjh-bg);
    border: 1px solid var(--qjh-border);
    border-radius: var(--qjh-radius);
    box-shadow: var(--qjh-shadow);
    padding: 0.85rem 1rem;
}
.qjh-palpite__league {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.78rem; color: var(--qjh-muted);
    text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 0.6rem;
}
.qjh-palpite__time { margin-left: auto; font-weight: 700; }

.qjh-palpite__teams {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    gap: 0.6rem; text-decoration: none; color: var(--qjh-text); margin-bottom: 0.75rem;
}
.qjh-palpite__team { display: flex; align-items: center; gap: 0.45rem; font-weight: 600; min-width: 0; }
.qjh-palpite__team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qjh-palpite__team--away { justify-content: flex-end; text-align: right; }
.qjh-palpite__vs { color: var(--qjh-muted); font-size: 0.8rem; }
.qjh-palpite__teams:hover .qjh-palpite__team span { color: var(--qjh-primary); }

.qjh-palpite__more { margin-top: 0.6rem; border-top: 1px dashed var(--qjh-border); padding-top: 0.5rem; }
.qjh-palpite__more summary {
    cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--qjh-primary);
    list-style: none;
}
.qjh-palpite__more summary::-webkit-details-marker { display: none; }
.qjh-palpite__more summary::before { content: '▸ '; }
.qjh-palpite__more[open] summary::before { content: '▾ '; }
.qjh-palpite__detail { margin-top: 0.6rem; font-size: 0.88rem; }
.qjh-palpite__detail p { margin: 0.25rem 0; }
.qjh-palpite__winner-note { color: var(--qjh-muted); font-style: italic; }

.qjh-cmp { margin-top: 0.6rem; }
.qjh-cmp__head { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--qjh-muted); margin-bottom: 0.3rem; }
.qjh-cmp__row { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; margin-top: 0.45rem; }
.qjh-cmp__label { color: var(--qjh-muted); text-transform: uppercase; letter-spacing: 0.4px; font-size: 0.68rem; }
.qjh-cmp__val { font-weight: 700; min-width: 2.6em; }
.qjh-cmp__val:last-child { text-align: right; }
.qjh-cmp__bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--qjh-bg-soft); margin-top: 2px; }
.qjh-cmp__seg--home { background: var(--qjh-primary); }
.qjh-cmp__seg--away { background: #94a3b8; }

.qjh-palpite__link {
    display: inline-block; margin-top: 0.7rem; font-size: 0.85rem; font-weight: 600;
    color: var(--qjh-primary); text-decoration: none;
}
.qjh-palpite__link:hover { text-decoration: underline; }


/* =====================================================================
   Futebol na TV (trang lịch chiếu TV)
   ===================================================================== */
.qjh-tv { display: flex; flex-direction: column; }
.qjh-tv__group {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--qjh-border);
}
.qjh-tv__time { font-weight: 800; color: var(--qjh-primary); font-size: 0.95rem; padding-top: 0.15rem; }
.qjh-tv__list { display: flex; flex-direction: column; gap: 0.7rem; }
.qjh-tv__teams { font-weight: 600; }
.qjh-tv__x { color: var(--qjh-muted); font-weight: 400; margin: 0 0.25rem; }
.qjh-tv__league { font-size: 0.78rem; color: var(--qjh-muted); margin-top: 1px; }
.qjh-tv__channels { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.qjh-tv__channel {
    background: var(--qjh-bg-soft);
    border: 1px solid var(--qjh-border);
    border-radius: 99px;
    padding: 0.12rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.qjh-tv__channels--none { color: var(--qjh-muted); font-size: 0.75rem; font-style: italic; }
@media (max-width: 640px) {
    .qjh-tv__group { grid-template-columns: 48px 1fr; gap: 0.5rem; }

    /* Legenda de status — grade de 2 colunas alinhada no mobile */
    .qjh-status-legend {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem 0.75rem;
        font-size: 0.78rem;
    }
    .qjh-status-legend__title {
        grid-column: 1 / -1;
        margin-bottom: 0.1rem;
    }
    .qjh-status-legend__item {
        white-space: normal;
    }
}

/* =====================================================================
   Shell 2 cột: sidebar điều hướng league (trái) + nội dung (phải)
   Item 3 — hiển thị trên mọi trang plugin.
   ===================================================================== */
.qjh-shell {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    align-items: start;
}
/* Khi tắt sidebar trong settings → nội dung chiếm full chiều rộng */
.qjh-shell--no-side {
    grid-template-columns: minmax(0, 1fr);
}
.qjh-shell__main { min-width: 0; }
.qjh-shell__side {
    position: sticky;
    top: 8px;
    align-self: start;
    max-height: calc(100vh - 16px);
    overflow: auto;
    padding: 1.25rem 0 1.25rem 0.75rem;
}

.qjh-leaguenav__group { margin-bottom: 1rem; }
.qjh-leaguenav__title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--qjh-muted);
    margin: 0 0 0.4rem;
    padding-left: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.qjh-leaguenav__star { color: var(--qjh-warning); flex-shrink: 0; }
.qjh-leaguenav__list { display: flex; flex-direction: column; gap: 1px; }
.qjh-leaguenav__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: var(--qjh-radius);
    text-decoration: none !important;
    color: var(--qjh-text);
    font-size: 0.85rem;
    line-height: 1.2;
}
.qjh-leaguenav__item:hover { background: var(--qjh-bg-hover); }
.qjh-leaguenav__item.is-current {
    background: rgba(22, 163, 74, 0.10);
    color: var(--qjh-primary);
    font-weight: 700;
}
.qjh-leaguenav__group--hot .qjh-leaguenav__item {
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid var(--qjh-warning);
    border-radius: 0 var(--qjh-radius) var(--qjh-radius) 0;
    font-weight: 700;
}
.qjh-leaguenav__group--hot .qjh-leaguenav__item:hover {
    background: rgba(245, 158, 11, 0.16);
}
.qjh-leaguenav__group--hot .qjh-leaguenav__item.is-current {
    border-left-color: var(--qjh-primary);
}
.qjh-leaguenav__logo {
    width: 20px; height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}
.qjh-leaguenav__logo--ph {
    border-radius: 50%;
    background: var(--qjh-border);
}
.qjh-leaguenav__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Phần còn lại gom theo quốc gia — khối thu gọn (collapsible) */
.qjh-leaguenav__country { border-bottom: 1px solid var(--qjh-border); }
.qjh-leaguenav__country:last-child { border-bottom: none; }
.qjh-leaguenav__country-sum {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--qjh-text);
    list-style: none;
    border-radius: var(--qjh-radius);
}
.qjh-leaguenav__country-sum::-webkit-details-marker { display: none; }
.qjh-leaguenav__country-sum:hover { background: var(--qjh-bg-hover); }
.qjh-leaguenav__country-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qjh-leaguenav__country-count {
    font-size: 0.7rem;
    color: var(--qjh-muted);
    background: var(--qjh-bg-soft);
    border-radius: 99px;
    padding: 0.05rem 0.45rem;
}
.qjh-leaguenav__country-sum::after {
    content: '';
    width: 7px; height: 7px;
    border-right: 2px solid var(--qjh-muted);
    border-bottom: 2px solid var(--qjh-muted);
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
.qjh-leaguenav__country[open] > .qjh-leaguenav__country-sum::after { transform: rotate(45deg); }
.qjh-leaguenav__list--sub { padding-left: 0.5rem; }
.qjh-leaguenav__list--sub .qjh-leaguenav__item { font-size: 0.82rem; padding: 0.3rem 0.5rem; }

/* Dropdown chọn league: ẩn trên desktop, chỉ hiện ở mobile */
.qjh-leaguenav__select { display: none; }
.qjh-leaguenav__countries { display: block; }

/* =====================================================================
   Khối mạng xã hội cuối trang — Item 4
   ===================================================================== */
.qjh-social {
    border-top: 1px solid var(--qjh-border);
    margin-top: 1.5rem;
    padding: 1.5rem 0;
    background: var(--qjh-bg-soft);
}

/* Footer plugin — link About/Termos/Privacidade + copyright */
.qjh-footer {
    border-top: 1px solid var(--qjh-border);
    background: var(--qjh-bar);
    padding: 1.1rem 0;
}
.qjh-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}
.qjh-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.2rem;
}
.qjh-footer__link {
    color: var(--qjh-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}
.qjh-footer__link:hover { color: var(--qjh-primary); text-decoration: underline; }
.qjh-footer__copy {
    margin: 0;
    font-size: 0.82rem;
    color: var(--qjh-muted);
}
.qjh-social__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.85rem;
    text-align: center;
}
.qjh-social__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}
.qjh-social__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    border-radius: 99px;
    background: var(--qjh-bg);
    border: 1px solid var(--qjh-border);
    color: var(--qjh-text);
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.qjh-social__link:hover { transform: translateY(-1px); }
.qjh-social__link--facebook:hover  { border-color: #1877F2; color: #1877F2; }
.qjh-social__link--instagram:hover { border-color: #E1306C; color: #E1306C; }
.qjh-social__link--x:hover         { border-color: var(--qjh-text); }
.qjh-social__link--youtube:hover   { border-color: #FF0000; color: #FF0000; }
.qjh-social__link--telegram:hover  { border-color: #229ED2; color: #229ED2; }

/* ===== Social + footer trên trang WP tĩnh (Sobre/Termos/Privacidade) =====
   Render qua hook (ngoài .entry-content) nên cần tự canh khung 600px.
   Bỏ box xám nặng của social để nhẹ, liền mạch — chỉ còn 1 dải footer rõ ràng. */
.qjh-static-chrome {
    max-width: 600px;
    margin: 2rem auto 0;
    width: 100%;
    box-sizing: border-box;
}
.qjh-static-chrome .qjh-social {
    background: transparent;
    margin-top: 0;
    padding: 1.25rem 0 1rem;
}

/* ===== Responsive: mobile → sidebar thành dải chip cuộn ngang trên đầu ===== */
@media (max-width: 900px) {
    .qjh-shell { display: block; }
    .qjh-shell__side {
        position: static;
        max-height: none;
        overflow: visible;
        padding: 0.75rem;
    }
    .qjh-leaguenav__group { margin-bottom: 0.5rem; }
    /* Chỉ nhóm "Em destaque" cuộn ngang dạng chip; các quốc gia vẫn list dọc */
    .qjh-leaguenav__group--hot .qjh-leaguenav__list {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.4rem;
        padding-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
    }
    .qjh-leaguenav__group--hot .qjh-leaguenav__item {
        flex: 0 0 auto;
        padding: 0.35rem 0.7rem;
    }
    .qjh-leaguenav__name { max-width: 160px; }

    /* Mobile: phần không-hot dùng dropdown cho gọn, ẩn list quốc gia */
    .qjh-leaguenav__select {
        display: block;
        width: 100%;
        padding: 0.55rem 0.7rem;
        font-size: 0.9rem;
        color: var(--qjh-text);
        background: var(--qjh-bg);
        border: 1px solid var(--qjh-border);
        border-radius: var(--qjh-radius);
        box-sizing: border-box;
    }
    .qjh-leaguenav__countries { display: none; }
}

/* =====================================================================
   League fixtures list — gom nhóm theo ngày (tab Próximos / Resultados)
   ===================================================================== */
.qjh-datelist__group { margin-bottom: 1.25rem; }
.qjh-datelist__date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--qjh-muted);
    text-transform: capitalize;
    margin: 0 0 0.5rem;
    padding: 0.35rem 0.6rem;
    background: var(--qjh-bg-soft);
    border-radius: var(--qjh-radius);
}
.qjh-datelist__items { display: flex; flex-direction: column; gap: 0.4rem; 