.fgh{--fgh-fg:var(--ink,#0f0f0f);--fgh-sub:var(--muted,#606060);--fgh-bg2:var(--panel,#f2f2f2);--fgh-line:var(--line,#e5e5e5);--fgh-acc:var(--pink,#ff0033);--fgh-on:var(--bg,#fff);--fgh-link:var(--cyan,#065fd4);font-family:inherit;color:var(--fgh-fg);box-sizing:border-box}
.fgh *{box-sizing:border-box}
.fgh a{color:inherit;text-decoration:none}
.fgh button{font:inherit;cursor:pointer}
.fgh-sub{color:var(--fgh-sub);font-size:13px;line-height:1.4}
.fgh-empty{color:var(--fgh-sub);padding:24px 0}
.fgh-av{border-radius:50%;flex:0 0 auto;object-fit:cover;background:var(--fgh-bg2)}
.fgh-av-txt{display:inline-flex;align-items:center;justify-content:center;background:#c00;color:#fff;font-weight:700}

/* toolbar + chips */
.fgh-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.fgh-search{flex:1 1 260px;padding:10px 16px;border:1px solid var(--fgh-line);border-radius:40px;font-size:15px;background:transparent;color:inherit}
.fgh-toolbar select{padding:9px 12px;border:1px solid var(--fgh-line);border-radius:20px;background:transparent;color:inherit}
.fgh-chips{display:flex;gap:10px;overflow-x:auto;padding:4px 0 14px;scrollbar-width:none}
.fgh-chips::-webkit-scrollbar{display:none}
.fgh-chip{white-space:nowrap;border:0;border-radius:8px;padding:7px 12px;background:var(--fgh-bg2);color:var(--fgh-fg);font-size:14px;font-weight:500}
.fgh-chip.on{background:var(--fgh-fg);color:var(--fgh-on)}

/* grid */
.fgh-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr));gap:32px 16px}
.fgh-card{display:block}
.fgh-thumb{position:relative;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:var(--fgh-bg2)}
.fgh-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s}
@media (hover:hover){.fgh-card:hover .fgh-thumb img{transform:scale(1.04)}}
.fgh-badge{position:absolute;right:8px;bottom:8px;background:rgba(0,0,0,.8);color:#fff;font-size:11px;font-weight:700;padding:2px 6px;border-radius:4px}
.fgh-meta{display:flex;gap:12px;margin-top:12px}
.fgh-title{font-size:16px;font-weight:600;line-height:1.35;margin:0 0 4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.fgh-more-wrap{text-align:center;margin:28px 0}
.fgh-more,.fgh-btn,.fgh-like{border:0;border-radius:20px;padding:9px 18px;background:var(--fgh-bg2);color:var(--fgh-fg);font-weight:500;display:inline-flex;align-items:center;gap:6px}
.fgh-more:hover,.fgh-btn:hover,.fgh-like:hover{filter:brightness(.93)}
.fgh-like.on{background:var(--fgh-fg);color:var(--fgh-on)}
.fgh-grid.loading{opacity:.5;pointer-events:none}

/* watch page */
.fgh-watch{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:24px;max-width:1700px;margin:0 auto;padding:24px}
@media (max-width:1000px){.fgh-watch{grid-template-columns:1fr;padding:12px}}
.fgh-player{position:relative;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#000}
.fgh-player.is-short{aspect-ratio:9/16;max-height:80vh;margin:0 auto;max-width:calc(80vh*9/16)}
.fgh-player iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.fgh-watch-title{font-size:20px;font-weight:700;margin:12px 0 8px;line-height:1.35}
.fgh-watch-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.fgh-owner{display:flex;align-items:center;gap:12px}
.fgh-subscribe{background:var(--fgh-fg);color:var(--fgh-on)!important;border-radius:20px;padding:9px 16px;font-weight:600;font-size:14px;margin-left:8px}
.fgh-actions{display:flex;gap:8px;flex-wrap:wrap}
.fgh-desc{background:var(--fgh-bg2);border-radius:12px;padding:12px;margin:12px 0 24px;font-size:14px}
.fgh-desc-body{max-height:4.5em;overflow:hidden;white-space:pre-line;word-break:break-word}
.fgh-desc-body p{margin:0 0 .6em}
.fgh-desc.open .fgh-desc-body{max-height:none}
.fgh-desc-toggle{border:0;background:none;font-weight:700;padding:6px 0 0;color:inherit}
.fgh-desc a{color:var(--fgh-link)}
.fgh-watch-side{display:flex;flex-direction:column;gap:10px}
.fgh-side-card{display:grid;grid-template-columns:168px 1fr;gap:8px}
.fgh-side-card img{width:168px;aspect-ratio:16/9;object-fit:cover;border-radius:8px}
.fgh-side-card .fgh-title{font-size:14px}
.fgh-back{font-weight:600;margin-bottom:6px;display:inline-block}

/* comments (theme markup) */
.fgh-comments .comment-list{list-style:none;padding:0}
.fgh-comments .comment-body{padding:10px 0;border-bottom:1px solid var(--fgh-line)}
.fgh-comments textarea,.fgh-comments input[type=text],.fgh-comments input[type=email],.fgh-comments input[type=url]{width:100%;border:1px solid var(--fgh-line);border-radius:8px;padding:10px;font:inherit}
.fgh-comments input[type=submit]{background:var(--fgh-acc);color:#fff;border:0;border-radius:20px;padding:9px 18px;font-weight:600;cursor:pointer}

/* community */
.fgh-community{max-width:1000px;margin:0 auto}
.fgh-tabs{display:flex;gap:8px;margin-bottom:16px;border-bottom:1px solid var(--fgh-line)}
.fgh-tab{border:0;background:none;padding:10px 16px;font-weight:600;color:var(--fgh-sub);border-bottom:3px solid transparent}
.fgh-tab.on{color:var(--fgh-fg);border-color:var(--fgh-fg)}
.fgh-pane{display:none}.fgh-pane.on{display:block}
.fgh-newtopic{background:var(--fgh-bg2);border-radius:12px;padding:12px 16px;margin-bottom:16px}
.fgh-newtopic summary{font-weight:700;cursor:pointer}
.fgh-topic-form,.fgh-chat-form{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.fgh-topic-form input,.fgh-topic-form textarea,.fgh-chat-form input{border:1px solid var(--fgh-line);border-radius:8px;padding:10px;font:inherit;background:var(--fgh-bg2);color:var(--fgh-fg)}
.fgh-topic-form button,.fgh-chat-form button{align-self:flex-start;background:var(--fgh-acc);color:#fff;border:0;border-radius:20px;padding:9px 20px;font-weight:600}
.fgh-hp{position:absolute!important;left:-9999px!important;height:0;width:0;opacity:0}
.fgh-topics{list-style:none;padding:0;margin:0}
.fgh-topics li{padding:14px 4px;border-bottom:1px solid var(--fgh-line);display:flex;flex-direction:column;gap:2px}
.fgh-topics li a:hover b{color:var(--fgh-link)}
.fgh-chat-log{height:460px;overflow-y:auto;border:1px solid var(--fgh-line);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:8px;background:var(--fgh-bg2)}
.fgh-chat-row{font-size:14px;line-height:1.4;word-break:break-word}
.fgh-chat-row b{margin-right:6px}
.fgh-chat-row b.m{color:var(--fgh-link)}
.fgh-chat-row time{color:var(--fgh-sub);font-size:11px;margin-right:6px}
.fgh-chat-form{flex-direction:row;flex-wrap:wrap}
.fgh-chat-form input[name=msg]{flex:1 1 240px}
.fgh-chat-name{flex:0 0 140px}
.fgh-login{background:var(--fgh-bg2);padding:12px 16px;border-radius:12px}
.fgh-login a{color:var(--fgh-link)!important;font-weight:600}
.fgh-topic{max-width:900px;margin:0 auto;padding:24px 12px}
.fgh-topic-post h1{font-size:24px;margin:8px 0}
.fgh-topic-body{margin:16px 0;font-size:16px;line-height:1.6}
.fgh-msg{font-size:13px;color:var(--fgh-sub)}

/* v1.1: breadcrumb, video facts, channel page */
.fgh-crumbs{font-size:13px;color:var(--fgh-sub);margin:0 0 10px}
.fgh-crumbs a:hover{text-decoration:underline}
.fgh-facts{border:1px solid var(--fgh-line);border-radius:12px;padding:12px 16px;margin:0 0 24px;font-size:14px}
.fgh-facts h2{font-size:16px;margin:0 0 8px}
.fgh-facts dl{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:0}
.fgh-facts dt{color:var(--fgh-sub)}
.fgh-facts dd{margin:0;word-break:break-word}
.fgh-facts a{color:var(--fgh-link)}
.fgh-side-h{font-size:15px;margin:0 0 10px}
.fgh-channel-page{max-width:1400px;margin:0 auto;padding:16px}
.fgh-ch-head{display:flex;gap:20px;align-items:center;margin:8px 0 24px}
.fgh-ch-head h1{font-size:28px;margin:0 0 4px}
.fgh-ch-desc{color:var(--fgh-sub);font-size:14px;margin:8px 0 12px;max-width:760px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.fgh-ch-head .fgh-subscribe{display:inline-block}
@media (max-width:600px){.fgh-ch-head{flex-direction:column;align-items:flex-start}.fgh-facts dl{grid-template-columns:1fr}}

/* v1.1.1: thân thiện điện thoại / máy tính bảng / PC */
.fgh{max-width:100%;overflow-wrap:anywhere;-webkit-text-size-adjust:100%}
.fgh img{max-width:100%;height:auto}
.fgh-thumb img{height:100%}
.fgh button,.fgh-btn,.fgh-chip,.fgh-subscribe,.fgh-more{min-height:40px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.fgh input,.fgh select,.fgh textarea{font-size:16px;max-width:100%} /* 16px: iPhone không tự phóng to khi gõ */
.fgh-subscribe{display:inline-flex;align-items:center;white-space:nowrap}
.fgh-owner{min-width:0}
.fgh-owner b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:46vw}
@media (min-width:1600px){.fgh-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media (min-width:1000px) and (max-width:1300px){.fgh-watch{grid-template-columns:minmax(0,1fr) 340px}}
@media (min-width:1000px){.fgh-watch-side{position:sticky;top:16px;align-self:start;max-height:calc(100vh - 32px);overflow-y:auto;scrollbar-width:thin}}

/* máy tính bảng */
@media (max-width:1000px){
	.fgh-watch-side{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(320px,100%),1fr));gap:12px}
	.fgh-watch-side .fgh-side-h,.fgh-watch-side .fgh-back{grid-column:1/-1}
}

/* điện thoại */
@media (max-width:640px){
	.fgh-grid{gap:20px 12px}
	.fgh-toolbar{gap:6px}
	.fgh-search{flex:1 1 100%}
	.fgh-toolbar select{flex:1 1 0;min-width:0}
	.fgh-chips{margin:0 -12px;padding:4px 12px 12px;scroll-snap-type:x proximity}
	.fgh-chip{scroll-snap-align:start}
	.fgh-meta{gap:10px;margin-top:10px}
	.fgh-title{font-size:15px}

	.fgh-watch{padding:0 0 16px;gap:16px}
	.fgh-watch-main,.fgh-watch-side{padding:0 12px}
	.fgh-watch .fgh-crumbs{padding-top:10px}
	.fgh-player{border-radius:0;margin:0 -12px}
	.fgh-player.is-short{max-height:78svh;max-width:min(100vw,calc(78svh*9/16));margin:0 auto;border-radius:12px}
	.fgh-watch-title{font-size:18px}
	.fgh-watch-bar{flex-direction:column;align-items:stretch}
	.fgh-owner{justify-content:space-between}
	.fgh-owner .fgh-subscribe{margin-left:auto}
	.fgh-actions{flex-wrap:nowrap;overflow-x:auto;margin:0 -12px;padding:0 12px 4px;scrollbar-width:none}
	.fgh-actions::-webkit-scrollbar{display:none}
	.fgh-actions>*{flex:0 0 auto}
	.fgh-side-card{grid-template-columns:140px 1fr}
	.fgh-side-card img{width:140px}

	.fgh-channel-page{padding:12px}
	.fgh-ch-head{gap:12px}
	.fgh-ch-head h1{font-size:22px}

	.fgh-tabs{overflow-x:auto}
	.fgh-chat-log{height:58svh}
	.fgh-chat-form{position:sticky;bottom:0;background:var(--fgh-bg2);padding:8px;border-radius:12px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
	.fgh-chat-name{flex:1 1 100%}
	.fgh-topic{padding:12px}
	.fgh-topic-post h1{font-size:20px}
	.fgh-topic-form button,.fgh-chat-form button{align-self:stretch}
}
@media (prefers-reduced-motion:reduce){.fgh *{transition:none!important}}

/* v1.1.2: trang Hub bọc trong giao diện Flixgo */
main.fgh{width:100%}
main.fgh:not(.fgh-watch){display:block}
.fgh .fgh-av{align-self:flex-start;flex:0 0 auto;object-fit:cover;max-width:none}
.fgh-page{max-width:1700px;margin:0 auto;padding:24px 16px 48px}
.fgh-page-title{font-size:28px;margin:0 0 16px}
.fgh-watch,.fgh-channel-page,.fgh-topic,.fgh-page{position:relative;z-index:1}
@media (max-width:640px){.fgh-page{padding:12px 12px 32px}.fgh-page-title{font-size:22px}}

/* v1.2: ranking, forum boards, news */
.fgh-btn-acc{background:var(--fgh-acc)!important;color:#fff!important}
.fgh-pill{display:inline-block;background:var(--fgh-acc);color:#fff;font-size:12px;font-weight:700;padding:3px 10px;border-radius:20px}
.fgh-rank-feat{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:20px;align-items:center;background:var(--fgh-bg2);border-radius:16px;overflow:hidden;margin:12px 0 28px}
.fgh-rank-feat img{width:100%;height:100%;object-fit:cover;aspect-ratio:16/9;display:block}
.fgh-rank-feat-body{padding:16px 20px 16px 0}
.fgh-rank-feat h2{font-size:26px;margin:8px 0}
.fgh-rank-stats{font-size:15px;margin-bottom:14px}
.fgh-rank-stats b{font-size:22px}
.fgh-rank-btns{display:flex;gap:8px;flex-wrap:wrap}
.fgh-rank-h{font-size:22px;margin:0 0 12px}
.fgh-rank-list{list-style:none;padding:0;margin:0 0 16px;display:flex;flex-direction:column;gap:10px}
.fgh-rank-item{display:grid;grid-template-columns:64px 72px minmax(0,1fr) auto;gap:14px;align-items:center;padding:10px 12px;border:1px solid var(--fgh-line);border-radius:14px}
.fgh-rank-item img{width:72px;height:72px;border-radius:14px;object-fit:cover}
.fgh-rank-no{font-size:22px;font-weight:800;text-align:center;line-height:1.1}
.fgh-rank-info h3{font-size:17px;margin:0 0 4px}
.fgh-rank-info a:hover{text-decoration:underline}
.fgh-delta,.fgh-move,.fgh-new{font-size:12px;font-weight:700;white-space:nowrap}
.fgh-delta.up,.fgh-move.up{color:#0a8f3c}.fgh-delta.down,.fgh-move.down{color:#c62828}
.fgh-move,.fgh-new{display:block}
.fgh-new{color:var(--fgh-acc)}
.fgh-boards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr));gap:12px;margin:0 0 24px}
.fgh-board-card{display:block;border:1px solid var(--fgh-line);border-radius:14px;padding:14px 16px;background:var(--fgh-bg2)}
.fgh-board-card.is-main{border:2px solid var(--fgh-acc)}
.fgh-board-card h3{margin:0 0 6px;font-size:18px}
.fgh-board-card p{margin:0 0 8px}
.fgh-board-meta{font-size:12px;color:var(--fgh-sub)}
.fgh-board-head h1{margin:0 0 6px}
.fgh-board-links{display:flex;gap:8px;flex-wrap:wrap}
.fgh-topic-row.is-pin{background:var(--fgh-bg2);border-radius:8px}
.fgh-topic-row a:hover b{color:var(--fgh-link)}
.fgh-topic-form select{border:1px solid var(--fgh-line);border-radius:8px;padding:10px;font:inherit;background:var(--fgh-bg2);color:var(--fgh-fg)}
.fgh-article{max-width:860px}
.fgh-article h1{font-size:32px;line-height:1.25;margin:4px 0 8px}
.fgh-article-meta{margin-bottom:16px}
.fgh-article-meta a{color:var(--fgh-link)}
.fgh-article-img{width:100%;border-radius:14px;margin:0 0 16px;aspect-ratio:16/9;object-fit:cover}
.fgh-article-body{font-size:17px;line-height:1.7}
.fgh-article-body h2{font-size:23px;margin:28px 0 10px}
.fgh-article-body h3{font-size:19px;margin:22px 0 8px}
.fgh-article-body a{color:var(--fgh-link);text-decoration:underline}
.fgh-article-body table{border-collapse:collapse;width:100%;display:block;overflow-x:auto}
.fgh-article-body td,.fgh-article-body th{border:1px solid var(--fgh-line);padding:8px}
.fgh-article-cta{display:flex;gap:8px;flex-wrap:wrap;margin:24px 0;padding:16px;border-radius:14px;background:var(--fgh-bg2)}
.fgh-news-card .fgh-title{margin-top:10px}
.fgh-news-ex{margin:6px 0 0}
@media (max-width:760px){
	.fgh-rank-feat{grid-template-columns:1fr}
	.fgh-rank-feat-body{padding:0 16px 16px}
	.fgh-rank-feat h2{font-size:22px}
	.fgh-rank-item{grid-template-columns:44px 56px minmax(0,1fr);gap:10px}
	.fgh-rank-item img{width:56px;height:56px}
	.fgh-rank-no{font-size:18px}
	.fgh-rank-play{display:none!important}
	.fgh-article h1{font-size:25px}
	.fgh-article-body{font-size:16px}
	.fgh-article-cta .fgh-btn{flex:1 1 100%;justify-content:center}
}

/* v1.2.2: theo màu giao diện (nền tối mặc định / nền sáng) */
.fgh h1,.fgh h2,.fgh h3,.fgh-page-title,.fgh-watch-title{color:var(--fgh-fg)}
.fgh-search,.fgh-toolbar select,.fgh select,.fgh input,.fgh textarea{color:var(--fgh-fg);background-color:var(--fgh-bg2)}
.fgh select option{background:var(--fgh-bg2);color:var(--fgh-fg)}
.fgh-search::placeholder,.fgh input::placeholder,.fgh textarea::placeholder{color:var(--fgh-sub);opacity:1}
.fgh-chip,.fgh-more,.fgh-btn,.fgh-like{border:1px solid var(--fgh-line)}
.fgh-card .fgh-title{color:var(--fgh-fg)}
.fgh-desc,.fgh-facts,.fgh-rank-feat,.fgh-board-card,.fgh-newtopic,.fgh-login,.fgh-article-cta{color:var(--fgh-fg)}
.fgh-comments,.fgh-comments a{color:var(--fgh-fg)}
.fgh-comments .comment-meta,.fgh-comments .comment-metadata a{color:var(--fgh-sub)}
.fgh-comments textarea,.fgh-comments input[type=text],.fgh-comments input[type=email],.fgh-comments input[type=url]{background:var(--fgh-bg2);color:var(--fgh-fg)}
/* v1.3: đa ngôn ngữ */
.fgh-tr-links{padding:0 0 12px}
.fgh-lang-tabs{padding-bottom:16px}
.fgh-news-pane[hidden]{display:none}
.fgh-sources{font-size:14px}
.fgh-article-body iframe,.fgh-article-body .wp-block-embed,.fgh-article-body .twitter-tweet{max-width:100%;margin:16px auto}
.fgh-article-body img{max-width:100%;height:auto;border-radius:10px}
.fgh-article-body blockquote{border-left:4px solid var(--fgh-acc);margin:16px 0;padding:4px 16px;color:var(--fgh-sub)}
.fgh-article-body figcaption{font-size:13px;color:var(--fgh-sub);text-align:center}
