/* ============================================================
   NGỌC RỒNG MASTER — Giao diện COMIC/MANGA tươi sáng
   CSS thuần, không ảnh ngoài, không framework
   ============================================================ */
:root {
    --red: #e01f26;
    --red-dark: #b3121a;
    --gold: #f5a623;
    --gold-light: #ffc107;
    --navy: #1e2a3a;
    --navy-dark: #1c2333;
    --cream: #f7f5f0;
    --purple: #7c3aed;
    --purple-dark: #5b21b6;
    --ink: #141414;
    --text: #2b2b2b;
    --muted: #4b5563;
    --line: #e8e0d2;
    --green: #2ba84a;
    --orange: #f5a623; /* alias tương thích ngược */
    --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--cream);
    background-image: radial-gradient(rgba(30, 42, 58, .07) 1.2px, transparent 1.3px);
    background-size: 22px 22px;
}
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
img { max-width: 100%; }
.container { width: min(1140px, 94%); margin: 0 auto; }
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============ COMIC UTILITIES ============ */
.comic-title {
    display: block;
    width: 100%;
    font-family: 'Kanit', sans-serif;
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
    background: linear-gradient(180deg, #fff275 0%, #ffc107 35%, #ff7700 70%, #d82020 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1.5px var(--ink);
    filter: drop-shadow(0 3px 0 var(--ink)) drop-shadow(3px 5px 0 rgba(0, 0, 0, .45));
    text-shadow: none;
    transform: none;
}
.hazard {
    height: 14px;
    background: repeating-linear-gradient(45deg, var(--red) 0 16px, var(--ink) 16px 32px);
}
.ribbon {
    display: inline-block;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 28px;
    transform: rotate(-2deg) skew(-8deg);
    box-shadow: 4px 4px 0 rgba(224, 31, 38, .9);
}
.starburst {
    width: 132px; height: 132px;
    background: var(--red);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    font-weight: 900; font-size: .78rem; text-transform: uppercase; line-height: 1.35;
    padding: 24px;
    border: none;
    clip-path: polygon(50% 0%, 61% 12%, 75% 5%, 79% 20%, 93% 18%, 91% 33%, 100% 40%, 93% 52%, 100% 62%, 90% 68%, 92% 83%, 78% 81%, 74% 96%, 60% 88%, 50% 100%, 40% 88%, 26% 96%, 22% 81%, 8% 83%, 10% 68%, 0% 62%, 7% 52%, 0% 40%, 9% 33%, 7% 18%, 21% 20%, 25% 5%, 39% 12%);
}

/* ============ BUTTONS (chunky comic) ============ */
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-size: .95rem;
    border: 3px solid var(--ink);
    background: #fff;
    color: var(--ink);
    box-shadow: 0 4px 0 var(--ink);
    cursor: pointer;
    text-align: center;
    transition: transform .08s, box-shadow .08s, background .15s;
    font-family: inherit;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--red); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-outline {
    background: #fff; color: var(--red);
    border-color: var(--red); box-shadow: 0 4px 0 var(--red);
}
.btn-outline:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--red); color: var(--red-dark); }
.btn-gold {
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    border-color: var(--ink); color: var(--ink);
}
.btn-gold:hover { color: var(--ink); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-dark); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { color: #fff; filter: brightness(.92); }
.btn-header {
    background: #fff; color: var(--ink);
    border-color: var(--ink); box-shadow: 0 3px 0 var(--ink);
}
.btn-header:hover { background: var(--cream); color: var(--red); box-shadow: 0 1px 0 var(--ink); transform: translateY(2px); }
.btn-sm {
    padding: 7px 14px; font-size: .78rem;
    border-width: 2px; box-shadow: 0 3px 0 var(--ink);
}
.btn-sm:hover { box-shadow: 0 1px 0 var(--ink); }
.btn-block { display: block; width: 100%; }

/* ============ HEADER ============ */
.site-header {
    background: #fff;
    border-bottom: 4px solid var(--ink);
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    position: relative;
    min-height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; justify-self: start; }
.logo-img {
    height: 52px;
    width: auto;
    max-height: 52px;
    display: block;
    object-fit: contain;
    transition: transform .15s ease, filter .15s ease;
}
.logo:hover .logo-img {
    transform: scale(1.05);
}
.logo-text {
    font-size: 1.25rem; font-weight: 900; color: var(--navy);
    text-transform: uppercase; letter-spacing: .5px;
    transform: skew(-4deg); white-space: nowrap;
}
.logo-text em { font-style: normal; color: var(--red); }
/* Viên ngọc rồng vẽ bằng CSS */
.logo-ball {
    width: 42px; height: 42px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffb347, #f07f00 70%);
    border: 3px solid var(--ink);
    position: relative; display: inline-block; flex: 0 0 auto;
    box-shadow: 0 0 10px rgba(240, 127, 0, .8), inset 0 0 8px rgba(255, 255, 255, .5);
}
.logo-ball .star {
    position: absolute; width: 0; height: 0;
    border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-bottom: 8px solid var(--red);
}
.logo-ball .s1 { top: 7px; left: 14px; transform: rotate(20deg); }
.logo-ball .s2 { top: 16px; left: 7px; transform: rotate(-15deg) scale(.8); }
.logo-ball .s3 { top: 16px; left: 20px; transform: rotate(30deg) scale(.8); }
.logo-ball .s4 { top: 24px; left: 14px; transform: rotate(-25deg) scale(.7); }

/* Nav viên thuốc xanh navy */
.main-nav {
    display: flex; gap: 2px;
    background: #1a2332;
    border-radius: 999px;
    padding: 6px;
    border: 3px solid var(--ink);
    justify-self: center;
    margin: 0;
}
.main-nav a {
    position: relative;
    color: #fff; font-weight: 800; text-transform: uppercase;
    font-size: .8rem; letter-spacing: .4px;
    padding: 9px 12px; border-radius: 999px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.main-nav a:hover { background: rgba(255, 255, 255, .14); color: var(--gold-light); }
.main-nav a.active { color: #fff; }
.main-nav a.active::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px;
    height: 3px; border-radius: 2px; background: var(--red);
}
.main-nav a.nav-admin { color: var(--gold-light); }
.user-area { display: flex; align-items: center; gap: 8px; justify-self: end; margin-left: 0; flex-shrink: 0; }
.user-area .btn { white-space: nowrap; flex-shrink: 0; }
/* ============ USER CHIP & DROPDOWN ============ */
.user-dropdown-wrap {
    position: relative;
    display: inline-block;
}
.user-chip {
    display: flex; align-items: center; gap: 9px;
    background: var(--cream);
    border: 2px solid var(--ink); border-radius: 999px;
    padding: 4px 14px 4px 4px; font-weight: 700; font-size: .9rem;
    color: var(--navy);
    box-shadow: 0 3px 0 var(--ink);
    cursor: pointer;
    font-family: inherit;
    transition: transform .12s, box-shadow .12s, background .15s, color .15s;
    outline: none;
}
.user-chip:hover {
    color: var(--red);
    transform: translateY(-1px);
    box-shadow: 0 4px 0 var(--ink);
}
.dropdown-caret {
    font-size: .75rem;
    color: var(--muted);
    transition: transform .2s ease;
    margin-left: -2px;
}
.user-dropdown-wrap.open .dropdown-caret {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 3px solid var(--ink);
    border-radius: 14px;
    box-shadow: 0 8px 0 var(--ink), 0 14px 28px rgba(0, 0, 0, .25);
    padding: 8px 6px;
    z-index: 1000;
    animation: ddFadeIn .15s ease;
}
.user-dropdown-wrap.open .user-dropdown-menu {
    display: block;
}
@keyframes ddFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-user-info {
    padding: 8px 12px 6px;
}
.dropdown-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--red);
    letter-spacing: .5px;
}
.dropdown-username {
    font-size: 1rem;
    font-weight: 900;
    color: var(--navy);
    word-break: break-all;
}
.dropdown-divider {
    height: 2px;
    background: var(--line);
    margin: 6px 4px;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: .88rem;
    font-weight: 700;
    color: var(--text);
    border-radius: 8px;
    text-decoration: none;
    transition: background .12s, color .12s, transform .08s;
}
.dropdown-item .dd-ico {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
}
.dropdown-item:hover {
    background: var(--cream);
    color: var(--red);
    transform: translateX(3px);
}
.dropdown-item.dropdown-admin:hover {
    color: var(--gold);
}
.dropdown-item.dropdown-logout {
    color: var(--red);
}
.dropdown-item.dropdown-logout:hover {
    background: #fdecec;
    color: var(--red-dark);
}
.avatar-mini {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid var(--ink);
    object-fit: cover;
    display: block;
    background: #fff;
    flex: 0 0 32px;
}
.nav-toggle {
    display: none; background: #1e2a3a; color: #fff;
    border: 3px solid var(--ink); border-radius: 10px;
    font-size: 1.3rem; cursor: pointer; padding: 4px 12px;
    box-shadow: 0 3px 0 var(--ink);
    transition: transform .08s, box-shadow .08s, background .15s, color .15s;
}
.nav-toggle:hover {
    background: #2c3e55;
    color: var(--gold-light);
}

/* ============ PAGE BODY / TITLES ============ */
.page-body { padding: 28px 0 44px; flex: 1; }
.page-title {
    font-size: 1.6rem; font-weight: 900; text-transform: uppercase;
    margin-bottom: 18px; color: var(--navy);
    display: flex; align-items: center; gap: 12px;
    letter-spacing: .5px;
}
.page-title::before {
    content: ""; width: 10px; height: 30px; flex: 0 0 10px;
    background: var(--red); border: 2px solid var(--ink);
    transform: skew(-8deg);
    box-shadow: 2px 2px 0 var(--ink);
}

/* ============ FLASH NOTIFICATIONS ============ */
.flash-wrap {
    padding-top: 16px;
    overflow: hidden;
    transition: padding .45s cubic-bezier(0.4, 0, 0.2, 1),
                max-height .45s cubic-bezier(0.4, 0, 0.2, 1),
                margin .45s cubic-bezier(0.4, 0, 0.2, 1);
}
.flash-wrap.flash-closing {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.flash {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-weight: 700;
    border: 2px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    max-height: 200px;
    transform: translateY(0);
    opacity: 1;
    transition: transform .45s cubic-bezier(0.4, 0, 0.2, 1),
                opacity .35s ease,
                max-height .45s cubic-bezier(0.4, 0, 0.2, 1),
                margin .45s cubic-bezier(0.4, 0, 0.2, 1),
                padding .45s cubic-bezier(0.4, 0, 0.2, 1),
                border-width .45s ease;
}
.flash.flash-closing {
    transform: translateY(-24px);
    opacity: 0;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-width: 0 !important;
    pointer-events: none;
}
.flash-close {
    background: none;
    border: none;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    color: inherit;
    cursor: pointer;
    opacity: .6;
    padding: 0 4px;
    transition: opacity .15s, transform .15s;
    flex: 0 0 auto;
}
.flash-close:hover {
    opacity: 1;
    transform: scale(1.15);
}
.flash-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: .3;
    animation: flashCountdown 3s linear forwards;
}
@keyframes flashCountdown {
    from { width: 100%; }
    to { width: 0%; }
}
.flash-success { background: #e6f9ec; color: #1c7a38; border-color: #1c7a38; }
.flash-error   { background: #fdecec; color: #c62828; border-color: #c62828; }
.flash-info    { background: #e8f1ff; color: #2456a6; border-color: #2456a6; }

/* ============ HERO (full-bleed) ============ */
.hero-full {
    width: 100%;
    margin-left: 0;
    background-color: #fff;
    background-image:
        radial-gradient(rgba(224, 31, 38, .08) 1.6px, transparent 1.7px),
        radial-gradient(rgba(245, 166, 35, .12) 1.6px, transparent 1.7px);
    background-size: 26px 26px, 26px 26px;
    background-position: 0 0, 13px 13px;
    border-top: none;
    border-bottom: 6px solid var(--ink);
    padding: 34px 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-kicker {
    display: inline-block;
    background: var(--navy); color: #fff;
    font-weight: 800; letter-spacing: 4px; font-size: .85rem;
    padding: 8px 22px; margin-bottom: 18px;
    transform: skew(-8deg);
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
}
.hero-full .comic-title {
    font-size: clamp(2.4rem, 7.5vw, 4.8rem);
    margin-bottom: 6px;
}
/* ============ HERO SAIYAN 3D TITLE ============ */
.hero-title-wrap {
    display: block;
    width: 100%;
    margin: 4px 0 10px;
    text-align: center;
}
.hero-saiyan-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-style: normal;
    text-transform: uppercase;
    font-size: clamp(2.2rem, 6.2vw, 4.2rem);
    line-height: 1.05;
    margin: 0 auto;
    user-select: none;
}
.saiyan-gold {
    display: inline-block;
    background: linear-gradient(180deg, #ffffff 0%, #fff785 22%, #ffc107 48%, #ff8c00 75%, #d82b00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter:
        drop-shadow(1px 1px 0 #121212)
        drop-shadow(-1px -1px 0 #121212)
        drop-shadow(1px -1px 0 #121212)
        drop-shadow(-1px 1px 0 #121212)
        drop-shadow(0 3px 0 #cc6f00)
        drop-shadow(0 5px 0 #121212)
        drop-shadow(0 0 16px rgba(255, 179, 0, .55));
    letter-spacing: 2px;
    transition: transform .2s ease;
}
.saiyan-fire {
    display: inline-block;
    background: linear-gradient(180deg, #ffffff 0%, #ff8a80 20%, #ff1744 50%, #c62828 80%, #560000 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter:
        drop-shadow(1px 1px 0 #121212)
        drop-shadow(-1px -1px 0 #121212)
        drop-shadow(1px -1px 0 #121212)
        drop-shadow(-1px 1px 0 #121212)
        drop-shadow(0 3px 0 #990000)
        drop-shadow(0 5px 0 #121212)
        drop-shadow(0 0 16px rgba(255, 23, 68, .55));
    letter-spacing: 2px;
    transition: transform .2s ease;
}
.hero-saiyan-title:hover .saiyan-gold,
.hero-saiyan-title:hover .saiyan-fire {
    transform: translateY(-2px) scale(1.02);
}

/* ============ HERO LOGO GRAPHIC BANNER ============ */
/* ============ HERO LOGO GRAPHIC BANNER & FX ============ */
.hero-logo-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2px auto 26px;
    position: relative;
    z-index: 2;
}

.hero-logo-fx-stage {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
}

/* Hào quang tím nền (Ultra Ego Aura Pulse) */
.hero-aura-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 104%;
    height: 98%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(192, 38, 211, 0.45) 0%, rgba(147, 51, 234, 0.28) 45%, rgba(124, 58, 237, 0) 72%);
    filter: blur(22px);
    pointer-events: none;
    z-index: 1;
    animation: heroAuraPulse 3.6s ease-in-out infinite alternate;
}
@keyframes heroAuraPulse {
    0%   { transform: translate(-50%, -50%) scale(0.92); opacity: 0.65; }
    50%  { transform: translate(-50%, -50%) scale(1.06); opacity: 0.95; }
    100% { transform: translate(-50%, -50%) scale(0.96); opacity: 0.75; }
}

/* Tia năng lượng tím to lướt qua (Ki Beams) */
.hero-fx-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    overflow: visible;
}
.svg-energy-arc {
    stroke-dasharray: 140 380;
    stroke-dashoffset: 520;
    animation: dashLoop 2.8s linear infinite;
}
.svg-energy-arc.arc-1 {
    animation-duration: 2.6s;
}
.svg-energy-arc.arc-2 {
    stroke-dasharray: 150 400;
    stroke-dashoffset: 550;
    animation-duration: 3.4s;
    animation-direction: reverse;
}
@keyframes dashLoop {
    0%   { stroke-dashoffset: 520; }
    100% { stroke-dashoffset: 0; }
}

/* Các điểm lấp lánh (Sparkles) */
.hero-sparkles-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}
.fx-sparkle {
    position: absolute;
    width: 18px;
    height: 18px;
    display: block;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
}
.fx-sparkle::before,
.fx-sparkle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 6px #fff, 0 0 12px #d946ef, 0 0 20px #a855f7;
}
.fx-sparkle::before {
    width: 100%;
    height: 3px;
}
.fx-sparkle::after {
    width: 3px;
    height: 100%;
}

.spk-1 { top: 36%; left: 54%; animation: fxSparkleTwinkle 2.2s ease-in-out infinite; animation-delay: 0s; }
.spk-2 { top: 15%; left: 48%; animation: fxSparkleTwinkle 2.6s ease-in-out infinite; animation-delay: 0.7s; }
.spk-3 { top: 82%; left: 18%; animation: fxSparkleTwinkle 2.4s ease-in-out infinite; animation-delay: 1.2s; }
.spk-4 { top: 82%; left: 82%; animation: fxSparkleTwinkle 2.5s ease-in-out infinite; animation-delay: 0.4s; }
.spk-5 { top: 58%; left: 16%; animation: fxSparkleTwinkle 2.1s ease-in-out infinite; animation-delay: 1.6s; }
.spk-6 { top: 54%; left: 84%; animation: fxSparkleTwinkle 2.3s ease-in-out infinite; animation-delay: 0.9s; }
.spk-7 { top: 92%; left: 50%; animation: fxSparkleTwinkle 1.8s ease-in-out infinite; animation-delay: 1.4s; }

@keyframes fxSparkleTwinkle {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    30% {
        transform: translate(-50%, -50%) scale(1.3) rotate(45deg);
        opacity: 1;
    }
    60% {
        transform: translate(-50%, -50%) scale(0.85) rotate(90deg);
        opacity: 0.85;
    }
    80% {
        transform: translate(-50%, -50%) scale(0.2) rotate(135deg);
        opacity: 0.2;
    }
}

/* Ảnh Logo chính */
.hero-logo-graphic {
    max-width: min(520px, 90%);
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
    filter:
        drop-shadow(0 8px 18px rgba(0, 0, 0, .45))
        drop-shadow(0 0 24px rgba(192, 38, 211, .55))
        drop-shadow(0 0 40px rgba(147, 51, 234, .35))
        drop-shadow(0 0 14px rgba(245, 166, 35, .3));
    transition: transform .3s ease, filter .3s ease;
    animation: heroLogoFloat 5s ease-in-out infinite;
}
.hero-logo-graphic:hover {
    transform: scale(1.03) translateY(-4px);
    filter:
        drop-shadow(0 14px 28px rgba(0, 0, 0, .6))
        drop-shadow(0 0 36px rgba(217, 70, 239, .75))
        drop-shadow(0 0 55px rgba(147, 51, 234, .55))
        drop-shadow(0 0 24px rgba(245, 166, 35, .5));
}
@keyframes heroLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}
.hero-full .ribbon { margin: 16px 8px 28px; font-size: clamp(.8rem, 2.4vw, 1.05rem); }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; padding-bottom: 44px; }
.hero-cta .btn { padding: 15px 34px; font-size: 1.05rem; }
/* Ngọc rồng trang trí hero */
.hero-ball {
    position: absolute; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffb347, #f07f00 70%);
    border: 4px solid var(--ink);
    box-shadow: 0 0 22px rgba(240, 127, 0, .7), inset 0 0 10px rgba(255, 255, 255, .5);
    opacity: .9;
}
.hb1 { width: 110px; height: 110px; left: 6%; top: 16%; animation: float 5s ease-in-out infinite; }
.hb2 { width: 64px; height: 64px; right: 9%; top: 24%; animation: float 6s ease-in-out infinite reverse; }
.hb3 { width: 42px; height: 42px; right: 16%; bottom: 26%; animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* ============ CARD ============ */
.card {
    background: #fff;
    border: 3px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: 5px 5px 0 var(--ink);
    padding: 22px;
    margin-bottom: 22px;
    min-width: 0;
}
.card.hover,
.hazard-wrap.hover {
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.card.hover:hover,
.hazard-wrap.hover:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--ink);
}
.card h3 { margin-bottom: 12px; color: var(--navy); font-weight: 900; text-transform: uppercase; font-size: 1.05rem; letter-spacing: .5px; }
.hazard-top { border-top: none; border-radius: 0 0 var(--radius) var(--radius); }
.hazard-wrap { border: 3px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: 5px 5px 0 var(--ink); margin-bottom: 22px; background: #fff; min-width: 0; }
.hazard-wrap > .card { border: none; box-shadow: none; border-radius: 0; margin-bottom: 0; background: transparent; }
.dl-head {
    display: inline-block;
    background: var(--red); color: #fff;
    font-weight: 900; text-transform: uppercase; letter-spacing: 1px;
    padding: 8px 26px; margin-bottom: 18px;
    transform: skew(-8deg);
    border: 3px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
}

/* ============ GRID ============ */
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ============ SECTION HEAD ============ */
.section-head {
    display: flex; align-items: center; gap: 12px;
    margin: 6px 0 16px;
}
.section-head::before {
    content: ""; width: 10px; height: 28px; flex: 0 0 10px;
    background: var(--red); border: 2px solid var(--ink);
    transform: skew(-8deg); box-shadow: 2px 2px 0 var(--ink);
}
.section-head h3 { margin: 0; font-size: 1.2rem; font-weight: 900; text-transform: uppercase; color: var(--navy); }
.grid-3 .section-head h3 { font-size: 1.05rem; white-space: nowrap; }
.section-head .more { margin-left: auto; font-weight: 800; text-transform: uppercase; font-size: .85rem; white-space: nowrap; }

/* ============ NEWS ============ */
.news-item {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 12px 10px;
    border-bottom: 2px dashed var(--line);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover {
    background: rgba(0, 0, 0, .03);
    transform: translateX(4px);
}
.news-thumb {
    flex: 0 0 74px; width: 74px; height: 74px;
    border-radius: 12px; border: 3px solid var(--ink);
    background: linear-gradient(135deg, var(--gold-light), var(--red));
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    padding: 0;
    box-shadow: 3px 3px 0 var(--ink);
    transition: transform .15s ease, box-shadow .15s ease;
}
.news-thumb-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s ease;
}
.news-item:hover .news-thumb {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 4px 4px 0 var(--ink);
}
.news-item:hover .news-thumb-img {
    transform: scale(1.08);
}
.news-item h4 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--navy);
    transition: color .15s ease;
}
.news-item:hover h4 {
    color: var(--red);
}
.news-meta {
    font-size: .84rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.badge-admin-author {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #fff;
    background: linear-gradient(135deg, #e01f26, #b3121a);
    padding: 2px 9px;
    border-radius: 6px;
    border: 1.5px solid var(--ink);
    box-shadow: 1.5px 1.5px 0 var(--ink);
    line-height: 1.3;
}
.badge {
    display: inline-block; font-size: .72rem; font-weight: 800;
    padding: 3px 10px; border-radius: 999px; margin-left: 8px;
    vertical-align: middle; text-transform: uppercase;
    border: 2px solid var(--ink);
}
.badge-pin { background: var(--red); color: #fff; }
.badge-new { background: var(--green); color: #fff; }
.badge-pending { background: var(--gold-light); color: var(--ink); }
.badge-ok { background: var(--green); color: #fff; }
.badge-no { background: var(--red); color: #fff; }

/* Chi tiết bài viết - Meta & Tác giả Quản trị viên kèm hiệu ứng lấp lánh admin.png */
.article-meta {
    font-size: .88rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 16px;
}
.article-meta-sep {
    color: var(--muted);
    font-weight: bold;
    user-select: none;
}
.article-meta-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
}
.admin-author-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
}
.admin-sparkle-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    transition: transform .25s ease;
}
.admin-sparkle-box:hover {
    transform: scale(1.12);
}
.admin-sparkle-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffd700;
    background: #111;
    display: block;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.85), 0 0 16px rgba(224, 31, 38, 0.5);
    animation: admin-glow-pulse 2.2s ease-in-out infinite;
}
.admin-sparkle-box .sparkle-shine {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}
.forum-author-avatar-wrap.is-sparkle-wrap,
.article-author-avatar-wrap.is-sparkle-wrap,
.comment-avatar-wrap.is-sparkle-wrap {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}
.admin-sparkle-box .sparkle-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -120%;
    width: 70%;
    height: 200%;
    background: linear-gradient(
        60deg,
        rgba(255, 255, 255, 0) 20%,
        rgba(255, 255, 255, 0.85) 50%,
        rgba(255, 255, 255, 0) 80%
    );
    transform: rotate(25deg);
    animation: admin-light-sweep 2.8s ease-in-out infinite;
}
.admin-sparkle-box .sparkle-star {
    position: absolute;
    color: #fff475;
    font-size: 11px;
    line-height: 1;
    pointer-events: none;
    z-index: 4;
    text-shadow: 0 0 5px #ffd700, 0 0 8px #ffffff;
    filter: drop-shadow(0 0 2px #ffc107);
    user-select: none;
}
.admin-sparkle-box .star-1 {
    top: -5px;
    right: -4px;
    animation: admin-star-twinkle 1.6s ease-in-out infinite 0s;
}
.admin-sparkle-box .star-2 {
    bottom: -4px;
    left: -4px;
    font-size: 9px;
    animation: admin-star-twinkle 2s ease-in-out infinite 0.5s;
}
.admin-sparkle-box .star-3 {
    top: -3px;
    left: -5px;
    font-size: 8px;
    animation: admin-star-twinkle 2.3s ease-in-out infinite 1s;
}
.admin-sparkle-box .star-4 {
    bottom: -3px;
    right: -3px;
    font-size: 10px;
    color: #ffffff;
    animation: admin-star-twinkle 1.9s ease-in-out infinite 1.4s;
}

@keyframes admin-glow-pulse {
    0%, 100% {
        box-shadow: 0 0 6px rgba(255, 215, 0, 0.7), 0 0 12px rgba(224, 31, 38, 0.4);
        border-color: #ffd700;
    }
    50% {
        box-shadow: 0 0 12px rgba(255, 235, 59, 1), 0 0 20px rgba(255, 87, 34, 0.7);
        border-color: #fff9a6;
    }
}
@keyframes admin-light-sweep {
    0% { left: -120%; }
    40%, 100% { left: 160%; }
}
@keyframes admin-star-twinkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.2) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.3) rotate(90deg);
    }
}

/* Banner hình ảnh chi tiết bài viết */
.article-banner {
    margin: 16px 0 20px;
    border: 3px solid var(--ink);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 4px 4px 0 var(--ink);
    background: #000;
    text-align: center;
}
.article-banner img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* ============ BÀI VIẾT TIÊU ĐIỂM & DANH SÁCH GỌN (HOMEPAGE) ============ */
.news-featured {
    display: flex;
    gap: 16px;
    align-items: stretch;
    background: #fbf6ec;
    border: 2.5px solid var(--ink);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 4px 4px 0 var(--ink);
    margin-bottom: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.news-featured:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
    background: #ffffff;
}
.featured-media {
    flex: 0 0 135px;
    width: 135px;
    min-height: 135px;
    border-radius: 10px;
    border: 2px solid var(--ink);
    overflow: hidden;
    background: linear-gradient(135deg, var(--gold-light), var(--red));
    position: relative;
    box-shadow: 2px 2px 0 var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
}
.featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}
.news-featured:hover .featured-img {
    transform: scale(1.08);
}
.featured-pill-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--red);
    color: #fff;
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1.5px solid var(--ink);
    box-shadow: 1px 1px 0 var(--ink);
}
.featured-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.featured-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: 4px;
}
.featured-title {
    font-size: 1.05rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.3;
    margin: 2px 0 6px;
    letter-spacing: .3px;
    color: var(--navy);
    transition: color .15s ease;
}
.news-featured:hover .featured-title {
    color: var(--red);
}
.featured-desc {
    font-size: .86rem;
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.featured-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}
.featured-actions .btn {
    padding: 6px 16px;
    font-size: .82rem;
}
.featured-cmt {
    font-size: .8rem;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
}

/* Danh sách gọn */
.compact-news-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.compact-news-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 8px;
    border-bottom: 1.5px dashed var(--line);
    border-radius: 8px;
    text-decoration: none;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    transition: transform .15s ease, background .15s ease, padding-left .15s ease;
}
.compact-news-item:last-child {
    border-bottom: none;
}
.compact-news-item:hover {
    background: rgba(0, 0, 0, .03);
    padding-left: 14px;
    transform: translateX(4px);
}
.compact-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}
.compact-icon {
    font-size: .95rem;
    flex: 0 0 auto;
}
.compact-title {
    display: block;
    font-size: .92rem;
    font-weight: 800;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .15s ease;
    flex: 1 1 auto;
    min-width: 0;
}
.compact-left .badge {
    flex-shrink: 0;
    margin-left: 0;
    white-space: nowrap;
}
.compact-news-item:hover .compact-title {
    color: var(--red);
}
.compact-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}
.badge-sm {
    font-size: .65rem;
    padding: 1px 7px;
    margin-left: 4px;
}

/* Phiên bản compact cho danh sách bài viết ở trang chủ - Bo tròn hoàn hảo ôm sát viền ảnh */
.admin-sparkle-compact {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}
.admin-sparkle-compact .admin-sparkle-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffd700;
    background: #000;
    display: block;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.85), 0 0 10px rgba(255, 107, 0, 0.5);
    animation: admin-glow-circle 2s ease-in-out infinite;
}
.admin-sparkle-compact .sparkle-shine {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}
.admin-sparkle-compact .sparkle-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -120%;
    width: 60%;
    height: 200%;
    background: linear-gradient(
        60deg,
        rgba(255, 255, 255, 0) 15%,
        rgba(255, 255, 255, 0.9) 50%,
        rgba(255, 255, 255, 0) 85%
    );
    transform: rotate(25deg);
    animation: admin-light-sweep 2.5s ease-in-out infinite;
}

@keyframes admin-glow-circle {
    0%, 100% {
        box-shadow: 0 0 4px rgba(255, 215, 0, 0.7), 0 0 8px rgba(255, 107, 0, 0.4);
        border-color: #ffd700;
    }
    50% {
        box-shadow: 0 0 8px rgba(255, 235, 59, 1), 0 0 14px rgba(255, 87, 34, 0.7);
        border-color: #fff9a6;
    }
}

/* ============ QUICK LINKS ============ */
.quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.qlink {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 3px solid var(--ink); border-radius: 12px;
    padding: 14px 16px; font-weight: 800; text-transform: uppercase; font-size: .88rem;
    box-shadow: 4px 4px 0 var(--ink); color: var(--navy);
    transition: transform .12s, box-shadow .12s;
}
.qlink:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); color: var(--red); }
.qlink .qicon { font-size: 1.5rem; }
.qlink .arr { margin-left: auto; color: var(--red); font-weight: 900; }

/* ============ RANKING ============ */
.rank-list { list-style: none; }
.rank-list li {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 8px; border-bottom: 2px dashed var(--line); font-weight: 600;
    border-radius: 8px;
    transition: background .15s ease, transform .15s ease;
}
.rank-list li:last-child { border-bottom: none; }
.rank-list li:nth-child(-n+3) { background: #fffdf4; }
.rank-list li:hover {
    background: rgba(0, 0, 0, .03);
    transform: translateX(4px);
}
.rank-medal { font-size: 1.35rem; width: 36px; text-align: center; flex: 0 0 36px; }
.rank-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-sub { display: block; font-size: .74rem; font-weight: 500; opacity: .78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.rank-val-wrap { text-align: right; line-height: 1.25; flex-shrink: 0; }
.rank-val { color: var(--red); font-weight: 800; white-space: nowrap; display: block; }
.rank-time { display: block; font-size: .72rem; font-weight: 600; opacity: .72; white-space: nowrap; margin-top: 2px; }

/* ============ DOWNLOAD CARDS ============ */
.dl-card {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 34px 18px 22px;
    border-radius: 14px;
    border: 2.5px solid var(--ink) !important;
    background: #fbf6ec;
    box-shadow: 4px 4px 0 var(--ink) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.dl-card:hover {
    background: #ffffff;
    transform: translate(-3px, -3px) !important;
    box-shadow: 7px 7px 0 var(--ink) !important;
}
.dl-card h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--navy);
    letter-spacing: .5px;
}
.dl-card .form-hint {
    margin-bottom: 16px;
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.45;
}
.dl-card .btn {
    margin-top: auto;
}
.dl-actions {
    margin-top: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dl-actions .btn {
    margin-top: 0;
}
.btn.btn-play-now {
    background: linear-gradient(180deg, #22c55e, #16a34a);
    border: 2.5px solid var(--ink);
    color: #ffffff;
    font-size: .98rem;
    font-weight: 900;
    padding: 11px 16px;
    letter-spacing: .5px;
    box-shadow: 0 4px 0 var(--ink), 0 0 14px rgba(34, 197, 94, .45);
}
.btn.btn-play-now:hover {
    background: linear-gradient(180deg, #16a34a, #15803d);
    color: #ffffff;
    box-shadow: 0 2px 0 var(--ink), 0 0 18px rgba(34, 197, 94, .65);
}
.btn.btn-testflight-disabled,
.btn.btn-testflight-disabled:hover,
.btn.btn-testflight-disabled:active {
    background: #cbd5e1;
    color: #64748b;
    border: 1.5px solid #94a3b8;
    font-size: .7rem;
    font-weight: 700;
    padding: 5px 10px;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
    opacity: .72;
}

/* Badge góc phiên bản */
.dl-tag {
    position: absolute;
    top: 16px;
    right: -42px;
    transform: rotate(45deg);
    font-weight: 900;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 5px 44px;
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
    background: var(--gold-light);
    color: var(--ink);
}

/* Màu sắc tag riêng cho từng nền tảng */
.dl-card-apk .dl-tag { background: #3ddc84; color: #052e16; }
.dl-card-ipa .dl-tag { background: #38bdf8; color: #082f49; }
.dl-card-pc  .dl-tag { background: #c084fc; color: #3b0764; }
.dl-card-jar .dl-tag { background: #f59e0b; color: #451a03; }

/* Icon hình tròn nổi bật */
.dl-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.3rem;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--ink);
    box-shadow: 2.5px 2.5px 0 var(--ink);
    transition: transform .2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .2s ease;
}
.dl-card:hover .dl-icon {
    transform: scale(1.1) rotate(-4deg);
    box-shadow: 4px 4px 0 var(--ink);
}
.android-robot-icon {
    width: 1.1em;
    height: 1.1em;
    vertical-align: middle;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .2));
}

/* ============ GIFTCODE & CỘNG ĐỒNG (DẠNG THANH BANNER HÀNH ĐỘNG NGANG) ============ */
.comm-banner-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.comm-banner-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #fbf6ec;
    border: 2px solid var(--ink);
    border-radius: 12px;
    box-shadow: 3.5px 3.5px 0 var(--ink);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    position: relative;
    overflow: hidden;
}
.comm-banner-item:hover {
    background: #ffffff;
    transform: translate(-3px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
}

/* Icon tròn / bo góc bên trái */
.comm-banner-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    transition: transform .2s ease;
}
.comm-banner-item:hover .comm-banner-icon {
    transform: scale(1.1) rotate(-4deg);
}
.icon-zalo { background: #0068ff; color: #fff; }
.icon-fb   { background: #1877f2; color: #fff; }
.icon-gift {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    box-shadow: 2px 2px 0 var(--ink), 0 0 10px rgba(255, 215, 0, 0.4);
}
.icon-guide { background: linear-gradient(135deg, #34d399, #059669); }

/* Thông tin tiêu đề & mô tả ở giữa */
.comm-banner-info {
    flex: 1;
    min-width: 0;
}
.comm-banner-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.comm-banner-title h4 {
    margin: 0;
    font-size: .98rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--navy);
    letter-spacing: .4px;
    transition: color .15s ease;
}
.comm-banner-item:hover .comm-banner-title h4 {
    color: var(--red);
}
.comm-banner-desc {
    font-size: .8rem;
    color: var(--muted);
    margin: 3px 0 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Nút CTA bên phải */
.comm-banner-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    font-weight: 800;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-radius: 8px;
    border: 1.5px solid var(--ink);
    box-shadow: 1.5px 1.5px 0 var(--ink);
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease;
}
.comm-banner-item:hover .comm-banner-btn {
    transform: scale(1.05);
    box-shadow: 2.5px 2.5px 0 var(--ink);
}

/* Điểm nhấn viền vàng hoàng kim cho Giftcode */
.comm-item-gift {
    border-color: #f59e0b;
    background: linear-gradient(90deg, #fffbee, #fff3dc);
}
.comm-item-gift:hover {
    background: #ffffff;
    border-color: #d97706;
}

/* Màu sắc các nút */
.btn-zalo {
    background: linear-gradient(135deg, #0068ff, #004ecc);
    color: #fff !important;
}
.btn-zalo:hover {
    background: linear-gradient(135deg, #1f7eff, #005ce6);
}
.btn-fb {
    background: linear-gradient(135deg, #1877f2, #0d5ec4);
    color: #fff !important;
}
.btn-fb:hover {
    background: linear-gradient(135deg, #3086f7, #156ad6);
}
.btn-gift {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff !important;
}
.btn-gift:hover {
    background: linear-gradient(135deg, #fbbf24, #ea580c);
}
.btn-guide {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff !important;
}
.btn-guide:hover {
    background: linear-gradient(135deg, #34d399, #047857);
}

/* Dark theme */
html.dark-theme .comm-banner-item {
    background: #1a2232 !important;
    border-color: #2e3a50 !important;
    box-shadow: 3.5px 3.5px 0 #070a10 !important;
}
html.dark-theme .comm-banner-item:hover {
    background: #232d42 !important;
    border-color: #435474 !important;
    box-shadow: 6px 6px 0 #070a10 !important;
}
html.dark-theme .comm-banner-title h4 {
    color: #f1f5f9;
}
html.dark-theme .comm-banner-item:hover .comm-banner-title h4 {
    color: var(--gold-light);
}
html.dark-theme .comm-banner-desc {
    color: #94a3b8;
}
html.dark-theme .comm-banner-icon {
    border-color: #2e3a50;
    box-shadow: 2px 2px 0 #070a10;
}
html.dark-theme .comm-banner-btn {
    border-color: #070a10;
    box-shadow: 1.5px 1.5px 0 #070a10;
}
html.dark-theme .comm-item-gift {
    border-color: #f59e0b !important;
    background: linear-gradient(90deg, #1e2638, #242d40) !important;
}

/* ============ RECHARGE ============ */
.pay-head { text-align: center; margin-bottom: 20px; }
.pay-head .comic-title { font-size: clamp(2rem, 6vw, 3.4rem); }
.pay-panel {
    background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, #ef8f1c);
    border: 3px solid var(--ink); border-radius: 16px;
    box-shadow: 6px 6px 0 var(--ink);
    padding: 26px; margin-bottom: 22px; position: relative;
}
.pay-panel h3 { font-weight: 900; text-transform: uppercase; color: var(--ink); margin-bottom: 6px; }
.pay-panel .starburst { position: absolute; top: -34px; right: 18px; transform: rotate(12deg); }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.step {
    background: #fff; border: 3px solid var(--ink);
    border-radius: 12px; padding: 16px;
    box-shadow: 4px 4px 0 var(--ink);
}
.step-num {
    font-size: 2.1rem; font-weight: 900; color: var(--red);
    -webkit-text-stroke: 1.5px var(--ink);
    line-height: 1; margin-bottom: 6px;
}
.step b { text-transform: uppercase; font-size: .9rem; }
.step p { font-size: .88rem; color: var(--muted); margin-top: 4px; }

/* ============ FORM ============ */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 800; margin-bottom: 6px; color: var(--navy); font-size: .92rem; text-transform: uppercase; letter-spacing: .3px; }
.form-control {
    width: 100%; padding: 11px 14px;
    border: 3px solid var(--ink); border-radius: 10px;
    font-size: 1rem; font-family: inherit; background: #fffdf8; color: var(--text);
    transition: box-shadow .15s;
}
.form-control:focus { outline: none; box-shadow: 0 0 0 3px rgba(224, 31, 38, .25); border-color: var(--red); }
textarea.form-control { min-height: 140px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.form-box { max-width: 480px; margin: 10px auto; }
.form-box .card { padding: 30px; }
.form-title { text-align: center; margin-bottom: 20px; font-size: 1.4rem; font-weight: 900; text-transform: uppercase; color: var(--navy); }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-weight: 600; text-transform: none; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--red); }

/* ============ TABLE ============ */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 3px solid var(--ink); }
table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: .93rem; }
table.data th {
    background: var(--navy); color: #fff;
    padding: 12px 10px; text-align: left; white-space: nowrap;
    text-transform: uppercase; font-size: .8rem; letter-spacing: .5px;
}
table.data td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:hover td { background: #fffaf0; }
table.data tr:last-child td { border-bottom: none; }
.actions { white-space: nowrap; }
.actions .btn { margin: 2px; }

/* ============ COMMENTS ============ */
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 2px dashed var(--line); }
.comment:last-child { border-bottom: none; }
.avatar {
    width: 44px; height: 44px; border-radius: 50%; flex: 0 0 44px;
    background: linear-gradient(135deg, var(--gold-light), var(--red));
    color: #fff; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; text-transform: uppercase;
    border: 3px solid var(--ink);
    text-shadow: 1px 1px 0 var(--ink);
}
.comment-body { flex: 1; }
.comment-head { font-size: .88rem; margin-bottom: 4px; }
.comment-head b { color: var(--navy); }
.comment-time { color: var(--muted); margin-left: 8px; font-size: .8rem; }

/* ============ ACCOUNT INFO ============ */
.info-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 2px dashed var(--line); }
.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--navy); font-weight: 600; }
.info-row .v { font-weight: 800; }
.char-chip {
    display: inline-flex; align-items: center; gap: 12px;
    background: #fff8ec; border: 2px solid var(--ink); border-radius: 12px;
    padding: 8px 16px; margin: 4px 6px 4px 0;
    box-shadow: 3px 3px 0 var(--ink);
}
.char-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid var(--ink);
    object-fit: cover;
    background: #fff;
    flex: 0 0 40px;
    box-shadow: 0 2px 0 var(--ink);
}

/* ============ ARTICLE ============ */
.article h2 { font-size: 1.55rem; margin-bottom: 8px; color: var(--navy); font-weight: 900; }
.article-meta { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.article-body { font-size: 1.02rem; }
.article-body p { margin-bottom: 12px; }

/* ============ PAGINATION ============ */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 8px 14px; border-radius: 10px;
    border: 3px solid var(--ink); background: #fff; font-weight: 800;
    box-shadow: 0 3px 0 var(--ink); color: var(--navy);
}
.pagination a:hover { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); color: var(--red); }
.pagination span.current { background: var(--red); color: #fff; border-color: var(--ink); }

/* ============ FOOTER ============ */
.site-footer { background: var(--navy-dark); color: #cfd6f2; margin-top: auto; border-top: 6px solid var(--ink); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; padding: 36px 0 20px; }
.footer-inner h4 { color: var(--gold-light); margin-bottom: 10px; text-transform: uppercase; font-weight: 900; }
.footer-inner a { display: block; color: #cfd6f2; padding: 3px 0; font-size: .95rem; }
.footer-inner a:hover { color: var(--gold-light); }
.footer-bottom {
    text-align: center; padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .85rem; color: #9aa3c7;
}

/* ============ ADMIN LAYOUT ============ */
.admin-wrap { display: flex; min-height: 100vh; align-items: stretch; }
.admin-sidebar {
    width: 264px; flex: 0 0 264px;
    background: var(--navy-dark); color: #cfd6f2;
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    border-right: 4px solid var(--ink);
}
.admin-brand {
    padding: 20px; font-weight: 900; color: #fff; font-size: 1.05rem;
    text-transform: uppercase; letter-spacing: .5px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    display: flex; align-items: center; gap: 10px;
}
.admin-hello {
    margin: 14px 12px 4px; padding: 14px;
    background: rgba(255, 255, 255, .06);
    border: 2px solid rgba(255, 255, 255, .12);
    border-radius: 10px; font-size: .88rem; line-height: 1.5;
}
.admin-hello b { color: #fff; }
.admin-menu { flex: 1; padding: 6px 12px; overflow-y: auto; }
.admin-menu .menu-group {
    font-size: .7rem; text-transform: uppercase; letter-spacing: 1.5px;
    color: #8a93b2; font-weight: 800; padding: 14px 10px 6px;
}
.admin-menu a {
    display: block; color: #cfd6f2; padding: 10px 12px;
    border-radius: 8px; font-weight: 600; margin-bottom: 2px; font-size: .93rem;
}
.admin-menu a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-menu a.active { background: var(--purple); color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.4); }
.admin-logout { padding: 12px; }
.admin-logout .btn { width: 100%; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
    background: #fff; border-bottom: 4px solid var(--ink);
    padding: 14px 26px; display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 50;
}
.admin-topbar h1 { font-size: 1.25rem; font-weight: 900; text-transform: uppercase; color: var(--navy); margin: 0; }
.admin-topbar .crumb { color: var(--muted); font-size: .85rem; margin-left: auto; }
.admin-content { padding: 26px; flex: 1; min-width: 0; }
/* Accent tím cho khu vực admin */
.admin-content .btn-primary { background: var(--purple); }
.admin-content .btn-primary:hover { background: var(--purple-dark); color: #fff; }
.admin-content .btn-outline { border-color: var(--purple); color: var(--purple); box-shadow: 0 4px 0 var(--purple); }
.admin-content .btn-outline:hover { box-shadow: 0 2px 0 var(--purple); color: var(--purple-dark); }
.admin-content table.data th { background: var(--navy-dark); }
.admin-content .page-title::before { background: var(--purple); }
.admin-content .form-control:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124, 58, 237, .2); }
.admin-content .checkbox-row input { accent-color: var(--purple); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stat-card {
    background: #fff; border: 3px solid var(--ink); border-radius: var(--radius);
    padding: 20px; box-shadow: 5px 5px 0 var(--ink); text-align: center;
}
.stat-card .num { font-size: 2rem; font-weight: 900; color: var(--purple); }
.stat-card .lbl { color: var(--navy); font-weight: 700; font-size: .9rem; text-transform: uppercase; }

/* ============ BXH NOEL EVENT & SERVER TABS ============ */
.bxh-noel-section {
    margin-bottom: 24px;
}
.bxh-event-banner {
    background: linear-gradient(135deg, #fff6f6 0%, #fffdf4 55%, #f2fbf6 100%);
    margin-bottom: 16px;
}
.bxh-event-banner-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.bxh-event-title-wrap h3 {
    margin-bottom: 4px;
}
.bxh-event-sub {
    margin: 0;
    font-size: .86rem;
    color: var(--muted);
    font-weight: 600;
}
.bxh-event-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.bxh-event-badges .badge {
    margin-left: 0;
}
.bxh-event-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding-top: 10px;
    border-top: 2px dashed rgba(20, 26, 36, .14);
    font-size: .86rem;
    color: var(--navy);
}
.bxh-section-title {
    margin: 22px 0 12px;
    color: var(--navy);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.05rem;
    letter-spacing: .5px;
}
.bxh-card-note {
    margin: -4px 0 10px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
}
.badge-gold {
    background: var(--gold-light);
    color: var(--ink);
}
html.dark-theme .bxh-event-banner {
    background: linear-gradient(135deg, #251923 0%, #171f2d 55%, #12241e 100%);
}
html.dark-theme .bxh-event-sub,
html.dark-theme .bxh-card-note {
    color: #94a3b8;
}
html.dark-theme .bxh-event-meta {
    color: #e2e8f0;
    border-top-color: rgba(255, 255, 255, .14);
}
html.dark-theme .bxh-section-title {
    color: #f1f5f9;
}

.bxh-tabs {
    display: none;
}
@media (min-width: 961px) {
    .bxh-grid .bxh-card,
    #bxh .bxh-card {
        display: block !important;
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
    .grid-3, .grid-4, .quick-links { grid-template-columns: repeat(2, 1fr); }
    .grid-3 > :last-child:nth-child(2n+1) { grid-column: span 2; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-sidebar { width: 220px; flex-basis: 220px; }

    /* BXH Mobile: thanh chuyển tab tiện lợi và hiển thị 1 cột cân đối */
    .bxh-tabs {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 4px 2px 10px;
        margin-bottom: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .bxh-tabs::-webkit-scrollbar {
        display: none;
    }
    .bxh-tab {
        flex: 1 1 0;
        min-width: max-content;
        padding: 10px 14px;
        font-family: inherit;
        font-size: .84rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .3px;
        border: 2px solid var(--ink);
        border-radius: 10px;
        background: #fff;
        color: var(--navy);
        box-shadow: 3px 3px 0 var(--ink);
        cursor: pointer;
        transition: all .15s ease;
        white-space: nowrap;
        text-align: center;
    }
    .bxh-tab:hover {
        transform: translate(-1px, -1px);
        box-shadow: 4px 4px 0 var(--ink);
    }
    .bxh-tab.active {
        background: var(--red);
        color: #fff;
        box-shadow: 4px 4px 0 var(--ink);
        transform: translate(-1px, -1px);
    }
    html.dark-theme .bxh-tab {
        background: #171f2d;
        color: #f1f5f9;
        border-color: var(--ink);
    }
    html.dark-theme .bxh-tab.active {
        background: var(--red);
        color: #fff;
    }

    .bxh-grid.grid-3,
    #bxh.grid-3 {
        grid-template-columns: 1fr !important;
    }
    .bxh-grid.grid-3 > :last-child:nth-child(2n+1),
    #bxh.grid-3 > :last-child:nth-child(2n+1) {
        grid-column: auto !important;
    }

    /* Mặc định hiển thị tab được chọn cho cả BXH Noel và BXH Server */
    .bxh-grid[data-active-tab="power"] .bxh-card:not(.bxh-card-power),
    .bxh-grid[data-active-tab="nap"] .bxh-card:not(.bxh-card-nap),
    .bxh-grid[data-active-tab="task"] .bxh-card:not(.bxh-card-task),
    .bxh-grid[data-active-tab="caycuoc"] .bxh-card:not(.bxh-card-caycuoc),
    .bxh-grid[data-active-tab="vongquay"] .bxh-card:not(.bxh-card-vongquay),
    .bxh-grid[data-active-tab="napnoel"] .bxh-card:not(.bxh-card-napnoel) {
        display: none !important;
    }
    .bxh-grid[data-active-tab="all"] .bxh-card {
        display: block !important;
    }
}
/* ============ HEADER TABLET & MOBILE ============ */
@media (max-width: 1024px) {
    .header-inner {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 8px 0;
        min-height: auto;
    }
    .logo {
        flex: 0 0 auto;
    }
    .logo-img {
        height: 42px;
        max-height: 42px;
        max-width: 95px;
    }
    .user-area {
        margin-left: auto;
        gap: 6px;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }
    .theme-toggle {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        font-size: 1rem;
        box-shadow: 0 2px 0 var(--ink);
    }
    .user-chip {
        padding: 3px 8px 3px 3px;
        font-size: .8rem;
        gap: 6px;
        box-shadow: 0 2px 0 var(--ink);
    }
    .user-chip .avatar-mini {
        width: 26px;
        height: 26px;
        flex: 0 0 26px;
    }
    .user-chip-name {
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
    }
    .btn-header {
        padding: 6px 10px;
        font-size: .72rem;
        box-shadow: 0 2px 0 var(--ink);
        white-space: nowrap;
    }
    .nav-toggle {
        display: block;
        padding: 4px 10px;
        font-size: 1.15rem;
        box-shadow: 0 2px 0 var(--ink);
    }

    /* Menu drawer mở ra mượt mà */
    .main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        transform: none;
        flex-direction: column;
        border-radius: 14px;
        padding: 8px;
        gap: 3px;
        margin: 0 3%;
        z-index: 999;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
    }
    .main-nav.open {
        display: flex;
    }
    .main-nav a {
        border-radius: 10px;
        padding: 10px 16px;
        font-size: .9rem;
        text-align: center;
    }
    .main-nav a.active::after {
        left: 35%;
        right: 35%;
        bottom: 4px;
    }
}

@media (max-width: 760px) {
    .logo-img {
        height: 38px;
        max-height: 38px;
        max-width: 85px;
    }

    /* Banner Hero cân đối, không bị bóng che chữ */
    .hero-full {
        padding: 26px 0 0;
    }
    .hero-kicker {
        font-size: .72rem;
        letter-spacing: 2px;
        padding: 5px 14px;
        margin-bottom: 10px;
    }
    .hero-full .comic-title {
        font-size: clamp(1.4rem, 6.4vw, 2.15rem);
        margin-bottom: 8px;
        letter-spacing: .5px;
        line-height: 1.15;
        -webkit-text-stroke: 1px var(--ink);
        filter: drop-shadow(0 2px 0 var(--ink)) drop-shadow(2px 3px 0 rgba(0, 0, 0, .4));
        text-shadow: none;
        max-width: 100%;
        word-break: keep-all;
    }
    .hero-title-wrap {
        margin: 2px 0 6px;
    }
    .hero-saiyan-title {
        font-size: clamp(1.4rem, 6.6vw, 2.15rem);
        gap: 8px;
        line-height: 1.15;
    }
    .saiyan-gold {
        filter:
            drop-shadow(1px 1px 0 #121212)
            drop-shadow(-1px -1px 0 #121212)
            drop-shadow(0 2px 0 #cc6f00)
            drop-shadow(0 3.5px 0 #121212)
            drop-shadow(0 0 10px rgba(255, 179, 0, .5));
        letter-spacing: .5px;
    }
    .saiyan-fire {
        filter:
            drop-shadow(1px 1px 0 #121212)
            drop-shadow(-1px -1px 0 #121212)
            drop-shadow(0 2px 0 #990000)
            drop-shadow(0 3.5px 0 #121212)
            drop-shadow(0 0 10px rgba(255, 23, 68, .5));
        letter-spacing: 1px;
    }
    .hero-logo-banner {
        margin: 2px auto 18px;
    }
    .hero-logo-graphic {
        max-width: min(340px, 92%);
        animation: none;
    }
    .fx-sparkle {
        width: 14px;
        height: 14px;
    }
    .hero-aura-pulse {
        filter: blur(14px);
    }
    .hero-full .ribbon {
        font-size: .76rem;
        padding: 6px 14px;
        margin: 8px 4px 18px;
        line-height: 1.35;
        max-width: 94%;
        white-space: normal;
        transform: rotate(-1deg) skew(-4deg);
    }
    /* Đưa các nút CTA vào bố cục 2 hàng: Tải game full trên, 2 nút phụ chia đôi dưới */
    .hero-cta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        max-width: 330px;
        margin: 0 auto;
        padding-bottom: 24px;
    }
    .hero-cta .btn {
        padding: 10px 14px;
        font-size: .88rem;
    }
    .hero-cta .btn-primary {
        grid-column: 1 / -1;
        padding: 12px 16px;
        font-size: .95rem;
    }
    /* Khi chưa đăng nhập (chỉ có 2 nút Tải game + Diễn đàn): nút thứ 2 cũng full ngang cho cân đối */
    .hero-cta .btn:nth-child(2):last-child {
        grid-column: 1 / -1;
        padding: 11px 16px;
        font-size: .92rem;
    }
    /* Di chuyển viên ngọc rồng ra góc để không đè lên chữ */
    .hb1 {
        width: 38px;
        height: 38px;
        top: 6px;
        left: 4%;
        opacity: .35;
        animation: none;
    }
    .hb2, .hb3 {
        display: none;
    }

    /* Thẻ Card & Layout */
    .card {
        padding: 16px 14px;
        margin-bottom: 16px;
        border-width: 2px;
        box-shadow: 4px 4px 0 var(--ink);
    }
    .grid-2, .grid-3, .grid-4, .steps {
        grid-template-columns: 1fr;
    }
    .footer-inner {
        grid-template-columns: 1fr;
    }
    .pay-panel .starburst {
        position: static;
        margin: 0 auto 14px;
        transform: rotate(12deg);
    }

    /* Tin tức danh sách */
    .news-item {
        padding: 12px 0;
        gap: 12px;
    }
    .news-thumb {
        flex: 0 0 52px;
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
        border-radius: 10px;
        border-width: 2px;
    }
    .news-item h4 {
        font-size: .95rem;
        line-height: 1.3;
        margin-bottom: 5px;
    }
    .news-meta {
        font-size: .78rem;
        line-height: 1.4;
    }
    .badge {
        font-size: .65rem;
        padding: 2px 7px;
        margin-left: 4px;
    }

    /* Bài tiêu điểm & danh sách gọn mobile */
    .news-featured {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    .featured-media {
        width: 100%;
        height: 150px;
        min-height: 150px;
    }
    .compact-news-item {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        gap: 5px;
        padding: 8px 6px;
        box-sizing: border-box;
    }
    .compact-left {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .compact-title {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .compact-right {
        padding-left: 32px;
        font-size: .74rem;
        margin-left: 0;
    }

    /* Bảng xếp hạng */
    .rank-list li {
        padding: 8px 4px;
        gap: 8px;
        font-size: .88rem;
    }
    .rank-medal {
        width: 28px;
        flex: 0 0 28px;
        font-size: 1.15rem;
    }
    .rank-name {
        font-size: .88rem;
    }
    .rank-val {
        font-size: .88rem;
    }

    /* Thẻ cộng đồng & Giftcode trên mobile: xếp gọn, không bóp chữ */
    .comm-banner-item {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 10px 12px;
        padding: 12px;
    }
    .comm-banner-icon {
        width: 42px;
        height: 42px;
        font-size: 1.35rem;
    }
    .comm-banner-info {
        flex: 1 1 calc(100% - 56px);
    }
    .comm-banner-title {
        gap: 6px;
    }
    .comm-banner-title h4 {
        font-size: .9rem;
        line-height: 1.25;
    }
    .comm-banner-desc {
        display: block;
        white-space: normal;
        font-size: .8rem;
        margin-top: 4px;
    }
    .comm-banner-btn {
        width: 100%;
        text-align: center;
        padding: 8px 12px;
    }

    /* Thanh tab BXH dạng lưới 2x2 trên mobile: hiển thị đủ cả 4 tab, không tràn ngang */
    .bxh-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        overflow-x: visible;
        padding: 4px 0 10px;
    }
    .bxh-tab {
        min-width: 0;
        padding: 9px 10px;
        font-size: .8rem;
        white-space: normal;
    }

    /* Header gọn trên mobile (không tràn mép phải) */
    .header-inner {
        padding-left: 10px;
        padding-right: 10px;
        gap: 6px;
    }
    .user-area {
        gap: 6px;
        min-width: 0;
    }
    .user-area .btn-sm {
        padding: 6px 10px;
        font-size: .74rem;
        white-space: nowrap;
    }
    .theme-toggle {
        width: 34px;
        height: 34px;
        font-size: .9rem;
        flex-shrink: 0;
    }
    .nav-toggle {
        width: 36px;
        height: 36px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    /* Admin: sidebar thành thanh ngang */
    .admin-wrap { flex-direction: column; }
    .admin-sidebar { width: 100%; flex-basis: auto; height: auto; position: static; border-right: none; border-bottom: 4px solid var(--ink); }
    .admin-menu { display: flex; overflow-x: auto; padding: 8px; gap: 4px; }
    .admin-menu .menu-group { display: none; }
    .admin-menu a { white-space: nowrap; margin-bottom: 0; }
    .admin-hello, .admin-logout { display: none; }
    .admin-content { padding: 16px; }
}

@media (max-width: 380px) {
    .user-chip-name { display: none; }
    .user-chip { padding: 3px; }
    .logo-img { height: 32px; max-height: 32px; max-width: 75px; }
    .btn-header { padding: 5px 8px; font-size: .68rem; }
    .header-inner { gap: 4px; }
    .hero-cta { max-width: 100%; }
}

/* ============ THEME TOGGLE BUTTON ============ */
.theme-toggle {
    background: #fff;
    color: var(--navy);
    border: 2px solid var(--ink);
    border-radius: 999px;
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 3px 0 var(--ink);
    transition: transform .12s, background .15s, box-shadow .12s;
    user-select: none;
    flex: 0 0 36px;
    line-height: 1;
}
.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 var(--ink);
    background: var(--cream);
}
.theme-toggle:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--ink);
}

/* ============ DARK MODE ============ */
html.dark-theme {
    --cream: #0e121a;
    --navy: #e2e8f0;
    --navy-dark: #070a10;
    --text: #cbd5e1;
    --muted: #8b97a8;
    --line: #222b3b;
    --ink: #05070c;
    --card-bg: #151b27;
    --card-hover: #1b2333;
    --header-bg: #111622;
    --input-bg: #18202e;
    --input-border: #2e3a4e;
    --table-header: #0d121c;
    --chip-bg: #1c2434;
}

html.dark-theme body {
    background-color: var(--cream);
    background-image: radial-gradient(rgba(255, 255, 255, .05) 1.2px, transparent 1.3px);
    color: var(--text);
}

html.dark-theme a:not(.btn):not(.user-chip):not(.logo):not(.main-nav a) {
    color: #f87171;
}
html.dark-theme a:hover {
    color: var(--gold-light);
}

html.dark-theme .main-nav {
    background: #090d14;
    border: 3px solid #000;
    box-shadow: 0 4px 0 #000;
}
html.dark-theme .main-nav a {
    color: #cbd5e1;
}
html.dark-theme .main-nav a:hover {
    background: rgba(255, 255, 255, .14);
    color: var(--gold-light);
}
html.dark-theme .main-nav a.active {
    color: #ffffff;
}
html.dark-theme .main-nav a.active::after {
    background: var(--red);
}
html.dark-theme .main-nav a.nav-admin {
    color: var(--gold-light);
}

html.dark-theme .site-header {
    background: var(--header-bg);
    border-bottom-color: var(--ink);
}

html.dark-theme .theme-toggle {
    background: #1c2434;
    color: #ffc107;
    border-color: var(--ink);
    box-shadow: 0 3px 0 var(--ink);
}
html.dark-theme .theme-toggle:hover {
    background: #273248;
}

html.dark-theme .nav-toggle {
    background: #1c2434;
    color: #f8fafc;
    border-color: #344158;
    box-shadow: 0 3px 0 var(--ink);
}
html.dark-theme .nav-toggle:hover {
    background: #273248;
    color: var(--gold-light);
    border-color: var(--gold-light);
}

html.dark-theme .hero-full {
    background-color: #101521;
    background-image:
        radial-gradient(rgba(224, 31, 38, .15) 1.6px, transparent 1.7px),
        radial-gradient(rgba(245, 166, 35, .15) 1.6px, transparent 1.7px);
}
html.dark-theme .hero-kicker {
    background: #080c14;
    color: #f8fafc;
}
html.dark-theme .hero-logo-graphic {
    filter:
        drop-shadow(0 10px 24px rgba(0, 0, 0, .8))
        drop-shadow(0 0 26px rgba(217, 70, 239, .65))
        drop-shadow(0 0 45px rgba(147, 51, 234, .5))
        drop-shadow(0 0 16px rgba(245, 166, 35, .4));
}
html.dark-theme .hero-logo-graphic:hover {
    filter:
        drop-shadow(0 14px 30px rgba(0, 0, 0, .9))
        drop-shadow(0 0 38px rgba(217, 70, 239, .85))
        drop-shadow(0 0 60px rgba(147, 51, 234, .65))
        drop-shadow(0 0 24px rgba(245, 166, 35, .6));
}

html.dark-theme .card,
html.dark-theme .hazard-wrap,
html.dark-theme .step {
    background: var(--card-bg);
    color: var(--text);
}
html.dark-theme .hazard-wrap {
    background: var(--card-bg);
}
html.dark-theme .card h3,
html.dark-theme .page-title,
html.dark-theme .section-head h3,
html.dark-theme .form-title,
html.dark-theme .form-group label {
    color: #f1f5f9;
}

html.dark-theme .card.hover:hover,
html.dark-theme .hazard-wrap.hover:hover {
    background: var(--card-hover);
}
html.dark-theme .hazard-wrap.hover:hover > .card {
    background: transparent;
}
html.dark-theme .news-item:hover,
html.dark-theme .rank-list li:hover {
    background: rgba(255, 255, 255, .04);
}
html.dark-theme .dl-card {
    background: #1a2232 !important;
    border-color: #2e3a50 !important;
    box-shadow: 4px 4px 0 #070a10 !important;
}
html.dark-theme .dl-card:hover {
    background: #232d42 !important;
    border-color: #435474 !important;
    box-shadow: 7px 7px 0 #070a10 !important;
}
html.dark-theme .dl-card .dl-icon {
    background: #111722;
    border-color: #2e3a50;
    box-shadow: 2.5px 2.5px 0 #070a10;
}
html.dark-theme .dl-card:hover .dl-icon {
    box-shadow: 4px 4px 0 #070a10;
}
html.dark-theme .dl-card h3 {
    color: #f1f5f9;
}
html.dark-theme .dl-card .form-hint {
    color: #94a3b8;
}
html.dark-theme .dl-card-apk .dl-tag { background: #22c55e; color: #022c16; border-color: #05070c; }
html.dark-theme .dl-card-ipa .dl-tag { background: #38bdf8; color: #082f49; border-color: #05070c; }
html.dark-theme .dl-card-pc  .dl-tag { background: #c084fc; color: #2e0854; border-color: #05070c; }
html.dark-theme .dl-card-jar .dl-tag { background: #f59e0b; color: #451a03; border-color: #05070c; }
html.dark-theme .android-robot-icon {
    filter: drop-shadow(0 0 10px rgba(61, 220, 132, .55)) drop-shadow(0 2px 4px rgba(0, 0, 0, .6));
}

html.dark-theme .news-item h4 {
    color: #f1f5f9;
}
html.dark-theme .news-item:hover h4 {
    color: var(--gold-light);
}
html.dark-theme .badge-admin-author {
    background: linear-gradient(135deg, #e01f26, #800a10);
    border-color: #05070c;
    box-shadow: 1.5px 1.5px 0 #05070c;
}
html.dark-theme .news-thumb {
    border-color: #05070c;
    box-shadow: 3px 3px 0 #05070c;
}
html.dark-theme .article-banner {
    border-color: #05070c;
    box-shadow: 4px 4px 0 #05070c;
}

html.dark-theme .news-featured {
    background: #1a2232;
    border-color: #2e3a50;
    box-shadow: 4px 4px 0 #070a10;
}
html.dark-theme .news-featured:hover {
    background: #232d42;
    box-shadow: 6px 6px 0 #070a10;
}
html.dark-theme .featured-media {
    border-color: #2e3a50;
    box-shadow: 2px 2px 0 #070a10;
}
html.dark-theme .featured-title,
html.dark-theme .compact-title {
    color: #f1f5f9;
}
html.dark-theme .news-featured:hover .featured-title,
html.dark-theme .compact-news-item:hover .compact-title {
    color: var(--gold-light);
}
html.dark-theme .featured-desc,
html.dark-theme .featured-meta,
html.dark-theme .featured-cmt,
html.dark-theme .compact-right {
    color: #94a3b8;
}
html.dark-theme .compact-news-item {
    border-bottom-color: var(--line);
}
html.dark-theme .compact-news-item:hover {
    background: rgba(255, 255, 255, .04);
}

html.dark-theme .user-chip {
    background: var(--chip-bg);
    color: #f1f5f9;
}
html.dark-theme .user-chip:hover {
    color: var(--gold-light);
}

html.dark-theme .user-dropdown-menu {
    background: #151b27;
    border-color: var(--ink);
    box-shadow: 0 8px 0 #000, 0 16px 36px rgba(0, 0, 0, .6);
}
html.dark-theme .dropdown-username {
    color: #f8fafc;
}
html.dark-theme .dropdown-badge {
    color: #ffc107;
}
html.dark-theme .dropdown-divider {
    background: var(--line);
}
html.dark-theme .dropdown-item {
    color: #cbd5e1;
}
html.dark-theme .dropdown-item:hover {
    background: #1e2638;
    color: var(--gold-light);
}
html.dark-theme .dropdown-item.dropdown-logout {
    color: #f87171;
}
html.dark-theme .dropdown-item.dropdown-logout:hover {
    background: rgba(224, 31, 38, .2);
    color: #ff8a80;
}

html.dark-theme .char-chip {
    background: var(--chip-bg);
    color: #f1f5f9;
}
html.dark-theme .char-avatar,
html.dark-theme .avatar-mini {
    background: #0e131d;
}

html.dark-theme .form-control {
    background: var(--input-bg);
    color: #f8fafc;
    border-color: var(--input-border);
}
html.dark-theme .form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, .25);
}

html.dark-theme table.data {
    background: var(--card-bg);
    color: var(--text);
}
html.dark-theme table.data th {
    background: var(--table-header);
    color: #f1f5f9;
}
html.dark-theme table.data tr:hover td {
    background: rgba(255, 255, 255, .04);
}
html.dark-theme table.data td {
    border-bottom-color: var(--line);
}

html.dark-theme .rank-list li {
    border-bottom-color: var(--line);
}
html.dark-theme .rank-list li:nth-child(-n+3) {
    background: rgba(245, 166, 35, .1);
}

html.dark-theme .btn {
    background: #1c2434;
    color: #f8fafc;
    border-color: var(--ink);
    box-shadow: 0 4px 0 var(--ink);
}
html.dark-theme .btn:hover {
    background: #273248;
    color: #fff;
    box-shadow: 0 2px 0 var(--ink);
}
html.dark-theme .btn-primary {
    background: var(--red);
    color: #fff;
}
html.dark-theme .btn-primary:hover {
    background: var(--red-dark);
}
html.dark-theme .btn-gold {
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    color: var(--ink);
}
html.dark-theme .btn.btn-play-now {
    background: linear-gradient(180deg, #22c55e, #15803d);
    border-color: #052e16;
    color: #ffffff;
    box-shadow: 0 4px 0 #052e16, 0 0 18px rgba(34, 197, 94, .5);
}
html.dark-theme .btn.btn-play-now:hover {
    background: linear-gradient(180deg, #4ade80, #16a34a);
    color: #ffffff;
    box-shadow: 0 2px 0 #052e16, 0 0 22px rgba(34, 197, 94, .7);
}
html.dark-theme .btn.btn-testflight-disabled,
html.dark-theme .btn.btn-testflight-disabled:hover,
html.dark-theme .btn.btn-testflight-disabled:active {
    background: #273244;
    color: #64748b;
    border-color: #3a475e;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
    opacity: .68;
}
html.dark-theme .btn-outline {
    background: #1c2434;
    color: var(--gold-light);
    border-color: var(--gold);
    box-shadow: 0 4px 0 var(--gold);
}
html.dark-theme .btn-outline:hover {
    background: rgba(245, 166, 35, .15);
    color: #fff;
    box-shadow: 0 2px 0 var(--gold);
}
html.dark-theme .btn-header {
    background: #1c2434;
    color: #f8fafc;
    border-color: #344158;
    box-shadow: 0 3px 0 var(--ink);
}
html.dark-theme .btn-header:hover {
    background: #273248;
    color: var(--gold-light);
    border-color: var(--gold-light);
}
html.dark-theme .btn-danger {
    background: var(--red);
    color: #fff;
}

html.dark-theme .pagination a,
html.dark-theme .pagination span {
    background: #1c2434;
    color: #f8fafc;
    border-color: var(--ink);
}
html.dark-theme .pagination span.current {
    background: var(--red);
    color: #fff;
}

html.dark-theme .info-row {
    border-bottom-color: var(--line);
}
html.dark-theme .info-row .k {
    color: #94a3b8;
}
html.dark-theme .info-row .v {
    color: #f1f5f9;
}

html.dark-theme .comment {
    border-bottom-color: var(--line);
}
html.dark-theme .comment-head b {
    color: #f1f5f9;
}

html.dark-theme .flash-success { background: #0e2718; color: #4ade80; border-color: #166534; }
html.dark-theme .flash-error   { background: #2d1416; color: #f87171; border-color: #991b1b; }
html.dark-theme .flash-info    { background: #132238; color: #60a5fa; border-color: #1e40af; }

html.dark-theme .admin-topbar {
    background: var(--header-bg);
}
html.dark-theme .admin-topbar h1 {
    color: #f8fafc;
}
html.dark-theme .stat-card {
    background: var(--card-bg);
}
html.dark-theme .stat-card .lbl {
    color: #cbd5e1;
}
html.dark-theme .admin-hello {
    background: rgba(0, 0, 0, .3);
}

html.dark-theme .compact-title {
    color: #e2e8f0;
}
html.dark-theme .compact-news-item:hover .compact-title {
    color: var(--gold-light);
}
html.dark-theme .compact-news-item:hover {
    background: rgba(255, 255, 255, .04);
}
html.dark-theme .compact-right {
    color: #94a3b8;
}

/* ============================================================
   DIỄN ĐÀN (FORUM FEED) - GIAO DIỆN BÀI ĐĂNG DẠNG THẺ (CARD FEED)
   ============================================================ */
.forum-feed-container {
    max-width: 860px;
    margin: 0 auto 30px;
}
.forum-post-card {
    background: #ffffff;
    border: 2px solid #fdba74;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    cursor: pointer;
}
.forum-post-card:hover {
    border-color: #f97316;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.16);
    transform: translateY(-2px);
}
.forum-post-card:hover .forum-post-heading a {
    color: #ea580c;
    text-decoration: underline;
}
.forum-post-card.is-pinned-post {
    border: 2.5px solid #ea580c;
    box-shadow: 0 4px 18px rgba(234, 88, 12, 0.14);
}
.forum-post-card.is-pinned-post:hover {
    border-color: #c2410c;
    box-shadow: 0 6px 22px rgba(234, 88, 12, 0.25);
}
.forum-card-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px 4px;
    min-height: 32px;
}
.forum-topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.forum-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.forum-badge-pin {
    background: #ea580c;
    color: #ffffff !important;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 3px 9px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.25;
    user-select: none;
    pointer-events: none;
    cursor: default;
}
.forum-category-badge {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 5px;
    line-height: 1.25;
    color: #ffffff !important;
    user-select: none;
    pointer-events: none;
    cursor: default;
    border: 1px solid transparent;
}
.forum-tag-event {
    background: #dc2626;
}
.forum-tag-guide {
    background: #16a34a;
}
.forum-tag-giftcode {
    background: #d97706;
}
.forum-tag-notice {
    background: #2563eb;
}
.forum-tag-default {
    background: #ea580c;
}

.forum-author-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px 8px;
}
.forum-author-avatar-wrap {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #38bdf8;
    background: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}
.forum-author-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.forum-author-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.forum-author-name {
    font-size: 1.02rem;
    font-weight: 800;
    color: #dc2626;
    letter-spacing: 0.3px;
    line-height: 1.25;
}
.forum-author-name.is-admin {
    color: #ea580c;
    background: linear-gradient(90deg, #dc2626, #ea580c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.forum-author-time {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
}

.forum-content-section {
    padding: 6px 16px 16px;
}
.forum-title-wrap {
    margin-bottom: 12px;
}
.forum-post-heading {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0.3px;
}
.forum-post-heading a {
    color: #9a3412;
    text-decoration: none;
    transition: color .15s ease;
}
.forum-post-heading a:hover {
    color: #ea580c;
    text-decoration: underline;
}

.forum-image-wrap {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    cursor: pointer;
}
.forum-post-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform .3s ease, filter .3s ease;
}
.forum-image-wrap:hover .forum-post-img {
    transform: scale(1.015);
    filter: brightness(1.03);
}

/* Dark theme cho Diễn đàn */
html.dark-theme .forum-post-card {
    background: #1e293b;
    border-color: #ea580c;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
html.dark-theme .forum-post-card:hover {
    border-color: #f97316;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.25);
}
html.dark-theme .forum-author-time {
    color: #94a3b8;
}
html.dark-theme .forum-post-heading a {
    color: #fed7aa;
}
html.dark-theme .forum-post-heading a:hover {
    color: #fb923c;
}
html.dark-theme .forum-image-wrap {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Tem phân loại & ghim ở Dark Mode - Chữ trắng tinh, viền tinh tế và phát sáng nhẹ */
html.dark-theme .forum-category-badge {
    color: #ffffff !important;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.22);
}
html.dark-theme .forum-tag-event {
    background: #dc2626 !important;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.45);
}
html.dark-theme .forum-tag-guide {
    background: #16a34a !important;
    box-shadow: 0 0 10px rgba(22, 163, 74, 0.45);
}
html.dark-theme .forum-tag-notice {
    background: #2563eb !important;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.45);
}
html.dark-theme .forum-tag-giftcode {
    background: #d97706 !important;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.45);
}
html.dark-theme .forum-tag-default {
    background: #ea580c !important;
    box-shadow: 0 0 10px rgba(234, 88, 12, 0.45);
}
html.dark-theme .forum-badge-pin {
    color: #ffffff !important;
    background: #ea580c !important;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 10px rgba(234, 88, 12, 0.45);
}

/* ============================================================
   NÚT LỌC PHÂN LOẠI DIỄN ĐÀN (HIỂN THỊ CẢ TRÊN PC VÀ MOBILE)
   ============================================================ */
.forum-filter-tabs {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 4px 0;
}
.forum-filter-tab {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border: 2px solid var(--ink);
    border-radius: 10px;
    background: #ffffff;
    color: var(--navy);
    box-shadow: 3px 3px 0 var(--ink);
    cursor: pointer;
    text-decoration: none !important;
    transition: all .15s ease;
    user-select: none;
    line-height: 1.3;
}
.forum-filter-tab:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: 4.5px 4.5px 0 var(--ink);
    color: var(--red);
    background: #ffffff;
}
.forum-filter-tab.active {
    background: linear-gradient(135deg, #e01f26, #b3121a);
    color: #ffffff !important;
    box-shadow: 4px 4px 0 var(--ink);
    transform: translate(-1.5px, -1.5px);
}
.forum-filter-tab.active:hover {
    color: #ffffff !important;
}

/* Dark theme cho nút lọc diễn đàn */
html.dark-theme .forum-filter-tab {
    background: #171f2d;
    color: #e2e8f0;
    border-color: #05070c;
    box-shadow: 3px 3px 0 #05070c;
}
html.dark-theme .forum-filter-tab:hover {
    background: #232e42;
    color: var(--gold-light);
    box-shadow: 4px 4px 0 #05070c;
}
html.dark-theme .forum-filter-tab.active {
    background: linear-gradient(135deg, #e01f26, #b3121a);
    color: #ffffff !important;
    box-shadow: 4px 4px 0 #05070c;
}

/* ============================================================
   NÚT QUAY LẠI DIỄN ĐÀN (CHI TIẾT BÀI VIẾT)
   ============================================================ */
.article-top-nav {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}
.btn-back-forum {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--navy);
    background: #ffffff;
    border: 2px solid var(--ink);
    border-radius: 8px;
    box-shadow: 2.5px 2.5px 0 var(--ink);
    text-decoration: none !important;
    transition: all .15s ease;
    user-select: none;
    line-height: 1.3;
}
.btn-back-forum:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: 4px 4px 0 var(--ink);
    color: var(--red);
    background: #ffffff;
}
html.dark-theme .btn-back-forum {
    background: #171f2d;
    color: #e2e8f0;
    border-color: #05070c;
    box-shadow: 2.5px 2.5px 0 #05070c;
}
html.dark-theme .btn-back-forum:hover {
    background: #232e42;
    color: var(--gold-light);
    box-shadow: 4px 4px 0 #05070c;
}

/* ============================================================
   KHU VỰC TÁC GIẢ BÀI VIẾT (CHI TIẾT BÀI ĐĂNG)
   ============================================================ */
.article-author-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 18px;
    padding: 8px 14px;
    background: rgba(249, 115, 22, 0.05);
    border: 1.5px solid rgba(249, 115, 22, 0.25);
    border-radius: 10px;
}
.article-author-avatar-wrap {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #38bdf8;
    background: #0f172a;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.article-author-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.article-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.author-name-admin {
    font-size: 1.02rem;
    font-weight: 800;
    color: #ea580c;
    background: linear-gradient(90deg, #dc2626, #ea580c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.author-name-user {
    font-size: 1rem;
    font-weight: 800;
    color: var(--navy);
}
.badge-admin-pill {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    background: #dc2626;
    color: #ffffff !important;
    padding: 1px 7px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
}
.article-author-sub {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 500;
}
html.dark-theme .article-author-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(249, 115, 22, 0.35);
}
html.dark-theme .author-name-user {
    color: #f1f5f9;
}

/* ============================================================
   GIAO DIỆN BÌNH LUẬN (AVATAR HÀNH TINH & TÊN PLAYER)
   ============================================================ */
.comment {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1.5px dashed var(--line);
    align-items: flex-start;
}
.comment:last-child {
    border-bottom: none;
}
.comment-avatar-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--ink);
    background: #0f172a;
    flex: 0 0 44px;
    box-shadow: 2.5px 2.5px 0 var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
}
.comment-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.comment-body {
    flex: 1;
    min-width: 0;
}
.comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.comment-author {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--navy);
}
.comment-author.admin-color {
    color: #ea580c;
    background: linear-gradient(90deg, #dc2626, #ea580c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.comment-planet-tag {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--muted);
    border: 1px solid var(--line);
    line-height: 1.3;
}
.comment-planet-tag.planet-0 {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.25);
}
.comment-planet-tag.planet-1 {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.25);
}
.comment-planet-tag.planet-2 {
    color: #ea580c;
    background: rgba(234, 88, 12, 0.08);
    border-color: rgba(234, 88, 12, 0.25);
}
.comment-time {
    color: var(--muted);
    font-size: 0.8rem;
    margin-left: auto;
}
.comment-content {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
    word-break: break-word;
}

html.dark-theme .comment-avatar-wrap {
    border-color: #334155;
    box-shadow: 2px 2px 0 #05070c;
}
html.dark-theme .comment-author {
    color: #f1f5f9;
}
html.dark-theme .comment-content {
    color: #cbd5e1;
}
html.dark-theme .comment-planet-tag.planet-0 {
    color: #60a5fa;
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(37, 99, 235, 0.35);
}
html.dark-theme .comment-planet-tag.planet-1 {
    color: #4ade80;
    background: rgba(22, 163, 74, 0.18);
    border-color: rgba(22, 163, 74, 0.35);
}
html.dark-theme .comment-planet-tag.planet-2 {
    color: #fb923c;
    background: rgba(234, 88, 12, 0.18);
    border-color: rgba(234, 88, 12, 0.35);
}

/* Liên kết trong nội dung bài viết và bình luận */
.content-link {
    color: #2563eb !important;
    text-decoration: underline !important;
    font-weight: 600;
    word-break: break-all;
    transition: color .15s ease, opacity .15s ease;
}
.content-link:hover {
    color: #1d4ed8 !important;
    opacity: 0.85;
}
html.dark-theme .content-link {
    color: #60a5fa !important;
}
html.dark-theme .content-link:hover {
    color: #93c5fd !important;
}

/* ============================================================
   NÚT HIỂN THỊ / ẨN MẬT KHẨU
   ============================================================ */
.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.password-input-wrap .form-control {
    padding-right: 44px !important;
    width: 100%;
}
.btn-toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    margin: 0;
    cursor: pointer;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color .15s ease, background-color .15s ease;
    user-select: none;
    line-height: 1;
    z-index: 2;
}
.btn-toggle-password:hover {
    color: var(--red);
    background: rgba(0, 0, 0, 0.05);
}
html.dark-theme .btn-toggle-password {
    color: #94a3b8;
}
html.dark-theme .btn-toggle-password:hover {
    color: var(--gold-light);
    background: rgba(255, 255, 255, 0.08);
}










/* ==========================================================================
   KÊNH CHAT THẾ GIỚI (TRANG RIÊNG chat.php & BONG BÓNG CHAT NỔI)
   ========================================================================== */
.chat-page-head {
    margin-bottom: 18px;
}
.chat-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 18px;
    align-items: start;
}
.chat-main-card {
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.chat-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 16px;
    background: var(--navy);
    color: #fff;
    border-bottom: 3px solid var(--ink);
}
.chat-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    min-width: 0;
}
.chat-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .28);
    flex-shrink: 0;
    animation: chatPulse 1.8s infinite;
}
@keyframes chatPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, .3); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, .08); }
}
.chat-online-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(34, 197, 94, .18);
    color: #86efac;
    border: 1.5px solid rgba(34, 197, 94, .45);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .74rem;
    font-weight: 800;
    white-space: nowrap;
}
.chat-online-pill-sm {
    font-size: .68rem;
    padding: 2px 7px;
}

/* Thông báo ghim */
.chat-pinned-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: #fff7ed;
    border-bottom: 2px solid #fdba74;
    color: #9a3412;
    font-size: .84rem;
    font-weight: 700;
}
.chat-pinned-bar[hidden] { display: none; }
.chat-pinned-tag {
    background: var(--red);
    color: #fff;
    font-size: .68rem;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}
.chat-pinned-text {
    min-width: 0;
    word-break: break-word;
}
.chat-pinned-sm {
    padding: 7px 10px;
    font-size: .78rem;
}

/* Khu vực danh sách tin nhắn */
.chat-messages {
    height: 490px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 13px;
    background-color: #eef2f7;
    background-image: radial-gradient(rgba(15, 23, 42, .05) 1px, transparent 1px);
    background-size: 18px 18px;
    scroll-behavior: smooth;
}
.chat-empty {
    margin: auto;
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
    padding: 24px 12px;
}
.chat-msg {
    display: flex;
    align-items: flex-start;
    align-self: flex-start;
    gap: 10px;
    max-width: 85%;
}
.chat-msg.is-mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.chat-msg-av {
    flex-shrink: 0;
    padding-top: 2px;
}
.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--ink);
    background: #fff;
    display: block;
}
.chat-admin-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
}
.chat-msg-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.chat-msg.is-mine .chat-msg-content {
    align-items: flex-end;
}
.chat-msg-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 3px;
}
.chat-msg.is-mine .chat-msg-head {
    flex-direction: row-reverse;
    justify-content: flex-start;
}
.chat-rank-badge {
    font-size: .88rem;
    line-height: 1;
}
.chat-active-star {
    font-size: .82rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    filter: drop-shadow(0 0 4px rgba(250, 204, 21, .65));
}
.chat-author-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: .86rem;
    font-weight: 900;
    color: var(--navy);
    cursor: pointer;
}
.chat-author-btn:hover {
    color: var(--red);
    text-decoration: underline;
}
.chat-author-btn.is-admin {
    color: var(--red);
}
.chat-role-badge {
    font-size: .66rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    border: 1px solid #cbd5e1;
}
.chat-role-badge.is-bqt {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border-color: #b91c1c;
}
.chat-time {
    font-size: .72rem;
    font-weight: 600;
    color: #64748b;
    margin-left: 2px;
}
.chat-admin-actions {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 4px;
}
.chat-msg.is-mine .chat-admin-actions {
    margin-left: 0;
    margin-right: 4px;
}
.chat-act-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 6px;
    font-size: .72rem;
    padding: 1px 5px;
    cursor: pointer;
    line-height: 1.3;
}
.chat-act-btn:hover {
    background: #fee2e2;
    border-color: var(--red);
}
.chat-msg-bubble {
    display: inline-block;
    max-width: 100%;
    padding: 9px 13px;
    border-radius: 4px 14px 14px 14px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .08);
    font-size: .92rem;
    line-height: 1.45;
    color: #0f172a;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.chat-msg.is-mine .chat-msg-bubble {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border-color: #1e40af;
    box-shadow: 0 3px 8px rgba(37, 99, 235, .28);
    border-radius: 14px 4px 14px 14px;
    text-align: left;
}
.chat-msg.is-admin .chat-msg-bubble {
    background: #fff1f2;
    color: #881337;
    border: 1.5px solid #fb7185;
    box-shadow: 0 2px 8px rgba(225, 29, 72, .14);
}
.chat-msg.is-mine.is-admin .chat-msg-bubble {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #ffffff;
    border-color: #9f1239;
    box-shadow: 0 3px 10px rgba(225, 29, 72, .3);
}
.chat-mention {
    color: #1d4ed8;
    font-weight: 800;
    background: rgba(37, 99, 235, .12);
    padding: 0 4px;
    border-radius: 4px;
}
.chat-msg.is-mine .chat-mention {
    color: #fef08a;
    background: rgba(255, 255, 255, .18);
}
.chat-link {
    color: #1d4ed8;
    font-weight: 800;
    text-decoration: underline;
    word-break: break-all;
}
.chat-link:hover {
    opacity: .85;
}
.chat-msg.is-mine .chat-link {
    color: #fef08a;
}
html.dark-theme .chat-link {
    color: #93c5fd;
}
html.dark-theme .chat-msg.is-mine .chat-link {
    color: #fef08a;
}
.chat-online-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
}
.chat-online-big-num {
    font-size: 1.35rem;
    font-weight: 900;
    color: #15803d;
    line-height: 1;
}
.chat-online-unit {
    font-size: .85rem;
    font-weight: 800;
    color: #166534;
}
html.dark-theme .chat-online-stat {
    background: rgba(34, 197, 94, .12);
    border-color: rgba(34, 197, 94, .35);
}
html.dark-theme .chat-online-big-num {
    color: #4ade80;
}
html.dark-theme .chat-online-unit {
    color: #bbf7d0;
}

/* Nút cuộn xuống tin mới */
.chat-scroll-bottom {
    position: absolute;
    left: 50%;
    bottom: 112px;
    transform: translateX(-50%);
    background: var(--red);
    color: #fff;
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: .76rem;
    font-weight: 800;
    box-shadow: 2px 2px 0 var(--ink);
    cursor: pointer;
    z-index: 5;
}
.chat-scroll-bottom[hidden] { display: none; }

/* Thông báo trạng thái / lỗi nhỏ */
.chat-status-msg {
    padding: 7px 14px;
    font-size: .8rem;
    font-weight: 700;
    border-top: 2px solid var(--ink);
}
.chat-status-msg[hidden] { display: none; }
.chat-status-msg.is-err { background: #fee2e2; color: #b91c1c; }
.chat-status-msg.is-ok  { background: #dcfce7; color: #15803d; }

/* Thanh emoji & Form gửi */
.chat-emoji-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    background: #f8fafc;
    border-top: 1.5px solid #cbd5e1;
    overflow-x: auto;
    scrollbar-width: none;
}
.chat-emoji-bar::-webkit-scrollbar { display: none; }
.chat-emoji-btn {
    border: 1.5px solid transparent;
    background: transparent;
    border-radius: 8px;
    padding: 3px 6px;
    font-size: 1.05rem;
    cursor: pointer;
    line-height: 1;
    transition: transform .12s ease, background .12s ease;
    flex-shrink: 0;
}
.chat-emoji-btn:hover {
    background: rgba(37, 99, 235, .12);
    border-color: #93c5fd;
    transform: scale(1.15);
}
.chat-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}
.chat-input {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
}
.chat-input:focus {
    background: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15) !important;
    outline: none;
}
.chat-char-count {
    font-size: .74rem;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
}
.chat-send-btn {
    flex-shrink: 0;
    white-space: nowrap;
}
.chat-guest-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: #fffbeb;
    border-top: 2px solid var(--ink);
    font-size: .85rem;
    font-weight: 700;
}
.chat-guest-actions {
    display: flex;
    gap: 8px;
}

/* Sidebar trang chat.php */
.chat-sidebar .card {
    margin-bottom: 16px;
}
.chat-online-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 155px;
    overflow-y: auto;
    padding-right: 2px;
}
.chat-online-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f8fafc;
    color: #0f172a;
    border: 1.5px solid #cbd5e1;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease;
}
.chat-online-chip.is-admin {
    background: #fef2f2;
    border-color: #f87171;
    color: #b91c1c;
}
.chat-online-more {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1.5px dashed #94a3b8;
    font-size: .75rem;
    font-weight: 800;
    color: #475569;
}
.chat-online-chip:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}
.chat-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
}
.chat-rules-list {
    margin: 0;
    padding-left: 18px;
    font-size: .86rem;
    line-height: 1.6;
    color: #334155;
}
.chat-rules-list li { margin-bottom: 6px; }
.chat-muted-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.chat-muted-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(239, 68, 68, .08);
    border: 1px solid rgba(239, 68, 68, .25);
    font-size: .8rem;
}

/* ============ BONG BÓNG CHAT NỔI (GÓC DƯỚI PHẢI) ============ */
.chat-widget-wrap {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 990;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.chat-fab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: 2.5px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    font-family: inherit;
    font-weight: 900;
    font-size: .88rem;
    cursor: pointer;
    position: relative;
    transition: transform .16s ease, box-shadow .16s ease;
}
.chat-fab:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
}
.chat-fab-ico {
    font-size: 1.15rem;
    line-height: 1;
}
.chat-fab-badge {
    position: absolute;
    top: -8px;
    right: -6px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: #facc15;
    color: #111827;
    border: 2px solid var(--ink);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    font-size: .74rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: chatBadgePop .25s ease-out;
}
@keyframes chatBadgePop {
    0% { transform: scale(.5); }
    70% { transform: scale(1.18); }
    100% { transform: scale(1); }
}
.chat-fab-badge[hidden] { display: none; }

.chat-widget-panel {
    width: 375px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border: 3px solid var(--ink);
    border-radius: 16px;
    box-shadow: 6px 6px 0 var(--ink);
    overflow: hidden;
    display: none;
    flex-direction: column;
    position: relative;
}
.chat-widget-wrap.is-open .chat-widget-panel {
    display: flex;
    animation: chatPopIn .18s ease-out;
}
@keyframes chatPopIn {
    from { opacity: 0; transform: translateY(10px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-widget-header {
    padding: 10px 12px;
}
.chat-widget-head-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.chat-widget-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1.5px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: .85rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}
.chat-widget-icon-btn:hover {
    background: var(--red);
    border-color: #fff;
}
.chat-widget-messages {
    height: 330px;
    padding: 10px 12px;
    gap: 9px;
}
.chat-widget-messages .chat-avatar,
.chat-widget-messages .chat-admin-avatar {
    width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
}
.chat-widget-messages .chat-msg-bubble {
    padding: 6px 10px;
    font-size: .84rem;
}
.chat-emoji-bar-sm {
    padding: 5px 8px;
}
.chat-form-sm {
    padding: 8px 10px;
    gap: 6px;
}
.chat-form-sm .chat-input {
    padding: 8px 10px;
    font-size: .86rem;
}
.chat-guest-bar-sm {
    padding: 9px 10px;
    font-size: .78rem;
}

/* ============ DARK MODE CHO KÊNH CHAT ============ */
html.dark-theme .chat-box-header {
    background: #0b1120;
    border-bottom-color: #334155;
}
html.dark-theme .chat-messages {
    background-color: #0f172a;
    background-image: radial-gradient(rgba(148, 163, 184, .06) 1px, transparent 1px);
}
html.dark-theme .chat-msg-bubble {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, .4);
}
html.dark-theme .chat-msg.is-mine .chat-msg-bubble {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 3px 10px rgba(37, 99, 235, .35);
}
html.dark-theme .chat-msg.is-admin .chat-msg-bubble {
    background: linear-gradient(135deg, #2d161b, #292014);
    color: #ffe4e6;
    border-color: #ef4444;
}
html.dark-theme .chat-msg.is-mine.is-admin .chat-msg-bubble {
    background: linear-gradient(135deg, #be123c, #9f1239);
    color: #ffffff;
    border-color: #fb7185;
}
html.dark-theme .chat-time,
html.dark-theme .chat-char-count {
    color: #94a3b8;
}
html.dark-theme .chat-rules-list {
    color: #cbd5e1;
}
html.dark-theme .chat-input {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}
html.dark-theme .chat-input:focus {
    background: #0b1120 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .22) !important;
}
html.dark-theme .chat-online-chip.is-admin {
    background: rgba(239, 68, 68, .15);
    border-color: #ef4444;
    color: #fca5a5;
}
html.dark-theme .chat-online-more {
    background: rgba(148, 163, 184, .14);
    border-color: #475569;
    color: #94a3b8;
}
html.dark-theme .chat-author-btn {
    color: #f8fafc;
}
html.dark-theme .chat-author-btn.is-admin {
    color: #fb7185;
}
html.dark-theme .chat-role-badge {
    background: rgba(148, 163, 184, .16);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, .25);
}
html.dark-theme .chat-role-badge.is-bqt {
    background: #dc2626;
    color: #fff;
}
html.dark-theme .chat-mention {
    color: #93c5fd;
    background: rgba(59, 130, 246, .2);
}
html.dark-theme .chat-emoji-bar,
html.dark-theme .chat-form,
html.dark-theme .chat-widget-panel {
    background: #111827;
    border-color: #334155;
}
html.dark-theme .chat-pinned-bar {
    background: #271a0c;
    border-bottom-color: #9a3412;
    color: #fed7aa;
}
html.dark-theme .chat-guest-bar {
    background: #1e293b;
    border-top-color: #334155;
    color: #e2e8f0;
}
html.dark-theme .chat-online-chip {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}
html.dark-theme .chat-act-btn {
    background: #1e293b;
    border-color: #475569;
}
html.dark-theme .chat-fab {
    border-color: #020617;
    box-shadow: 4px 4px 0 #020617;
}
html.dark-theme .chat-widget-panel {
    box-shadow: 6px 6px 0 #020617;
}

/* ============ RESPONSIVE CHO KÊNH CHAT ============ */
@media (max-width: 960px) {
    .chat-page-layout {
        grid-template-columns: 1fr;
    }
    .chat-messages {
        height: 430px;
    }
}
@media (max-width: 600px) {
    .chat-messages {
        height: 380px;
        padding: 10px;
    }
    .chat-char-count {
        display: none;
    }
    .chat-widget-wrap {
        right: 12px;
        bottom: 12px;
    }
    .chat-fab {
        padding: 10px 13px;
        font-size: .82rem;
    }
    .chat-fab-label {
        display: none;
    }
    .chat-widget-panel {
        width: min(348px, calc(100vw - 36px));
    }
    .chat-widget-messages {
        height: min(300px, 46vh);
    }
}


/* ==========================================================================
   TRANG NẠP TIỀN: PHONG CÁCH COMIC ĐỒNG BỘ + CHUYỂN ĐỔI TAB ATM & THẺ CÀO
   ========================================================================== */
.pay-balance-strip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    background: #ffffff;
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    font-size: .88rem;
    font-weight: 700;
    color: var(--navy);
}
.pay-balance-strip b {
    color: var(--red);
    font-weight: 900;
}
.pay-bal-sep { opacity: .45; }

.pay-switcher {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 auto 24px;
    max-width: 720px;
}
.pay-switch-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    background: #ffffff;
    color: var(--navy);
    border: 2.5px solid var(--ink);
    border-radius: 14px;
    box-shadow: 4px 4px 0 var(--ink);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.pay-switch-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
}
@keyframes payLightSweep {
    0%   { background-position: 180% 0, 0 0, 0 0; }
    35%  { background-position: -80% 0, 0 0, 0 0; }
    100% { background-position: -80% 0, 0 0, 0 0; }
}
.pay-switch-btn.active,
.pay-switch-btn[data-pay-tab="card"].active {
    background-image:
        linear-gradient(115deg, transparent 0%, transparent 38%, rgba(255, 255, 255, .28) 45%, rgba(255, 255, 255, .65) 50%, rgba(255, 255, 255, .22) 55%, transparent 62%, transparent 100%),
        linear-gradient(180deg, rgba(255, 255, 255, .36) 0%, rgba(255, 255, 255, .08) 47%, rgba(0, 20, 60, .10) 51%, rgba(0, 20, 60, .20) 100%),
        linear-gradient(135deg, #38e8ff 0%, #0ea5e9 40%, #0284c7 78%, #0369a1 100%);
    background-size: 260% 100%, 100% 100%, 100% 100%;
    background-repeat: no-repeat;
    animation: payLightSweep 3.8s cubic-bezier(.4, 0, .2, 1) infinite;
    color: #ffffff;
    border-color: var(--ink);
    text-shadow: 0 1px 3px rgba(0, 35, 80, .45);
    transform: translate(-2px, -2px);
    box-shadow:
        6px 6px 0 var(--ink),
        inset 0 1px 0 rgba(255, 255, 255, .6),
        inset 0 -3px 8px rgba(0, 35, 90, .28);
}
.pay-switch-ico {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: #f1f5f9;
    border: 2px solid var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
}
.pay-switch-btn.active .pay-switch-ico {
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .45);
}
.pay-switch-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.pay-switch-text strong {
    font-size: .96rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.pay-switch-text small {
    font-size: .78rem;
    color: var(--muted);
    margin-top: 2px;
}
.pay-switch-btn.active .pay-switch-text small {
    color: rgba(255, 255, 255, .9);
}
.pay-switch-tag {
    position: absolute;
    top: -10px;
    right: 12px;
    background: #facc15;
    color: #111827;
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 1px 9px;
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
}
.pay-tab-pane { display: none; }
.pay-tab-pane.active {
    display: block;
    animation: chatPopIn .18s ease-out;
}

/* Mốc tiền ATM & Hộp thông tin ngân hàng gọn nét đồng bộ comic */
.atm-amount-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}
.atm-amt-btn {
    padding: 9px 8px;
    border-radius: 10px;
    border: 2px solid var(--ink);
    background: #ffffff;
    color: var(--navy);
    box-shadow: 2px 2px 0 var(--ink);
    font-family: inherit;
    font-size: .84rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.atm-amt-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink);
    background: #fff7ed;
}
.atm-amt-btn.active {
    background-image:
        linear-gradient(115deg, transparent 0%, transparent 38%, rgba(255, 255, 255, .25) 45%, rgba(255, 255, 255, .62) 50%, rgba(255, 255, 255, .2) 55%, transparent 62%, transparent 100%),
        linear-gradient(180deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, .05) 48%, rgba(0, 20, 60, .12) 52%, rgba(0, 20, 60, .2) 100%),
        linear-gradient(135deg, #38e8ff 0%, #0ea5e9 45%, #0284c7 100%);
    background-size: 260% 100%, 100% 100%, 100% 100%;
    background-repeat: no-repeat;
    animation: payLightSweep 4.2s cubic-bezier(.4, 0, .2, 1) infinite;
    color: #ffffff;
    border-color: var(--ink);
    text-shadow: 0 1px 2px rgba(0, 35, 80, .45);
    transform: translate(-1px, -1px);
    box-shadow:
        3px 3px 0 var(--ink),
        inset 0 1px 0 rgba(255, 255, 255, .55);
}
.atm-info-box {
    border: 2px solid var(--ink);
    border-radius: 12px;
    background: #fbf8f1;
    overflow: hidden;
    margin-top: 14px;
}
.atm-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1.5px solid var(--line);
    font-size: .88rem;
    flex-wrap: wrap;
}
.atm-info-row:last-child { border-bottom: none; }
.atm-info-row.is-highlight { background: #fff7ed; }
.atm-info-row .k { color: var(--muted); font-weight: 700; }
.atm-copy-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.atm-code {
    font-size: .95rem;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 7px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #0f172a;
    letter-spacing: .5px;
}
.atm-code.is-memo {
    background: #fee2e2;
    border-color: #f87171;
    color: #b91c1c;
}
.atm-copy-btn {
    padding: 4px 10px !important;
    font-size: .74rem !important;
}
.atm-note-box {
    margin-top: 14px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #fffbeb;
    border: 1.5px solid #fcd34d;
    color: #78350f;
    font-size: .84rem;
    line-height: 1.5;
}
.atm-inline-error {
    margin: 0 0 12px;
    padding: 10px 13px;
    border-radius: 10px;
    background: #fee2e2;
    border: 2px solid #dc2626;
    color: #991b1b;
    font-size: .86rem;
    font-weight: 800;
    line-height: 1.45;
}
.atm-inline-error.is-shake {
    animation: atmErrShake .3s ease;
}
@keyframes atmErrShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
html.dark-theme .atm-inline-error {
    background: rgba(239, 68, 68, .18);
    border-color: #ef4444;
    color: #fecaca;
}
.atm-qr-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 rgba(18, 18, 18, .12);
}
.atm-qr-frame img {
    width: min(275px, 100%);
    height: auto;
    border-radius: 8px;
    display: block;
}
.atm-wait-box {
    padding: 36px 18px;
    text-align: center;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
}
.atm-wait-ico {
    font-size: 2.4rem;
    margin-bottom: 8px;
    line-height: 1;
}
html.dark-theme .atm-wait-box {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

/* Tinh chỉnh .pay-panel & huy hiệu starburst bóng bẩy ánh sáng quét qua */
.pay-panel .starburst {
    background-image:
        linear-gradient(115deg, transparent 0%, transparent 38%, rgba(255, 255, 255, .25) 45%, rgba(255, 255, 255, .62) 50%, rgba(255, 255, 255, .2) 55%, transparent 62%, transparent 100%),
        linear-gradient(180deg, rgba(255, 255, 255, .30) 0%, rgba(255, 255, 255, .04) 48%, rgba(60, 0, 18, .15) 52%, rgba(60, 0, 18, .25) 100%),
        linear-gradient(135deg, #ff4d6d 0%, #e11d48 48%, #9f1239 100%);
    background-size: 260% 100%, 100% 100%, 100% 100%;
    background-repeat: no-repeat;
    animation: payLightSweep 3.4s cubic-bezier(.4, 0, .2, 1) infinite;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(60, 0, 20, .55);
    filter: drop-shadow(3px 5px 0 rgba(15, 23, 42, .45));
}
.pay-panel .step-num {
    color: #2563eb;
}
html.dark-theme .pay-panel .step-num {
    color: #fbbf24;
    -webkit-text-stroke: 0;
}
.pay-panel > p,
html.dark-theme .pay-panel > p {
    color: #1c1917;
    font-weight: 600;
}
.pay-panel > p b,
html.dark-theme .pay-panel > p b {
    color: #09090b;
    font-weight: 900;
}
html.dark-theme .pay-panel h3 {
    color: #09090b;
}
html.dark-theme .pay-balance-strip {
    background: #171f2d;
    color: #f1f5f9;
    border-color: #334155;
    box-shadow: 3px 3px 0 #020617;
}
html.dark-theme .pay-balance-strip b {
    color: #fbbf24;
}
html.dark-theme .pay-switch-btn {
    background: #171f2d;
    color: #f1f5f9;
    border-color: #334155;
    box-shadow: 4px 4px 0 #020617;
}
html.dark-theme .pay-switch-btn.active,
html.dark-theme .pay-switch-btn[data-pay-tab="card"].active {
    background-image:
        linear-gradient(115deg, transparent 0%, transparent 38%, rgba(255, 255, 255, .30) 45%, rgba(255, 255, 255, .68) 50%, rgba(255, 255, 255, .22) 55%, transparent 62%, transparent 100%),
        linear-gradient(180deg, rgba(255, 255, 255, .36) 0%, rgba(255, 255, 255, .07) 47%, rgba(0, 20, 60, .12) 51%, rgba(0, 20, 60, .24) 100%),
        linear-gradient(135deg, #38e8ff 0%, #0ea5e9 40%, #0284c7 78%, #0369a1 100%);
    background-size: 260% 100%, 100% 100%, 100% 100%;
    background-repeat: no-repeat;
    animation: payLightSweep 3.8s cubic-bezier(.4, 0, .2, 1) infinite;
    color: #ffffff;
    border-color: #7dd3fc;
    box-shadow:
        4px 4px 0 #020617,
        0 0 22px rgba(14, 165, 233, .42),
        inset 0 1px 0 rgba(255, 255, 255, .65),
        inset 0 -3px 8px rgba(0, 30, 80, .35);
}
html.dark-theme .pay-switch-ico {
    background: #0f172a;
    border-color: #334155;
}
html.dark-theme .atm-amt-btn {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
    box-shadow: 2px 2px 0 #020617;
}
html.dark-theme .atm-amt-btn:hover {
    background: #273449;
    border-color: #38bdf8;
}
html.dark-theme .atm-amt-btn.active {
    background-image:
        linear-gradient(115deg, transparent 0%, transparent 38%, rgba(255, 255, 255, .28) 45%, rgba(255, 255, 255, .65) 50%, rgba(255, 255, 255, .2) 55%, transparent 62%, transparent 100%),
        linear-gradient(180deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, .05) 48%, rgba(0, 20, 60, .14) 52%, rgba(0, 20, 60, .24) 100%),
        linear-gradient(135deg, #38e8ff 0%, #0ea5e9 45%, #0284c7 100%);
    background-size: 260% 100%, 100% 100%, 100% 100%;
    background-repeat: no-repeat;
    animation: payLightSweep 4.2s cubic-bezier(.4, 0, .2, 1) infinite;
    border-color: #7dd3fc;
    color: #ffffff;
    box-shadow:
        2px 2px 0 #020617,
        0 0 14px rgba(14, 165, 233, .38),
        inset 0 1px 0 rgba(255, 255, 255, .6);
}
html.dark-theme .atm-info-box {
    background: #0f172a;
    border-color: #334155;
}
html.dark-theme .atm-info-row {
    border-bottom-color: #1e293b;
}
html.dark-theme .atm-info-row.is-highlight {
    background: rgba(245, 158, 11, .12);
}
html.dark-theme .atm-info-row .k {
    color: #94a3b8;
}
html.dark-theme .atm-code {
    background: #1e293b;
    border-color: #475569;
    color: #f8fafc;
}
html.dark-theme .atm-code.is-memo {
    background: rgba(239, 68, 68, .2);
    border-color: #ef4444;
    color: #fca5a5;
}
html.dark-theme .atm-note-box {
    background: rgba(245, 158, 11, .1);
    border-color: rgba(245, 158, 11, .35);
    color: #fde68a;
}
html.dark-theme .atm-qr-frame {
    background: #ffffff;
    border-color: #334155;
}

@media (max-width: 640px) {
    .pay-switcher {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .pay-switch-btn {
        padding: 12px 14px;
    }
}

/* ============ SITE NOTICE MODAL ============ */
.site-notice-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, .65);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.site-notice-overlay.open {
    opacity: 1;
    visibility: visible;
}
.site-notice-modal {
    position: relative;
    width: 100%;
    max-width: 390px;
    padding: 26px 24px 22px;
    border-radius: 16px;
    background: #ffffff;
    border: 2px solid var(--ink);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
    text-align: center;
    transform: translateY(10px) scale(.96);
    transition: transform .2s ease;
}
.site-notice-overlay.open .site-notice-modal {
    transform: translateY(0) scale(1);
}
.site-notice-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 4px 6px;
    transition: color .15s ease, transform .15s ease;
}
.site-notice-close:hover {
    color: var(--red);
    transform: scale(1.1);
}
.site-notice-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    background: rgba(245, 158, 11, .14);
    border: 1.5px solid rgba(245, 158, 11, .45);
}
.site-notice-title {
    margin: 0 0 8px;
    font-size: 1.12rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--navy);
}
.site-notice-msg {
    margin: 0 0 18px;
    font-size: .95rem;
    line-height: 1.5;
    color: var(--muted);
}
.site-notice-ok {
    min-width: 130px;
}
html.dark-theme .site-notice-modal {
    background: #131c2e;
    border-color: #334155;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
}
html.dark-theme .site-notice-title {
    color: #f8fafc;
}
html.dark-theme .site-notice-msg {
    color: #cbd5e1;
}


/* ==================== TRANG GIFTCODE (giftcode.php) ==================== */
.gc-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.gc-hero {
    padding: 24px;
    border-radius: 16px;
}
.gc-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.gc-kicker {
    display: inline-block;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .6px;
    color: #d97706;
    background: rgba(245, 158, 11, .14);
    border: 1px solid rgba(245, 158, 11, .38);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}
.gc-title {
    margin: 0 0 6px;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.2;
}
.gc-subtitle {
    margin: 0;
    font-size: .95rem;
    color: var(--muted);
    line-height: 1.5;
}
.gc-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.gc-status-bar {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, .05);
    border: 1px solid rgba(15, 23, 42, .12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.gc-status-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.gc-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .8rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
}
.gc-status-pill.pill-vip {
    background: rgba(245, 158, 11, .18);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, .5);
}
.gc-status-pill.pill-normal {
    background: rgba(59, 130, 246, .14);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, .35);
}
.gc-status-pill.pill-guest {
    background: rgba(100, 116, 139, .16);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, .32);
}
.gc-status-text {
    font-size: .9rem;
    color: var(--ink);
}
.gc-tabs {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.gc-tab {
    padding: 8px 15px;
    border-radius: 10px;
    border: 1.5px solid rgba(15, 23, 42, .18);
    background: transparent;
    color: var(--ink);
    font-weight: 800;
    font-size: .88rem;
    cursor: pointer;
    transition: all .16s ease;
}
.gc-tab:hover {
    border-color: #f59e0b;
    color: #d97706;
}
.gc-tab.active {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(234, 88, 12, .28);
}

.gc-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.gc-section-head h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 900;
}
.gc-section-head p {
    margin: 0;
    font-size: .9rem;
    color: var(--muted);
}
.gc-count-badge {
    font-size: .8rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(34, 197, 94, .14);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, .35);
}
.gc-count-badge.badge-vip {
    background: rgba(245, 158, 11, .16);
    color: #b45309;
    border-color: rgba(245, 158, 11, .45);
}

.gc-vip-banner {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, .14), rgba(239, 68, 68, .12));
    border: 1.5px solid rgba(245, 158, 11, .5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.gc-vip-banner-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: .9rem;
    line-height: 1.45;
    max-width: 780px;
}
.gc-vip-banner-text strong {
    color: #b91c1c;
    font-size: .95rem;
}

.gc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.gc-card {
    margin-bottom: 0;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-radius: 14px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.gc-card:hover {
    transform: translateY(-2px);
}
.gc-card-vip {
    border-color: rgba(245, 158, 11, .55);
}
.gc-card.is-claimed {
    opacity: .78;
}
.gc-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(100, 116, 139, .3);
}
.gc-code-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.gc-type-tag {
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
}
.gc-type-tag.tag-public {
    background: rgba(34, 197, 94, .16);
    color: #15803d;
}
.gc-type-tag.tag-vip {
    background: rgba(245, 158, 11, .2);
    color: #b45309;
}
.gc-code-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.12rem;
    font-weight: 900;
    letter-spacing: .5px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, .08);
    color: var(--navy);
}
.gc-card-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.gc-state {
    font-size: .76rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 999px;
}
.gc-state.state-done {
    background: rgba(100, 116, 139, .18);
    color: #475569;
}
.gc-state.state-ready {
    background: rgba(34, 197, 94, .16);
    color: #15803d;
}
.gc-state.state-lock {
    background: rgba(239, 68, 68, .15);
    color: #b91c1c;
}
.gc-copy-btn.copied {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}

.gc-reward-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.gc-reward-list li {
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, .04);
    border: 1px solid rgba(15, 23, 42, .08);
}
.gc-reward-main {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .92rem;
    font-weight: 700;
}
.gc-qty {
    display: inline-block;
    font-size: .8rem;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(37, 99, 235, .14);
    color: #1d4ed8;
    white-space: nowrap;
}
.gc-qty.qty-vip {
    background: rgba(245, 158, 11, .2);
    color: #b45309;
}
.gc-item-name {
    font-weight: 800;
}
.gc-opt-tags {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.gc-opt {
    font-size: .75rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
}
.gc-opt.opt-stat {
    background: rgba(16, 185, 129, .14);
    color: #047857;
}
.gc-opt.opt-lock {
    background: rgba(100, 116, 139, .16);
    color: #475569;
}
.gc-opt.opt-vip {
    background: rgba(234, 88, 12, .16);
    color: #c2410c;
}

.gc-card-foot {
    padding-top: 10px;
    border-top: 1px solid rgba(100, 116, 139, .18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    font-size: .82rem;
    color: var(--muted);
}

/* Hướng dẫn 3 bước + ảnh minh họa */
.gc-guide {
    padding: 24px;
    border-radius: 16px;
}
.gc-guide-head h2 {
    margin: 0 0 4px;
    font-size: 1.3rem;
    font-weight: 900;
}
.gc-guide-head p {
    margin: 0 0 18px;
    font-size: .92rem;
    color: var(--muted);
}
.gc-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.gc-step-card {
    position: relative;
    padding: 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, .04);
    border: 1px solid rgba(15, 23, 42, .1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gc-step-badge {
    align-self: flex-start;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
}
.gc-step-img-btn {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 2px solid rgba(15, 23, 42, .15);
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
    cursor: zoom-in;
    aspect-ratio: 16 / 9;
}
.gc-step-img-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .22s ease;
}
.gc-step-img-btn:hover img {
    transform: scale(1.04);
}
.gc-zoom-hint {
    position: absolute;
    right: 8px;
    bottom: 8px;
    font-size: .74rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(15, 23, 42, .78);
    color: #ffffff;
}
.gc-step-card h3 {
    margin: 2px 0 0;
    font-size: 1rem;
    font-weight: 900;
}
.gc-step-card p {
    margin: 0;
    font-size: .88rem;
    line-height: 1.5;
    color: var(--muted);
}
.gc-notes {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(245, 158, 11, .1);
    border: 1px solid rgba(245, 158, 11, .35);
    font-size: .88rem;
    line-height: 1.55;
}
.gc-notes ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

/* Lightbox ảnh */
.gc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 6, 23, .86);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.gc-lightbox.open {
    opacity: 1;
    visibility: visible;
}
.gc-lightbox-close {
    position: fixed;
    top: 16px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, .35);
    background: rgba(15, 23, 42, .85);
    color: #ffffff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.gc-lightbox-inner {
    margin: 0;
    max-width: min(1040px, 95vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.gc-lightbox-inner img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, .25);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .65);
}
.gc-lightbox-inner figcaption {
    color: #f8fafc;
    font-size: .92rem;
    font-weight: 700;
    text-align: center;
}

/* Toast copy */
.gc-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    z-index: 9998;
    padding: 10px 18px;
    border-radius: 999px;
    background: #16a34a;
    color: #ffffff;
    font-weight: 800;
    font-size: .88rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .32);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.gc-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Dark theme overrides */
html.dark-theme .gc-kicker {
    color: #fbbf24;
    background: rgba(245, 158, 11, .16);
}
html.dark-theme .gc-status-bar {
    background: rgba(30, 41, 59, .7);
    border-color: #334155;
}
html.dark-theme .gc-status-text {
    color: #e2e8f0;
}
html.dark-theme .gc-status-pill.pill-vip {
    color: #fbbf24;
}
html.dark-theme .gc-status-pill.pill-normal {
    color: #93c5fd;
}
html.dark-theme .gc-status-pill.pill-guest {
    color: #cbd5e1;
}
html.dark-theme .gc-tab {
    border-color: #334155;
    color: #e2e8f0;
}
html.dark-theme .gc-tab.active {
    color: #ffffff;
}
html.dark-theme .gc-count-badge {
    color: #86efac;
}
html.dark-theme .gc-count-badge.badge-vip {
    color: #fbbf24;
}
html.dark-theme .gc-vip-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, .16), rgba(239, 68, 68, .16));
    border-color: rgba(251, 191, 36, .48);
}
html.dark-theme .gc-vip-banner-text strong {
    color: #fca5a5;
}
html.dark-theme .gc-code-text {
    background: rgba(15, 23, 42, .85);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, .35);
}
html.dark-theme .gc-type-tag.tag-public {
    color: #86efac;
}
html.dark-theme .gc-type-tag.tag-vip {
    color: #fbbf24;
}
html.dark-theme .gc-state.state-done {
    color: #cbd5e1;
}
html.dark-theme .gc-state.state-ready {
    color: #86efac;
}
html.dark-theme .gc-state.state-lock {
    color: #fca5a5;
}
html.dark-theme .gc-reward-list li {
    background: rgba(15, 23, 42, .55);
    border-color: #263348;
}
html.dark-theme .gc-qty {
    background: rgba(59, 130, 246, .22);
    color: #93c5fd;
}
html.dark-theme .gc-qty.qty-vip {
    background: rgba(245, 158, 11, .22);
    color: #fbbf24;
}
html.dark-theme .gc-opt.opt-stat {
    background: rgba(16, 185, 129, .18);
    color: #6ee7b7;
}
html.dark-theme .gc-opt.opt-lock {
    background: rgba(100, 116, 139, .24);
    color: #cbd5e1;
}
html.dark-theme .gc-opt.opt-vip {
    background: rgba(249, 115, 22, .22);
    color: #fdba74;
}
html.dark-theme .gc-step-card {
    background: rgba(15, 23, 42, .55);
    border-color: #263348;
}
html.dark-theme .gc-step-img-btn {
    border-color: #334155;
}
html.dark-theme .gc-notes {
    background: rgba(245, 158, 11, .12);
    border-color: rgba(251, 191, 36, .35);
    color: #e2e8f0;
}

@media (max-width: 900px) {
    .gc-grid {
        grid-template-columns: 1fr;
    }
    .gc-steps-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 540px) {
    .gc-hero, .gc-guide {
        padding: 16px;
    }
    .gc-title {
        font-size: 1.35rem;
    }
}


/* Spotlight Danh hiệu Fan Cứng Vĩnh Viễn trong banner VIP GiftCode */
.gc-vip-banner {
    padding: 18px 20px;
    border-radius: 16px;
    border: 2px solid rgba(245, 158, 11, .65);
    box-shadow: 0 10px 28px rgba(245, 158, 11, .16);
}
.gc-vip-banner-main {
    flex: 1 1 560px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gc-vip-banner-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.gc-vip-hot-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #ffffff;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .4px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, .35);
}
.gc-vip-sub-note {
    font-size: .9rem;
    color: var(--ink);
}
.gc-fancung-spotlight {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(254, 243, 199, .95), rgba(253, 230, 138, .75));
    border: 2px solid #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .16), 0 8px 22px rgba(217, 119, 6, .22);
    animation: gcFanCungPulse 2.6s ease-in-out infinite;
}
@keyframes gcFanCungPulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(245, 158, 11, .16), 0 8px 22px rgba(217, 119, 6, .22);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(251, 191, 36, .34), 0 10px 28px rgba(234, 88, 12, .32);
    }
}
.gc-fancung-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 6px 14px rgba(234, 88, 12, .35);
}
.gc-fancung-body {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}
.gc-fancung-title {
    font-size: 1rem;
    font-weight: 900;
    color: #78350f;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.3;
}
.gc-fancung-name {
    color: #dc2626;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.gc-fancung-perm {
    display: inline-block;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .5px;
    padding: 3px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;
}
.gc-fancung-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.gc-fc-stat {
    font-size: .78rem;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 7px;
    background: #ffffff;
    color: #92400e;
    border: 1px solid rgba(217, 119, 6, .4);
}
.gc-fc-auto {
    font-size: .82rem;
    font-weight: 700;
    color: #78350f;
}
.gc-vip-future-note {
    margin: 0;
    font-size: .88rem;
    line-height: 1.45;
    color: var(--ink);
}
.gc-vip-cta {
    padding: 11px 18px !important;
    font-size: .92rem !important;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(245, 158, 11, .32);
}

html.dark-theme .gc-vip-sub-note,
html.dark-theme .gc-vip-future-note {
    color: #e2e8f0;
}
html.dark-theme .gc-fancung-spotlight {
    background: linear-gradient(135deg, rgba(245, 158, 11, .24), rgba(234, 88, 12, .22));
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, .18), 0 10px 26px rgba(245, 158, 11, .25);
}
html.dark-theme .gc-fancung-title {
    color: #fef3c7;
}
html.dark-theme .gc-fancung-name {
    color: #fde047;
}
html.dark-theme .gc-fc-stat {
    background: rgba(15, 23, 42, .78);
    color: #fde68a;
    border-color: rgba(251, 191, 36, .45);
}
html.dark-theme .gc-fc-auto {
    color: #fed7aa;
}
@media (max-width: 600px) {
    .gc-fancung-spotlight {
        align-items: flex-start;
    }
    .gc-vip-cta {
        width: 100%;
        text-align: center;
    }
}


/* ==================== TRANG HƯỚNG DẪN CƠ CHẾ GAME (guide.php) ==================== */
.gd-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.gd-hero {
    padding: 24px;
    border-radius: 16px;
}
.gd-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.gd-kicker {
    display: inline-block;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .6px;
    color: #059669;
    background: rgba(16, 185, 129, .14);
    border: 1px solid rgba(16, 185, 129, .38);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}
.gd-title {
    margin: 0 0 6px;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.22;
}
.gd-subtitle {
    margin: 0;
    font-size: .95rem;
    color: var(--muted);
    line-height: 1.5;
}
.gd-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.gd-search-wrap {
    position: relative;
    margin-top: 16px;
    display: flex;
    align-items: center;
}
.gd-search-ico {
    position: absolute;
    left: 14px;
    font-size: 1rem;
    pointer-events: none;
}
.gd-search-input {
    width: 100%;
    padding: 12px 42px 12px 42px;
    border-radius: 12px;
    border: 1.5px solid rgba(15, 23, 42, .18);
    background: rgba(15, 23, 42, .04);
    color: var(--ink);
    font-size: .95rem;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.gd-search-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .18);
}
.gd-search-clear {
    position: absolute;
    right: 10px;
    border: none;
    background: rgba(100, 116, 139, .2);
    color: var(--ink);
    width: 26px;
    height: 26px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
}
.gd-tabs {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.gd-tab {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1.5px solid rgba(15, 23, 42, .16);
    background: transparent;
    color: var(--ink);
    font-weight: 800;
    font-size: .86rem;
    cursor: pointer;
    transition: all .15s ease;
}
.gd-tab:hover {
    border-color: #10b981;
    color: #059669;
}
.gd-tab.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(16, 185, 129, .28);
}
.gd-empty {
    padding: 24px;
    text-align: center;
    font-size: .95rem;
    color: var(--muted);
}

.gd-sec-head {
    margin-bottom: 14px;
}
.gd-sec-head h2 {
    margin: 0 0 4px;
    font-size: 1.28rem;
    font-weight: 900;
}
.gd-sec-head p {
    margin: 0;
    font-size: .9rem;
    color: var(--muted);
    line-height: 1.5;
}
.gd-cards-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.gd-cards-2:last-child {
    margin-bottom: 0;
}
.gd-card {
    margin-bottom: 0;
    padding: 18px 20px;
    border-radius: 14px;
}
.gd-card-highlight {
    border-color: rgba(245, 158, 11, .55);
}
.gd-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(100, 116, 139, .28);
}
.gd-ico {
    font-size: 1.35rem;
    line-height: 1;
}
.gd-card-title h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 900;
}
.gd-step-list,
.gd-bullet-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: .91rem;
    line-height: 1.55;
}
.gd-bullet-list ul {
    margin: 6px 0 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.gd-card code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .86rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(15, 23, 42, .08);
    color: #c2410c;
}
.gd-tip {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(16, 185, 129, .1);
    border: 1px solid rgba(16, 185, 129, .32);
    font-size: .86rem;
    line-height: 1.5;
}
.gd-note-inline {
    margin: 0 0 10px;
    font-size: .85rem;
    color: var(--muted);
}

.gd-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.gd-mini-box {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, .04);
    border: 1px solid rgba(15, 23, 42, .1);
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: .88rem;
    line-height: 1.5;
}
.gd-mini-box strong {
    font-size: .93rem;
}

.gd-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(100, 116, 139, .22);
}
.gd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .87rem;
    line-height: 1.48;
}
.gd-table th,
.gd-table td {
    padding: 9px 11px;
    text-align: left;
    border-bottom: 1px solid rgba(100, 116, 139, .18);
    vertical-align: top;
}
.gd-table thead th {
    background: rgba(15, 23, 42, .06);
    font-weight: 900;
    white-space: nowrap;
}
.gd-table tbody tr:last-child td {
    border-bottom: none;
}
.gd-table-compact th,
.gd-table-compact td {
    padding: 6px 10px;
}
.gd-row-vip td {
    background: rgba(245, 158, 11, .1);
}
.gd-pill-green {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    background: rgba(34, 197, 94, .16);
    color: #15803d;
    white-space: nowrap;
}
.gd-pill-gold {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
    background: rgba(245, 158, 11, .2);
    color: #b45309;
    white-space: nowrap;
}
.gd-opt-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.gd-opt-chip {
    font-size: .76rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(16, 185, 129, .14);
    color: #047857;
    white-space: nowrap;
}

.gd-faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gd-faq {
    margin-bottom: 0;
    padding: 14px 18px;
    border-radius: 12px;
}
.gd-faq summary {
    cursor: pointer;
    font-weight: 900;
    font-size: .96rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.gd-faq summary::-webkit-details-marker {
    display: none;
}
.gd-faq summary::after {
    content: '▾';
    font-size: 1rem;
    color: var(--muted);
    transition: transform .18s ease;
}
.gd-faq[open] summary::after {
    transform: rotate(180deg);
}
.gd-faq p {
    margin: 10px 0 0;
    font-size: .9rem;
    line-height: 1.55;
    color: var(--muted);
}

/* Dark theme overrides */
html.dark-theme .gd-kicker {
    color: #34d399;
}
html.dark-theme .gd-search-input {
    background: rgba(15, 23, 42, .7);
    border-color: #334155;
    color: #f8fafc;
}
html.dark-theme .gd-search-clear {
    color: #f8fafc;
}
html.dark-theme .gd-tab {
    border-color: #334155;
    color: #e2e8f0;
}
html.dark-theme .gd-tab.active {
    color: #ffffff;
}
html.dark-theme .gd-card code {
    background: rgba(15, 23, 42, .85);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, .28);
}
html.dark-theme .gd-mini-box {
    background: rgba(15, 23, 42, .55);
    border-color: #263348;
}
html.dark-theme .gd-table thead th {
    background: rgba(15, 23, 42, .75);
}
html.dark-theme .gd-row-vip td {
    background: rgba(245, 158, 11, .14);
}
html.dark-theme .gd-pill-green {
    color: #86efac;
}
html.dark-theme .gd-pill-gold {
    color: #fbbf24;
}
html.dark-theme .gd-opt-chip {
    background: rgba(16, 185, 129, .2);
    color: #6ee7b7;
}
html.dark-theme .gd-tip {
    background: rgba(16, 185, 129, .14);
    color: #d1fae5;
}

@media (max-width: 900px) {
    .gd-cards-2,
    .gd-mini-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 540px) {
    .gd-hero {
        padding: 16px;
    }
    .gd-title {
        font-size: 1.35rem;
    }
}


/* ==================== TINH CHỈNH FONT TIẾNG VIỆT (Be Vietnam Pro) CHO GUIDE & GIFTCODE ==================== */
.gd-page,
.gd-page button,
.gd-page input,
.gc-page,
.gc-page button,
.gc-page input {
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.gd-title,
.gc-title {
    font-weight: 800;
    letter-spacing: -.2px;
}
.gd-sec-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.gd-sec-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: .88rem;
    font-weight: 800;
    background: rgba(16, 185, 129, .14);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, .35);
    margin-top: 2px;
}
.gd-sec-head h2,
.gc-section-head h2,
.gc-guide-head h2 {
    font-weight: 700;
    letter-spacing: -.15px;
    text-transform: none;
}
.gd-card-title h3,
.gc-step-card h3 {
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 1.04rem !important;
    margin-bottom: 0 !important;
}
.gd-page b,
.gd-page strong,
.gc-page b,
.gc-page strong {
    font-weight: 600;
}
.gd-tab,
.gc-tab {
    font-weight: 600;
}
.gd-table thead th {
    font-weight: 700;
}
.gd-faq summary {
    font-weight: 700;
}
.gd-search-ico {
    color: var(--muted);
    display: flex;
    align-items: center;
}
.gd-note-box {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 3px solid #10b981;
    background: rgba(15, 23, 42, .04);
    font-size: .87rem;
    line-height: 1.55;
    color: var(--muted);
}
html.dark-theme .gd-sec-num {
    background: rgba(16, 185, 129, .16);
    color: #34d399;
    border-color: rgba(52, 211, 153, .35);
}
html.dark-theme .gd-card-title h3 {
    color: #f8fafc !important;
}
html.dark-theme .gd-note-box {
    background: rgba(15, 23, 42, .5);
    color: #cbd5e1;
}


/* ==================== NÚT HƯỚNG DẪN CÀI ĐẶT IOS + POPUP THÔNG BÁO + LIGHTBOX ==================== */
.btn-ios-guide,
html.dark-theme .btn-ios-guide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: .84rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    border-radius: 10px;
    background: rgba(59, 130, 246, .14);
    color: #1d4ed8;
    border: 1.5px solid rgba(59, 130, 246, .45);
    box-shadow: none;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .12s ease;
}
.btn-ios-guide:hover,
html.dark-theme .btn-ios-guide:hover {
    background: rgba(59, 130, 246, .24);
    border-color: #60a5fa;
    transform: translateY(-1px);
}
html.dark-theme .btn-ios-guide {
    background: rgba(59, 130, 246, .18);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, .48);
}
.btn-apk-backup,
html.dark-theme .btn-apk-backup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: .84rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    border-radius: 10px;
    background: rgba(16, 185, 129, .12);
    color: #047857;
    border: 1.5px solid rgba(16, 185, 129, .45);
    box-shadow: none;
    transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.btn-apk-backup:hover,
html.dark-theme .btn-apk-backup:hover {
    background: rgba(16, 185, 129, .24);
    border-color: #34d399;
    transform: translateY(-1px);
    box-shadow: none;
}
html.dark-theme .btn-apk-backup {
    background: rgba(16, 185, 129, .16);
    color: #6ee7b7;
    border-color: rgba(52, 211, 153, .45);
}

/* Welcome Popup Overlay */
.wp-overlay {
    position: fixed;
    inset: 0;
    z-index: 9980;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: rgba(2, 6, 23, .72);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
}
.wp-overlay.open {
    opacity: 1;
    visibility: visible;
}
.wp-modal {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #fff9f2;
    color: #2c1e12;
    border: 2px solid #5c3114;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    transform: translateY(12px) scale(.97);
    transition: transform .22s ease;
}
.wp-overlay.open .wp-modal {
    transform: translateY(0) scale(1);
}
.wp-head {
    position: relative;
    flex-shrink: 0;
    padding: 14px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4b2109 0%, #7a340e 55%, #4b2109 100%);
    border-bottom: 2px solid #c26a26;
}
.wp-logo {
    height: 54px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .45));
}
.wp-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, .32);
    background: rgba(0, 0, 0, .35);
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.wp-close:hover {
    background: rgba(220, 38, 38, .85);
    transform: translateY(-50%) scale(1.06);
}
.wp-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.wp-title {
    margin: 0;
    text-align: center;
    font-size: 1.24rem;
    font-weight: 800;
    letter-spacing: .3px;
    color: #5c2808;
}
.wp-intro {
    margin: 0;
    text-align: center;
    font-size: .9rem;
    line-height: 1.55;
    color: #4b3523;
}
.wp-intro b {
    font-weight: 700;
    color: #b91c1c;
}
.wp-guide-box {
    padding: 14px 15px;
    border-radius: 14px;
    background: #ffffff;
    border: 1.5px solid #e7cfb4;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.wp-guide-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #5c2808;
    text-transform: none;
    letter-spacing: 0;
}
.wp-guide-desc {
    margin: 0;
    font-size: .86rem;
    line-height: 1.52;
    color: #4b3523;
}
.wp-steps {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: .85rem;
    line-height: 1.48;
    color: #3a291b;
}
.wp-img-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 2px solid #d9b892;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
    cursor: zoom-in;
    transition: transform .15s ease, border-color .15s ease;
}
.wp-img-trigger:hover {
    border-color: #ea580c;
    transform: scale(1.01);
}
.wp-img-trigger img {
    display: block;
    width: 100%;
    height: auto;
}
.wp-img-caption {
    text-align: center;
    margin-top: -4px;
}
.wp-link-btn {
    border: none;
    background: none;
    padding: 2px 6px;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    color: #9a3412;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.wp-link-btn:hover {
    color: #dc2626;
}
.wp-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wp-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.wp-steps-details {
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #f3d4b4;
    overflow: hidden;
}
.wp-steps-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 11px;
    font-size: .83rem;
    font-weight: 700;
    color: #7c2d12;
    cursor: pointer;
    user-select: none;
}
.wp-steps-summary::-webkit-details-marker {
    display: none;
}
.wp-steps-caret {
    flex-shrink: 0;
    font-size: .9rem;
    transition: transform .18s ease;
}
.wp-steps-details[open] .wp-steps-caret {
    transform: rotate(180deg);
}
.wp-steps-details .wp-steps {
    padding: 0 12px 10px 28px;
}
.wp-foot {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 18px;
    background: #f8ede0;
    border-top: 1.5px solid #e7cfb4;
}
.wp-foot-close-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1.5px solid #c9a784;
    background: #ffffff;
    color: #5c2808;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.wp-foot-close-btn:hover {
    background: #5c2808;
    border-color: #5c2808;
    color: #ffffff;
}
.wp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 11px 16px;
    border-radius: 11px;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 800;
    text-decoration: none;
    color: #ffffff !important;
    transition: filter .15s ease, transform .12s ease;
}
.wp-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}
.wp-btn-play {
    background: linear-gradient(135deg, #16a34a, #15803d);
    box-shadow: 0 5px 14px rgba(22, 163, 74, .32);
}
.wp-btn-gift {
    background: linear-gradient(135deg, #ea580c, #dc2626);
    box-shadow: 0 5px 14px rgba(220, 38, 38, .28);
}
.wp-btn-fb {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 5px 14px rgba(37, 99, 235, .26);
}
.wp-btn-zalo {
    background: linear-gradient(135deg, #0088ff, #0068ff);
    box-shadow: 0 5px 14px rgba(0, 104, 255, .28);
}
.wp-mute-wrap {
    text-align: center;
    padding-top: 2px;
}
.wp-mute-btn {
    border: none;
    background: none;
    padding: 6px 10px;
    font-family: inherit;
    font-size: .84rem;
    font-weight: 600;
    color: #6b5344;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color .15s ease;
}
.wp-mute-btn:hover {
    color: #dc2626;
}

/* Dark theme for Welcome Popup */
html.dark-theme .wp-modal {
    background: #111827;
    color: #e2e8f0;
    border-color: #334155;
}
html.dark-theme .wp-head {
    background: linear-gradient(135deg, #1e293b 0%, #312e81 52%, #1e293b 100%);
    border-bottom-color: #475569;
}
html.dark-theme .wp-title {
    color: #fbbf24;
}
html.dark-theme .wp-intro {
    color: #cbd5e1;
}
html.dark-theme .wp-intro b {
    color: #fde047;
}
html.dark-theme .wp-guide-box {
    background: #172033;
    border-color: #2d3c54;
}
html.dark-theme .wp-guide-title {
    color: #f8fafc;
}
html.dark-theme .wp-guide-desc,
html.dark-theme .wp-steps {
    color: #cbd5e1;
}
html.dark-theme .wp-img-trigger {
    border-color: #3b4c68;
}
html.dark-theme .wp-link-btn {
    color: #93c5fd;
}
html.dark-theme .wp-link-btn:hover {
    color: #fde047;
}
html.dark-theme .wp-mute-btn {
    color: #94a3b8;
}
html.dark-theme .wp-mute-btn:hover {
    color: #f8fafc;
}
html.dark-theme .wp-steps-details {
    background: #10192b;
    border-color: #2d3c54;
}
html.dark-theme .wp-steps-summary {
    color: #fde68a;
}
html.dark-theme .wp-foot {
    background: #0d1424;
    border-top-color: #253349;
}
html.dark-theme .wp-foot-close-btn {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}
html.dark-theme .wp-foot-close-btn:hover {
    background: #334155;
    border-color: #475569;
    color: #ffffff;
}

/* Lightbox phóng to ảnh hướng dẫn iOS */
.ios-guide-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(2, 6, 23, .88);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
}
.ios-guide-lightbox.open {
    opacity: 1;
    visibility: visible;
}
.ios-guide-close {
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 10052;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, .38);
    background: rgba(15, 23, 42, .86);
    color: #ffffff;
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ios-guide-close:hover {
    background: rgba(220, 38, 38, .9);
}
.ios-guide-inner {
    max-width: min(1080px, 96vw);
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.ios-guide-inner img {
    max-width: 100%;
    max-height: 80dvh;
    width: auto;
    height: auto;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, .28);
    box-shadow: 0 22px 55px rgba(0, 0, 0, .7);
}
.ios-guide-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    color: #f8fafc;
    font-size: .88rem;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 640px) {
    .wp-overlay {
        padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
        align-items: center;
    }
    .wp-modal {
        max-width: 100%;
        max-height: 90dvh;
        border-radius: 16px;
    }
    .wp-head {
        padding: 9px 44px;
    }
    .wp-logo {
        height: 36px;
        max-width: 190px;
    }
    .wp-close {
        width: 30px;
        height: 30px;
        right: 10px;
        font-size: 1.2rem;
    }
    .wp-body {
        padding: 12px 13px 14px;
        gap: 10px;
    }
    .wp-title {
        font-size: 1.04rem;
    }
    .wp-intro {
        font-size: .82rem;
        line-height: 1.48;
    }
    .wp-zalo-note {
        padding: 8px 10px;
        font-size: .79rem;
        line-height: 1.42;
    }
    .wp-guide-box {
        padding: 11px;
        border-radius: 12px;
        gap: 8px;
    }
    .wp-guide-title {
        font-size: .92rem;
    }
    .wp-guide-desc {
        font-size: .8rem;
        line-height: 1.45;
    }
    .wp-steps-summary {
        padding: 8px 10px;
        font-size: .8rem;
    }
    .wp-steps-details .wp-steps {
        font-size: .79rem;
        line-height: 1.45;
        gap: 4px;
        padding: 0 10px 9px 24px;
    }
    .wp-img-trigger img {
        max-height: 180px;
        object-fit: contain;
    }
    .wp-btn {
        padding: 9px 10px;
        font-size: .82rem;
        border-radius: 10px;
        text-align: center;
    }
    .wp-foot {
        padding: 9px 13px;
    }
    .wp-mute-btn {
        font-size: .78rem;
        padding: 4px 2px;
    }
    .wp-foot-close-btn {
        padding: 5px 12px;
        font-size: .78rem;
    }
    .ios-guide-lightbox {
        padding: 10px;
    }
    .ios-guide-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
    }
}

.wp-zalo-note {
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(0, 104, 255, .1);
    border: 1px solid rgba(0, 104, 255, .35);
    font-size: .85rem;
    line-height: 1.5;
    text-align: center;
    color: #004ecc;
}
html.dark-theme .wp-zalo-note {
    background: rgba(0, 136, 255, .14);
    border-color: rgba(56, 189, 248, .4);
    color: #bae6fd;
}


/* ==================== BOT HỖ TRỢ & 2 GHIM THÔNG BÁO KÊNH CHAT ==================== */
.chat-pinned-stack {
    display: flex;
    flex-direction: column;
}
.chat-pinned-stack .chat-pinned-bar.is-pin-2 {
    border-top: 1px dashed rgba(59, 130, 246, .35);
    background: rgba(59, 130, 246, .08);
}
.chat-pinned-tag.is-bot-pin {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #ffffff;
}
html.dark-theme .chat-pinned-stack .chat-pinned-bar.is-pin-2 {
    background: rgba(37, 99, 235, .14);
    border-top-color: rgba(96, 165, 250, .28);
}

/* Tin nhắn của Bot Hỗ Trợ */
.chat-bot-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border: 2px solid #93c5fd;
    box-shadow: 0 3px 10px rgba(37, 99, 235, .35);
}
.chat-author-btn.is-bot {
    color: #1d4ed8 !important;
    font-weight: 800;
}
.chat-role-badge.is-bot {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: .3px;
}
.chat-msg.is-bot .chat-msg-bubble {
    background: rgba(37, 99, 235, .09);
    border: 1.5px solid rgba(59, 130, 246, .36);
}
html.dark-theme .chat-author-btn.is-bot {
    color: #60a5fa !important;
}
html.dark-theme .chat-msg.is-bot .chat-msg-bubble {
    background: rgba(30, 58, 138, .32);
    border-color: rgba(96, 165, 250, .42);
    color: #e2e8f0;
}

/* Thanh chip hỏi nhanh Bot */
.chat-bot-quickbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px 2px;
    overflow-x: auto;
    scrollbar-width: thin;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
}
.chat-bot-quick-label {
    flex-shrink: 0;
    font-size: .76rem;
    font-weight: 700;
    color: var(--muted);
}
.chat-bot-chip {
    flex-shrink: 0;
    border: 1px solid rgba(59, 130, 246, .38);
    background: rgba(59, 130, 246, .1);
    color: #1d4ed8;
    font-family: inherit;
    font-size: .76rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
}
.chat-bot-chip:hover {
    background: rgba(59, 130, 246, .22);
    transform: translateY(-1px);
}
html.dark-theme .chat-bot-chip {
    background: rgba(37, 99, 235, .2);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, .4);
}
html.dark-theme .chat-bot-chip:hover {
    background: rgba(37, 99, 235, .36);
}

/* Hàng bật/tắt Bot trong bảng Quản trị Kênh Chat */
.chat-bot-admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 10px;
    background: rgba(59, 130, 246, .08);
    border: 1px solid rgba(59, 130, 246, .28);
}
html.dark-theme .chat-bot-admin-row {
    background: rgba(37, 99, 235, .14);
    border-color: rgba(96, 165, 250, .3);
}


/* Nút Chat ngay với Admin (Messenger Fanpage) bên cạnh khung chat */
.chat-support-card {
    border-color: rgba(0, 132, 255, .45);
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
}
.chat-support-card h3 {
    text-transform: none !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}
.chat-support-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-admin-msg-btn,
.chat-zalo-join-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 11px;
    background: linear-gradient(135deg, #0084ff, #0066e6);
    color: #ffffff !important;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 132, 255, .32);
    transition: filter .15s ease, transform .12s ease;
}
.chat-zalo-join-btn {
    background: linear-gradient(135deg, #0068ff, #004ecc);
    box-shadow: 0 6px 16px rgba(0, 104, 255, .3);
}
.chat-admin-msg-btn:hover,
.chat-zalo-join-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}
.chat-header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.chat-header-admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0084ff, #0066e6);
    color: #ffffff !important;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: .76rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 132, 255, .3);
    transition: filter .15s ease, transform .12s ease;
}
.chat-header-admin-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
.chat-widget-admin-link {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #0084ff;
    color: #ffffff !important;
    font-size: .72rem;
    font-weight: 700;
    text-decoration: none;
    margin-right: 4px;
}
.chat-widget-admin-link:hover {
    filter: brightness(1.12);
}
html.dark-theme .chat-support-card h3 {
    color: #f8fafc !important;
}


/* Hiển thị số người đang ở trong phòng chat */
.chat-room-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, .18);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, .42);
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: .76rem;
    font-weight: 700;
    white-space: nowrap;
}
.chat-room-pill-sm {
    padding: 2px 8px;
    font-size: .7rem;
}
html.dark-theme .chat-room-pill {
    background: rgba(34, 197, 94, .2);
    color: #86efac;
    border-color: rgba(74, 222, 128, .42);
}
.chat-presence-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-presence-list .chat-online-stat.is-web {
    padding-top: 8px;
    border-top: 1px dashed rgba(100, 116, 139, .28);
}
.chat-live-dot.is-blue {
    background: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .25);
}
.chat-online-big-num.is-sub {
    font-size: 1.2rem;
}
