/* ==========================================================================
   Moban 8-10-8 — Bento v2 Card Layout
   Palette: Navy #16324F · Coral #FF6B6B · Cloud #F4F7FA
   Shape: 6px radius · white cards · soft shadows
   ========================================================================== */

:root {
    --navy: #16324F;
    --navy-deep: #0E2438;
    --coral: #FF6B6B;
    --coral-dark: #F0504F;
    --bg: #F4F7FA;
    --card: #FFFFFF;
    --line: #E4EBF3;
    --text: #1B2B3A;
    --muted: #5E7186;
    --radius: 6px;
    --shadow: 0 2px 10px rgba(22, 50, 79, 0.07);
    --shadow-hover: 0 10px 28px rgba(22, 50, 79, 0.14);
    --font: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --gap: 16px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--coral); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; color: var(--navy); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* min-width:0 guards for every grid/flex child */
.header-inner > *, .main-nav > *, .nav-menu > li,
.bento-home > *, .news-grid > *, .icon-wall > *,
.single-layout > *, .news-mini-item > *, .icon-tile > *,
.breadcrumb > * { min-width: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 11px 24px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .2px;
    text-align: center;
    border: 2px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-register { background: var(--coral); color: #fff; box-shadow: 0 4px 14px rgba(255, 107, 107, .35); }
.btn-register:hover { background: var(--coral-dark); color: #fff; box-shadow: 0 8px 20px rgba(255, 107, 107, .45); }
.btn-login { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-login:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .55); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---------- Header (slim logo bar) ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(22, 50, 79, .04);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.site-logo { flex: 0 0 auto; }
.logo-img { height: 42px; width: auto; }
.main-nav { flex: 1 1 auto; display: flex; justify-content: center; }
.nav-menu { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-menu a {
    display: block; padding: 8px 14px; border-radius: var(--radius);
    font-weight: 500; font-size: 14px; color: var(--text);
    transition: background .2s ease, color .2s ease;
}
.nav-menu a:hover { background: rgba(22, 50, 79, .06); color: var(--navy); }
.header-actions { flex: 0 0 auto; display: flex; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s ease; }
.nav-toggle-icon { position: relative; }
.nav-toggle-icon::before, .nav-toggle-icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle-icon::before { top: -7px; }
.nav-toggle-icon::after { top: 7px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px 18px; margin: 18px 0 20px;
    font-size: 13px; color: var(--muted);
}
.breadcrumb a { color: var(--navy); font-weight: 500; }
.breadcrumb a:hover { color: var(--coral); }
.bc-sep { color: #A9B8C9; }
.bc-current { color: var(--coral); font-weight: 700; }

/* ---------- Section heads ---------- */
.cell-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title {
    position: relative; margin: 0; padding-left: 16px;
    font-size: 22px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px;
}
.section-title::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 6px; height: 70%; background: var(--coral); border-radius: 3px;
}
.page-head { margin-top: 8px; }
.view-all { font-size: 13px; font-weight: 700; color: var(--coral); white-space: nowrap; }
.view-all:hover { color: var(--coral-dark); }

/* ---------- Bento grid (desktop) ---------- */
.bento-home {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: 200px 200px 190px 190px auto auto;
    gap: var(--gap);
    grid-template-areas:
        "hero hero hero hero hero hero"
        "hero hero hero hero hero hero"
        "cat-slot cat-slot cat-fish cat-fish cat-baucua cat-baucua"
        "cat-xoso cat-xoso cat-poker cat-poker poster-a poster-b"
        "news news news news poster-a poster-b"
        "icons icons icons icons icons icons";
}
.cell-hero { grid-area: hero; }
.cat-slot { grid-area: cat-slot; }
.cat-fish { grid-area: cat-fish; }
.cat-baucua { grid-area: cat-baucua; }
.cat-xoso { grid-area: cat-xoso; }
.cat-poker { grid-area: cat-poker; }
.poster-a { grid-area: poster-a; }
.poster-b { grid-area: poster-b; }
.cell-news { grid-area: news; }
.cell-icons { grid-area: icons; }

.bento-cell {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}
.bento-cell:hover { box-shadow: var(--shadow-hover); }

/* ---------- Hero (light parallax) ---------- */
.cell-hero { position: relative; background: var(--navy-deep); }
.cell-hero:hover { transform: none; }
.hero-media {
    position: absolute; left: 0; right: 0; top: -70px; bottom: -70px;
    background-size: cover; background-position: center;
    will-change: transform; transform: translate3d(0, 0, 0);
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(14, 36, 56, .92) 0%, rgba(22, 50, 79, .72) 45%, rgba(22, 50, 79, .25) 100%);
}
.hero-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 40px 48px; max-width: 640px; }
.hero-tag {
    display: inline-block; align-self: flex-start;
    background: rgba(255, 107, 107, .16); color: var(--coral);
    border: 1px solid rgba(255, 107, 107, .5);
    padding: 4px 12px; border-radius: var(--radius);
    font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    margin-bottom: 14px;
}
.hero-title { color: #fff; font-size: clamp(30px, 4vw, 48px); font-weight: 900; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.hero-desc { color: rgba(255, 255, 255, .82); font-size: 15px; margin-bottom: 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Category bento cards ---------- */
.cell-cat { position: relative; display: block; }
.cat-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cell-cat::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(14, 36, 56, 0) 30%, rgba(14, 36, 56, .85) 100%);
}
.cell-cat:hover .cat-thumb { transform: scale(1.06); }
.cat-info { position: absolute; left: 16px; bottom: 14px; z-index: 2; }
.cat-name { margin: 0; color: #fff; font-size: 18px; font-weight: 900; text-transform: uppercase; letter-spacing: .4px; }
.cat-count { color: rgba(255, 255, 255, .75); font-size: 12px; }
.cat-arrow {
    position: absolute; right: 14px; bottom: 14px; z-index: 2;
    width: 34px; height: 34px; border-radius: var(--radius);
    background: var(--coral); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700;
    transition: transform .25s ease, background .25s ease;
}
.cell-cat:hover .cat-arrow { transform: translateX(4px); background: var(--coral-dark); }
.cell-cat:hover { color: inherit; }

/* ---------- Poster banners ---------- */
.cell-poster { position: relative; display: block; }
.poster-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cell-poster:hover .poster-img { transform: scale(1.05); }
.poster-cta {
    position: absolute; left: 12px; bottom: 12px; z-index: 2;
    background: var(--coral); color: #fff;
    padding: 6px 14px; border-radius: var(--radius);
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, .4);
}
.cell-poster:hover { color: #fff; }

/* ---------- News bento card ---------- */
.cell-news { padding: 22px 24px; }
.cell-news .cell-head { margin-bottom: 12px; }
.news-mini-list { display: flex; flex-direction: column; }
.news-mini-item {
    display: flex; gap: 14px; align-items: center;
    padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.news-mini-item:last-child { border-bottom: 0; padding-bottom: 0; }
.news-mini-thumb { flex: 0 0 84px; width: 84px; height: 62px; border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.news-mini-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.news-mini-item:hover .news-mini-thumb img { transform: scale(1.08); }
.news-mini-title {
    margin: 0 0 3px; font-size: 14.5px; font-weight: 700; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-mini-item:hover .news-mini-title { color: var(--coral); }
.news-mini-date { font-size: 12px; color: var(--muted); }

/* ---------- Mini icons cell ---------- */
.cell-icons { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.mini-icon-row { display: flex; gap: 12px; flex-wrap: wrap; }
.mini-icon {
    flex: 0 0 60px; width: 60px; height: 60px;
    border-radius: var(--radius); overflow: hidden;
    border: 2px solid var(--line);
    transition: border-color .2s ease, transform .2s ease;
}
.mini-icon img { width: 100%; height: 100%; object-fit: cover; }
.mini-icon:hover { border-color: var(--coral); transform: translateY(-3px); }

/* ---------- Poster banner (full width strip) ---------- */
.poster-banner-section { margin: 34px 0 8px; }
.poster-banner { position: relative; display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.poster-banner img { width: 100%; max-height: 260px; object-fit: cover; transition: transform .5s ease; }
.poster-banner:hover img { transform: scale(1.02); }
.poster-banner-label {
    position: absolute; left: 24px; bottom: 20px;
    background: var(--coral); color: #fff;
    padding: 10px 20px; border-radius: var(--radius);
    font-weight: 900; font-size: 14px; text-transform: uppercase; letter-spacing: .5px;
    box-shadow: 0 6px 18px rgba(255, 107, 107, .45);
}

/* ---------- Game icon wall ---------- */
.icon-wall-section { margin: 36px 0 44px; }
.icon-wall { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.icon-tile {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 10px; text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
}
.icon-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); }
.icon-tile-name {
    display: block; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--navy);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.icon-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.icon-tile:hover .icon-tile-name { color: var(--coral); }

/* ---------- News grid (index / archive) ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 26px; }
.news-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.news-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg); }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover .news-card-media img { transform: scale(1.06); }
.news-card-body { padding: 18px 20px 20px; }
.news-card-date { font-size: 12px; color: var(--coral); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.news-card-title { font-size: 17px; font-weight: 700; margin: 6px 0 8px; }
.news-card-title a { color: var(--text); }
.news-card-title a:hover { color: var(--coral); }
.news-card-excerpt { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.news-card-more { font-size: 13px; font-weight: 700; color: var(--coral); }

/* ---------- Single / page ---------- */
.single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; margin-bottom: 44px; }
.bento-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 34px; }
.page-article { margin-bottom: 44px; }
.single-title { font-size: clamp(24px, 3vw, 34px); font-weight: 900; margin-bottom: 10px; }
.single-meta { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-bottom: 18px; flex-wrap: wrap; }
.single-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; }
.single-thumb img { width: 100%; }
.single-content { font-size: 15.5px; color: #33465A; }
.single-content h2, .single-content h3 { margin-top: 1.4em; }
.single-content img { border-radius: var(--radius); }
.single-content a { color: var(--coral); text-decoration: underline; }
.single-download-box {
    margin-top: 28px; padding: 26px;
    background: linear-gradient(120deg, var(--navy) 0%, var(--navy-deep) 100%);
    border-radius: var(--radius); color: #fff; text-align: center;
}
.single-download-box h3 { color: #fff; margin-bottom: 6px; font-size: 20px; }
.single-download-box p { color: rgba(255, 255, 255, .8); margin-bottom: 16px; }

/* ---------- Sidebar widgets ---------- */
.single-sidebar { display: flex; flex-direction: column; gap: 18px; }
.sidebar-widget { padding: 22px 24px; }
.widget-title {
    font-size: 15px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px;
    padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--bg);
    position: relative;
}
.widget-title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 42px; height: 2px; background: var(--coral); }
.sidebar-search { display: flex; gap: 8px; }
.search-input {
    flex: 1; min-width: 0; padding: 10px 14px;
    border: 1px solid var(--line); border-radius: var(--radius);
    font-family: inherit; font-size: 14px; background: var(--bg);
}
.search-input:focus { outline: none; border-color: var(--coral); background: #fff; }
.search-btn {
    flex: 0 0 auto; border: 0; background: var(--navy); color: #fff;
    border-radius: var(--radius); padding: 0 14px; cursor: pointer; font-size: 15px;
    transition: background .2s ease;
}
.search-btn:hover { background: var(--coral); }
.sidebar-post-list li { padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.sidebar-post-list li:last-child { border-bottom: 0; }
.sidebar-post-list a { color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar-post-list a:hover { color: var(--coral); }
.sidebar-game-row { display: flex; gap: 10px; margin-bottom: 14px; }

/* ---------- Pagination ---------- */
.pagination { margin: 8px 0 44px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    font-weight: 700; font-size: 14px; color: var(--navy);
    transition: all .2s ease;
}
.pagination a:hover { border-color: var(--coral); color: var(--coral); transform: translateY(-2px); }
.pagination .current { background: var(--coral); border-color: var(--coral); color: #fff; }
.no-posts { text-align: center; padding: 50px 20px; color: var(--muted); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.archive-desc { color: var(--muted); margin-bottom: 20px; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, .72); margin-top: 30px; padding: 46px 0 30px; }
.footer-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 30px; }
.footer-widget .widget-title { color: #fff; border-bottom-color: rgba(255, 255, 255, .12); }
.footer-widget a { color: rgba(255, 255, 255, .72); }
.footer-widget a:hover { color: var(--coral); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 24px; text-align: center; }
.disclaimer-text { font-size: 12.5px; line-height: 1.8; color: rgba(255, 255, 255, .55); max-width: 760px; margin: 16px auto 0; }

/* ---------- Scroll reveal ---------- */
.scroll-reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.scroll-reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .scroll-reveal { opacity: 1; transform: none; transition: none; }
    .hero-media { transform: none; }
}

/* ---------- Bento grid restacks (grid-template-areas lives only here) ---------- */
@media (max-width: 992px) {
    .bento-home {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: 190px 190px 180px 180px auto auto;
        grid-template-areas:
            "hero hero hero hero"
            "hero hero hero hero"
            "cat-slot cat-slot cat-fish cat-fish"
            "cat-baucua cat-baucua cat-xoso cat-xoso"
            "cat-poker cat-poker news news"
            "poster-a poster-b icons icons";
    }
}

@media (max-width: 768px) {
    .bento-home {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 220px 180px 180px 180px auto auto auto;
        grid-template-areas:
            "hero hero"
            "cat-slot cat-fish"
            "cat-baucua cat-xoso"
            "cat-poker poster-a"
            "news news"
            "poster-b icons";
    }
    .poster-a .poster-img, .poster-b .poster-img { position: static; height: 180px; }
}

@media (max-width: 480px) {
    .bento-home {
        grid-template-columns: 1fr;
        grid-template-rows: 240px 170px 170px 170px 170px 170px auto 200px 200px auto;
        grid-template-areas:
            "hero"
            "cat-slot"
            "cat-fish"
            "cat-baucua"
            "cat-xoso"
            "cat-poker"
            "news"
            "poster-a"
            "poster-b"
            "icons";
    }
    .poster-a .poster-img, .poster-b .poster-img { position: absolute; height: 100%; }
}
