/* ==========================================================================
   Moban 8-10-26 — main.css
   Aesthetic: "Denim Arcade" — denim blue #1565C0 x salmon pink #FF8A80
   on misty #F0F4F8, Bungee display type, full-width snap gallery.
   ========================================================================== */

/* --- Guard: chống tràn ngang (BẮT BUỘC ở đầu file) --- */
html, body {
    overflow-x: hidden;
}

:root {
    --c-primary: #1565C0;
    --c-primary-deep: #0D47A1;
    --c-accent: #FF8A80;
    --c-accent-deep: #FF5252;
    --c-bg: #F0F4F8;
    --c-surface: #FFFFFF;
    --c-ink: #1C2B3A;
    --c-ink-soft: #5A6B80;
    --radius: 14px;
    --shadow-card: 0 10px 24px rgba(13, 71, 161, .12);
    --shadow-big: 0 24px 48px rgba(13, 71, 161, .22);
    --font-display: 'Bungee', 'Roboto', sans-serif;
    --font-body: 'Be Vietnam Pro', 'Roboto', sans-serif;
}

.site-content {
    min-width: 0;
    padding-top: 84px;
}

/* ============================ Header ============================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 90;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--c-primary);
    box-shadow: 0 6px 20px rgba(13, 71, 161, .08);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 68px;
    min-width: 0;
}
.site-logo { flex: 0 0 auto; min-width: 0; }
.logo-img { max-height: 46px; width: auto; display: block; }

.main-nav { flex: 1 1 auto; min-width: 0; }
.nav-menu {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-menu::-webkit-scrollbar { display: none; }
.nav-menu a {
    display: block;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 15px;
    color: var(--c-ink);
    border-radius: 14px;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.nav-menu a:hover,
.nav-menu li.current-menu-item > a,
.nav-menu li.current_page_item > a {
    background: var(--c-primary);
    color: #fff;
}

.header-actions { display: flex; gap: 10px; flex: 0 0 auto; }

/* ============================ Buttons ============================ */
.btn {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .3px;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-login {
    border-color: var(--c-primary);
    color: var(--c-primary);
    background: transparent;
}
.btn-login:hover { background: rgba(21, 101, 192, .08); color: var(--c-primary); }
.btn-register {
    background: var(--c-primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(21, 101, 192, .35);
}
.btn-register:hover { background: var(--c-primary-deep); color: #fff; }
.btn-download {
    background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-deep) 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 82, 82, .35);
}
.btn-download:hover { color: #fff; box-shadow: 0 12px 26px rgba(255, 82, 82, .45); }
.btn-outline {
    border-color: var(--c-accent);
    color: var(--c-accent-deep);
}
.btn-outline:hover { background: rgba(255, 138, 128, .12); color: var(--c-accent-deep); }

.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--c-primary);
    border-radius: 14px;
    width: 42px; height: 42px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    display: block;
    width: 20px; height: 2px;
    background: var(--c-primary);
    border-radius: 2px;
    position: relative;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

/* ============================ Sections ============================ */
.hp-section { padding: 56px 0 34px; min-width: 0; }
.section-head { margin-bottom: 26px; position: relative; }
.section-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 30px;
    line-height: 1.25;
    color: var(--c-primary-deep);
    margin: 0 0 6px;
    text-transform: none;
}
.section-title::after {
    content: "";
    display: block;
    width: 72px; height: 6px;
    margin-top: 10px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
}
.section-sub { color: var(--c-ink-soft); margin: 0; font-size: 15px; }

/* ============================ Gallery ============================ */
.gallery-section {
    background:
        radial-gradient(900px 340px at 8% 0%, rgba(21, 101, 192, .10), transparent 60%),
        radial-gradient(700px 300px at 95% 100%, rgba(255, 138, 128, .12), transparent 60%);
}
.gallery-shell {
    min-width: 0;
    position: relative;
    padding: 6px 0 10px;
}
.gallery-track {
    display: flex;
    gap: 22px;
    min-width: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: 5vw;
    padding: 14px 5vw 26px;
    scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide {
    flex: 0 0 min(84vw, 860px);
    min-width: 0;
    scroll-snap-align: center;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-big);
    background: var(--c-surface);
    transition: transform .3s ease, box-shadow .3s ease;
}
.gallery-slide:hover {
    transform: translateY(-6px);
    box-shadow: 0 32px 60px rgba(13, 71, 161, .3);
}
.gallery-slide img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}
.gallery-slide:hover img { transform: scale(1.05); }

/* Hover reveal: lớp phủ nổi lên khi rê chuột */
.slide-veil {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px;
    padding: 34px;
    background: linear-gradient(180deg, rgba(13, 71, 161, 0) 30%, rgba(13, 71, 161, .82) 100%);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .32s ease, transform .32s ease;
}
.gallery-slide:hover .slide-veil,
.gallery-slide:focus-within .slide-veil {
    opacity: 1;
    transform: translateY(0);
}
.slide-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 26px;
    color: #fff;
    margin: 0;
    text-shadow: 0 3px 12px rgba(0, 0, 0, .35);
}
.slide-desc { color: rgba(255, 255, 255, .88); margin: 0; font-size: 15px; max-width: 520px; }

/* Chấm tròn phòng trưng bày */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
}
.gallery-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(21, 101, 192, .25);
    cursor: pointer;
    transition: transform .25s ease, background .25s ease, width .25s ease;
}
.gallery-dot:hover { background: rgba(21, 101, 192, .5); }
.gallery-dot.active {
    background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
    width: 30px;
    border-radius: 8px;
}

/* ============================ Games rail ============================ */
.games-section { background: var(--c-surface); }
.games-shell { min-width: 0; }
.games-rail {
    display: flex;
    gap: 18px;
    min-width: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding: 16px 5vw 24px;
    scrollbar-width: none;
}
.games-rail::-webkit-scrollbar { display: none; }
.game-card {
    flex: 0 0 172px;
    min-width: 0;
    scroll-snap-align: start;
    background: var(--c-bg);
    border-radius: 14px;
    overflow: hidden;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: transform .25s ease, box-shadow .25s ease;
}
.game-card:hover {
    transform: translateY(-6px) rotate(-1deg);
    box-shadow: var(--shadow-big);
}
.game-card img { width: 100%; height: 172px; object-fit: cover; display: block; }
.game-name {
    display: block;
    padding: 10px 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--c-primary-deep);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================ News ============================ */
.news-section { background: var(--c-bg); }
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    min-width: 0;
}
.news-card {
    min-width: 0;
    background: var(--c-surface);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform .25s ease, box-shadow .25s ease;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-big); }
.news-card-link { display: block; color: inherit; }
.news-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: #DCE6F2; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card:hover .news-thumb img { transform: scale(1.06); }
.news-body { padding: 18px; min-width: 0; }
.news-date { font-size: 12px; color: var(--c-accent-deep); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.news-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--c-ink);
    margin: 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-excerpt { font-size: 14px; color: var(--c-ink-soft); margin: 0; }
.news-more { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--c-primary); font-size: 14px; }
.news-empty { color: var(--c-ink-soft); }
.news-foot { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }

/* ============================ Section dots (bên phải) ============================ */
.section-dots {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 80;
}
.section-dot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.section-dot::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    color: var(--c-primary-deep);
    background: #fff;
    border-radius: 8px;
    padding: 3px 8px;
    box-shadow: var(--shadow-card);
    opacity: 0;
    transform: translateX(6px);
    transition: opacity .25s ease, transform .25s ease;
}
.section-dot:hover::before { opacity: 1; transform: translateX(0); }
.section-dot i {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(21, 101, 192, .28);
    transition: background .25s ease, transform .25s ease;
}
.section-dot.active i {
    background: var(--c-accent-deep);
    transform: scale(1.35);
    box-shadow: 0 0 0 4px rgba(255, 82, 82, .18);
}

/* ============================ List / Single pages ============================ */
.list-main, .single-main { padding: 46px 0 60px; }
.list-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
    min-width: 0;
}
.list-col { min-width: 0; }
.list-head { margin-bottom: 26px; }
.list-breadcrumb { font-size: 13px; color: var(--c-ink-soft); }
.list-breadcrumb a { font-weight: 600; }
.list-breadcrumb span { margin: 0 6px; color: var(--c-accent-deep); }

.list-main .news-grid,
.archive-page .news-grid { grid-template-columns: repeat(2, 1fr); }

.pagination-bar { margin-top: 34px; text-align: center; }
.pagination-bar .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination-bar .page-numbers {
    display: inline-block;
    min-width: 40px;
    padding: 8px 12px;
    border-radius: 14px;
    background: var(--c-surface);
    color: var(--c-primary);
    font-weight: 700;
    box-shadow: var(--shadow-card);
}
.pagination-bar .page-numbers.current { background: var(--c-primary); color: #fff; }

.empty-state {
    background: var(--c-surface);
    border-radius: 14px;
    padding: 48px 24px;
    text-align: center;
    box-shadow: var(--shadow-card);
}

/* Sidebar */
.sidebar-col { min-width: 0; }
.sidebar-widget {
    background: var(--c-surface);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-card);
}
.cta-widget {
    background: linear-gradient(150deg, var(--c-primary) 0%, var(--c-primary-deep) 100%);
    color: #fff;
}
.cta-widget .widget-title { color: var(--c-accent); }
.cta-widget p { font-size: 14px; opacity: .92; }
.sidebar-search { display: flex; gap: 8px; min-width: 0; }
.search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 2px solid #DCE6F2;
    border-radius: 14px;
    padding: 8px 14px;
    font-family: var(--font-body);
}
.search-input:focus { outline: none; border-color: var(--c-primary); }
.search-btn {
    border: none;
    background: var(--c-accent);
    border-radius: 14px;
    width: 42px;
    cursor: pointer;
    font-size: 16px;
}

/* Single */
.single-card {
    background: var(--c-surface);
    border-radius: 14px;
    padding: 34px;
    box-shadow: var(--shadow-card);
    min-width: 0;
}
.single-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 30px;
    line-height: 1.3;
    color: var(--c-primary-deep);
    margin: 8px 0 12px;
}
.single-meta { display: flex; gap: 18px; color: var(--c-ink-soft); font-size: 13px; margin-bottom: 18px; }
.single-thumb { border-radius: 14px; overflow: hidden; margin-bottom: 22px; }
.single-thumb img { width: 100%; display: block; }
.entry-content { font-size: 16px; color: var(--c-ink); overflow-wrap: break-word; min-width: 0; }
.entry-content h2, .entry-content h3 { color: var(--c-primary-deep); }
.entry-content a { color: var(--c-primary); text-decoration: underline; }
.entry-content a:hover { color: var(--c-accent-deep); }
.entry-content blockquote {
    border-left: 4px solid var(--c-accent);
    background: var(--c-bg);
    margin: 18px 0;
    padding: 14px 18px;
    border-radius: 0 14px 14px 0;
}
.single-cta {
    margin-top: 26px;
    padding: 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(21, 101, 192, .08), rgba(255, 138, 128, .12));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.single-cta p { margin: 0; font-weight: 600; color: var(--c-primary-deep); }
.single-tags { margin-top: 18px; }
.single-tags a {
    display: inline-block;
    background: var(--c-bg);
    color: var(--c-primary);
    border-radius: 10px;
    padding: 4px 12px;
    margin: 4px 6px 0 0;
    font-size: 13px;
}
.single-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
    min-width: 0;
}
.single-nav-item {
    min-width: 0;
    background: var(--c-surface);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: var(--shadow-card);
}
.single-nav-item.next { text-align: right; }
.single-nav-item a { font-weight: 600; font-size: 14px; }
.comments-shell { margin-top: 26px; }
.page-shell { max-width: 900px; margin: 0 auto; min-width: 0; padding: 46px 0 60px; }

/* ============================ Footer ============================ */
.site-footer {
    margin-top: 40px;
    background: var(--c-primary-deep);
    color: rgba(255, 255, 255, .85);
    padding: 44px 0 26px;
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    min-width: 0;
}
.footer-widget .widget-title { color: var(--c-accent); }
.footer-widget a { color: rgba(255, 255, 255, .8); }
.footer-widget a:hover { color: var(--c-accent); }
.footer-bottom {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .15);
    text-align: center;
}
.disclaimer-text { font-size: 13px; line-height: 1.7; color: rgba(255, 255, 255, .7); max-width: 760px; margin: 14px auto 0; }
