/* =========================================================
   Moban 8-10-6 — Bento v2 | main.css
   Forest green + cream | radius 20px | flat color blocks
   ========================================================= */

:root {
    --green: #2F5D3A;
    --green-dark: #24492D;
    --green-soft: #E4ECDF;
    --gold: #C9A227;
    --gold-soft: #F5EAC8;
    --cream: #F6F1E7;
    --white: #FFFFFF;
    --ink: #1E2B20;
    --muted: #5F6F60;
    --radius: 20px;
    --gap: 18px;
    --font-display: 'Baloo 2', 'Roboto', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* ---------- Base ---------- */
html, body { overflow-x: hidden; }
body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.25; margin: 0 0 0.5em; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.site-content { min-height: 60vh; padding: 26px 0 40px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-green { background: var(--green); color: #fff; }
.btn-login { background: transparent; border-color: var(--green); color: var(--green); }
.btn-login:hover { background: var(--green-soft); }
.btn-register { background: var(--green); color: #fff; }
.btn-lg { padding: 14px 34px; font-size: 1.05rem; }

/* ---------- Top bar ---------- */
.top-bar {
    background: var(--white);
    border-bottom: 3px solid var(--green-soft);
    position: sticky;
    top: 0;
    z-index: 900;
}
.top-bar-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}
.site-logo a { display: inline-flex; align-items: center; }
.logo-img { max-height: 44px; width: auto; }
.top-nav { flex: 1 1 auto; min-width: 0; }
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.nav-menu li a {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--ink);
    transition: background 0.18s ease, color 0.18s ease;
}
.nav-menu li a:hover,
.nav-menu li.current-menu-item a,
.nav-menu li.current_page_item a {
    background: var(--green);
    color: #fff;
}
.header-actions { display: flex; gap: 10px; flex: 0 0 auto; }

/* ---------- Chip strip (nowrap horizontal scroller) ---------- */
.chip-strip-section { margin-bottom: var(--gap); }
.chip-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 4px 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.chip-strip::-webkit-scrollbar { display: none; }
.chip {
    flex: 0 0 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border-radius: 999px;
    padding: 6px 16px 6px 6px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--green-dark);
    transition: background 0.18s ease;
}
.chip:hover { background: var(--gold-soft); }
.chip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }

/* ---------- Bento tabs ---------- */
.bento-section { margin-bottom: 34px; }
.bento-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: var(--gap);
}
.bento-tab {
    border: none;
    background: var(--green-soft);
    color: var(--green-dark);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 26px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.bento-tab:hover { transform: translateY(-2px); }
.bento-tab.is-active { background: var(--green); color: #fff; }

/* ---------- Bento grid base ---------- */
.bento-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.bento-grid > * { min-width: 0; }
.b-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: transform 0.2s ease, background 0.2s ease;
}
a.b-card:hover { transform: translateY(-4px); }
.b-cover { width: 100%; height: 100%; object-fit: cover; }

/* Panel 1: featured — grid-template-areas (desktop) */
.bento-panel--featured .bento-grid {
    grid-auto-rows: 165px;
    grid-template-areas:
        "hero hero poster1 news1"
        "hero hero poster1 news2"
        "g1 g2 poster2 news3"
        "g3 g4 download download";
}
/* Panel 2: games — grid-template-areas (desktop) */
.bento-panel--games .bento-grid {
    grid-auto-rows: 195px;
    grid-template-areas:
        "x1 x2 x3 xbanner"
        "x4 x5 x6 xbanner"
        "x7 x8 x9 xbanner";
}
/* Panel 3: news — grid-template-areas (desktop) */
.bento-panel--news .bento-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 165px;
    grid-template-areas:
        "n1 n1 n2"
        "n1 n1 n3"
        "n4 n5 n6";
}
.bento-panel[hidden] { display: none; }

/* Area assignments */
.b-area-hero { grid-area: hero; }
.b-area-poster1 { grid-area: poster1; }
.b-area-poster2 { grid-area: poster2; }
.b-area-news1 { grid-area: news1; }
.b-area-news2 { grid-area: news2; }
.b-area-news3 { grid-area: news3; }
.b-area-g1 { grid-area: g1; }
.b-area-g2 { grid-area: g2; }
.b-area-g3 { grid-area: g3; }
.b-area-g4 { grid-area: g4; }
.b-area-download { grid-area: download; }
.b-area-x1 { grid-area: x1; }
.b-area-x2 { grid-area: x2; }
.b-area-x3 { grid-area: x3; }
.b-area-x4 { grid-area: x4; }
.b-area-x5 { grid-area: x5; }
.b-area-x6 { grid-area: x6; }
.b-area-x7 { grid-area: x7; }
.b-area-x8 { grid-area: x8; }
.b-area-x9 { grid-area: x9; }
.b-area-xbanner { grid-area: xbanner; }
.b-area-n1 { grid-area: n1; }
.b-area-n2 { grid-area: n2; }
.b-area-n3 { grid-area: n3; }
.b-area-n4 { grid-area: n4; }
.b-area-n5 { grid-area: n5; }
.b-area-n6 { grid-area: n6; }

/* Hero card */
.b-hero { background: var(--green); color: #fff; }
.b-hero .b-cover { height: 56%; flex: 0 0 auto; }
.b-hero-body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-height: 0; }
.b-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
}
.b-kicker-dark { color: var(--green-dark); }
.b-hero-title { font-size: 1.25rem; margin: 0 0 6px; color: #fff; }
.b-hero .btn { align-self: flex-start; margin-top: auto; }

/* Poster card */
.b-poster { position: relative; }
.b-poster .b-cover { position: absolute; inset: 0; }
.b-tag {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: var(--gold);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 999px;
}

/* Game card */
.b-game { background: var(--white); }
.b-game-img { width: 100%; height: 62%; object-fit: cover; flex: 0 0 auto; }
.b-game-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    flex: 1 1 auto;
    min-height: 0;
}
.b-game-title {
    font-size: 0.9rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.b-rating {
    flex: 0 0 auto;
    background: var(--gold-soft);
    color: var(--green-dark);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 999px;
}

/* News mini card */
.b-news-mini { background: var(--white); padding: 14px 16px; justify-content: center; }
.b-news-link { display: block; min-width: 0; }
.b-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    margin-bottom: 8px;
}
.b-news-title {
    font-size: 0.92rem;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.b-news-date { font-size: 0.75rem; color: var(--muted); }

/* Download CTA card */
.b-download {
    background: var(--gold);
    padding: 18px 22px;
    justify-content: center;
    gap: 8px;
}
.b-download-title { font-size: 1.25rem; margin: 0; color: var(--ink); }
.b-download .btn { align-self: flex-start; }

/* News panel cards */
.b-news-card { background: var(--white); }
.b-news-thumb { height: 55%; flex: 0 0 auto; overflow: hidden; }
.b-news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.b-news-thumb--empty { background: var(--green-soft); }
.b-news-body { padding: 12px 16px; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.b-news-card .b-news-title { -webkit-line-clamp: 2; }
.b-news-excerpt {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.b-news-card--fallback { grid-row: span 2; justify-content: center; }

/* ---------- CTA band ---------- */
.cta-band { margin-bottom: 10px; }
.cta-band-inner {
    background: var(--green);
    border-radius: var(--radius);
    color: #fff;
    padding: 34px 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.cta-band-title { color: #fff; font-size: 1.7rem; margin-bottom: 6px; }
.cta-band-desc { margin: 0; color: var(--green-soft); max-width: 560px; }

/* ---------- Page band (archive/index/page) ---------- */
.page-band {
    background: var(--green);
    border-radius: var(--radius);
    color: #fff;
    padding: 30px 34px;
    margin-bottom: 26px;
}
.page-band-title { color: #fff; font-size: 1.9rem; margin-bottom: 4px; }
.page-band-desc { margin: 0; color: var(--green-soft); }

/* ---------- Post grid ---------- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
    margin-bottom: 26px;
}
.post-grid > * { min-width: 0; }
.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease;
}
.post-card:hover { transform: translateY(-4px); }
.post-card-link { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.post-card-thumb { height: 170px; overflow: hidden; flex: 0 0 auto; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-thumb--empty { background: var(--green-soft); }
.post-card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-height: 0; }
.post-card-title { font-size: 1.05rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-excerpt { margin: 0; font-size: 0.85rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; font-size: 0.8rem; }
.post-card-date { color: var(--muted); }
.post-card-more { color: var(--gold); font-weight: 700; font-family: var(--font-display); }
.no-posts {
    grid-column: 1 / -1;
    background: var(--white);
    border-radius: var(--radius);
    padding: 48px 20px;
    text-align: center;
    color: var(--muted);
}

/* Pagination */
.pagination-wrap { margin-bottom: 20px; }
.pagination, .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pagination a, .nav-links a, .pagination span, .nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}
.pagination .current, .nav-links .current { background: var(--green); color: #fff; }
.pagination a:hover, .nav-links a:hover { background: var(--gold-soft); }

/* ---------- Single / page ---------- */
.single-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 38px 42px;
    margin-bottom: 26px;
}
.single-title { font-size: 2rem; margin-bottom: 10px; }
.single-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 0.88rem; margin-bottom: 20px; }
.single-thumb { margin-bottom: 24px; border-radius: 16px; overflow: hidden; }
.single-content { line-height: 1.85; min-width: 0; }
.single-content img { border-radius: 12px; }
.single-content h2, .single-content h3 { margin-top: 1.4em; }
.single-content a { color: var(--green); font-weight: 600; text-decoration: underline; }
.single-cta { margin: 30px 0 10px; text-align: center; }
.single-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 2px solid var(--green-soft);
    font-size: 0.9rem;
}
.single-nav-item { min-width: 0; flex: 1 1 40%; }
.single-nav-item:last-child { text-align: right; }
.single-nav a { color: var(--green); font-weight: 600; }

/* Widgets */
.widget { background: var(--white); border-radius: var(--radius); padding: 20px 22px; margin-bottom: var(--gap); }
.widget-title { font-size: 1.05rem; color: var(--green-dark); margin-bottom: 12px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 6px 0; border-bottom: 1px dashed var(--green-soft); }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--ink); }
.widget ul li a:hover { color: var(--green); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-dark); color: var(--green-soft); padding: 46px 0 34px; }
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
    margin-bottom: 30px;
}
.footer-widgets > * { min-width: 0; }
.footer-widget .widget-title { color: var(--gold); }
.footer-widget a { color: var(--green-soft); }
.footer-widget a:hover { color: #fff; }
.footer-bottom { text-align: center; border-top: 1px solid rgba(246, 241, 231, 0.15); padding-top: 24px; }
.disclaimer-text { font-size: 0.82rem; line-height: 1.7; color: var(--green-soft); max-width: 760px; margin: 16px auto 0; }

/* ---------- Mobile tab bar (desktop: hidden) ---------- */
.mobile-tabbar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    background: var(--white);
    border-top: 2px solid var(--green-soft);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
.mtab {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: none;
    background: transparent;
    padding: 6px 2px;
    border-radius: 14px;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
}
.mtab-icon { width: 22px; height: 22px; }
.mtab.is-active, .mtab:hover { color: var(--green); background: var(--green-soft); }

/* Mobile menu sheet */
.mobile-menu-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 960;
    background: var(--green);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 24px 22px calc(86px + env(safe-area-inset-bottom, 0px));
}
.mobile-menu-sheet[hidden] { display: none; }
.mobile-menu-list { list-style: none; margin: 0 0 18px; padding: 0; }
.mobile-menu-list li { border-bottom: 1px solid rgba(246, 241, 231, 0.18); }
.mobile-menu-list li a {
    display: block;
    padding: 13px 4px;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.02rem;
}
.mobile-menu-actions { display: flex; gap: 10px; }
.mobile-menu-actions .btn-login { border-color: #fff; color: #fff; }
.mobile-menu-actions .btn-login:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Overflow & misc fixes ---------- */
.site-main { min-width: 0; }
.front-main { padding-top: 6px; }
figure, iframe, video { max-width: 100%; }

/* ---------- Bento entrance motion (staggered reveal) ---------- */
@keyframes bento-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.bento-panel.is-active .bento-grid > * { animation: bento-rise 0.5s ease both; }
.bento-panel.is-active .bento-grid > *:nth-child(2) { animation-delay: 0.06s; }
.bento-panel.is-active .bento-grid > *:nth-child(3) { animation-delay: 0.12s; }
.bento-panel.is-active .bento-grid > *:nth-child(4) { animation-delay: 0.18s; }
.bento-panel.is-active .bento-grid > *:nth-child(5) { animation-delay: 0.24s; }
.bento-panel.is-active .bento-grid > *:nth-child(6) { animation-delay: 0.3s; }
.bento-panel.is-active .bento-grid > *:nth-child(7) { animation-delay: 0.36s; }
.bento-panel.is-active .bento-grid > *:nth-child(8) { animation-delay: 0.42s; }
.bento-panel.is-active .bento-grid > *:nth-child(9) { animation-delay: 0.48s; }
.bento-panel.is-active .bento-grid > *:nth-child(n+10) { animation-delay: 0.54s; }
@media (prefers-reduced-motion: reduce) {
    .bento-panel.is-active .bento-grid > * { animation: none; }
    .btn:hover, a.b-card:hover, .post-card:hover { transform: none; }
}
