/* =========================
   RESET
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #f4f6fb;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
}

/* =========================
   GLOBAL LINK / BUTTON UX
========================= */
a {
    text-decoration: none;
    color: inherit;
    transition: all 0.22s ease;
    will-change: transform;
}

a:hover {
    opacity: 0.85;
}

a:active {
    transform: scale(0.96);
}

button,
.btn {
    cursor: pointer;
    transition: all 0.2s ease;
}

button:active,
.btn:active {
    transform: scale(0.95);
}

/* =========================
   CONTAINER
========================= */
.container {
    max-width: 820px;
    margin: auto;
    padding: 14px;
}

@media (min-width: 768px) {
    .container {
        padding: 10px;
    }
}

/* =========================
   HEADER
========================= */
.header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    position: relative;
    padding: 0 12px;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* =========================
   LOGO
========================= */
.logo svg {
    height: 34px;
    width: auto;
    display: block;
    transition: 0.25s ease;
}

.logo:hover svg {
    transform: scale(1.06);
    opacity: 0.9;
}

.logo a {
    display: inline-flex;
    align-items: center;
}

/* =========================
   HAMBURGER
========================= */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 6px;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: #111;
    border-radius: 2px;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(6px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-6px);
}

/* =========================
   DESKTOP MENU
========================= */
.desktop-menu {
    display: none;
}

.desktop-menu a {
    margin-left: 20px;
    font-size: 14px;
    color: #666;
    position: relative;
    transition: all 0.25s ease;
}

.desktop-menu a:hover {
    color: #000;
    transform: translateY(-1px);
}

.desktop-menu a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: #111;
    transition: width 0.3s ease;
}

.desktop-menu a:hover::after {
    width: 100%;
}

.desktop-menu a.active {
    color: #000;
    font-weight: 500;
}

/* =========================
   MOBILE MENU
========================= */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 64%;
    max-width: 360px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f9fafb;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 30px 0 80px rgba(0,0,0,0.25);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-header {
    background: #ffffff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}

.menu-user {
    background: #f3f4f6;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e5e7eb;
}

/* avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.avatar:hover img {
    transform: scale(1.08);
}

/* menu list */
.menu-list {
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
}

.menu-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    font-size: 15px;
    color: #374151;
    border-bottom: 1px solid #f1f1f1;
    transition: all 0.2s ease;
}

.menu-list a:hover {
    background: #f3f4f6;
}

.menu-list a:active {
    background: #e5e7eb;
    transform: scale(0.97);
}

.menu-list a.active {
    background: #eef2ff;
    color: #2563eb;
    font-weight: 500;
}

/* ICON MENU */
.menu-list i,
.desktop-menu i {
    font-size: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

/* desktop căn chỉnh đẹp hơn */
.desktop-menu a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.menu-footer {
    background: #ffffff;
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
}

/* =========================
   OVERLAY
========================= */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 999;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================
   DESKTOP
========================= */
@media (min-width: 768px) {
    .hamburger {
        display: none;
    }

    .desktop-menu {
        display: flex;
    }

    .nav-center {
        position: static;
        transform: none;
    }
}

/* =========================
   FORUM
========================= */
.forum-wrapper {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .forum-wrapper {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

.forum-header {
    display: flex;
    justify-content: space-between;
    padding: 14px;
    background: #f7f8fa;
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.forum-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 14px;
    border-top: 1px solid #eee;
    transition: all 0.2s ease;
}

.forum-item:hover {
    background: #f9fafb;
}

.forum-item:active {
    transform: scale(0.98);
}

.forum-title {
    font-size: 15px;
    font-weight: 500;
    color: #222;
}

.forum-title:hover {
    color: #2563eb;
}

.forum-meta {
    margin: 1px;
    padding: 2px;
    font-size: 12px;
    color: #888;
}

.category-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cat-item {
    padding: 6px 12px;
    background: #eee;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.cat-item:hover {
    background: #ddd;
}
.cat-item.active {
    background: #333;
    color: #fff;
}

.cat-item.active:hover {
    background: #000;
}
.category-menu {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.cat-item {
    padding: 6px 12px;
    background: #eee;
    border-radius: 6px;
    text-decoration: none;
}

.cat-item.active {
    background: #333;
    color: #fff;
}

.badge-category {
    background: #f1f1f1;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.badge-category {
    background: #f1f1f1;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
}
.badge-category {
    background: #eee;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
}

/* =========================
   PAGINATION
========================= */
.pagination {
    margin-top: 24px;
    text-align: center;
}

.pagination a {
    display: inline-block;
    margin: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #111;
    color: #fff;
    transform: translateY(-1px);
}

.pagination a.active {
    background: #111;
    color: #fff;
}

/* =========================
   FOOTER
========================= */
.footer {
    margin-top: 40px;
    padding: 24px 0;
    border-top: 1px solid #eee;
    background: #fff;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.footer-left p {
    font-size: 14px;
    color: #444;
}

.footer-left span {
    font-size: 13px;
    color: #888;
}

.footer-right a {
    font-size: 13px;
    color: #666;
    margin-left: 12px;
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
    }
}

/* =========================
   SCROLL LOCK
========================= */
.no-scroll {
    overflow: hidden;
}


/* ======================
   VIEWS COUNTER - TÍM MỜ
   ====================== */
.views-count {
    font-size: 9.5px;
    font-weight: 500;
    color: #8b5cf6;           /* Tím đẹp */
    display: inline-flex;
    align-items: center;
    gap: 5px;
    opacity: 0.85;
}

.views-count strong {
    font-size: 12.5px;
    color: #a089c3;           /* Tím đậm hơn một chút cho số lượt xem */
    font-weight: 600;
}

/* Hover effect nhẹ */
.views-count:hover {
    opacity: 1;
    color: #7c3aed;
}

.views-count:hover strong {
    color: #5b21b6;
}