*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Ẩn scrollbar nhưng giữ khả năng cuộn */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    touch-action: pan-y;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    background: #030307;
    color: #f8fafc;
    letter-spacing: -0.02em;
    line-height: 1.5;
    overflow-y: auto;
    min-height: 100vh;
}

main {
    padding-bottom: 70px;
}

html {
    scroll-behavior: smooth;
}

/* Kỹ thuật Ẩn Nội Dung SEO dành riêng cho Crawler Bot */
.seo-crawler-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* SPLASH SCREEN OPTIMIZED (250ms) */
.splash-screen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #030307;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    opacity: 1;
    transition: opacity 0.25s ease-out, filter 0.25s ease-out;
    will-change: opacity, filter;
}

.splash-screen.fade-out {
    opacity: 0;
    filter: blur(8px);
    pointer-events: none;
}

.splash-screen.hidden {
    display: none !important;
}

.cyber-spinner {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.splash-text {
    font-size: clamp(16px, 3.5vw, 22px);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ENTERPRISE NAVBAR & LED NEON LOGO EFFECT */
.desktop-header {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(3, 3, 7, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: 72px;
    align-items: center;
    justify-content: center;
}

.desktop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.desktop-logo img, .mobile-logo img, .home-logo, .modal-logo {
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 18px rgba(56, 189, 248, 0.7));
    animation: logoLedPulse 3s infinite ease-in-out;
}

@keyframes logoLedPulse {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 15px rgba(56, 189, 248, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1)) drop-shadow(0 0 25px rgba(56, 189, 248, 0.9));
    }
}

.desktop-logo img { height: 40px; width: auto; }
.mobile-logo img { height: 32px; width: auto; }

/* LOGO TRANG CHỦ TRÊN PC TO HƠN VÀ CÂN ĐỐI VỪA MÀN HÌNH */
.home-logo { 
    max-width: 480px; 
    width: 100%; 
    height: auto; 
    display: block;
    margin: 0 auto;
}

.modal-logo { height: 42px; width: auto; margin: 0 auto 16px; }

.desktop-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.desktop-nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    transition: color 0.2s ease;
    padding: 24px 0;
    cursor: pointer;
    white-space: nowrap;
}

.desktop-nav a:hover, .desktop-nav a.active {
    color: #38bdf8;
}

.desktop-register {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.desktop-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.5);
}

.mobile-top-bar {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(3, 3, 7, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1001;
    padding: 12px 20px;
    justify-content: space-between;
    align-items: center;
}

.mobile-register {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
    text-decoration: none;
}

/* MARQUEE RUNNING TEXT */
.top-marquee-container {
    position: fixed;
    left: 0; width: 100%;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 0;
    z-index: 999;
    overflow: hidden;
    white-space: nowrap;
}

@media (min-width: 1025px) { .top-marquee-container { top: 72px; } }
@media (max-width: 1024px) { .top-marquee-container { top: 57px; } }

.top-marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: topMarqueeScroll 28s linear infinite;
    will-change: transform;
}

@keyframes topMarqueeScroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* BOTTOM MOBILE NAVIGATION */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    background: rgba(3, 3, 7, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    justify-content: space-around;
    align-items: center;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 999;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    flex: 1;
}

.nav-item svg { width: 18px; height: 18px; fill: #64748b; transition: fill 0.2s; }
.nav-item span { font-size: 11px; font-weight: 600; color: #94a3b8; }
.nav-item.active svg { fill: #38bdf8; }
.nav-item.active span { color: #38bdf8; }

@media (min-width: 1025px) { .desktop-header { display: flex !important; } }
@media (max-width: 1024px) { 
    .mobile-top-bar, .bottom-nav { display: flex !important; } 
    .section {
        min-height: auto;
        padding: 110px 4% 60px;
        align-items: flex-start;
    }
}

/* SECTION HERO & CONTENT */
.section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 160px 4% 80px;
    position: relative;
}

.home-banner {
    background: radial-gradient(ellipse at center 40%, #0c1125 0%, #030307 70%);
}

.home-content {
    text-align: center;
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-logo-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    background: transparent;
}

.home-slogan {
    font-size: clamp(20px, 4vw, 36px);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 30px;
    line-height: 1.3;
}

.btn-home {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    padding: 14px 44px;
    font-size: clamp(15px, 3vw, 17px);
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    color: #ffffff;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(56, 189, 248, 0.5);
}

.server-title {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-top: 50px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* BENTO FLAG GRID & HỘP KÍNH 3D TỶ LỆ CHUẨN 3:2 */
.flag-section { width: 100%; position: relative; }

.flag-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    position: relative;
}

.flag-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px 6px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    border-radius: 12px;
    transition: transform 0.2s ease, background-color 0.2s ease;
    will-change: transform;
}

.flag-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translate3d(0, -3px, 0);
}

.flag-item.fiery-ring {
    border: 1.5px solid #f59e0b;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.2) 0%, rgba(9, 13, 26, 0.95) 80%);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4), 0 0 25px rgba(239, 68, 68, 0.3);
    animation: fieryPulse 2s infinite alternate ease-in-out;
}

@keyframes fieryPulse {
    0% { border-color: rgba(245, 158, 11, 0.7); }
    100% { border-color: rgba(239, 68, 68, 1); box-shadow: 0 0 22px rgba(239, 68, 68, 0.6); }
}

.flag-item .flag-box {
    width: 54px; height: 36px; /* Tỷ lệ 3:2 hoàn hảo */
    overflow: hidden;
    border-radius: 5px;
    position: relative;
    box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.25), 0 3px 8px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flag-item .flag-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.flag-item .flag-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 100%);
    pointer-events: none;
}

.flag-item .country-name { 
    font-size: 12px; 
    font-weight: 500; 
    color: #cbd5e1;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* CỘT SÓNG ĐIỆN THOẠI VÀ PING */
.flag-ping-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
}

.signal-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 11px;
}

.signal-bars .bar {
    width: 2.5px;
    background-color: #22c55e;
    border-radius: 1px;
    transition: background-color 0.3s;
}

.signal-bars .bar:nth-child(1) { height: 3px; }
.signal-bars .bar:nth-child(2) { height: 6px; }
.signal-bars .bar:nth-child(3) { height: 9px; }
.signal-bars .bar:nth-child(4) { height: 12px; }

.signal-bars.warning .bar {
    background-color: #eab308;
}

.ping-text {
    color: #94a3b8;
    font-weight: 600;
}

/* HIỆU ỨNG BẢO TRÌ VÀ Ổ KHÓA MỜ */
.flag-item.maintenance {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(0.9);
    background: rgba(15, 23, 42, 0.7);
}

.maintenance-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(3, 3, 7, 0.82);
    border-radius: 12px;
    z-index: 5;
    gap: 3px;
}

.maintenance-overlay svg {
    width: 16px;
    height: 16px;
    fill: #ef4444;
}

.maintenance-overlay span {
    font-size: 9px;
    font-weight: 700;
    color: #ef4444;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 1200px) { .flag-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 900px) { .flag-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { 
    .flag-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } 
    .flag-item { padding: 8px 3px; border-radius: 10px; }
    .flag-item .flag-box { width: 45px; height: 30px; border-radius: 4px; }
    .flag-item .country-name { font-size: 11px; }
    .flag-ping-info { font-size: 9.5px; gap: 4px; }
    .maintenance-overlay svg { width: 14px; height: 14px; }
    .maintenance-overlay span { font-size: 8px; }
    .home-logo { max-width: 85%; }
    .home-slogan { font-size: clamp(17px, 4.5vw, 24px); margin-bottom: 20px; }
    .btn-home { padding: 12px 32px; font-size: 14px; }
    .server-title { margin-top: 35px; margin-bottom: 15px; font-size: 11px; }
}

/* GAME HOT SECTION */
.gamehot-section { background: #030307; }
.gamehot-container { max-width: 1200px; width: 100%; margin: 0 auto; }

.hotgame-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.hotgame-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #090d1a;
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease;
    will-change: transform;
}

.hotgame-card .img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: #05070f;
}

.hotgame-card .img-wrapper img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hotgame-card:hover {
    transform: translate3d(0, -4px, 0);
    border-color: rgba(56, 189, 248, 0.4);
}

.hotgame-card:hover .img-wrapper img { transform: scale(1.05); }

.online-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 3;
}

.online-badge .dot {
    width: 6px; height: 6px;
    background-color: #22c55e;
    border-radius: 50%;
}

.online-badge span { font-size: 11px; font-weight: 600; color: #f1f5f9; }

.hotgame-info {
    padding: 14px;
    text-align: left;
    background: #090d1a;
}

.hotgame-name { font-size: 13.5px; font-weight: 600; color: #f8fafc; }

@media (max-width: 1024px) { .hotgame-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (max-width: 640px) {
    .hotgame-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .hotgame-info { padding: 10px; }
    .hotgame-name { font-size: 12.5px; }
}

.section-title { text-align: center; }
.section-title h2 { font-size: clamp(20px, 4vw, 28px); font-weight: 700; color: #ffffff; }
.right-title { font-size: 14px; text-align: center; margin-top: 8px; color: #64748b; font-weight: 400; }

/* POPUP MODAL TỐI ƯU CỰC MƯỢT */
.modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%; height: 100%;
    background: rgba(3, 3, 7, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-out;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: linear-gradient(145deg, #0b1120, #050814);
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    max-width: 540px;
    width: 100%;
    padding: 32px 24px 28px;
    text-align: center;
    position: relative;
    transform: scale(0.96);
    transition: transform 0.25s ease-out;
}

@media (max-width: 480px) {
    .modal-box { padding: 24px 16px 20px; }
    .modal-logo { height: 36px; }
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 14px; right: 14px;
    width: 32px; height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    color: #cbd5e1;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.modal-box h2.modal-title {
    font-size: clamp(18px, 3.5vw, 22px);
    font-weight: 800;
    color: #38bdf8;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.modal-box p.modal-desc {
    font-size: 14.5px;
    font-weight: 500;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 12px;
    text-align: left;
}

.modal-box p.modal-desc .highlight-text {
    color: #f59e0b;
    font-weight: 700;
}

.modal-btn-action {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: block;
    margin-top: 16px;
    width: 100%;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.4);
}

footer {
    background: #020204;
    text-align: center;
    padding: 32px 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
}

footer p { font-size: 13px; color: #64748b; margin: 4px 0; }
footer .social-icons { display: flex; justify-content: center; gap: 16px; margin-top: 12px; }
footer .social-icons a { color: #64748b; font-size: 18px; text-decoration: none; }
footer .social-icons a:hover { color: #38bdf8; }