body {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Nhiễu hạt điện ảnh */
.overlay-grain {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
    z-index: 99;
}

.bg-radial-glow {
    background: radial-gradient(circle at center, rgba(14, 167, 249, 0.05) 0%, rgba(3, 7, 18, 0) 70%);
}

/* Hiệu ứng Logo & Nút bấm */
@keyframes logoMetallicGlow {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(14, 167, 249, 0.3)); transform: translateY(0px); }
    50% { filter: drop-shadow(0 0 30px rgba(79, 70, 229, 0.5)); transform: translateY(-3px); }
}
.special-logo-effect {
    animation: logoMetallicGlow 6s infinite ease-in-out;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.special-logo-effect:hover {
    filter: drop-shadow(0 0 40px rgba(14, 167, 249, 0.8)) brightness(1.25) !important;
    transform: scale(1.04);
}

.btn-premium {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: all 0.4s ease;
}
.btn-premium:hover {
    background: rgba(14, 167, 249, 0.08);
    border-color: rgba(14, 167, 249, 0.4);
    box-shadow: 0 0 20px rgba(14, 167, 249, 0.15);
}

.special-btn-effect {
    position: relative;
    overflow: hidden;
}
.special-btn-effect::after {
    content: '';
    position: absolute;
    top: -50%; left: -100%; width: 50%; height: 200%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(30deg);
}
.special-btn-effect:hover::after {
    left: 150%;
    transition: all 1s cubic-bezier(0.19, 1, 0.22, 1);
}
.special-btn-effect:hover { transform: translateY(-2px); }

@keyframes shimmerGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.animate-shimmer { animation: shimmerGradient 4s ease infinite; }

/* =======================================================
   NÂNG CẤP MỚI: CẤU TRÚC HỘP KÍNH & CỘT SÓNG CHO QUỐC KỲ
   ======================================================= */

/* Định hình hộp kính cao cấp biệt lập (Glassmorphic Luxury Box) */
.flag-glass-box {
    background: rgba(255, 255, 255, 0.03);
    backdrop-blur: 16px;
    -webkit-backdrop-blur: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
                inset 0 1px 0px rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.25rem 0.75rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hiệu ứng tương tác hộp kính */
.flag-glass-box:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(14, 167, 249, 0.4);
    box-shadow: 0 24px 50px rgba(14, 167, 249, 0.15),
                inset 0 1px 0px rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.flag-wrapper {
    width: 52px;
    height: 34px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.6rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.flag {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.greeting {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
    margin-bottom: 0.1rem;
}

.country-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

/* Khung trạng thái mạng (Cột sóng + Chữ Ping) */
.network-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Kiểu dáng Cột sóng mạng */
.signal-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    width: 14px;
    height: 10px;
}

.signal-bars .bar {
    width: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1px;
    transition: background 0.3s ease, height 0.3s ease;
}

/* Chiều cao tăng dần của từng cột sóng */
.bar-1 { height: 30%; }
.bar-2 { height: 55%; }
.bar-3 { height: 75%; }
.bar-4 { height: 100%; }

/* Định dạng text chỉ số Ping */
.ping-text {
    font-size: 0.7rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    transition: color 0.3s ease;
}

/* Màu trạng thái mạng EXCELLENT (Ping thấp dưới 28ms - Cực tốt) */
.net-excellent .ping-text { color: #10B981; text-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }
.net-excellent .bar { background: #10B981; }

/* Màu trạng thái mạng GOOD (Ping từ 28ms - 40ms - Ổn định) */
.net-good .ping-text { color: #F59E0B; text-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
.net-good .bar-1, .net-good .bar-2, .net-good .bar-3 { background: #F59E0B; }
.net-good .bar-4 { background: rgba(255, 255, 255, 0.15); } /* Cột thứ 4 mờ đi */