@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Be+Vietnam+Pro:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ── Guard: chặn tràn ngang toàn trang ───────────────────────────── */
html, body { overflow-x: hidden; }

:root {
    --petrol: #006064;
    --petrol-deep: #00363A;
    --petrol-ink: #042A2D;
    --sand: #E0C097;
    --sand-soft: #F0E2CB;
    --foam: #F4F9F9;
    --white: #FFFFFF;
    --line: rgba(0, 96, 100, 0.14);
    --shadow-card: 0 10px 30px rgba(0, 54, 58, 0.12);
    --shadow-focus: 0 34px 70px rgba(0, 54, 58, 0.38);
    --radius: 16px;
    --font-display: 'Bricolage Grotesque', 'Be Vietnam Pro', sans-serif;
    --font-body: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
}

/* ── Nền tảng ─────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background:
        radial-gradient(1100px 500px at 85% -80px, rgba(224, 192, 151, 0.22), transparent 60%),
        radial-gradient(900px 460px at -120px 300px, rgba(0, 96, 100, 0.10), transparent 62%),
        var(--foam);
    color: var(--petrol-ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--petrol); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--petrol-deep); }
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ── Nút ──────────────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .04em;
    padding: 11px 24px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-login { color: var(--petrol); border-color: var(--petrol); background: transparent; }
.btn-login:hover { background: rgba(0, 96, 100, .08); color: var(--petrol); }
.btn-register { color: var(--white); background: var(--petrol); }
.btn-register:hover { background: var(--petrol-deep); color: var(--white); }
.btn-download {
    color: var(--petrol-ink);
    background: linear-gradient(135deg, var(--sand) 0%, #F5E3C4 55%, var(--sand) 100%);
    box-shadow: 0 10px 24px rgba(224, 192, 151, 0.45);
}
.btn-download:hover { box-shadow: 0 16px 34px rgba(224, 192, 151, 0.6); color: var(--petrol-ink); }

/* ── Đầu trang ────────────────────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 90;
    background: rgba(244, 249, 249, 0.86);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 74px; }
.site-logo { flex: 0 0 auto; }
.logo-img { max-height: 46px; width: auto; }
.main-nav { flex: 1 1 auto; min-width: 0; }
.nav-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.nav-menu li a {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    color: var(--petrol-deep);
}
.nav-menu li a:hover, .nav-menu li.current-menu-item a {
    background: var(--petrol);
    color: var(--sand-soft);
}
.header-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.nav-toggle { display: none; }

/* ── Thanh bánh mì ────────────────────────────────────────────────── */
.breadcrumb-bar {
    background: linear-gradient(90deg, var(--petrol-deep), var(--petrol) 65%, #00797E);
    border-bottom: 3px solid var(--sand);
}
.breadcrumb {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 11px 0;
    font-size: 13.5px; letter-spacing: .02em;
}
.breadcrumb-home { color: var(--sand); font-weight: 600; }
.breadcrumb-home:hover { color: var(--white); }
.breadcrumb-sep { color: rgba(240, 226, 203, 0.55); }
.breadcrumb-current { color: var(--white); font-weight: 500; }

/* ── Tiêu đề khu vực ──────────────────────────────────────────────── */
.section-head { margin: 54px 0 26px; }
.section-kicker {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 12px; font-weight: 700;
    letter-spacing: .28em; text-transform: uppercase;
    color: var(--petrol);
    background: rgba(0, 96, 100, .08);
    border: 1px solid var(--line);
    padding: 6px 14px; border-radius: 999px;
    margin-bottom: 14px;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800; line-height: 1.12;
    color: var(--petrol-ink);
    letter-spacing: -0.01em;
}
.section-title em {
    font-style: normal;
    background: linear-gradient(100deg, #B98A4E, var(--sand) 55%, #CBA26B);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-cta { text-align: center; margin: 38px 0 6px; }

/* ── Phòng trưng bày cuộn ngang (focus gallery) ───────────────────── */
.gallery-section { padding: 44px 0 30px; overflow: hidden; }
.gallery-shell {
    position: relative;
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    grid-template-areas: "prev track next";
    align-items: center;
    min-width: 0;
    max-width: 1400px;
    margin: 0 auto;
}
.gallery-viewport { grid-area: track; overflow: hidden; min-width: 0; border-radius: var(--radius); }
.gallery-track {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 46px calc(max((100vw - 1240px) / 2, 20px)) 52px;
    min-width: 0;
    scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.slide-card {
    flex: 0 0 auto;
    width: clamp(280px, 52vw, 640px);
    scroll-snap-align: center;
    border-radius: var(--radius);
    transform: scale(0.8) translateY(14px);
    opacity: .55;
    filter: saturate(.8);
    box-shadow: var(--shadow-card);
    transition: transform .55s cubic-bezier(.22, 1, .36, 1), opacity .55s ease, filter .55s ease, box-shadow .55s ease;
    cursor: pointer;
    background: var(--petrol-deep);
}
.slide-card:hover { opacity: .8; }
.slide-card.is-focus {
    transform: scale(1) translateY(0);
    opacity: 1;
    filter: none;
    box-shadow: var(--shadow-focus);
    cursor: default;
    z-index: 2;
}
.slide-link { display: block; position: relative; border-radius: var(--radius); overflow: hidden; }
.slide-link img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.slide-tag {
    position: absolute; left: 16px; top: 16px;
    font-family: var(--font-display);
    font-weight: 800; font-size: 12px; letter-spacing: .18em;
    color: var(--petrol-ink);
    background: linear-gradient(120deg, var(--sand), #F5E3C4);
    padding: 6px 13px; border-radius: 999px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .25);
}
.gallery-arrow {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    background: var(--white);
    color: var(--petrol);
    font-size: 26px; line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: background .25s ease, color .25s ease, transform .25s ease;
    z-index: 3;
}
.gallery-arrow:hover { background: var(--petrol); color: var(--sand-soft); transform: scale(1.08); }
.gallery-prev { grid-area: prev; justify-self: center; }
.gallery-next { grid-area: next; justify-self: center; }
.gallery-dots { display: flex; justify-content: center; gap: 9px; margin-top: 8px; }
.gallery-dot {
    width: 10px; height: 10px; border-radius: 999px;
    border: none; cursor: pointer;
    background: rgba(0, 96, 100, .22);
    transition: width .3s ease, background .3s ease;
}
.gallery-dot.is-active { width: 30px; background: var(--sand); box-shadow: 0 0 0 3px rgba(224, 192, 151, .3); }

/* ── Dải áp phích ─────────────────────────────────────────────────── */
.poster-section { padding: 26px 0 56px; }
.poster-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-areas: "p1 p2 p3 p4 p5 p6";
    gap: 16px;
}
.poster-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform .4s cubic-bezier(.22, 1, .36, 1), box-shadow .4s ease;
}
.poster-card:nth-child(1) { grid-area: p1; }
.poster-card:nth-child(2) { grid-area: p2; }
.poster-card:nth-child(3) { grid-area: p3; }
.poster-card:nth-child(4) { grid-area: p4; }
.poster-card:nth-child(5) { grid-area: p5; }
.poster-card:nth-child(6) { grid-area: p6; }
.poster-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .6s ease; }
.poster-card:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: var(--shadow-focus); }
.poster-card:hover img { transform: scale(1.07); }
.poster-shine {
    position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .34) 48%, transparent 62%);
    transform: translateX(-120%);
    transition: transform .8s ease;
    pointer-events: none;
}
.poster-card:hover .poster-shine { transform: translateX(120%); }

/* ── Lưới trò chơi ────────────────────────────────────────────────── */
.games-section {
    padding: 56px 0 62px;
    background:
        linear-gradient(180deg, rgba(0, 96, 100, 0.045), rgba(0, 96, 100, 0)),
        repeating-linear-gradient(45deg, rgba(0, 96, 100, .03) 0 2px, transparent 2px 26px);
}
.games-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}
.game-tile { display: block; text-align: center; }
.game-thumb {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--petrol-deep);
    box-shadow: var(--shadow-card);
    transition: transform .4s cubic-bezier(.22, 1, .36, 1), box-shadow .4s ease;
}
.game-thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .5s ease; }
.game-tile:hover .game-thumb { transform: translateY(-7px); box-shadow: var(--shadow-focus); }
.game-tile:hover .game-thumb img { transform: scale(1.08); }
.game-name {
    display: block;
    margin-top: 10px;
    font-weight: 600; font-size: 14px;
    color: var(--petrol-deep);
}
.game-tile:hover .game-name { color: var(--petrol); }

/* ── Tin tức ──────────────────────────────────────────────────────── */
.news-section { padding: 30px 0 70px; }
.news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas: "main aside";
    gap: 34px;
    min-width: 0;
}
.news-main { grid-area: main; min-width: 0; }
.news-side { grid-area: aside; min-width: 0; }
.news-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
.news-main > .news-card { margin-top: 0; }
.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    transition: transform .35s ease, box-shadow .35s ease;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-focus); }
.news-thumb { display: block; overflow: hidden; }
.news-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .55s ease; }
.news-card:hover .news-thumb img { transform: scale(1.06); }
.news-body { padding: 18px 20px 22px; }
.news-meta { margin-bottom: 8px; }
.news-date { font-size: 12.5px; letter-spacing: .06em; color: rgba(4, 42, 45, .55); }
.news-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.news-title a { color: var(--petrol-ink); }
.news-title a:hover { color: var(--petrol); }
.news-excerpt { font-size: 14px; color: rgba(4, 42, 45, .72); margin-bottom: 10px; }
.news-more { font-weight: 700; font-size: 13.5px; color: #B98A4E; }
.news-more:hover { color: var(--petrol); }
.side-box {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 24px;
    margin-bottom: 22px;
}
.side-box p { font-size: 14px; color: rgba(4, 42, 45, .72); margin: 10px 0 16px; }
.side-title {
    font-family: var(--font-display); font-size: 18px; font-weight: 700;
    color: var(--petrol-deep);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--sand);
    margin-bottom: 6px;
}

/* ── Bố cục nội dung (index / archive / single / page) ────────────── */
.site-content { min-height: 60vh; }
.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas: "main aside";
    gap: 34px;
    padding: 40px 0 70px;
    min-width: 0;
}
.content-main { grid-area: main; min-width: 0; }
.content-side { grid-area: aside; min-width: 0; }
.post-list { display: grid; gap: 24px; }
.post-card {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform .35s ease, box-shadow .35s ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-focus); }
.post-thumb { display: block; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.post-card:hover .post-thumb img { transform: scale(1.06); }
.post-body { padding: 22px 26px; }
.post-meta { display: flex; gap: 14px; font-size: 12.5px; letter-spacing: .05em; color: rgba(4, 42, 45, .55); margin-bottom: 10px; }
.post-cat { color: #B98A4E; font-weight: 700; }
.post-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.post-title a { color: var(--petrol-ink); }
.post-title a:hover { color: var(--petrol); }
.post-excerpt { font-size: 14.5px; color: rgba(4, 42, 45, .72); margin-bottom: 12px; }
.archive-desc { font-size: 14.5px; color: rgba(4, 42, 45, .7); margin-top: 10px; max-width: 640px; }
.pagination-wrap { margin-top: 36px; }
.pagination-wrap .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination-wrap .page-numbers {
    display: inline-block;
    min-width: 42px; padding: 9px 13px;
    text-align: center;
    border-radius: 12px;
    border: 1.5px solid var(--line);
    background: var(--white);
    font-weight: 600; font-size: 14px;
    color: var(--petrol-deep);
}
.pagination-wrap .page-numbers.current { background: var(--petrol); border-color: var(--petrol); color: var(--sand-soft); }
.pagination-wrap .page-numbers:hover { border-color: var(--petrol); }
.empty-note { padding: 40px 0; color: rgba(4, 42, 45, .6); }

/* ── Trang bài viết đơn ───────────────────────────────────────────── */
.single-article {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 36px 40px 40px;
}
.single-article .section-head { margin: 0 0 22px; }
.single-meta { margin-top: 12px; }
.post-author { color: #B98A4E; font-weight: 700; }
.single-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; }
.entry-content { font-size: 16px; line-height: 1.85; color: rgba(4, 42, 45, .86); }
.entry-content p { margin-bottom: 1.1em; }
.entry-content h2, .entry-content h3 { font-family: var(--font-display); color: var(--petrol-deep); margin: 1.4em 0 .6em; }
.entry-content img { border-radius: 12px; margin: 1em 0; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.single-download { text-align: center; margin-top: 30px; }
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "prev next";
    gap: 18px;
    margin-top: 26px;
}
.post-nav-item {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 18px 22px;
}
.post-nav-prev { grid-area: prev; }
.post-nav-next { grid-area: next; text-align: right; }
.post-nav-label { display: block; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(4, 42, 45, .5); margin-bottom: 6px; }
.post-nav-item a { font-family: var(--font-display); font-weight: 700; color: var(--petrol-deep); }
.post-nav-item a:hover { color: var(--petrol); }
.related-section { margin-top: 44px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* ── Hiệu ứng hiện dần (IntersectionObserver) ─────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
.lazy-img { opacity: 0; transition: opacity .6s ease; }
.lazy-img.is-loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .reveal, .slide-card, .poster-card, .game-tile { transition: none; }
    .reveal { opacity: 1; transform: none; }
}

/* ── Chân trang ───────────────────────────────────────────────────── */
.site-footer {
    background:
        radial-gradient(700px 300px at 50% -120px, rgba(224, 192, 151, .16), transparent 70%),
        var(--petrol-deep);
    color: rgba(244, 249, 249, .85);
    padding: 54px 0 30px;
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas: "one two three";
    gap: 34px;
    padding-bottom: 34px;
    border-bottom: 1px solid rgba(244, 249, 249, .14);
}
.footer-widget:nth-child(1) { grid-area: one; }
.footer-widget:nth-child(2) { grid-area: two; }
.footer-widget:nth-child(3) { grid-area: three; }
.footer-widget .widget-title { font-family: var(--font-display); color: var(--sand); font-size: 17px; margin-bottom: 14px; }
.footer-widget ul { list-style: none; }
.footer-widget ul li { margin-bottom: 8px; }
.footer-widget a { color: rgba(244, 249, 249, .8); }
.footer-widget a:hover { color: var(--sand); }
.footer-download { text-align: center; padding: 32px 0; }
.footer-bottom { text-align: center; padding-top: 8px; }
.disclaimer-text { font-size: 13px; line-height: 1.8; color: rgba(244, 249, 249, .66); max-width: 760px; margin: 16px auto 0; }

/* ── Ghi chú lưới đáp ứng (grid-template-areas chỉ khai báo tại đây) ── */
@media (max-width: 991px) {
    .poster-strip {
        grid-template-columns: repeat(3, 1fr);
        grid-template-areas:
            "p1 p2 p3"
            "p4 p5 p6";
    }
    .gallery-shell { grid-template-columns: 1fr; grid-template-areas: "track"; }
    .news-layout,
    .content-layout { grid-template-columns: 1fr; grid-template-areas: "main" "aside"; }
    .footer-widgets { grid-template-columns: 1fr; grid-template-areas: "one" "two" "three"; }
}
@media (max-width: 768px) {
    .post-nav { grid-template-columns: 1fr; grid-template-areas: "prev" "next"; }
}
@media (max-width: 480px) {
    .poster-strip {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
            "p1 p2"
            "p3 p4"
            "p5 p6";
    }
}
