/* ============================================================
   Moban 8-10-13 — Main Stylesheet
   Phong cách: thác nước Pinterest, công nghệ lạnh, góc vuông
   Bảng màu: #101418 (mực đen) / #2D7DD2 (xanh điện quang) / #F0F2F5
   ============================================================ */

html, body { overflow-x: hidden; }

:root {
    --ink: #101418;
    --ink-2: #171d24;
    --ink-3: #1f2731;
    --blue: #2D7DD2;
    --blue-bright: #4a9bef;
    --mist: #F0F2F5;
    --paper: #ffffff;
    --line: #262f3a;
    --text: #22282f;
    --text-mute: #6b7684;
    --text-inv: #e8edf3;
    --font-display: 'Chakra Petch', 'Be Vietnam Pro', sans-serif;
    --font-body: 'Be Vietnam Pro', 'Chakra Petch', sans-serif;
    --nav-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--mist);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--blue-bright); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); line-height: 1.25; letter-spacing: .01em; }
ul, ol { padding-left: 1.2em; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons (góc vuông, sắc lạnh) ---------- */
.btn {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 12px 26px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .25s ease;
    text-align: center;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 4px 4px 0 rgba(16,20,24,.35); }
.btn-primary:hover { background: var(--blue-bright); color: #fff; transform: translate(-2px,-2px); box-shadow: 6px 6px 0 rgba(16,20,24,.35); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { border-color: var(--blue-bright); color: var(--blue-bright); }
.btn-sm { padding: 8px 18px; font-size: 12px; }

/* ---------- Header: thanh logo tối giản, nền mực đen ---------- */
.site-header {
    background: var(--ink);
    border-bottom: 2px solid var(--blue);
    position: sticky;
    top: 0;
    z-index: 900;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: var(--nav-h);
}
.site-logo { flex-shrink: 0; }
.logo-img { max-height: 42px; width: auto; }
.main-nav { flex: 1; }
.nav-menu { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; flex-wrap: wrap; }
.nav-menu li a {
    display: block;
    padding: 8px 14px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-inv);
    border-bottom: 2px solid transparent;
}
.nav-menu li a:hover,
.nav-menu li.current-menu-item > a,
.nav-menu li.current_page_item > a { color: var(--blue-bright); border-bottom-color: var(--blue-bright); }
.header-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn-login { border-color: var(--line); color: var(--text-inv); background: transparent; }
.btn-login:hover { border-color: var(--blue); color: var(--blue-bright); }
.btn-register { background: var(--blue); color: #fff; }
.btn-register:hover { background: var(--blue-bright); color: #fff; }

/* ---------- Hero banner ---------- */
.hero-banner {
    position: relative;
    background: var(--ink);
    color: #fff;
    overflow: hidden;
}
.hero-media img { width: 100%; height: 420px; object-fit: cover; opacity: .55; }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(16,20,24,.95) 0%, rgba(16,20,24,.6) 55%, rgba(45,125,210,.25) 100%);
}
.hero-body { position: relative; z-index: 2; padding: 60px 20px; margin-top: -260px; max-width: 1200px; }
.hero-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--blue-bright);
    margin-bottom: 14px;
}
.hero-title { font-size: 46px; font-weight: 700; text-transform: uppercase; margin-bottom: 14px; }
.hero-title .accent { color: var(--blue-bright); }
.hero-desc { max-width: 520px; color: rgba(232,237,243,.85); margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Section titles ---------- */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ink);
    margin: 46px 0 22px;
}
.title-mark { width: 22px; height: 22px; background: var(--blue); flex-shrink: 0; box-shadow: 4px 4px 0 var(--ink); }

/* ---------- Game icon row ---------- */
.icon-row-section { padding-top: 8px; }
.icon-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 6px 2px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--blue) var(--ink-2);
}
.icon-item { flex: 0 0 auto; width: 92px; text-align: center; }
.icon-thumb {
    display: block;
    border: 2px solid var(--ink);
    background: var(--paper);
    padding: 4px;
    transition: all .25s ease;
}
.icon-thumb img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.icon-item:hover .icon-thumb { border-color: var(--blue); transform: translateY(-4px); box-shadow: 0 8px 18px rgba(16,20,24,.25); }
.icon-name { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-item:hover .icon-name { color: var(--blue); }

/* ---------- Masonry waterfall (CSS columns) ---------- */
.masonry-section { padding-bottom: 56px; }
.masonry-grid {
    column-count: 4;
    column-gap: 20px;
}
.masonry-item {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    background: var(--paper);
    animation: card-in .55s ease both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Card tối: nền mực đen chữ trắng */
.masonry-item.card-dark { background: var(--ink); border-color: var(--ink); color: var(--text-inv); }
.card-dark .masonry-title, .card-dark .masonry-title a { color: #fff; }
.card-dark .masonry-title a:hover { color: var(--blue-bright); }
.card-dark .masonry-excerpt { color: rgba(232,237,243,.75); }
.card-dark .masonry-date { color: rgba(232,237,243,.6); }

/* Card sáng: nền trắng */
.masonry-item.card-light { background: var(--paper); border-color: #dde2e9; }
.masonry-thumb { position: relative; display: block; overflow: hidden; }
.masonry-thumb img { width: 100%; transition: transform .45s ease; }
.masonry-item:hover .masonry-thumb img { transform: scale(1.05); }
.masonry-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--blue);
    color: #fff;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 4px 10px;
}
.poster-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(16,20,24,.9));
    color: var(--blue-bright);
    font-family: var(--font-display);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: 26px 14px 10px;
}
.masonry-body { padding: 16px; }
.masonry-title { font-size: 17px; margin-bottom: 8px; }
.masonry-title a { color: var(--ink); }
.masonry-title a:hover { color: var(--blue); }
.masonry-excerpt { font-size: 14px; color: var(--text-mute); margin-bottom: 10px; }
.masonry-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 13px; }
.masonry-rating { color: #f5b942; font-weight: 700; font-family: var(--font-display); }
.masonry-date { color: var(--text-mute); }
.masonry-link { font-family: var(--font-display); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }

/* Card CTA nổi bật xanh điện quang */
.masonry-item.card-cta { background: var(--blue); border-color: var(--blue); }
.card-cta .masonry-body { padding: 26px 20px; }
.card-cta .cta-kicker {
    display: inline-block;
    background: var(--ink);
    color: var(--blue-bright);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: 4px 12px;
    margin-bottom: 12px;
}
.card-cta .masonry-title { color: #fff; font-size: 20px; }
.card-cta .masonry-excerpt { color: rgba(255,255,255,.85); }
.card-cta .btn-primary { background: var(--ink); box-shadow: 4px 4px 0 rgba(255,255,255,.35); }
.card-cta .btn-primary:hover { background: var(--ink-3); color: #fff; }

.masonry-more { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }

/* ---------- Page hero (archive / single / page) ---------- */
.page-hero {
    background: var(--ink);
    color: #fff;
    padding: 54px 0 40px;
    border-bottom: 3px solid var(--blue);
}
.page-hero-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--blue-bright);
    margin-bottom: 10px;
}
.page-hero-title { font-size: 36px; text-transform: uppercase; word-break: break-word; }
.page-hero-desc { color: rgba(232,237,243,.75); max-width: 720px; margin-top: 12px; }
.single-meta { display: flex; gap: 20px; margin-top: 14px; font-size: 14px; color: rgba(232,237,243,.75); flex-wrap: wrap; }

/* ---------- Single / page content ---------- */
.single-section { padding: 40px 0 60px; }
.single-card {
    background: var(--paper);
    border: 1px solid #dde2e9;
    border-top: 4px solid var(--blue);
    padding: 34px;
    max-width: 900px;
    margin: 0 auto;
}
.single-thumb { margin-bottom: 24px; }
.entry-content { font-size: 16px; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.2em 0 .6em; color: var(--ink); }
.entry-content p { margin-bottom: 1em; }
.entry-content img { margin: 1em auto; }
.entry-content blockquote {
    border-left: 4px solid var(--blue);
    background: var(--mist);
    padding: 14px 18px;
    margin: 1em 0;
}
.entry-content a { text-decoration: underline; }
.page-links { margin-top: 16px; font-weight: 600; }
.single-download {
    margin-top: 30px;
    background: var(--ink);
    color: var(--text-inv);
    padding: 26px;
    text-align: center;
    border-left: 4px solid var(--blue);
}
.single-download-title { color: #fff; font-size: 22px; margin-bottom: 8px; }
.single-download p { color: rgba(232,237,243,.8); margin-bottom: 16px; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; max-width: 900px; margin: 24px auto 0; flex-wrap: wrap; }
.post-nav-item a { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink); }
.post-nav-item a:hover { color: var(--blue); }

/* ---------- Pagination ---------- */
.pagination-wrap { margin-top: 34px; text-align: center; }
.pagination-wrap .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination-wrap .page-numbers {
    display: inline-block;
    min-width: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    background: var(--paper);
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
}
.pagination-wrap .page-numbers.current { background: var(--blue); border-color: var(--blue); color: #fff; }
.pagination-wrap a.page-numbers:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state p { margin-bottom: 18px; color: var(--text-mute); }

/* ---------- Footer (grid areas chỉ khai báo tại đây) ---------- */
.site-footer { background: var(--ink); color: var(--text-inv); padding: 50px 0 30px; border-top: 3px solid var(--blue); }
.footer-widgets {
    display: grid;
    grid-template-areas: "f1 f2 f3";
    grid-template-columns: repeat(3, 1fr);
    gap: 34px;
    margin-bottom: 34px;
}
.footer-widget-1 { grid-area: f1; }
.footer-widget-2 { grid-area: f2; }
.footer-widget-3 { grid-area: f3; }
.footer-widget .widget-title {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--blue-bright);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.footer-widget ul { list-style: none; padding: 0; }
.footer-widget ul li { margin-bottom: 8px; }
.footer-widget a { color: rgba(232,237,243,.8); }
.footer-widget a:hover { color: var(--blue-bright); }
.footer-bottom { text-align: center; border-top: 1px solid var(--line); padding-top: 24px; }
.disclaimer-text { max-width: 760px; margin: 16px auto 10px; font-size: 13px; color: rgba(232,237,243,.7); line-height: 1.7; }
.footer-copy { font-size: 12px; color: rgba(232,237,243,.5); margin-top: 10px; }

/* ---------- Bottom mobile nav (fixed) ---------- */
.mobile-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    background: var(--ink);
    border-top: 2px solid var(--blue);
}
.mobile-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(232,237,243,.75);
}
.mobile-nav-icon { width: 21px; height: 21px; }
.mobile-nav-link.active,
.mobile-nav-link:hover { color: var(--blue-bright); }

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 26px;
    z-index: 940;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    color: #fff;
    border: 1px solid var(--blue);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: all .3s ease;
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--blue); }

/* ---------- Widgets chung ---------- */
.widget { margin-bottom: 26px; }
.widget-title { font-size: 18px; color: var(--ink); margin-bottom: 12px; }

/* ---------- Comments ---------- */
.comments-area { max-width: 900px; margin: 26px auto 0; background: var(--paper); border: 1px solid #dde2e9; padding: 26px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { border-bottom: 1px solid var(--mist); padding: 14px 0; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfd6de;
    background: var(--mist);
    font-family: var(--font-body);
    margin-bottom: 12px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }

/* ---------- Footer grid responsive (grid-template-areas chỉ nằm trong main.css) ---------- */
@media (max-width: 768px) {
    .footer-widgets {
        grid-template-areas:
            "f1 f1"
            "f2 f3";
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 480px) {
    .footer-widgets {
        grid-template-areas:
            "f1"
            "f2"
            "f3";
        grid-template-columns: 1fr;
    }
}
