/* ==========================================================================
   Moban 8-10-17 · main.css
   Phong cách: Dòng thời gian một bên · xanh rừng #386641 + cam đào #F4A261
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Paytone+One&family=Be+Vietnam+Pro:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* --- Guard: chống tràn ngang --- */
html, body { overflow-x: hidden; }

:root {
    --green: #386641;
    --green-deep: #2b4f33;
    --green-ink: #1c3322;
    --green-leaf: #6a994e;
    --peach: #F4A261;
    --peach-deep: #e07b39;
    --peach-soft: #fbe8d5;
    --cream: #FDFCFA;
    --paper: #ffffff;
    --line: #e4e0d6;
    --text: #2c3a30;
    --muted: #74816f;
    --radius: 12px;
    --font-display: 'Paytone One', 'Be Vietnam Pro', sans-serif;
    --font-body: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
    --shadow-soft: 0 10px 30px rgba(28, 51, 34, 0.08);
    --shadow-lift: 0 18px 40px rgba(28, 51, 34, 0.14);
}

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

body {
    margin: 0;
    background: var(--cream);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--green); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--peach-deep); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.25; color: var(--green-ink); margin: 0 0 .5em; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

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

/* ==========================================================================
   Nút bấm
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 26px; border-radius: 999px; border: 2px solid transparent;
    font-family: var(--font-body); font-weight: 700; font-size: 15px;
    cursor: pointer; transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-peach { background: var(--peach); color: #4a2c10; box-shadow: 0 8px 20px rgba(244, 162, 97, 0.4); }
.btn-peach:hover { background: #f7b478; color: #4a2c10; box-shadow: 0 12px 26px rgba(244, 162, 97, 0.55); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(56, 102, 65, 0.3); }
.btn-primary:hover { background: var(--green-deep); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: var(--peach); }
.btn-outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-lg { padding: 15px 34px; font-size: 16px; }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* ==========================================================================
   Dải marquee game hot (ticker)
   ========================================================================== */
.ticker {
    overflow: hidden;
    background: var(--green-ink);
    border-bottom: 3px dotted rgba(244, 162, 97, 0.5);
    padding: 9px 0;
    white-space: nowrap;
}
.ticker-track {
    display: flex; width: max-content;
    animation: ticker-scroll 30s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; align-items: center; gap: 22px; padding-right: 22px; }
.ticker-item { color: #f3efe6; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.ticker-dot { color: var(--peach); font-size: 8px; line-height: 1; }
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 80;
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; padding: 14px 0; }
.site-logo img { max-height: 46px; width: auto; display: block; }
.main-nav { margin-left: auto; }
.nav-menu { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
    display: block; padding: 8px 14px; border-radius: 999px;
    font-weight: 600; font-size: 14.5px; color: var(--green-ink); position: relative;
}
.nav-menu a:hover, .nav-menu .current-menu-item > a { background: var(--green); color: #fff; }
.header-actions { display: flex; gap: 10px; }
.btn-login { border-color: var(--green); color: var(--green); padding: 9px 20px; font-size: 14px; }
.btn-login:hover { background: var(--green); color: #fff; }
.btn-register { background: var(--peach); color: #4a2c10; padding: 9px 20px; font-size: 14px; }
.btn-register:hover { background: #f7b478; color: #4a2c10; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle-icon, .nav-toggle-icon::before, .nav-toggle-icon::after {
    display: block; width: 24px; height: 2px; background: var(--green-ink); border-radius: 2px; position: relative; transition: transform .3s;
}
.nav-toggle-icon::before, .nav-toggle-icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle-icon::before { top: -7px; }
.nav-toggle-icon::after { top: 7px; }

/* ==========================================================================
   Cột chấm tròn cố định bên trái (điều hướng chương)
   ========================================================================== */
.dot-rail {
    position: fixed; left: 14px; top: 50%; transform: translateY(-50%);
    z-index: 70; display: flex; flex-direction: column; gap: 26px;
    padding: 0; width: 20px;
}
.dot-rail-line {
    position: absolute; left: 50%; top: 6px; bottom: 6px; width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, var(--line), var(--green-leaf), var(--line));
    border-radius: 2px;
}
.dot-link { position: relative; display: block; width: 20px; height: 20px; }
.dot-node {
    display: block; width: 12px; height: 12px; margin: 4px auto;
    border-radius: 50%; background: var(--cream); border: 2px solid #b9c4b3;
    transition: all .3s ease; position: relative; z-index: 1;
}
.dot-label {
    position: absolute; left: 26px; top: 50%; transform: translateY(-50%) translateX(-6px);
    background: var(--green-ink); color: #fff; font-size: 12px; font-weight: 600;
    padding: 5px 12px; border-radius: 999px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: all .25s ease;
}
.dot-link:hover .dot-label { opacity: 1; transform: translateY(-50%) translateX(0); }
.dot-link.is-passed .dot-node { background: var(--green); border-color: var(--green); }
.dot-link.is-active .dot-node {
    background: var(--peach); border-color: var(--peach);
    box-shadow: 0 0 0 5px rgba(244, 162, 97, 0.25), 0 0 18px rgba(244, 162, 97, 0.8);
    transform: scale(1.25);
}
.dot-link.is-active .dot-label { opacity: 1; transform: translateY(-50%) translateX(0); background: var(--peach-deep); }
body:not(.home) .dot-rail { display: none; }

/* ==========================================================================
   Hero (Chương 01)
   ========================================================================== */
.hero-section {
    position: relative; overflow: hidden;
    background:
        radial-gradient(circle at 12% 20%, rgba(106, 153, 78, 0.35), transparent 45%),
        radial-gradient(circle at 88% 85%, rgba(244, 162, 97, 0.22), transparent 40%),
        linear-gradient(135deg, var(--green-ink) 0%, var(--green-deep) 55%, var(--green) 100%);
    padding: 76px 0 90px; margin-bottom: 20px;
}
.hero-section::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1.5px, transparent 1.5px);
    background-size: 26px 26px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent 75%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; position: relative; }
.hero-kicker {
    display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--peach);
    border: 1px dashed rgba(244, 162, 97, 0.6); border-radius: 999px; padding: 6px 16px; margin-bottom: 20px;
}
.hero-title { color: #fff; font-size: clamp(34px, 4.6vw, 56px); margin-bottom: 20px; }
.hero-title em { font-style: normal; color: var(--peach); position: relative; }
.hero-title em::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 8px;
    background: rgba(244, 162, 97, 0.28); border-radius: 4px; z-index: -1;
}
.hero-desc { color: rgba(255, 255, 255, 0.85); font-size: 17px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 34px; }
.hero-stats { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-size: 24px; color: var(--peach); }
.hero-stats span { font-size: 13px; color: rgba(255, 255, 255, 0.7); }
.hero-visual { position: relative; }
.hero-frame {
    position: relative; border-radius: 22px; overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.22);
    box-shadow: var(--shadow-lift), 0 0 0 8px rgba(255, 255, 255, 0.05);
    transform: rotate(1.5deg);
}
.hero-frame img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.hero-frame-badge {
    position: absolute; top: 14px; left: 14px;
    background: var(--peach); color: #4a2c10; font-weight: 800; font-size: 12px;
    padding: 6px 14px; border-radius: 999px; letter-spacing: 0.05em;
    animation: badge-pulse 2.4s ease-in-out infinite;
}
@keyframes badge-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.hero-mini-cards { display: flex; gap: 12px; margin-top: 16px; justify-content: flex-end; }
.hero-mini {
    display: flex; align-items: center; gap: 9px;
    background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px; padding: 6px 16px 6px 6px; color: #fff; font-size: 13px; font-weight: 600;
    backdrop-filter: blur(6px);
}
.hero-mini img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }

/* ==========================================================================
   Dòng thời gian (timeline)
   ========================================================================== */
.timeline { position: relative; padding: 30px 0 70px; padding-left: 78px; }
.timeline-rail { position: absolute; left: 0; top: 0; bottom: 0; width: 64px; pointer-events: none; }
.timeline-line {
    position: absolute; left: 31px; top: 8px; bottom: 8px; width: 4px;
    background: repeating-linear-gradient(to bottom, #cfd8c9 0 10px, transparent 10px 18px);
    border-radius: 4px;
}
.timeline-fill {
    position: absolute; left: 31px; top: 8px; width: 4px; height: 0;
    background: linear-gradient(to bottom, var(--green-leaf), var(--peach));
    border-radius: 4px; transition: height .18s linear;
    box-shadow: 0 0 10px rgba(244, 162, 97, 0.5);
}
.timeline-node {
    position: absolute; left: 33px; transform: translate(-50%, -6px);
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--cream); border: 4px solid #cfd8c9; z-index: 2;
    transition: all .35s ease;
}
.timeline-node.is-passed { border-color: var(--green); background: var(--green-leaf); }
.timeline-node.is-active {
    border-color: var(--peach); background: var(--peach);
    box-shadow: 0 0 0 6px rgba(244, 162, 97, 0.2), 0 0 20px rgba(244, 162, 97, 0.7);
}
.tl-section { position: relative; padding: 26px 0 54px; scroll-margin-top: 110px; }
.tl-anchor { scroll-margin-top: 110px; }
.tl-step {
    display: inline-block; background: var(--peach-soft); color: var(--peach-deep);
    font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
    padding: 6px 16px; border-radius: 999px; margin-bottom: 12px;
}
.tl-title { font-size: clamp(26px, 3vw, 36px); margin-bottom: 6px; }
.tl-sub { color: var(--muted); margin-bottom: 28px; max-width: 560px; }
.tl-head { position: relative; }
.timeline-endcap { display: flex; align-items: center; gap: 12px; margin-top: 30px; }
.endcap-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--peach); box-shadow: 0 0 0 5px rgba(244, 162, 97, 0.2); }
.endcap-text { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* ==========================================================================
   Thẻ tin tức
   ========================================================================== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 30px; }
.news-card {
    background: var(--paper); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-soft); border: 1px solid var(--line);
    transition: transform .3s ease, box-shadow .3s ease;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.news-card-link { display: block; color: inherit; }
.news-thumb { position: relative; overflow: hidden; aspect-ratio: 16 / 10; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.news-card:hover .news-thumb img { transform: scale(1.06); }
.news-date {
    position: absolute; bottom: 10px; left: 10px;
    background: var(--green-ink); color: #fff; font-size: 12px; font-weight: 600;
    padding: 4px 12px; border-radius: 999px;
}
.news-body { padding: 18px 20px 20px; }
.news-title { font-family: var(--font-body); font-weight: 800; font-size: 16.5px; line-height: 1.45; color: var(--green-ink); margin-bottom: 8px; }
.news-excerpt { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.news-more { font-size: 13.5px; font-weight: 700; color: var(--peach-deep); }

/* Danh sách dọc (index) */
.article-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 30px; }
.article-row {
    background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line);
    box-shadow: var(--shadow-soft); overflow: hidden; transition: transform .3s ease, box-shadow .3s ease;
}
.article-row:hover { transform: translateX(6px); box-shadow: var(--shadow-lift); }
.article-row-link { display: flex; gap: 0; color: inherit; }
.article-row-thumb { flex: 0 0 260px; overflow: hidden; }
.article-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-row-body { padding: 20px 24px; }
.article-row-date { font-size: 12.5px; font-weight: 700; color: var(--peach-deep); letter-spacing: 0.06em; }
.article-row-title { font-family: var(--font-body); font-weight: 800; font-size: 19px; color: var(--green-ink); margin: 6px 0 8px; }
.article-row-excerpt { font-size: 14.5px; color: var(--muted); margin-bottom: 10px; }
.pagination-wrap { margin-top: 10px; }
.pagination-wrap .nav-links { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.pagination-wrap .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px;
    background: var(--paper); border: 1px solid var(--line); font-weight: 700; color: var(--green);
}
.pagination-wrap .page-numbers.current { background: var(--green); color: #fff; border-color: var(--green); }
.empty-note { color: var(--muted); font-style: italic; padding: 30px; background: var(--paper); border-radius: var(--radius); border: 1px dashed var(--line); }

/* ==========================================================================
   Thẻ game
   ========================================================================== */
.game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.game-card {
    background: var(--paper); border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--line); box-shadow: var(--shadow-soft); text-align: center;
    transition: transform .3s ease, box-shadow .3s ease;
}
.game-card:hover { transform: translateY(-6px) rotate(-0.5deg); box-shadow: var(--shadow-lift); }
.game-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.game-body { padding: 14px 14px 18px; }
.game-name { font-family: var(--font-body); font-weight: 800; font-size: 15px; color: var(--green-ink); margin-bottom: 6px; }
.game-rating { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; font-size: 13px; }
.game-rating .stars { color: var(--peach); letter-spacing: 2px; }
.game-rating b { color: var(--green); }

/* ==========================================================================
   Giới thiệu & Tải xuống
   ========================================================================== */
.about-panel {
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
    background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line);
    box-shadow: var(--shadow-soft); padding: 40px;
}
.about-points { list-style: none; padding: 0; margin: 20px 0 26px; display: flex; flex-direction: column; gap: 12px; }
.about-points li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.point-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--peach); flex: none; box-shadow: 0 0 0 4px rgba(244, 162, 97, 0.2); }
.about-imgs { position: relative; min-height: 320px; }
.about-img-a, .about-img-b { position: absolute; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow-lift); }
.about-img-a { width: 62%; top: 0; left: 0; transform: rotate(-3deg); }
.about-img-b { width: 58%; bottom: 0; right: 0; transform: rotate(3deg); border: 4px solid var(--peach-soft); }
.download-panel {
    background: linear-gradient(135deg, var(--green-deep), var(--green));
    border-radius: var(--radius); padding: 44px; color: #fff;
    display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: center;
    box-shadow: var(--shadow-lift); position: relative; overflow: hidden;
}
.download-panel::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1.5px, transparent 1.5px);
    background-size: 22px 22px; pointer-events: none;
}
.dl-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; position: relative; }
.dl-step { background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--radius); padding: 20px; }
.dl-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%; background: var(--peach); color: #4a2c10;
    font-family: var(--font-display); font-size: 18px; margin-bottom: 12px;
}
.dl-step h4 { color: #fff; font-family: var(--font-body); font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.dl-step p { font-size: 13.5px; color: rgba(255, 255, 255, 0.78); margin: 0; }
.dl-cta { position: relative; text-align: center; }
.dl-note { font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, 0.85); margin-bottom: 14px; }
.archive-cta, .single-cta {
    background: var(--peach-soft); border-radius: var(--radius); padding: 30px 36px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.archive-cta .dl-note, .single-cta .dl-note { color: var(--green-ink); margin: 0; font-size: 15px; }

/* ==========================================================================
   Trang chi tiết (single / page)
   ========================================================================== */
.page-hero { padding: 46px 0 10px; }
.page-title { font-size: clamp(30px, 4vw, 46px); margin-bottom: 8px; }
.page-sub { color: var(--muted); max-width: 620px; }
.single-panel {
    background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line);
    box-shadow: var(--shadow-soft); padding: 44px 48px; margin-bottom: 28px;
}
.single-title { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 12px; }
.single-meta { display: flex; gap: 20px; color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.single-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; }
.single-thumb img { display: block; width: 100%; }
.entry-content { font-size: 16.5px; }
.entry-content img { border-radius: var(--radius); }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content blockquote {
    border-left: 4px solid var(--peach); background: var(--peach-soft);
    margin: 24px 0; padding: 18px 24px; border-radius: 0 var(--radius) var(--radius) 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--green-ink); color: rgba(255, 255, 255, 0.75);
    padding: 56px 0 30px; margin-top: 40px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
}
.footer-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.footer-widget .widget-title { color: var(--peach); font-family: var(--font-body); font-weight: 800; font-size: 16px; margin-bottom: 14px; }
.footer-widget a { color: rgba(255, 255, 255, 0.75); }
.footer-widget a:hover { color: var(--peach); }
.footer-widget ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.footer-bottom { padding-top: 28px; text-align: center; }
.disclaimer-text { font-size: 13px; color: rgba(255, 255, 255, 0.6); max-width: 760px; margin: 18px auto 0; line-height: 1.8; }

/* ==========================================================================
   Hiệu ứng xuất hiện khi cuộn
   ========================================================================== */
.scroll-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.scroll-reveal.is-revealed { opacity: 1; transform: none; }

::selection { background: var(--peach); color: #4a2c10; }
