/*
Theme Name: MobiTV Esports
Theme URI: https://mobitv.net.vn
Author: MobiTV
Description: Theme tin tức game phong cách esports cho GenZ (13-20 tuổi): nền đen mực, một màu accent vàng chanh, góc vát HUD, chữ condensed, bảng xếp hạng bài nổi bật. Không gradient, không glow.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: mobitv-genz
*/

:root {
  --ink: #0a0b0f;
  --panel: #12141b;
  --panel-2: #1a1d27;
  --line: #2a2e3b;
  --fg: #f2f4f8;
  --soft: #9aa1b2;
  --acid: #d9ff3f;
  --on-acid: #0a0b0f;
  --hot: #ff3d3d;
  --f-display: 'Chakra Petch', 'Arial Narrow', sans-serif;
  --f-body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --cut: 14px;
  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--fg); font: 400 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: .01em; }
p { margin: 0 0 1em; }
::selection { background: var(--acid); color: var(--on-acid); }
:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }
.screen-reader-text, .skip-link:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; background: var(--acid); color: var(--on-acid); padding: 10px 16px; font-weight: 700; }
.wrap { width: min(100% - var(--gut) * 2, var(--wrap)); margin-inline: auto; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; flex: none; }

/* ---------- Ticker ---------- */
.ticker { background: var(--acid); color: var(--on-acid); font: 600 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .04em; overflow: hidden; }
.ticker__row { display: flex; align-items: stretch; height: 32px; }
.ticker__label { display: flex; align-items: center; gap: 8px; padding: 0 16px 0 0; background: var(--ink); color: var(--acid); padding-left: var(--gut); clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); padding-right: 22px; flex: none; }
.ticker__label i { width: 8px; height: 8px; background: var(--hot); animation: blink 1.2s steps(2) infinite; }
.ticker__track { flex: 1; overflow: hidden; display: flex; align-items: center; }
.ticker__move { display: flex; gap: 40px; white-space: nowrap; padding-left: 24px; animation: tick 45s linear infinite; }
.ticker__track:hover .ticker__move { animation-play-state: paused; }
.ticker__move a:hover { text-decoration: underline; }
.ticker__move span::before { content: '//'; margin-right: 40px; opacity: .5; }
@keyframes tick { to { transform: translateX(-50%); } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); border-bottom: 1px solid var(--line); }
.site-header__row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 26px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; font-style: italic; }
.brand b { color: var(--acid); }
.brand__mark { width: 30px; height: 30px; background: var(--acid); color: var(--on-acid); display: grid; place-items: center; clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%); }
.brand__mark svg { width: 14px; height: 14px; fill: currentColor; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a { display: flex; align-items: center; min-height: 44px; padding: 0 16px; font: 600 14px/1 var(--f-display); text-transform: uppercase; letter-spacing: .08em; color: var(--soft); position: relative; transition: color .2s; }
.nav a::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: 6px; height: 3px; background: var(--acid); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav a:hover, .nav .current-menu-item > a, .nav .current-cat > a { color: var(--fg); }
.nav a:hover::after, .nav .current-menu-item > a::after, .nav .current-cat > a::after { transform: scaleX(1); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 1px solid var(--line); color: var(--fg); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.icon-btn:hover { background: var(--acid); color: var(--on-acid); border-color: var(--acid); }
.menu-toggle { display: none; }
.search-panel { display: none; padding: 0 0 16px; }
.search-panel.is-open { display: block; }

.searchform { display: flex; max-width: 640px; }
.searchform input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; background: var(--panel); border: 1px solid var(--line); border-right: 0; color: var(--fg); font: inherit; border-radius: 0; }
.searchform input:focus { outline: none; border-color: var(--acid); }
.searchform button { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 20px; background: var(--acid); color: var(--on-acid); border: 0; font: 700 14px var(--f-display); text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }
.searchform button:hover { background: var(--fg); }

/* ---------- Shared bits ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 26px; background: var(--acid); color: var(--on-acid); font: 700 14px/1 var(--f-display); text-transform: uppercase; letter-spacing: .1em; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); transition: background .2s, transform .2s var(--ease); cursor: pointer; border: 0; }
.btn:hover { background: var(--fg); transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }
.cat-tag { display: inline-block; padding: 5px 14px 5px 10px; background: var(--acid); color: var(--on-acid); font: 700 12px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: .1em; clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 500 12px/1.4 var(--f-mono); color: var(--soft); text-transform: uppercase; letter-spacing: .03em; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta .icon { width: 14px; height: 14px; }
.section-head { display: flex; align-items: center; gap: 16px; margin: 56px 0 24px; }
.section-head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); text-transform: uppercase; letter-spacing: .04em; }
.section-head::before { content: ''; width: 12px; height: 28px; background: var(--acid); transform: skewX(-18deg); flex: none; }
.section-head::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- Hero + ranking ---------- */
.top { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 24px; margin-top: 28px; }
.hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(380px, 52vw, 560px); background: var(--panel); overflow: hidden; clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 40px 100%, 0 calc(100% - 40px)); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.hero:hover .hero__img { transform: scale(1.03); }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 11, 15, .96) 0%, rgba(10, 11, 15, .6) 45%, rgba(10, 11, 15, 0) 75%); pointer-events: none; }
.hero__body { position: relative; z-index: 2; padding: clamp(20px, 4vw, 44px); max-width: 780px; }
.hero__kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.hero__kicker .meta { color: var(--fg); }
.hero__title { font-size: clamp(1.7rem, 4.2vw, 3rem); margin-bottom: 14px; text-wrap: balance; }
.hero__title a { background: linear-gradient(var(--acid), var(--acid)) 0 100% / 0 3px no-repeat; transition: background-size .35s var(--ease); }
.hero__title a:hover { background-size: 100% 3px; }
.hero__title a::after { content: ''; position: absolute; inset: 0; z-index: 3; }
.hero__excerpt { color: #c8cedb; max-width: 60ch; margin-bottom: 20px; }
.hero .btn { position: relative; z-index: 4; }
.hero__bar { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--acid); z-index: 3; }

.rank { background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; }
.rank__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); font: 700 13px var(--f-display); text-transform: uppercase; letter-spacing: .14em; color: var(--acid); }
.rank__head span:last-child { color: var(--soft); font: 500 11px var(--f-mono); letter-spacing: .04em; }
.rank__item { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; flex: 1; padding: 16px 20px; border-bottom: 1px solid var(--line); transition: background .2s; }
.rank__item:last-child { border-bottom: 0; }
.rank__item:hover { background: var(--panel-2); }
.rank__item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--acid); transform: scaleY(0); transition: transform .25s var(--ease); }
.rank__item:hover::before { transform: scaleY(1); }
.rank__no { font: 700 40px/1 var(--f-display); font-style: italic; color: transparent; -webkit-text-stroke: 1.5px var(--soft); transition: color .2s, -webkit-text-stroke-color .2s; }
.rank__item:hover .rank__no { color: var(--acid); -webkit-text-stroke-color: var(--acid); }
.rank__title { font-size: 1rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }
.rank__title a::after { content: ''; position: absolute; inset: 0; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); transition: transform .25s var(--ease), border-color .25s; }
.card::after { content: ''; position: absolute; left: -1px; right: -1px; bottom: -1px; height: 4px; background: var(--acid); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.card:hover { transform: translateY(-4px); border-color: var(--soft); }
.card:hover::after { transform: scaleX(1); }
.card__thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--panel-2); clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__thumb img { transform: scale(1.05); }
.card__ph { width: 100%; height: 100%; display: grid; place-items: center; font: 700 80px var(--f-display); font-style: italic; color: var(--line); background: repeating-linear-gradient(135deg, var(--panel-2) 0 10px, var(--panel) 10px 20px); }
.card__tag { position: absolute; left: 0; bottom: 12px; }
.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title { font-size: 1.15rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a::before { content: ''; position: absolute; inset: 0; z-index: 1; }
.card__excerpt { color: var(--soft); font-size: .92rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 48px 0; }
.pagination .page-numbers { min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 14px; background: var(--panel); border: 1px solid var(--line); font: 700 14px var(--f-mono); transition: background .2s, color .2s; }
.pagination a.page-numbers:hover, .pagination .current { background: var(--acid); color: var(--on-acid); border-color: var(--acid); }

/* ---------- Page head / empty / 404 ---------- */
.page-head { margin: 48px 0 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line); position: relative; }
.page-head::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 120px; height: 4px; background: var(--acid); }
.page-head h1 { font-size: clamp(1.8rem, 5vw, 3rem); text-transform: uppercase; }
.page-head p { color: var(--soft); margin: 10px 0 0; }
.page-head + .grid { margin-top: 32px; }
.empty { text-align: center; padding: 80px 0; }
.empty .big { font: 700 clamp(6rem, 22vw, 12rem)/1 var(--f-display); font-style: italic; color: transparent; -webkit-text-stroke: 2px var(--acid); margin-bottom: 8px; }
.empty h2 { font-size: 1.8rem; margin-bottom: 8px; text-transform: uppercase; }
.empty p { color: var(--soft); }
.empty .searchform { margin: 24px auto 0; }

/* ---------- Article ---------- */
.progress { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: var(--acid); z-index: 100; }
.article { max-width: 800px; margin: 48px auto 56px; }
.article__head { margin-bottom: 28px; }
.article__title { font-size: clamp(1.9rem, 5vw, 3rem); margin: 18px 0 16px; text-wrap: balance; }
.article__cover { margin: 0 0 40px; clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 36px, 100% 100%, 0 100%); background: var(--panel); }
.article__cover img { width: 100%; }
.entry { font-size: 1.06rem; line-height: 1.85; overflow-wrap: anywhere; color: #dde1ea; }
.entry h2, .entry h3 { margin: 2em 0 .6em; color: var(--fg); }
.entry h2 { font-size: 1.7rem; padding-left: 16px; border-left: 6px solid var(--acid); }
.entry h3 { font-size: 1.3rem; }
.entry a { color: var(--acid); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.entry a:hover { background: var(--acid); color: var(--on-acid); text-decoration: none; }
.entry img { margin: 24px auto; }
.entry blockquote { margin: 28px 0; padding: 20px 24px; background: var(--panel); border-left: 6px solid var(--hot); color: var(--fg); font-size: 1.12rem; }
.entry blockquote p:last-child { margin: 0; }
.entry ul, .entry ol { padding-left: 1.4em; }
.entry li { margin-bottom: 6px; }
.entry li::marker { color: var(--acid); }
.entry table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.entry th, .entry td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.entry th { background: var(--panel-2); font-family: var(--f-display); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.entry code, .entry pre { background: var(--panel); border: 1px solid var(--line); font: .9em var(--f-mono); color: var(--acid); }
.entry code { padding: 2px 6px; }
.entry pre { padding: 16px; overflow-x: auto; }
.entry pre code { border: 0; padding: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.tags a { padding: 6px 12px; border: 1px solid var(--line); font: 500 12px var(--f-mono); text-transform: uppercase; color: var(--soft); }
.tags a::before { content: '#'; color: var(--acid); margin-right: 2px; }
.tags a:hover { border-color: var(--acid); color: var(--fg); }

/* ---------- Comments ---------- */
.comments { max-width: 800px; margin: 0 auto 56px; }
.comments h2, .comment-reply-title { font-size: 1.4rem; text-transform: uppercase; margin-bottom: 20px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--acid); padding: 16px 20px; margin-bottom: 16px; }
.comment-author .avatar { float: left; margin-right: 12px; }
.comment-metadata { font: 500 12px var(--f-mono); color: var(--soft); }
.comment-form label { display: block; font: 600 13px var(--f-display); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: inherit; border-radius: 0; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--acid); outline: none; }
.comment-form .submit { display: inline-flex; min-height: 48px; align-items: center; padding: 0 28px; background: var(--acid); color: var(--on-acid); border: 0; font: 700 14px var(--f-display); text-transform: uppercase; letter-spacing: .1em; cursor: pointer; }
.comment-form .submit:hover { background: var(--fg); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 80px; background: var(--panel); border-top: 1px solid var(--line); position: relative; }
.site-footer::before { content: ''; display: block; height: 10px; background: repeating-linear-gradient(135deg, var(--acid) 0 14px, var(--ink) 14px 28px); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; padding: 48px 0 32px; }
.site-footer h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .16em; color: var(--acid); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer li a { display: inline-block; padding: 6px 0; color: var(--soft); transition: color .2s, transform .2s; }
.site-footer li a:hover { color: var(--fg); transform: translateX(4px); }
.footer-note { margin-top: 14px; color: var(--soft); max-width: 48ch; }
.copy { padding: 20px 0 28px; border-top: 1px solid var(--line); margin: 0; font: 500 12px var(--f-mono); color: var(--soft); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .top { grid-template-columns: 1fr; }
  .rank__item { padding: 14px 16px; }
}
@media (max-width: 820px) {
  .menu-toggle { display: grid; }
  .site-header__row { gap: 8px; }
  .brand { margin-right: auto; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: var(--ink); border-bottom: 1px solid var(--line); display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px var(--gut) 16px; }
  .nav a { min-height: 52px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav a::after { display: none; }
  .nav .current-menu-item > a, .nav .current-cat > a { color: var(--acid); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero { clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px)); }
  .hero__excerpt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .ticker__move { transform: none; overflow-x: auto; }
}
