/* ==========================================================================
   Moban 8-10-30 — main.css
   Phong cách: Kẹo Anh Đào (Cherry Candy) — hồng cherry, bo góc 20px, tròn trịa
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap');

/* ---- Chống tràn ngang (bắt buộc) ---- */
html, body {
    overflow-x: hidden;
}

:root {
    --cherry: #880E4F;
    --cherry-deep: #5c0a36;
    --cherry-bright: #C2185B;
    --pink-bg: #FCE4EC;
    --pink-soft: #FFF3F7;
    --pink-card: #FFFFFF;
    --pink-line: #F8BBD0;
    --ink: #3E3A3C;
    --ink-soft: #7a6f74;
    --gold: #FFB300;
    --radius: 20px;
    --radius-lg: 28px;
    --shadow-pop: 0 10px 30px rgba(136, 14, 79, .16);
    --shadow-lift: 0 18px 40px rgba(136, 14, 79, .22);
    --font-display: 'Baloo 2', 'Segoe UI', sans-serif;
    --font-body: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
}

/* ---- Reset cơ bản ---- */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, .85) 0, transparent 34%),
        radial-gradient(circle at 92% 22%, rgba(248, 187, 208, .55) 0, transparent 42%),
        var(--pink-bg);
    background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cherry); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--cherry-bright); }
h1, h2, h3, h4, h5 { font-family: var(--font-display); color: var(--cherry); line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

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

/* ---- Nút ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    text-align: center;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-login {
    padding: 9px 20px;
    font-size: 14px;
    color: var(--cherry);
    background: #fff;
    border: 2px solid var(--pink-line);
}
.btn-login:hover { border-color: var(--cherry); color: var(--cherry); }
.btn-register {
    padding: 11px 22px;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--cherry-bright), var(--cherry));
    box-shadow: var(--shadow-pop);
}
.btn-big {
    padding: 15px 34px;
    font-size: 17px;
    color: #fff;
    background: linear-gradient(135deg, var(--cherry-bright), var(--cherry));
    box-shadow: var(--shadow-pop);
}
.btn-big:hover { box-shadow: var(--shadow-lift); color: #fff; }
.btn-white {
    background: #fff;
    color: var(--cherry);
    box-shadow: 0 10px 26px rgba(92, 10, 54, .28);
}
.btn-white:hover { color: var(--cherry-bright); }
.btn-outline-big {
    padding: 13px 32px;
    font-size: 16px;
    color: var(--cherry);
    background: transparent;
    border: 2px solid var(--cherry);
}
.btn-outline-big:hover { background: var(--cherry); color: #fff; }

/* ==========================================================================
   Header + Menu hamburger
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 243, 247, .92);
    backdrop-filter: blur(12px);
    border-bottom: 3px solid var(--pink-line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 74px;
}
.site-logo { min-width: 0; }
.logo-img { max-height: 52px; width: auto; }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* Nút hamburger — giống nhau trên desktop và mobile */
.nav-toggle {
    width: 52px;
    height: 52px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--cherry-bright), var(--cherry));
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: var(--shadow-pop);
    transition: transform .2s ease, box-shadow .2s ease;
}
.nav-toggle:hover { transform: translateY(-2px); }
.nav-toggle-bar {
    width: 24px;
    height: 3px;
    border-radius: 3px;
    background: #fff;
    transition: transform .3s ease, opacity .3s ease;
}
body.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
body.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Panel menu thả xuống */
.nav-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .45s ease;
    background: var(--pink-soft);
}
body.nav-open .nav-panel { max-height: 560px; border-top: 2px dashed var(--pink-line); }
.nav-panel-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0;
    flex-wrap: wrap;
}
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.nav-menu li a {
    display: inline-block;
    padding: 10px 20px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    color: var(--cherry);
    background: #fff;
    border-radius: 999px;
    border: 2px solid var(--pink-line);
    transition: all .2s ease;
}
.nav-menu li a:hover,
.nav-menu li.current-menu-item a {
    background: var(--cherry);
    border-color: var(--cherry);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-pop);
}

/* ==========================================================================
   F-01 Thư viện poster cuộn ngang
   ========================================================================== */
.poster-section { padding: 46px 0 34px; position: relative; }
.poster-heading { text-align: center; margin-bottom: 26px; }
.poster-title { font-size: 40px; font-weight: 800; margin-bottom: 6px; }
.poster-sub { color: var(--ink-soft); font-size: 16px; margin: 0; }

.gallery-shell {
    position: relative;
    min-width: 0;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 54px;
}
.gallery-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 14px 6px 24px;
    cursor: grab;
    min-width: 0;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track.dragging { scroll-behavior: auto; cursor: grabbing; user-select: none; }
.poster-card {
    position: relative;
    flex: 0 0 auto;
    width: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--pink-card);
    border: 4px solid #fff;
    box-shadow: var(--shadow-pop);
    transition: transform .3s ease, box-shadow .3s ease;
}
.poster-card:hover { transform: translateY(-8px) rotate(-.5deg); box-shadow: var(--shadow-lift); }
.poster-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; pointer-events: none; }
.poster-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 14px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .5px;
    color: var(--cherry);
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(92, 10, 54, .25);
}
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-family: var(--font-display);
    line-height: 1;
    color: var(--cherry);
    background: #fff;
    border: 2px solid var(--pink-line);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-pop);
    transition: all .2s ease;
}
.gallery-arrow:hover { background: var(--cherry); color: #fff; border-color: var(--cherry); transform: translateY(-50%) scale(1.08); }
.gallery-prev { left: 0; }
.gallery-next { right: 0; }
.gallery-dots { display: flex; justify-content: center; gap: 9px; margin-top: 6px; }
.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--pink-line);
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: all .25s ease;
}
.gallery-dot.active { background: var(--cherry); width: 26px; border-radius: 999px; }

/* ==========================================================================
   Tiêu đề khu chung
   ========================================================================== */
.section-head { text-align: center; margin-bottom: 28px; }
.section-title { font-size: 30px; font-weight: 800; margin-bottom: 4px; }
.section-sub { color: var(--ink-soft); margin: 0; font-size: 15px; }

/* ==========================================================================
   F-02 Khu game có thể tìm kiếm
   ========================================================================== */
.games-section { padding: 44px 0; }
.game-search-wrap {
    position: relative;
    max-width: 560px;
    margin: 0 auto 30px;
}
.game-search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
}
.game-search-input {
    width: 100%;
    padding: 16px 24px 16px 56px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--ink);
    background: #fff;
    border: 3px solid var(--pink-line);
    border-radius: 999px;
    outline: none;
    box-shadow: var(--shadow-pop);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.game-search-input::placeholder { color: #c39aab; }
.game-search-input:focus { border-color: var(--cherry); box-shadow: 0 0 0 5px rgba(136, 14, 79, .12); }

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 20px;
}
.game-card {
    position: relative;
    display: block;
    background: var(--pink-card);
    border: 3px solid #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-pop);
    transition: transform .25s ease, box-shadow .25s ease;
}
.game-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-lift); }
.game-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.game-name {
    display: block;
    padding: 10px 12px 2px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    color: var(--cherry);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.game-rating {
    display: inline-block;
    margin: 0 12px 12px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--cherry-deep);
    background: var(--pink-bg);
    border-radius: 999px;
}
.game-card.is-hidden { display: none; }
.game-empty {
    text-align: center;
    color: var(--ink-soft);
    font-size: 17px;
    padding: 30px 0;
}
.games-more { text-align: center; margin-top: 32px; }

/* ==========================================================================
   F-03 Tin tức / danh sách bài viết
   ========================================================================== */
.news-section { padding: 44px 0 54px; }
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.news-card {
    background: var(--pink-card);
    border: 3px solid #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-pop);
    transition: transform .25s ease, box-shadow .25s ease;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.news-card-link { display: block; height: 100%; color: inherit; }
.news-thumb { overflow: hidden; }
.news-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s ease; }
.news-card:hover .news-thumb img { transform: scale(1.07); }
.news-body { padding: 18px 20px 22px; }
.news-date {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--cherry-bright);
    background: var(--pink-bg);
    padding: 3px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
}
.news-title {
    font-size: 18px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card:hover .news-title { color: var(--cherry-bright); }
.news-excerpt {
    color: var(--ink-soft);
    font-size: 14px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-readmore { font-family: var(--font-display); font-weight: 700; color: var(--cherry-bright); font-size: 14px; }
.news-more { text-align: center; margin-top: 34px; }
.news-empty { text-align: center; color: var(--ink-soft); grid-column: 1 / -1; }

/* ==========================================================================
   F-04 Dải CTA
   ========================================================================== */
.cta-band { padding: 10px 0 60px; }
.cta-band-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    padding: 38px 44px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .22) 0, transparent 34%),
        radial-gradient(circle at 8% 92%, rgba(255, 255, 255, .16) 0, transparent 30%),
        linear-gradient(120deg, var(--cherry-bright), var(--cherry-deep));
    box-shadow: var(--shadow-lift);
}
.cta-band-title { color: #fff; font-size: 26px; margin-bottom: 4px; }
.cta-band-sub { color: rgba(255, 255, 255, .85); margin: 0; }

/* ==========================================================================
   Trang danh sách / hero trang trong
   ========================================================================== */
.page-hero {
    padding: 44px 0 10px;
    text-align: center;
}
.page-hero-title { font-size: 36px; font-weight: 800; margin-bottom: 6px; overflow-wrap: anywhere; }
.page-hero-sub { color: var(--ink-soft); margin: 0; }
.listing-section { padding: 30px 0 56px; }
.pagination-wrap { margin-top: 40px; text-align: center; }
.pagination-wrap .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pagination-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--cherry);
    background: #fff;
    border: 2px solid var(--pink-line);
    border-radius: 999px;
    transition: all .2s ease;
}
.pagination-wrap .page-numbers:hover { transform: translateY(-2px); border-color: var(--cherry); }
.pagination-wrap .page-numbers.current { background: var(--cherry); color: #fff; border-color: var(--cherry); }
.empty-box {
    text-align: center;
    padding: 50px 20px;
    background: var(--pink-soft);
    border: 2px dashed var(--pink-line);
    border-radius: var(--radius);
}
.empty-box .search-form { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.empty-box .search-field {
    padding: 12px 20px;
    border: 2px solid var(--pink-line);
    border-radius: 999px;
    font-family: var(--font-body);
    outline: none;
    min-width: 240px;
}
.empty-box .search-submit {
    padding: 12px 24px;
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    background: var(--cherry);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

/* ==========================================================================
   Trang chi tiết bài viết / trang tĩnh
   ========================================================================== */
.post-detail {
    max-width: 860px;
    margin: 0 auto;
    background: var(--pink-card);
    border: 3px solid #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-pop);
    padding: 40px 46px;
}
.post-detail-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.post-detail-thumb img { width: 100%; }
.post-detail-title { font-size: 34px; margin-bottom: 12px; overflow-wrap: anywhere; }
.post-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    font-size: 13px;
    color: var(--ink-soft);
    padding-bottom: 18px;
    margin-bottom: 24px;
    border-bottom: 2px dashed var(--pink-line);
}
.post-detail-meta a { color: var(--cherry-bright); }
.post-detail-content { font-size: 16.5px; overflow-wrap: anywhere; }
.post-detail-content img { border-radius: var(--radius); }
.post-detail-content h2 { font-size: 26px; margin-top: 1.4em; }
.post-detail-content h3 { font-size: 21px; margin-top: 1.2em; }
.post-detail-content blockquote {
    margin: 24px 0;
    padding: 18px 26px;
    background: var(--pink-bg);
    border-left: 6px solid var(--cherry);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--cherry-deep);
}
.post-detail-content a { text-decoration: underline; }
.post-detail-content table { border-collapse: collapse; width: 100%; }
.post-detail-content table td, .post-detail-content table th { border: 1px solid var(--pink-line); padding: 8px 12px; }
.page-links { margin: 24px 0; font-family: var(--font-display); font-weight: 700; color: var(--cherry); }

.post-detail-cta {
    text-align: center;
    margin: 36px 0 26px;
    padding: 30px 24px;
    border-radius: var(--radius);
    background: var(--pink-bg);
    border: 2px dashed var(--pink-line);
}
.post-detail-cta-title { font-family: var(--font-display); font-weight: 700; color: var(--cherry); font-size: 18px; margin-bottom: 16px; }
.post-detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; font-size: 13px; color: var(--ink-soft); }
.post-detail-tags a {
    padding: 4px 14px;
    background: var(--pink-bg);
    border-radius: 999px;
    color: var(--cherry);
    font-weight: 600;
}
.post-detail-tags a:hover { background: var(--cherry); color: #fff; }

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 30px;
}
.post-nav-item {
    padding: 18px 20px;
    background: var(--pink-soft);
    border: 2px solid var(--pink-line);
    border-radius: var(--radius);
    min-width: 0;
}
.post-nav-item.next { text-align: right; }
.post-nav-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.post-nav-item a { font-family: var(--font-display); font-weight: 700; color: var(--cherry); display: inline-block; overflow-wrap: anywhere; }
.post-nav-next { text-align: right; }

.related-section { max-width: 1100px; margin: 56px auto 0; }
.related-section .section-title { text-align: center; margin-bottom: 26px; }

/* ---- Bình luận ---- */
.comments-area { max-width: 860px; margin: 36px auto 0; }
.comments-area .comment-list { list-style: none; padding: 0; margin: 0; }
.comments-area .comment-body {
    padding: 18px 22px;
    background: var(--pink-soft);
    border: 2px solid var(--pink-line);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.comments-area .comment-form input[type="text"],
.comments-area .comment-form input[type="email"],
.comments-area .comment-form input[type="url"],
.comments-area .comment-form textarea {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid var(--pink-line);
    border-radius: var(--radius);
    font-family: var(--font-body);
    outline: none;
    background: #fff;
}
.comments-area .comment-form input:focus, .comments-area .comment-form textarea:focus { border-color: var(--cherry); }
.comments-area .form-submit .submit {
    padding: 12px 30px;
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    background: var(--cherry);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

/* ==========================================================================
   Widget (sidebar / footer)
   ========================================================================== */
.widget { margin-bottom: 26px; }
.widget-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--cherry);
    margin-bottom: 12px;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 6px 0; border-bottom: 1px dashed var(--pink-line); }
.widget ul li a { color: var(--ink); }
.widget ul li a:hover { color: var(--cherry-bright); }
.widget select, .widget input[type="text"], .widget input[type="search"] {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid var(--pink-line);
    border-radius: 999px;
    font-family: var(--font-body);
    outline: none;
    background: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    margin-top: 20px;
    background: linear-gradient(160deg, var(--cherry-deep), var(--cherry));
    color: rgba(255, 255, 255, .88);
    border-radius: 36px 36px 0 0;
    padding: 54px 0 30px;
}
.site-footer .widget-title { color: #fff; }
.site-footer .widget ul li { border-color: rgba(255, 255, 255, .18); }
.site-footer .widget ul li a { color: rgba(255, 255, 255, .85); }
.site-footer .widget ul li a:hover { color: var(--pink-line); }
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    padding-bottom: 34px;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.footer-cta { text-align: center; padding: 34px 0 26px; }
.footer-cta-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff; margin-bottom: 16px; }
.footer-bottom { text-align: center; padding-top: 20px; }
.disclaimer-text {
    max-width: 760px;
    margin: 18px auto 10px;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .78);
}
.footer-copy { font-size: 12.5px; color: rgba(255, 255, 255, .55); margin: 14px 0 0; }

/* ==========================================================================
   Hiệu ứng xuất hiện khi cuộn
   ========================================================================== */
.scroll-reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.scroll-reveal.revealed { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .gallery-track { scroll-behavior: auto; }
    .scroll-reveal { opacity: 1; transform: none; transition: none; }
    .btn, .poster-card, .game-card, .news-card { transition: none; }
}
