/* GameDHN – main.css
   Mobile-first, không framework, system font để không phải tải font ngoài. */

:root {
	--bg: #ffffff;
	--bg-soft: #f4f6fa;
	--bg-card: #ffffff;
	--text: #16202c;
	--text-muted: #5b6878;
	--line: #e3e8ef;
	--brand: #0f6b4a;
	--brand-dark: #0b5238;
	--accent: #ff7a1a;
	--ok-bg: #e6f6ee;  --ok-fg: #0f6b4a;
	--warn-bg: #fff4e0; --warn-fg: #9a5b00;
	--no-bg: #fde8e8;  --no-fg: #a32626;
	--radius: 12px;
	--shadow: 0 1px 2px rgba(16, 32, 44, .06), 0 4px 16px rgba(16, 32, 44, .06);
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--maxw: 1120px;
	--maxw-narrow: 800px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1419;
		--bg-soft: #161c23;
		--bg-card: #1b232c;
		--text: #e7ecf2;
		--text-muted: #9aa7b5;
		--line: #2a3440;
		--brand: #35c08a;
		--brand-dark: #2aa775;
		--ok-bg: #123627;  --ok-fg: #6fe0b0;
		--warn-bg: #3a2a0f; --warn-fg: #ffc46b;
		--no-bg: #3d1a1a;  --no-fg: #ff9b9b;
		--shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.35);
	}
}

/* ---------- Reset nhẹ ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	color: var(--text);
	background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin-top: 1.8em; }
h3 { font-size: 1.15rem; margin-top: 1.4em; }
p { margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; }
code { background: var(--bg-soft); padding: .1em .4em; border-radius: 4px; font-size: .9em; }
button { font: inherit; cursor: pointer; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: var(--maxw-narrow); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: var(--brand); color: #fff; padding: 8px 12px; z-index: 1000; border-radius: 6px; }

/* ---------- Header ---------- */
.site-header { background: var(--bg-card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.site-brand { flex: 1; }
.site-title { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.site-title a { color: var(--text); }
.custom-logo { max-height: 40px; width: auto; }

.nav-toggle { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 9px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); }

.site-nav { flex-basis: 100%; display: none; }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px 0; }
.site-nav li { position: relative; }
.site-nav a { display: block; padding: 10px 4px; color: var(--text); font-weight: 600; border-bottom: 1px solid var(--line); }
.site-nav .sub-menu { padding-left: 16px; }
.site-nav .sub-menu a { font-weight: 400; }

.site-search { display: flex; flex-basis: 100%; gap: 0; margin-bottom: 10px; }
.site-search input[type=search] { flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; background: var(--bg); color: var(--text); font: inherit; min-width: 0; }
.site-search button { padding: 0 14px; border: 1px solid var(--brand); background: var(--brand); color: #fff; border-radius: 0 8px 8px 0; font-size: 1.1rem; }
.site-search--big { margin: 16px 0; }

@media (min-width: 900px) {
	.site-brand { flex: 0 0 auto; margin-right: 8px; }
	.nav-toggle { display: none; }
	.site-nav { display: block; flex: 1; flex-basis: auto; }
	.site-nav ul { display: flex; gap: 2px; padding: 0; }
	.site-nav a { border: 0; padding: 8px 12px; border-radius: 8px; }
	.site-nav a:hover { background: var(--bg-soft); text-decoration: none; }
	.site-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; min-width: 200px; }
	.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: block; }
	.site-search { flex-basis: 280px; margin: 0; }
}

/* ---------- Layout chung ---------- */
.site-main { padding: 20px 0 48px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 14px; font-size: .88rem; color: var(--text-muted); }
.breadcrumb li + li::before { content: "›"; margin: 0 6px 0 2px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }

.archive-header { margin-bottom: 18px; }
.archive-desc { color: var(--text-muted); max-width: 70ch; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 1.5em; }
.section-head h2 { margin: 0 0 .6em; }
.home-hero { padding: 8px 0 4px; }
.home-hero p { color: var(--text-muted); max-width: 65ch; }

/* ---------- Chips / bộ lọc ---------- */
.chip { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--text-muted); line-height: 1.4; }
.chip--ok { background: var(--ok-bg); color: var(--ok-fg); }
.chip--link { font-size: .9rem; padding: 6px 12px; color: var(--text); }
.chip--link:hover { background: var(--brand); color: #fff; text-decoration: none; }
.chip--link small { opacity: .7; font-weight: 400; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }

/* ---------- Game card ---------- */
.game-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .game-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }
.game-grid--archive { margin-bottom: 24px; }

.game-card { display: flex; gap: 12px; padding: 12px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow .15s; }
.game-card:hover { box-shadow: var(--shadow); }
.game-card__icon { flex: 0 0 72px; }
.game-card__icon img, .game-card__placeholder { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; background: var(--bg-soft); display: block; }
.game-card__body { min-width: 0; }
.game-card__title { font-size: 1.02rem; margin: 0 0 2px; }
.game-card__title a { color: var(--text); }
.game-card__meta { font-size: .85rem; color: var(--text-muted); margin: 0 0 6px; }
.game-card__chips { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Post card ---------- */
.post-list { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .post-list { grid-template-columns: repeat(2, 1fr); } }
.post-card { display: flex; gap: 12px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post-card__thumb { flex: 0 0 140px; }
.post-card__thumb img { width: 140px; height: 100%; object-fit: cover; }
.post-card__body { padding: 12px 12px 12px 0; min-width: 0; }
.post-card:not(:has(.post-card__thumb)) .post-card__body { padding-left: 12px; }
.post-card__title { font-size: 1.05rem; margin: 0 0 4px; }
.post-card__title a { color: var(--text); }
.post-card__excerpt { font-size: .9rem; color: var(--text-muted); margin: 0 0 4px; }
.post-card__meta { font-size: .8rem; color: var(--text-muted); margin: 0; }

/* ---------- Trang game ---------- */
.game-hero { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.game-hero__icon { flex: 0 0 96px; }
.game-hero__icon img { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; box-shadow: var(--shadow); }
.game-hero__title { margin-bottom: 4px; }
.game-hero__sub { color: var(--text-muted); font-size: .95rem; margin: 0 0 4px; }
.game-hero__verified { font-size: .85rem; color: var(--ok-fg); margin: 0 0 8px; }
.game-hero__verdict { font-size: 1.05rem; margin: 6px 0 0; }
@media (min-width: 700px) {
	.game-hero__icon { flex-basis: 128px; }
	.game-hero__icon img { width: 128px; height: 128px; border-radius: 28px; }
}

.answers { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 14px 0; }
.answer { background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.answer__q { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.answer__a { font-weight: 700; }
.answer--ok { background: var(--ok-bg); } .answer--ok .answer__a { color: var(--ok-fg); }
.answer--warn { background: var(--warn-bg); } .answer--warn .answer__a { color: var(--warn-fg); }
.answer--no { background: var(--no-bg); } .answer--no .answer__a { color: var(--no-fg); }

.download-box { margin: 18px 0; padding: 16px; background: var(--bg-card); border: 2px solid var(--brand); border-radius: var(--radius); }
.download-box__label { font-size: .88rem; color: var(--text-muted); margin: 0 0 12px; }
.download-box__buttons { display: flex; flex-direction: column; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 10px; font-weight: 700; text-align: center; border: 2px solid transparent; transition: transform .1s, background .15s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--brand); color: #fff; font-size: 1.05rem; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--secondary { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn--ghost { background: var(--bg-soft); color: var(--text); font-weight: 600; }
.btn__icon { font-size: .85em; }
@media (min-width: 560px) { .download-box__buttons { flex-direction: row; flex-wrap: wrap; } .btn--primary { flex: 1 1 260px; } }

.game-specs h2 { margin-top: 1.4em; }
.spec-table { font-size: .95rem; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.spec-table th, .spec-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 38%; color: var(--text-muted); font-weight: 600; background: var(--bg-soft); }

.proscons { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 1.5em 0; }
@media (min-width: 640px) { .proscons { grid-template-columns: 1fr 1fr; } }
.proscons__col { padding: 14px 16px; border-radius: 10px; }
.proscons__col h3 { margin: 0 0 .5em; font-size: 1rem; }
.proscons__col ul { margin: 0; padding-left: 18px; }
.proscons__col li { margin-bottom: 4px; }
.proscons__col--pros { background: var(--ok-bg); } .proscons__col--pros h3 { color: var(--ok-fg); }
.proscons__col--cons { background: var(--no-bg); } .proscons__col--cons h3 { color: var(--no-fg); }

.screenshots__strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.screenshots__item { flex: 0 0 auto; scroll-snap-align: start; }
.screenshots__item img { height: 220px; width: auto; border-radius: 10px; border: 1px solid var(--line); }

.tester-box { margin: 1.8em 0; padding: 16px 18px; border-left: 4px solid var(--accent); background: var(--bg-soft); border-radius: 0 10px 10px 0; }
.tester-box h2 { margin: 0 0 .3em; font-size: 1.15rem; }
.tester-box__meta { font-size: .88rem; color: var(--text-muted); }
.tester-box p:last-child { margin-bottom: 0; }

.faq__item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--bg-card); }
.faq__item summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; position: relative; padding-right: 36px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 14px; top: 10px; font-size: 1.3rem; color: var(--text-muted); }
.faq__item[open] summary::after { content: "–"; }
.faq__answer { padding: 0 16px 12px; color: var(--text); }
.faq__answer p:last-child { margin-bottom: 0; }

.game-single__cta-bottom { margin-top: 1.5em; }

.author-box { display: flex; gap: 14px; align-items: flex-start; margin: 2em 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
.author-box img { border-radius: 50%; flex: 0 0 56px; width: 56px; height: 56px; }
.author-box p { margin: 0 0 4px; }
.author-box__name { font-weight: 700; }
.author-box__bio, .author-box__date { font-size: .9rem; color: var(--text-muted); }

.related h2 { margin-top: 1.5em; }

/* ---------- Nội dung bài ---------- */
.entry-content { max-width: var(--maxw-narrow); }
.entry-content > * + * { margin-top: 1em; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content img { border-radius: 10px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content blockquote { margin: 1em 0; padding: 10px 16px; border-left: 4px solid var(--line); color: var(--text-muted); }
.entry-content table { font-size: .95rem; }
.entry-content table th, .entry-content table td { border: 1px solid var(--line); padding: 8px 10px; }
.entry-content table th { background: var(--bg-soft); }
.entry-content figure { margin: 1.2em 0; }
.entry-content figcaption { font-size: .85rem; color: var(--text-muted); text-align: center; }
.wp-block-table { overflow-x: auto; }

.post-single__header h1 { margin-bottom: .3em; }
.post-single__meta { color: var(--text-muted); font-size: .9rem; }
.post-single__thumb { margin: 16px 0; }
.post-single__thumb img { border-radius: var(--radius); }
.post-tags { font-size: .9rem; color: var(--text-muted); }

/* ---------- Phân trang ---------- */
.pagination { margin: 24px 0; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.pagination .page-numbers.current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .page-numbers:hover { text-decoration: none; background: var(--bg-soft); }
.pagination .page-numbers.current:hover { background: var(--brand); }

/* ---------- Bình luận ---------- */
.comments-area { max-width: var(--maxw-narrow); margin-top: 2em; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-author img { display: inline-block; vertical-align: middle; border-radius: 50%; margin-right: 8px; }
.comment-metadata { font-size: .82rem; color: var(--text-muted); }
.comment-form textarea, .comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url] { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
.comment-form .submit { background: var(--brand); color: #fff; border: 0; padding: 10px 20px; border-radius: 8px; font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 28px 0; font-size: .9rem; color: var(--text-muted); }
.site-footer__widgets { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 20px; }
.widget-title { font-size: 1rem; }
.site-footer__nav ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer__nav a { color: var(--text-muted); }
.site-footer__note { max-width: 70ch; }
.site-footer__copy { margin: 0; }
