/* ============================================================
   Moban 8-10-11 — Indigo Pinboard (Pinterest-style waterfall)
   Palette: deep indigo #2C3E6B · gold #D4A017 · mist #F3F4F8
   ============================================================ */

/* --- Quy tắc nền tảng --- */
html, body {
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --indigo: #2C3E6B;
    --indigo-deep: #1F2C4E;
    --indigo-ink: #16203A;
    --gold: #D4A017;
    --gold-soft: #E8C25A;
    --mist: #F3F4F8;
    --card: #FFFFFF;
    --text: #232A3B;
    --text-soft: #5B6478;
    --line: #E2E5EF;
    --shadow-sm: 0 2px 8px rgba(31, 44, 78, .08);
    --shadow-md: 0 10px 28px rgba(31, 44, 78, .14);
    --shadow-lift: 0 22px 44px rgba(31, 44, 78, .22);
    --radius: 10px;
    --font-display: 'Bricolage Grotesque', 'Be Vietnam Pro', sans-serif;
    --font-body: 'Be Vietnam Pro', sans-serif;
}

html[data-theme="dark"] {
    --indigo: #3A4F86;
    --indigo-deep: #121A30;
    --indigo-ink: #0C1222;
    --mist: #0F1626;
    --card: #1A2338;
    --text: #E9ECF5;
    --text-soft: #9AA4BD;
    --line: #2A3550;
    --gold-soft: #F0CD6E;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, .45);
    --shadow-lift: 0 22px 44px rgba(0, 0, 0, .55);
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--mist);
    background-image: radial-gradient(rgba(44, 62, 107, .05) 1px, transparent 1px);
    background-size: 22px 22px;
    transition: background-color .3s ease, color .3s ease;
}

html[data-theme="dark"] body {
    background-image: radial-gradient(rgba(212, 160, 23, .05) 1px, transparent 1px);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--indigo);
    text-decoration: none;
    transition: color .2s ease;
}

a:hover {
    color: var(--gold);
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    line-height: 1.25;
    margin: 0 0 .5em;
}

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

/* --- Nút --- */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }

.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-deep); color: #fff; }

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    color: var(--indigo-ink);
    box-shadow: 0 4px 14px rgba(212, 160, 23, .35);
}
.btn-gold:hover { color: var(--indigo-ink); }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.btn-outline { background: var(--card); color: var(--indigo); border-color: var(--line); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-login { background: transparent; color: var(--text); border-color: var(--line); }
.btn-register { background: var(--indigo); color: #fff; }
html[data-theme="dark"] .btn-login { color: var(--text); }

/* --- Header & topbar --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.header-topbar {
    background: linear-gradient(90deg, var(--indigo-ink), var(--indigo-deep) 60%, var(--indigo));
    color: #CDD6EE;
    font-size: 12.5px;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    padding-bottom: 6px;
    gap: 12px;
}

.topbar-tag { color: var(--gold-soft); font-weight: 600; }

.header-inner {
    display: flex;
    align-items: center;
    gap: 26px;
    padding-top: 12px;
    padding-bottom: 12px;
    position: relative;
}

.site-logo { flex-shrink: 0; }
.logo-img { max-height: 46px; width: auto; display: block; }

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Nút chuyển giao diện --- */
.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--mist);
    cursor: pointer;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s ease, background .25s ease;
    position: relative;
}

.theme-toggle:hover { transform: rotate(20deg) scale(1.08); }

.theme-icon-sun { display: inline; }
.theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: inline; }

/* --- Navigation + mega menu --- */
.main-nav { flex: 1; }

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
}

.nav-item > a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    position: relative;
}

.nav-item > a:hover {
    color: var(--gold);
    background: rgba(212, 160, 23, .1);
}

.mega-caret { font-size: 11px; color: var(--gold); }

.nav-item.has-mega { position: static; }

.mega-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--card);
    border-top: 3px solid var(--gold);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lift);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    padding: 28px 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity .28s ease, transform .28s ease, visibility .28s;
}

.nav-item.has-mega:hover .mega-panel,
.nav-item.has-mega:focus-within .mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-heading {
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}

.mega-link {
    display: block;
    padding: 7px 0;
    color: var(--text-soft);
    font-size: 14.5px;
    border-bottom: 1px dashed var(--line);
}

.mega-link:hover { color: var(--gold); padding-left: 6px; }

.mega-thumb {
    display: block;
    margin-bottom: 12px;
}

.mega-thumb img {
    border-radius: var(--radius);
    display: block;
    transition: transform .25s ease;
}

.mega-thumb:hover img { transform: scale(1.04); }

.mega-thumb span {
    display: block;
    font-size: 13px;
    color: var(--text-soft);
    margin-top: 6px;
}

.mega-note {
    font-size: 13.5px;
    color: var(--text-soft);
    margin: 0 0 14px;
}

/* --- Nút mở menu mobile --- */
.nav-toggle {
    display: none;
    background: none;
    border: 0;
    width: 44px;
    height: 44px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: "";
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: transform .25s ease, opacity .25s ease;
    position: relative;
}

.nav-toggle-icon::before { position: absolute; top: -7px; left: 0; }
.nav-toggle-icon::after { position: absolute; top: 7px; left: 0; }

.nav-open .nav-toggle-icon { background: transparent; }
.nav-open .nav-toggle-icon::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-icon::after { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero giới thiệu ứng dụng --- */
.hero {
    position: relative;
    background: linear-gradient(120deg, var(--indigo-ink) 0%, var(--indigo-deep) 45%, var(--indigo) 100%);
    color: #EDF1FB;
    overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .5;
    animation: orb-float 9s ease-in-out infinite alternate;
}

.hero-orb-1 { width: 340px; height: 340px; background: var(--gold); top: -120px; right: 8%; opacity: .22; }
.hero-orb-2 { width: 260px; height: 260px; background: #4C63A8; bottom: -100px; left: -60px; animation-delay: 2s; }
.hero-orb-3 { width: 160px; height: 160px; background: var(--gold-soft); top: 30%; left: 42%; opacity: .16; animation-delay: 4s; }

@keyframes orb-float {
    from { transform: translateY(0) scale(1); }
    to { transform: translateY(-34px) scale(1.08); }
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    grid-template-areas: "copy visual";
    align-items: center;
    gap: 40px;
    padding-top: 66px;
    padding-bottom: 66px;
}

.hero-copy { grid-area: copy; }
.hero-visual { grid-area: visual; }

.hero-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-soft);
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(30px, 4.4vw, 52px);
    font-weight: 800;
    color: #fff;
    margin-bottom: 18px;
}

.hero-gold {
    background: linear-gradient(90deg, var(--gold-soft), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    font-size: 16.5px;
    color: #B9C4E2;
    max-width: 520px;
    margin-bottom: 26px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }

.hero-stats { display: flex; gap: 34px; }

.hero-stat { display: flex; flex-direction: column; }
.hero-stat strong { font-family: var(--font-display); font-size: 26px; color: var(--gold-soft); }
.hero-stat span { font-size: 13px; color: #93A2C8; }

/* --- Chồng ảnh hero --- */
.hero-stack { position: relative; height: 400px; }

.hero-img {
    position: absolute;
    width: 58%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
    border: 3px solid rgba(255, 255, 255, .12);
}

.hero-img-a { top: 0; left: 0; z-index: 3; transform: rotate(-4deg); animation: pin-bob 6s ease-in-out infinite alternate; }
.hero-img-b { top: 22%; right: 0; z-index: 2; transform: rotate(5deg); animation: pin-bob 7s ease-in-out infinite alternate-reverse; }
.hero-img-c { bottom: 0; left: 14%; z-index: 1; transform: rotate(-2deg); animation: pin-bob 8s ease-in-out infinite alternate; }

@keyframes pin-bob {
    from { margin-top: 0; }
    to { margin-top: -14px; }
}

/* --- Tiêu đề khối --- */
.section-head { text-align: center; margin-bottom: 34px; }

.section-title {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    border-radius: 2px;
    background: var(--gold);
    margin: 12px auto 0;
}

.section-sub { color: var(--text-soft); margin: 8px 0 0; }

/* --- Lưới thác nước (CSS columns) --- */
.masonry-section { padding: 60px 0 30px; }

.masonry {
    columns: 4;
    column-gap: 24px;
}

.masonry-related { columns: 2; column-gap: 24px; }

.pin {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
    transition: transform .3s ease, box-shadow .3s ease;
}

.pin:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lift);
}

.pin-media { display: block; overflow: hidden; }

.pin-media img {
    display: block;
    width: 100%;
    transition: transform .5s ease;
}

.pin:hover .pin-media img { transform: scale(1.05); }

.pin-body { padding: 18px 20px 20px; }

.pin-tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.pin-tag-game { background: rgba(212, 160, 23, .16); color: var(--gold); }
.pin-tag-news { background: rgba(44, 62, 107, .12); color: var(--indigo); }
html[data-theme="dark"] .pin-tag-news { color: #8FA4DF; }
.pin-tag-poster { background: rgba(180, 60, 90, .12); color: #C2496F; }
html[data-theme="dark"] .pin-tag-poster { color: #E77C9C; }

.pin-title { font-size: 17.5px; margin-bottom: 8px; }
.pin-title a { color: var(--text); }
.pin-title a:hover { color: var(--gold); }

.pin-excerpt { font-size: 14px; color: var(--text-soft); margin: 0 0 10px; }
.pin-rating { color: var(--gold); font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.pin-date { font-size: 12.5px; color: var(--text-soft); }

.pin-quote {
    background: linear-gradient(140deg, var(--indigo-deep), var(--indigo));
    border: 0;
    color: #E6EBF8;
}

.pin-quote .pin-body { padding: 28px 26px; }

.quote-mark {
    font-family: var(--font-display);
    font-size: 64px;
    line-height: .6;
    color: var(--gold);
    display: block;
    margin-bottom: 14px;
}

.quote-text {
    font-size: 16px;
    font-style: italic;
    line-height: 1.7;
    margin: 0 0 14px;
}

.quote-author { font-size: 13px; color: var(--gold-soft); font-weight: 600; }

.masonry-more { text-align: center; margin: 26px 0 40px; }

/* --- Hiệu ứng lộ diện khi cuộn --- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* --- Dải CTA --- */
.cta-band {
    background: linear-gradient(100deg, var(--indigo-ink), var(--indigo));
    color: #fff;
    border-top: 3px solid var(--gold);
}

.cta-band-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    padding-top: 44px;
    padding-bottom: 44px;
}

.cta-band-title { font-size: 26px; margin-bottom: 6px; color: #fff; }
.cta-band-desc { color: #A9B6D8; margin: 0; }

/* --- Hero trang con --- */
.page-hero {
    background: linear-gradient(120deg, var(--indigo-ink), var(--indigo));
    color: #fff;
    text-align: center;
    padding: 52px 0;
    border-bottom: 3px solid var(--gold);
}

.page-title { font-size: clamp(26px, 3.6vw, 40px); color: #fff; margin-bottom: 8px; }
.page-sub { color: #A9B6D8; margin: 0; }

/* --- Bố cục có sidebar --- */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas: "main side";
    gap: 34px;
    padding: 48px 0 60px;
    align-items: start;
}

.layout-main { grid-area: main; }
.layout-sidebar { grid-area: side; }

.sidebar-widget {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--gold);
    margin-bottom: 14px;
}

.sidebar-search { display: flex; gap: 8px; }

.search-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--mist);
    color: var(--text);
    font-family: var(--font-body);
}

.search-btn {
    border: 0;
    border-radius: var(--radius);
    background: var(--indigo);
    color: #fff;
    padding: 0 14px;
    cursor: pointer;
}

.sidebar-cat-list { list-style: none; margin: 0; padding: 0; }
.sidebar-cat-list li { border-bottom: 1px dashed var(--line); }
.sidebar-cat-list li a { display: block; padding: 9px 0; color: var(--text-soft); font-size: 14.5px; }
.sidebar-cat-list li a:hover { color: var(--gold); padding-left: 6px; }

.sidebar-widget-promo { text-align: center; }
.sidebar-widget-promo img { border-radius: var(--radius); margin-bottom: 14px; }

/* --- Trang nội dung (single/page) --- */
.single-article,
.page-article {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 40px 44px;
    margin-top: 40px;
}

.single-header { margin-bottom: 22px; }

.single-title { font-size: clamp(26px, 3.4vw, 38px); margin: 10px 0 12px; }

.single-meta { display: flex; gap: 20px; font-size: 13.5px; color: var(--text-soft); }

.single-thumbnail { margin: 0 0 26px; }
.single-thumbnail img { border-radius: var(--radius); width: 100%; }

.single-content { font-size: 16.5px; line-height: 1.85; }
.single-content p { margin-bottom: 1.2em; }
.single-content img { border-radius: var(--radius); }
.single-content h2, .single-content h3 { margin-top: 1.4em; }
.single-content a { color: var(--gold); text-decoration: underline; }
.single-content blockquote {
    margin: 1.4em 0;
    padding: 16px 22px;
    border-left: 4px solid var(--gold);
    background: var(--mist);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.single-tags { margin-top: 24px; font-size: 13.5px; color: var(--text-soft); }
.single-tags a { color: var(--gold); margin-right: 8px; }

.single-download-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(100deg, var(--indigo-deep), var(--indigo));
    color: #fff;
    border-radius: var(--radius);
    padding: 26px 30px;
    margin: 30px 0;
    border-left: 5px solid var(--gold);
}

.single-download-box h3 { margin-bottom: 4px; color: #fff; }
.single-download-box p { margin: 0; color: #A9B6D8; }

.single-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 34px;
}

.post-nav-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 22px;
    font-size: 14.5px;
}

.post-nav-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); font-weight: 700; }

.related-section { margin-bottom: 44px; }
.related-section .section-title { text-align: left; }
.related-empty { color: var(--text-soft); }

/* --- Phân trang --- */
.pagination-wrap { text-align: center; margin: 30px 0 10px; }

.pagination-wrap .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

.pagination-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--text);
    font-weight: 600;
}

.pagination-wrap .page-numbers.current { background: var(--gold); border-color: var(--gold); color: var(--indigo-ink); }
.pagination-wrap .page-numbers:hover { border-color: var(--gold); color: var(--gold); }

/* --- Trạng thái trống --- */
.empty-state {
    background: var(--card);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    text-align: center;
    padding: 70px 30px;
    margin-top: 40px;
}

/* --- Footer --- */
.site-footer {
    background: var(--indigo-ink);
    color: #B9C4E2;
    padding: 60px 0 30px;
    border-top: 4px solid var(--gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1.1fr;
    grid-template-areas: "brand links w1 w2 w3";
    gap: 36px;
    margin-bottom: 40px;
}

.footer-col-brand { grid-area: brand; }
.footer-col-links { grid-area: links; }
.footer-col-widget1 { grid-area: w1; }
.footer-col-widget2 { grid-area: w2; }
.footer-col-widget3 { grid-area: w3; }

.footer-logo img { max-height: 44px; margin-bottom: 16px; }
.footer-desc { font-size: 14px; line-height: 1.7; }

.footer-heading {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gold-soft);
    margin-bottom: 16px;
}

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li a { display: block; padding: 6px 0; color: #B9C4E2; font-size: 14.5px; }
.footer-links li a:hover { color: var(--gold-soft); padding-left: 6px; }

.footer-note { font-size: 14px; }

.site-footer .widget-title { color: var(--gold-soft); font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.site-footer .widget { margin-bottom: 0; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-top: 26px;
    text-align: center;
}

.disclaimer-text { font-size: 13px; color: #93A2C8; margin: 16px auto 10px; max-width: 760px; line-height: 1.7; }
.footer-copy { font-size: 12.5px; color: #6F7FA8; margin: 10px 0 0; }

/* --- Nút lên đầu trang --- */
.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: var(--gold);
    color: var(--indigo-ink);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
    z-index: 95;
}

.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }

/* --- Comment & widget WordPress --- */
.comment-respond textarea,
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--mist);
    color: var(--text);
    font-family: var(--font-body);
}

.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { border-top: 1px dashed var(--line); padding: 16px 0; }
