/* ============================================================
   Moban 8-10-20 — main.css
   Phong cách quán cà phê ấm áp: lộ trình 4 bước + timeline
   ============================================================ */
:root {
    --coffee: #4E342E;
    --coffee-dark: #3E2723;
    --coffee-mid: #6D4C41;
    --latte: #D7CCC8;
    --latte-soft: #EFEBE9;
    --cream: #FFF8E1;
    --cream-soft: #FFFDF4;
    --caramel: #C68B59;
    --caramel-deep: #A9714B;
    --gold: #E8A33D;
    --radius: 10px;
    --shadow: 0 10px 30px rgba(62, 39, 35, 0.14);
    --font-display: 'Baloo 2', 'Segoe UI', sans-serif;
    --font-body: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
}

html, body { overflow-x: hidden; }

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--cream);
    background-image: radial-gradient(rgba(78, 52, 46, 0.05) 1px, transparent 1px);
    background-size: 26px 26px;
    color: var(--coffee);
    line-height: 1.65;
    font-size: 16px;
}

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

a { color: var(--caramel-deep); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--coffee); }

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

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

/* ---------- Nút ---------- */
.btn {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    border-radius: var(--radius);
    padding: 10px 22px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
    text-align: center;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(62, 39, 35, 0.22); }
.btn-primary { background: var(--coffee); color: var(--cream); }
.btn-primary:hover { background: var(--coffee-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--coffee); color: var(--coffee); }
.btn-ghost:hover { background: var(--coffee); color: var(--cream); }
.btn-cream { background: var(--cream); color: var(--coffee); }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-login { background: transparent; border-color: var(--latte); color: var(--cream); }
.btn-login:hover { border-color: var(--gold); color: var(--gold); }
.btn-register { background: var(--gold); color: var(--coffee-dark); }
.btn-register:hover { background: #f0b254; color: var(--coffee-dark); }

/* ---------- Header ---------- */
.site-header {
    background: linear-gradient(135deg, var(--coffee-dark), var(--coffee));
    padding: 14px 0;
    border-bottom: 4px solid var(--gold);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-logo img { max-height: 52px; width: auto; display: block; }
.header-actions { display: flex; gap: 10px; }

/* ---------- Thanh tab điều hướng ---------- */
.tab-nav {
    position: sticky;
    top: 0;
    z-index: 99;
    background: var(--cream-soft);
    border-bottom: 2px dashed var(--latte);
    box-shadow: 0 4px 16px rgba(62, 39, 35, 0.08);
}
.tab-bar { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
    flex: 0 0 auto;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .95rem;
    color: var(--coffee-mid);
    background: transparent;
    border: none;
    border-radius: 999px;
    padding: 9px 20px;
    cursor: pointer;
    transition: background .25s ease, color .25s ease;
    min-width: 0;
}
.tab-btn:hover { background: var(--latte-soft); color: var(--coffee-dark); }
.tab-btn.active { background: var(--coffee); color: var(--cream); box-shadow: 0 4px 12px rgba(62, 39, 35, 0.25); }

/* ---------- Panel tab ---------- */
.tab-panel { display: none; animation: panel-in .45s ease both; }
.tab-panel.active { display: block; }
@keyframes panel-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero-coffee { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero-kicker {
    display: inline-block;
    background: var(--latte);
    color: var(--coffee-dark);
    font-weight: 600;
    font-size: .85rem;
    border-radius: 999px;
    padding: 6px 16px;
    margin-bottom: 16px;
}
.hero-title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; }
.hero-title em { font-style: normal; color: var(--caramel-deep); }
.hero-desc { font-size: 1.05rem; color: var(--coffee-mid); max-width: 46ch; }
.hero-cta { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-img { border-radius: var(--radius); box-shadow: var(--shadow); display: block; width: 100%; }
.hero-stamp {
    position: absolute;
    top: -18px;
    right: -12px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--coffee-dark);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
    box-shadow: 0 8px 20px rgba(232, 163, 61, 0.5);
    transform: rotate(8deg);
}

/* ---------- Tiêu đề section ---------- */
.section-title { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; display: flex; align-items: center; gap: 10px; }
.title-bean { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; background: var(--latte); border-radius: 50%; font-size: 1.2rem; flex: 0 0 auto; }
.section-sub { color: var(--coffee-mid); margin: 0 0 30px; }
.section-more { text-align: center; margin-top: 30px; }

/* ---------- Lộ trình 4 bước ---------- */
.roadmap-section { padding: 46px 0 56px; }
.roadmap-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    position: relative;
    margin-top: 34px;
}
.roadmap-track::before {
    content: "";
    position: absolute;
    top: 46px;
    left: 12%;
    right: 12%;
    height: 4px;
    border-radius: 4px;
    background: repeating-linear-gradient(90deg, var(--caramel) 0 14px, transparent 14px 26px);
    z-index: 0;
}
.step-item { position: relative; z-index: 1; text-align: center; background: transparent; min-width: 0; }
.step-circle {
    width: 92px;
    height: 92px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--cream-soft);
    border: 4px solid var(--caramel);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow);
    transition: transform .3s ease, border-color .3s ease;
}
.step-item:hover .step-circle { transform: translateY(-6px) scale(1.04); border-color: var(--gold); }
.step-icon { font-size: 2rem; }
.step-num {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--coffee);
    color: var(--cream);
    font-family: var(--font-display);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
}
.step-title { font-size: 1.15rem; margin-bottom: 6px; }
.step-desc { font-size: .9rem; color: var(--coffee-mid); margin: 0 auto; max-width: 24ch; }
.roadmap-cta { text-align: center; margin-top: 36px; }

/* ---------- Game nổi bật ---------- */
.featured-section { padding: 10px 0 50px; }
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.featured-grid > * { min-width: 0; }
.featured-card {
    background: var(--cream-soft);
    border: 1px solid var(--latte);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(62, 39, 35, 0.08);
    transition: transform .3s ease, box-shadow .3s ease;
}
.featured-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.featured-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.featured-body { padding: 16px 18px 20px; text-align: center; }
.featured-title { font-size: 1.05rem; margin-bottom: 4px; }
.featured-rating { display: block; color: var(--gold); font-size: .9rem; margin-bottom: 12px; }

/* ---------- Dòng thời gian tin tức ---------- */
.news-timeline-section { padding: 16px 0 56px; }
.news-timeline { position: relative; padding-left: 44px; max-width: 820px; }
.news-timeline::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: repeating-linear-gradient(180deg, var(--caramel) 0 12px, transparent 12px 22px);
}
.timeline-item { position: relative; margin-bottom: 24px; min-width: 0; }
.timeline-dot {
    position: absolute;
    left: -44px;
    top: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--coffee);
    color: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: 3px solid var(--cream);
    box-shadow: 0 0 0 2px var(--caramel);
}
.timeline-card {
    display: block;
    background: var(--cream-soft);
    border: 1px solid var(--latte);
    border-left: 5px solid var(--caramel);
    border-radius: var(--radius);
    padding: 18px 22px;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
    min-width: 0;
}
.timeline-card:hover { transform: translateX(8px); box-shadow: var(--shadow); border-left-color: var(--gold); }
.timeline-date {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--caramel-deep);
    background: var(--latte-soft);
    border-radius: 999px;
    padding: 3px 12px;
    margin-bottom: 8px;
}
.timeline-title { font-size: 1.1rem; margin-bottom: 6px; color: var(--coffee-dark); }
.timeline-excerpt { margin: 0; font-size: .92rem; color: var(--coffee-mid); }
.timeline-empty { color: var(--coffee-mid); font-style: italic; }

/* ---------- Kho game + tìm kiếm ---------- */
#panel-game { padding: 44px 0 60px; }
.game-search-wrap {
    position: relative;
    max-width: 520px;
    margin: 0 auto 12px;
}
.game-search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 1.05rem; }
.game-search-input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 14px 20px 14px 50px;
    border: 2px solid var(--latte);
    border-radius: 999px;
    background: var(--cream-soft);
    color: var(--coffee-dark);
    outline: none;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.game-search-input:focus { border-color: var(--caramel); box-shadow: 0 0 0 4px rgba(198, 139, 89, 0.2); }
.game-search-count { text-align: center; font-size: .85rem; color: var(--coffee-mid); margin: 0 0 22px; }
.game-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.game-grid > * { min-width: 0; }
.game-card {
    background: var(--cream-soft);
    border: 1px solid var(--latte);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}
.game-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.game-card.is-hidden { display: none; }
.game-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.game-body { padding: 10px 12px 14px; text-align: center; }
.game-title { font-size: .9rem; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-no-result { text-align: center; color: var(--coffee-mid); font-style: italic; padding: 24px 0; }

/* ---------- Giới thiệu ---------- */
#panel-about { padding: 44px 0 60px; }
.about-card {
    background: var(--cream-soft);
    border: 1px solid var(--latte);
    border-radius: var(--radius);
    padding: 30px 34px;
    box-shadow: 0 6px 18px rgba(62, 39, 35, 0.08);
}
.about-card p { margin-top: 0; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.about-stats > * { min-width: 0; }
.about-stat { background: var(--latte-soft); border-radius: var(--radius); padding: 18px 10px; text-align: center; }
.about-stat strong { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--caramel-deep); }
.about-stat span { font-size: .85rem; color: var(--coffee-mid); }
.about-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.about-gallery > * { min-width: 0; }
.about-gallery img { border-radius: var(--radius); width: 100%; aspect-ratio: 3 / 4; object-fit: cover; box-shadow: 0 6px 16px rgba(62, 39, 35, 0.12); }

/* ---------- Banner tải xuống ---------- */
.download-banner { background: linear-gradient(120deg, var(--coffee-dark), var(--coffee-mid)); padding: 44px 0; margin-top: 40px; }
.download-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.download-copy h2 { color: var(--cream); font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: 6px; }
.download-copy p { color: var(--latte); margin: 0; }

/* ---------- Trang danh mục / bài viết / trang tĩnh ---------- */
.page-heading { text-align: center; margin: 42px 0 34px; }
.page-breadcrumb {
    display: inline-block;
    background: var(--latte);
    border-radius: 999px;
    padding: 4px 16px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--coffee-dark);
    margin: 0 0 10px;
}
.page-title { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; margin-bottom: 6px; }
.page-sub { color: var(--coffee-mid); margin: 0; }
.pagination-bar { text-align: center; margin: 34px 0 10px; }
.pagination-bar .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination-bar .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 8px 12px;
    border-radius: var(--radius);
    background: var(--cream-soft);
    border: 1px solid var(--latte);
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--coffee-mid);
}
.pagination-bar .page-numbers.current { background: var(--coffee); color: var(--cream); border-color: var(--coffee); }
.archive-cta { text-align: center; margin: 30px 0 50px; }

.single-article { max-width: 820px; margin: 42px auto 0; }
.single-header { margin-bottom: 22px; }
.single-date-pill {
    display: inline-block;
    background: var(--latte);
    color: var(--coffee-dark);
    font-weight: 600;
    font-size: .85rem;
    border-radius: 999px;
    padding: 5px 16px;
    margin-bottom: 12px;
}
.single-title { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; }
.single-thumb { margin-bottom: 26px; }
.single-thumb img { border-radius: var(--radius); width: 100%; }
.single-body { background: var(--cream-soft); border: 1px solid var(--latte); border-radius: var(--radius); padding: 30px 34px; }
.single-body a { text-decoration: underline; }
.single-body img { border-radius: var(--radius); }
.single-cta {
    margin-top: 30px;
    background: var(--coffee);
    color: var(--cream);
    border-radius: var(--radius);
    padding: 30px 34px;
    text-align: center;
}
.single-cta h3 { color: var(--cream); }
.single-cta p { color: var(--latte); }
.related-section { max-width: 820px; margin: 50px auto 60px; }

.page-article { max-width: 820px; margin: 0 auto; padding-bottom: 60px; }

/* ---------- Widget ---------- */
.widget { background: var(--cream-soft); border: 1px solid var(--latte); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 22px; }
.widget-title { font-size: 1.05rem; margin-bottom: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--coffee-dark); color: var(--latte); padding: 46px 0 30px; margin-top: 20px; }
.footer-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-bottom: 30px; }
.footer-widgets > * { min-width: 0; }
.footer-widget .widget { background: rgba(255, 248, 225, 0.06); border-color: rgba(215, 204, 200, 0.2); }
.footer-widget .widget-title { color: var(--cream); }
.footer-widget a { color: var(--latte); }
.footer-widget a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px dashed rgba(215, 204, 200, 0.3); padding-top: 26px; text-align: center; }
.disclaimer-text { font-size: .85rem; color: var(--latte); max-width: 760px; margin: 16px auto 0; line-height: 1.7; }
