:root {
    --bg: #0f172a; 
    --sidebar-bg: rgba(30, 41, 59, 0.95); 
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1); 
    --primary: #6366f1; 
    --accent: #8b5cf6;
    --success: #10b981; 
    --danger: #ef4444; 
    --text: #f8fafc; 
    --text-muted: #94a3b8;

    /* PRO+ FX colors (match theme) */
    --fx-spot-a: rgba(99,102,241,0.16);
    --fx-spot-b: rgba(139,92,246,0.08);
    --fx-orb1: rgba(99,102,241,0.65);
    --fx-orb2: rgba(139,92,246,0.55);
    --fx-orb3: rgba(236,72,153,0.35);

    /* PRO UI (desktop sidebar motion) */
    --sidebar-collapsed: 80px;
    --sidebar-expanded: 260px;
    --sidebar-speed: 420ms;
    --sidebar-close-delay: 120ms;
    --sidebar-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body {
    background: var(--bg); 
    color: var(--text); 
    display: block; 
    min-height: 100vh;
    background-image: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 20%), 
                      radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 20%);
    transition: background 0.5s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* THEME ANIMATION */
/* NOTE: Đặt z-index thấp để hiệu ứng rơi chỉ nằm ở nền (tránh che UI gây "vỡ" giao diện). */
.snow-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1; overflow: hidden; }
.falling-object { position: absolute; top: -50px; user-select: none; animation: fall linear infinite; }
@keyframes fall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(110vh) rotate(360deg); opacity: 0; } }

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-collapsed);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    overflow-x: hidden;
}

.content {
    margin-left: var(--sidebar-collapsed);
    padding: 40px;
    position: relative;
    z-index: 2;
}


/* Desktop hover motion (PRO: speed + close delay) */
@media (min-width: 769px) {
    .sidebar {
        transition:
            width var(--sidebar-speed) var(--sidebar-ease),
            padding var(--sidebar-speed) var(--sidebar-ease);
        transition-delay: var(--sidebar-close-delay);
    }
    .content {
        transition: margin-left var(--sidebar-speed) var(--sidebar-ease);
        transition-delay: var(--sidebar-close-delay);
    }
    .sidebar:hover {
        width: var(--sidebar-expanded);
        padding: 20px;
        transition-delay: 0ms;
    }
    .sidebar:hover ~ .content {
        margin-left: var(--sidebar-expanded);
        transition-delay: 0ms;
    }
}


/* USER PROFILE */
.user-profile { display: flex; align-items: center; justify-content: center; min-height: 60px; margin-bottom: 20px; padding: 0; transition: 0.3s; border-radius: 12px; cursor: pointer; }
.sidebar:hover .user-profile { justify-content: flex-start; background: rgba(255,255,255,0.05); padding: 10px; gap: 12px; }
.profile-avatar { width: 45px; height: 45px; min-width: 45px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); background: #1e293b; }
.profile-info { opacity: 0; width: 0; white-space: nowrap; transform: translateX(10px); transition: 0.3s; pointer-events: none; display: flex; flex-direction: column; justify-content: center; }
.sidebar:hover .profile-info { opacity: 1; width: auto; transform: translateX(0); }
.profile-name { font-weight: 700; font-size: 0.95rem; color: #fff; line-height: 1.2; }
.profile-role { font-size: 0.75rem; color: var(--primary); font-weight: 600; text-transform: uppercase; margin-top: 2px; }

.btn-login-sidebar { width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(45deg, var(--primary), var(--accent)); color: white; padding: 0; border: none; transition: 0.3s; box-shadow: 0 0 10px rgba(99, 102, 241, 0.5); }
.btn-login-sidebar span { display: none; }
.sidebar:hover .btn-login-sidebar { width: 100%; border-radius: 10px; gap: 10px; }
.sidebar:hover .btn-login-sidebar span { display: inline-block; animation: fadeIn 0.3s; }

/* MENU */
.brand { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; text-align: center; white-space: nowrap; opacity: 0; transform: translateX(-20px); transition: 0.3s; }
.brand i { font-size: 2rem; display: block; margin-bottom: 5px; color: var(--primary); }
.brand span { color: #fff; }
.sidebar:hover .brand { opacity: 1; transform: translateX(0); }

.menu { list-style: none; flex: 1; margin-top: 10px; }
.menu li { padding: 12px; margin-bottom: 8px; border-radius: 10px; cursor: pointer; transition: 0.3s; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 15px; white-space: nowrap; }
.menu li:hover, .menu li.active { background: rgba(255,255,255,0.05); color: white; }
.menu li.active { background: var(--primary); box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); }
.menu li i { font-size: 1.3rem; min-width: 30px; text-align: center; }
.menu li span { opacity: 0; transform: translateX(-10px); transition: 0.3s; }
.sidebar:hover .menu li span { opacity: 1; transform: translateX(0); }

.lang-switch { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; opacity: 0; transition: 0.3s; pointer-events: none; }
.sidebar:hover .lang-switch { opacity: 1; pointer-events: auto; }
.lang-btn { background: var(--glass); color: var(--text-muted); padding: 5px 12px; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; font-size: 0.8rem; }
.lang-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.copyright { font-size: 0.8rem; text-align: center; color: var(--text-muted); margin-top: 10px; opacity: 0; transition: 0.3s; }
.sidebar:hover .copyright { opacity: 1; }

/* UI BASIC */
.section-title { margin-bottom: 25px; font-size: 1.5rem; border-left: 5px solid var(--primary); padding-left: 15px; font-weight: 700; }
.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.glass-card { background: var(--glass); border: 1px solid var(--border); border-radius: 16px; padding: 25px; backdrop-filter: blur(10px); box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); margin-bottom: 20px; }

button { border: none; outline: none; cursor: pointer; font-weight: 600; border-radius: 8px; transition: 0.2s; position: relative; overflow: hidden; font-family: inherit; }
.btn-primary { background: var(--primary); color: white; padding: 10px 20px; width: 100%; }
.btn-success { background: var(--success); color: white; padding: 10px 20px; width: 100%; }
.btn-danger { background: var(--danger); color: white; padding: 10px 20px; }
.btn-cancel { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 10px 20px; }
.btn-glow { background: linear-gradient(45deg, var(--primary), var(--accent)); color: white; width: 100%; padding: 10px; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); }

.input-group { display: flex; gap: 10px; margin-top: 15px; }
input, textarea, select { flex: 1; padding: 12px; border-radius: 8px; border: 1px solid var(--border); background: rgba(0, 0, 0, 0.3); color: white; outline: none; font-size: 0.95rem; }
input:focus, textarea:focus { border-color: var(--primary); background: rgba(0, 0, 0, 0.5); }

/* SHOP CARDS */
.shop-toolbar { margin-bottom: 25px; display: flex; flex-direction: column; gap: 15px; }
.category-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-btn { background: #1e293b; color: #94a3b8; border: 1px solid rgba(255,255,255,0.1); padding: 8px 16px; border-radius: 8px; display: inline-flex; align-items: center; gap: 8px; }
.cat-btn.active, .cat-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.search-box-shop { position: relative; width: 100%; max-width: 400px; }
.search-box-shop i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.search-box-shop input { padding-left: 40px; }

.shop-list-card { display: flex; align-items: center; background: #111827; border: 1px solid #1f2937; border-radius: 10px; padding: 12px 15px; margin-bottom: 10px; gap: 15px; position: relative; }
.shop-list-card:hover { border-color: rgba(99, 102, 241, 0.5); background: #161e2e; }
.card-icon { width: 45px; height: 45px; background: #1f2937; border-radius: 8px; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.card-icon img { width: 100%; height: 100%; object-fit: cover; }
.card-info { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.card-title { font-size: 1rem; font-weight: 600; color: #fff; margin: 0; }
.card-price-highlight { color: #eab308; font-weight: 600; }
.card-right-section { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 100px; flex-shrink: 0; }
.stock-status-box { font-size: 0.75rem; color: #10b981; font-weight: 600; background: rgba(16, 185, 129, 0.1); padding: 3px 8px; border-radius: 4px; }
.stock-status-box.out { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.btn-buy-compact { background: linear-gradient(to right, #f59e0b, #d97706); color: white; padding: 6px 12px; border-radius: 6px; font-size: 0.85rem; display: flex; align-items: center; gap: 5px; z-index: 50; position: relative; }
.btn-buy-compact:disabled { background: #374151; color: #9ca3af; cursor: not-allowed; }

/* MODALS */
.modal { display: none; position: fixed; z-index: 2000 !important; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal-content { background: #1e293b; padding: 30px; border-radius: 16px; width: 90%; max-width: 500px; text-align: center; border: 1px solid var(--primary); animation: zoomIn 0.3s; max-height: 90vh; overflow-y: auto; }
/* [FIX] Modal Blog To */
.modal-lg { max-width: 1100px; width: 95%; height: 90vh; }

.buy-modal-modern { background: #111827; padding: 0; overflow: hidden; border: 1px solid #374151; max-width: 450px; }
.buy-header { padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #374151; }
.buy-body { padding: 20px; }
.info-box-modern { background: rgba(30, 58, 138, 0.4); border: 1px solid #1e40af; border-radius: 8px; padding: 15px; margin-bottom: 20px; color: #e0f2fe; font-size: 0.9rem; text-align: left; }
.qty-section-modern { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.qty-control-group { display: flex; gap: 0; }
.qty-control-group button { width: 35px; height: 35px; background: #374151; color: #fff; border-radius: 4px; }
.qty-control-group input { width: 50px; text-align: center; background: #1f2937; border: none; margin: 0 5px; border-radius: 4px; }
.total-section-modern { background: #1f2937; padding: 15px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.final-price { color: #f97316; font-size: 1.3rem; font-weight: bold; }
.action-buttons-modern { display: flex; gap: 15px; }
.btn-cancel-modern { background: #374151; color: #d1d5db; width: 40%; padding: 12px; border-radius: 8px; }
.btn-confirm-modern { background: #f97316; color: white; width: 60%; padding: 12px; border-radius: 8px; }

/* [FIX] PROVIDER GRID WITH LOGOS */
.provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; margin-bottom: 20px; }
.btn-provider { background: #1e293b; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 15px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: white; transition: all 0.3s; position: relative; overflow: hidden; min-height: 110px; }
.btn-provider:hover { transform: translateY(-5px); border-color: var(--primary); background: rgba(30, 41, 59, 0.8); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); }
.provider-logo { width: 100%; height: 45px; object-fit: contain; background: rgba(255, 255, 255, 0.95); padding: 5px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.provider-name { font-weight: 900; font-size: 0.85rem; color: #e2e8f0; letter-spacing: 0.2px; }
.provider-badge { background: rgba(255, 255, 255, 0.1); color: #eab308; font-weight: bold; font-size: 0.85rem; padding: 4px 10px; border-radius: 20px; border: 1px solid rgba(234, 179, 8, 0.3); }
.btn-provider.linktop { border-bottom: 3px solid #0891b2; }
.btn-provider.yeumoney { border-bottom: 3px solid #831843; }
.btn-provider.traffictot { border-bottom: 3px solid #4c1d95; }
.btn-provider.link4m { border-bottom: 3px solid #00c851; }
.btn-provider.four_mmo { border-bottom: 3px solid #fbbf24; }

/* BLOG GRID & MARKDOWN */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.blog-card { background: #1e293b; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; cursor: pointer; transition: 0.3s; display: flex; flex-direction: column; height: 100%; }
.blog-card:hover { transform: translateY(-8px); border-color: var(--primary); }
.blog-thumb { width: 100%; height: 180px; object-fit: cover; border-bottom: 1px solid var(--border); }
.blog-info { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.blog-title { font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: 10px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.btn-read { margin-top: auto; background: rgba(99, 102, 241, 0.1); color: var(--primary); border: 1px solid var(--primary); padding: 8px 15px; border-radius: 8px; font-size: 0.85rem; align-self: flex-start; }
.btn-read:hover { background: var(--primary); color: white; }

.markdown-body { font-family: sans-serif; font-size: 16px; line-height: 1.6; color: #c9d1d9; background: #0d1117; padding: 25px; border-radius: 12px; border: 1px solid #30363d; }
.markdown-body h1, .markdown-body h2 { border-bottom: 1px solid #21262d; padding-bottom: .3em; margin-top: 24px; margin-bottom: 16px; color: #fff; }
.markdown-body img { max-width: 100%; border-radius: 8px; }

/* CHARTS & TABLES */
.chart-container { position: relative; height: 350px; width: 100%; margin-top: 15px; }
.chart-container.tall { height: 420px; }
.profile-chart-container { background: #1e293b; border-radius: 12px; padding: 20px; border: 1px solid var(--border); margin-top: 20px; height: 350px; position: relative; }
.history-table { width: 100%; border-collapse: collapse; margin-top: 10px; color: var(--text); }
.history-table th { color: var(--primary); text-align: left; padding: 12px; border-bottom: 2px solid var(--border); position: sticky; top: 0; background: #0f172a; z-index: 10; }
.history-table td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.compact-table td, .compact-table th { padding: 8px 5px !important; font-size: 0.85rem; }

/* CLOUD PHONE */
.ug-container { max-width: 600px; width: 100%; margin: 0 auto; background: #111827; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; overflow: hidden; }
.ug-header-banner { background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%); padding: 25px; color: white; }
.ug-logo-area { display: flex; align-items: center; gap: 15px; background: rgba(255,255,255,0.15); padding: 12px 20px; border-radius: 12px; width: fit-content; }
.ug-price-badge { background: rgba(0,0,0,0.2); padding: 3px 10px; border-radius: 20px; font-size: 0.85rem; font-weight: bold; margin-top: 5px; display: inline-block; }
.ug-body { padding: 30px; background: #0f172a; }
.ug-textarea { width: 100%; height: 120px; background: #1e293b; border: 1px solid #334155; color: #a5f3fc; font-family: monospace; padding: 15px; border-radius: 8px; margin-bottom: 20px; }
.ug-server-list { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 25px; }
.ug-server-btn { background: #1e293b; border: 1px solid #334155; color: #cbd5e1; padding: 10px 20px; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.ug-server-btn.active { background: #ef4444; color: white; border-color: #ef4444; }
.ug-create-btn { width: 100%; padding: 16px; font-size: 1.1rem; font-weight: bold; text-transform: uppercase; background: linear-gradient(to right, #ec4899, #8b5cf6); border: none; border-radius: 10px; color: white; cursor: pointer; }
.ug-console { background: #0b0f19; padding: 20px; border-top: 1px solid #1f2937; }
.console-content { height: 160px; overflow-y: auto; font-family: 'Consolas', monospace; font-size: 0.9rem; color: #4ade80; background: rgba(0,0,0,0.2); padding: 10px; border-radius: 6px; }

/* Cloud Phone Upgrade */
.ug-mini-btn { background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.25); color: #fff; padding: 8px 12px; border-radius: 12px; cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; transition: transform 0.15s ease, filter 0.15s ease; }
.ug-mini-btn:hover { transform: translateY(-1px); filter: brightness(1.1); }

.cloud-type-label { color: #e2e8f0; font-weight: 700; margin: 10px 0 8px; }
.cloud-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.cloud-type-btn { background: #1e293b; border: 1px solid #334155; color: #cbd5e1; padding: 10px 12px; border-radius: 12px; cursor: pointer; font-weight: 700; transition: 0.15s; }
.cloud-type-btn b { color: #fff; }
.cloud-type-btn:hover { filter: brightness(1.1); }
.cloud-type-btn.active { background: rgba(236,72,153,0.2); border-color: rgba(236,72,153,0.55); box-shadow: 0 0 14px rgba(236,72,153,0.25); color: #fff; }

.cloud-hint { margin: -10px 0 16px; color: #94a3b8; font-size: 0.85rem; line-height: 1.4; }
.cloud-hint code { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 6px; color: #a5f3fc; }

.cloud-btn-row { display: flex; gap: 12px; }
.cloud-btn-row button { flex: 1; }
.ug-check-btn { background: linear-gradient(to right, #10b981, #22c55e); border: none; border-radius: 10px; color: #fff; cursor: pointer; padding: 16px; font-size: 1.05rem; font-weight: 900; text-transform: uppercase; }

.ug-status-card { background: rgba(15, 23, 42, 0.9); border-top: 1px solid rgba(255,255,255,0.08); padding: 18px 20px 22px; }
.ug-status-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

.ug-status-meta { margin: -6px 0 10px; color: #94a3b8; font-size: 0.85rem; display: flex; align-items: center; gap: 8px; }
.ug-status-title { font-weight: 900; color: #e2e8f0; display: flex; align-items: center; gap: 10px; }
.ug-status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ug-status-empty { grid-column: 1 / -1; text-align: center; color: #94a3b8; padding: 12px; border: 1px dashed rgba(255,255,255,0.12); border-radius: 12px; background: rgba(30,41,59,0.25); }
.ug-status-pill { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); background: rgba(30,41,59,0.55); }
.ug-status-pill .k { color: #cbd5e1; font-weight: 800; }
.ug-status-pill .v {font-weight: 900; font-size: 1.2rem; }
.ug-status-pill.ok .v { color: #34d399; }
.ug-status-pill.bad .v { color: #f87171; }

.ug-status-pill.unk { opacity: 0.85; }
.ug-status-pill.unk .v { color: #94a3b8; }
.ug-status-note { margin-top: 10px; color: #94a3b8; font-size: 0.85rem; }

@media (max-width: 560px) {
    .cloud-type-grid { grid-template-columns: 1fr; }
    .cloud-btn-row { flex-direction: column; }
    .ug-status-grid { grid-template-columns: 1fr; }
}

/* MISC */
.top-bar { display: flex; justify-content: space-between; align-items: center; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(12px); padding: 15px 30px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); position: sticky; top: 0; z-index: 90; margin: -40px -40px 30px -40px; }
.coin-display-box { background: rgba(30, 41, 59, 0.8); border: 1px solid rgba(99, 102, 241, 0.3); padding: 6px 15px; border-radius: 20px; display: flex; align-items: center; }
.notif-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; display: flex; justify-content: center; align-items: center; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); }
.notif-badge { position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; background: #ef4444; border-radius: 50%; display: none; }
.intro-box { margin-top: 20px; }
.social-grid-large { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-top: 15px; }
.social-btn-lg { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border-radius: 12px; font-weight: bold; color: white; text-decoration: none; transition: transform 0.2s; }
.social-btn-lg:hover { transform: translateY(-3px); filter: brightness(1.2); }
.social-btn-lg.youtube { background: #ef4444; } .social-btn-lg.discord { background: #5865F2; } .social-btn-lg.facebook { background: #1877F2; } .social-btn-lg.tiktok { background: #000; border: 1px solid #333; }

/* FIX LEADERBOARD */
.lb-container { background: var(--glass); border-radius: 12px; padding: 20px; overflow: hidden; }
.lb-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
.lb-title { font-size: 1.2rem; font-weight: 700; color: #eab308; }
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th { text-align: left; color: var(--text-muted); font-size: 0.85rem; padding-bottom: 15px; }
.lb-table td { padding: 12px 5px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.lb-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); background: #1e293b; vertical-align: middle; }
.lb-user-cell { display: flex; align-items: center; gap: 10px; }
.lb-name { font-weight: 600; color: #fff; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-rank-badge { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); border-radius: 50%; font-weight: bold; color: #fff; }
.rank-1 .lb-rank-badge { background: #eab308; color: #000; box-shadow: 0 0 10px #eab308; }
.rank-2 .lb-rank-badge { background: #94a3b8; color: #000; }
.rank-3 .lb-rank-badge { background: #b45309; color: #fff; }

/* LIVE ACTIVITY */
.live-activity-box { background: var(--glass); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-top: 25px; max-height: 400px; overflow-y: auto; }
.activity-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); transition: background 0.2s; }
.activity-item:hover { background: rgba(255,255,255,0.03); }
.act-avatar { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; border: 1px solid #555; }
.act-content { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.act-row-top { font-size: 0.9rem; color: #cbd5e1; }
.act-row-bot { font-size: 0.75rem; color: #64748b; display: flex; justify-content: space-between; }
.act-user { color: #fff; font-weight: bold; }
.act-item { color: var(--primary); font-weight: 600; }
.act-time { color: #94a3b8; font-size: 0.75rem; }

/* PROFILE HEADER */
.profile-header-new { background: linear-gradient(to right, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1)); border: 1px solid var(--border); border-radius: 16px; padding: 25px; display: flex; align-items: center; gap: 25px; margin-bottom: 25px; position: relative; overflow: hidden; }
.p-avatar-box { position: relative; flex-shrink: 0; }
.p-avatar-img { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--primary); object-fit: cover; }
.p-avatar-badge { position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; font-weight: bold; }
.p-info { flex: 1; min-width: 0; }
.p-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.p-name { margin: 0; font-size: 1.5rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-edit-btn { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 0.9rem; }
.p-edit-btn:hover { color: #fff; }
.p-uid, .p-join-date { font-size: 0.85rem; color: #94a3b8; font-family: monospace; }
.profile-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 20px; }
.p-stat-card { background: rgba(30, 41, 59, 0.6); padding: 15px; border-radius: 12px; text-align: center; border: 1px solid var(--border); }
.p-stat-title { font-size: 0.75rem; color: #94a3b8; text-transform: uppercase; margin-bottom: 5px; }
.p-stat-value { font-size: 1.1rem; font-weight: bold; color: #fff; }
.p-stat-value.deposit { color: #eab308; }
.p-stat-value.earned { color: #10b981; }
.p-stat-value.bought { color: #f472b6; }
.network-dual { display: flex; flex-direction: column; gap: 5px; }
.ip-v4 { color: #4ade80; font-family: monospace; }
.ip-v6 { color: #a78bfa; font-family: monospace; font-size: 0.85rem; }
.referral-box { background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 78, 59, 0.2)); border: 1px dashed #10b981; border-radius: 16px; padding: 25px; margin-bottom: 20px; text-align: center; }
.ref-code-display { background: #0f172a; border: 1px solid #334155; padding: 15px; border-radius: 8px; font-family: monospace; color: #eab308; font-size: 1.1rem; margin: 10px 0; word-break: break-all; user-select: all; }

/* TEMP MAIL */
.tool-switcher { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; }
.tool-btn { background: rgba(30, 41, 59, 0.6); color: #94a3b8; border: 1px solid rgba(255, 255, 255, 0.1); padding: 12px 25px; border-radius: 30px; font-size: 1rem; transition: all 0.3s; display: flex; align-items: center; gap: 8px; }
.tool-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.tool-btn.active { background: var(--primary); color: white; box-shadow: 0 0 15px rgba(99, 102, 241, 0.4); border-color: var(--primary); }
.temp-mail-controls { display: flex; flex-direction: column; gap: 20px; margin-bottom: 30px; }
.tm-screen { background: #0f172a; border: 1px solid #334155; padding: 20px; border-radius: 12px; text-align: center; position: relative; overflow: hidden; }
.tm-screen::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, #ec4899, #8b5cf6, #3b82f6); }
.tm-label { font-size: 0.85rem; color: #94a3b8; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }
.tm-display { font-family: 'Consolas', monospace; font-size: 1.5rem; color: #4ade80; font-weight: bold; margin-bottom: 10px; word-break: break-all; }
.tm-display i, .tm-pass-display i { font-size: 1rem; color: #94a3b8; cursor: pointer; margin-left: 10px; transition: 0.2s; }
.tm-display i:hover { color: #fff; transform: scale(1.2); }
.tm-pass-display { color: #cbd5e1; font-family: monospace; background: rgba(255,255,255,0.1); display: inline-block; padding: 4px 10px; border-radius: 4px; }
.tm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tm-inbox-container { background: rgba(15, 23, 42, 0.6); border-radius: 12px; padding: 20px; min-height: 300px; }
.tm-list { display: flex; flex-direction: column; gap: 10px; }
.tm-item { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.05); padding: 15px; border-radius: 8px; cursor: pointer; transition: 0.2s; display: flex; justify-content: space-between; align-items: center; }
.tm-item:hover { background: rgba(99, 102, 241, 0.1); border-color: var(--primary); transform: translateX(5px); }
.tm-from { font-weight: bold; color: #fff; margin-bottom: 3px; }
.tm-subject { color: #cbd5e1; font-size: 0.9rem; }
.tm-date { font-size: 0.75rem; color: #64748b; white-space: nowrap; margin-left: 10px; }

/* THEME GRID */
.theme-selector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; margin-top: 15px; }
.theme-btn { background: rgba(30, 41, 59, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); color: #cbd5e1; padding: 15px 10px; border-radius: 12px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 500; text-align: center; position: relative; overflow: hidden; }
.theme-btn:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-3px); border-color: var(--primary); color: white; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.theme-btn:nth-child(1) { border-bottom: 3px solid #3b82f6; } 
.theme-btn:nth-child(2) { border-bottom: 3px solid #ef4444; } 
.theme-btn:nth-child(3) { border-bottom: 3px solid #ec4899; } 
.theme-btn:nth-child(4) { border-bottom: 3px solid #f97316; } 
.theme-btn:nth-child(5) { border-bottom: 3px solid #10b981; } 
.theme-btn:nth-child(6) { border-bottom: 3px solid #94a3b8; } 

body.theme-tet { --bg: #2b0a0a; --sidebar-bg: rgba(69, 10, 10, 0.98); --primary: #fbbf24; --accent: #ef4444; --success: #f59e0b; --text: #fffbeb; --glass: rgba(251, 191, 36, 0.05); --border: rgba(251, 191, 36, 0.15); --fx-spot-a: rgba(251,191,36,0.18); --fx-spot-b: rgba(239,68,68,0.10); --fx-orb1: rgba(251,191,36,0.55); --fx-orb2: rgba(239,68,68,0.45); --fx-orb3: rgba(234,179,8,0.32);  background-image: radial-gradient(circle at 10% 20%, rgba(239, 68, 68, 0.15) 0%, transparent 20%), radial-gradient(circle at 90% 80%, rgba(251, 191, 36, 0.1) 0%, transparent 20%); }
body.theme-valentine { --bg: #1f0a15; --sidebar-bg: rgba(80, 7, 36, 0.95); --primary: #f472b6; --accent: #ec4899; --text: #fce7f3; --glass: rgba(236, 72, 153, 0.08); --border: rgba(244, 114, 182, 0.15); --fx-spot-a: rgba(244,114,182,0.18); --fx-spot-b: rgba(168,85,247,0.10); --fx-orb1: rgba(244,114,182,0.55); --fx-orb2: rgba(236,72,153,0.45); --fx-orb3: rgba(168,85,247,0.30);  background-image: radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.15) 0%, transparent 50%), radial-gradient(circle at 0% 100%, rgba(139, 92, 246, 0.1) 0%, transparent 30%); }
body.theme-midautumn { --bg: #0b0f19; --sidebar-bg: rgba(15, 23, 42, 0.95); --primary: #f97316; --accent: #eab308; --glass: rgba(249, 115, 22, 0.08); --border: rgba(249, 115, 22, 0.2); --fx-spot-a: rgba(249,115,22,0.18); --fx-spot-b: rgba(234,179,8,0.10); --fx-orb1: rgba(249,115,22,0.55); --fx-orb2: rgba(234,179,8,0.45); --fx-orb3: rgba(251,146,60,0.28);  background-image: radial-gradient(circle at 80% 10%, rgba(234, 179, 8, 0.2) 0%, transparent 25%), radial-gradient(circle at 20% 90%, rgba(249, 115, 22, 0.1) 0%, transparent 30%); }
body.theme-christmas { --bg: #061814; --sidebar-bg: rgba(6, 78, 59, 0.95); --primary: #10b981; --accent: #ef4444; --text: #ecfdf5; --glass: rgba(255, 255, 255, 0.05); --border: rgba(16, 185, 129, 0.2); --fx-spot-a: rgba(16,185,129,0.18); --fx-spot-b: rgba(239,68,68,0.10); --fx-orb1: rgba(16,185,129,0.50); --fx-orb2: rgba(239,68,68,0.38); --fx-orb3: rgba(5,150,105,0.28);  background-image: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.15) 0%, transparent 70%); }
body.theme-blackfriday { --bg: #000000; --sidebar-bg: #0a0a0a; --primary: #ffffff; --accent: #333333; --text: #ffffff; --text-muted: #a3a3a3; --glass: rgba(255, 255, 255, 0.05); --border: rgba(255, 255, 255, 0.15); --success: #fff; --danger: #fff; --fx-spot-a: rgba(255,255,255,0.08); --fx-spot-b: rgba(255,255,255,0.03); --fx-orb1: rgba(255,255,255,0.22); --fx-orb2: rgba(255,255,255,0.14); --fx-orb3: rgba(255,255,255,0.10);  background-image: none; }

.mobile-toggle { display: none; }
@media (max-width: 768px) {
    .sidebar { width: 280px; left: -100%; background: #0f172a; box-shadow: 5px 0 20px rgba(0,0,0,0.8); transition: left 0.3s ease; position: fixed; height: 100%; z-index: 1000; padding: 20px; align-items: flex-start; flex-direction: column; }
    .sidebar.active { left: 0; width: 280px; }
    .content { margin-left: 0 !important; width: 100% !important; padding: 15px; }
    .mobile-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 1.5rem; color: #fff; cursor: pointer; margin-right: 10px; background: rgba(255,255,255,0.1); border-radius: 8px; }
    .modal-content { width: 95%; max-height: 90vh; overflow-y: auto; }
}

/* ===============================
   Zendax v2: mượt + dễ đọc hơn
   (override an toàn, không phá layout cũ)
   =============================== */

:root{
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 14px 40px rgba(0,0,0,.28);
  --container: 1180px;
}

body{
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Modal mượt hơn trên mobile */
.modal-content{ -webkit-overflow-scrolling: touch; }

/* ===== Blog Read (xem chi tiết) ===== */
.blog-modal.modal-lg{
  max-width: min(1100px, 95vw);
  width: 95%;
  height: min(90vh, 920px);
  padding: 26px 28px;
}

.blog-modal #blogReadTitle{
  font-size: clamp(1.35rem, 1.8vw, 2.05rem);
  line-height: 1.25;
  margin: 16px 0 10px;
}

.blog-modal #blogReadMeta{
  font-size: 0.95rem;
}

.blog-modal #blogReadImage{
  height: clamp(220px, 32vh, 360px) !important;
  border-radius: 14px !important;
}

.blog-read-content{ margin-top: 16px; }

.blog-modal .markdown-body{
  font-size: clamp(17px, 1.0vw, 20px);
  line-height: 1.85;
  color: #e5e7eb;
  max-width: 75ch;
  margin: 0 auto;
  padding: 24px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .35);
  border: 1px solid rgba(148, 163, 184, .18);
}

.blog-modal .markdown-body p{ margin: 0 0 .95em; }
.blog-modal .markdown-body h1{ font-size: clamp(1.55rem, 2.3vw, 2.2rem); }
.blog-modal .markdown-body h2{ font-size: clamp(1.35rem, 2.0vw, 1.85rem); }
.blog-modal .markdown-body h3{ font-size: clamp(1.15rem, 1.6vw, 1.45rem); }

.blog-modal .markdown-body a{
  color: #a5b4fc;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.blog-modal .markdown-body blockquote{
  border-left: 4px solid rgba(99, 102, 241, .85);
  padding-left: 14px;
  color: #cbd5e1;
  opacity: .95;
}

/* ===== Performance (lists dài) ===== */
.shop-category-section,
.shop-list-card,
.blog-card{
  content-visibility: auto;
}

.shop-category-section{ contain-intrinsic-size: 520px; }
.shop-list-card{ contain-intrinsic-size: 220px; will-change: transform; }
.blog-card{ contain-intrinsic-size: 320px; }

/* ===== Giảm hiệu ứng nếu người dùng bật Reduce Motion ===== */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .blog-card:hover, .shop-list-card:hover{ transform: none !important; }
  .snow-container{ display: none !important; }
}

/* ---------------------------------------------------------
   CANVAS FX (Emoji Particles)
   - overlay above content, below modals
--------------------------------------------------------- */
.fx-canvas{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  /* Đặt dưới UI để tránh che chữ gây "vỡ" giao diện */
  z-index: 1;
  opacity: 0.65;
  display: block;
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce){
  /* Tôn trọng reduced-motion: tắt snow mặc định.
     Canvas FX vẫn cho phép bật thủ công trong Profile (JS sẽ tự throttle). */
  .snow-container{ display:none; }
}

/* ---------------------------------------------------------
   Profile: FX controls
--------------------------------------------------------- */
.fx-card .fx-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:10px;
  flex-wrap:wrap;
}
.fx-card .fx-row label{
  display:flex;
  align-items:center;
  gap:8px;
  color:#cbd5e1;
  font-size:0.95rem;
}
.fx-card .fx-hint{
  margin-top:10px;
  color:#94a3b8;
  font-size:0.85rem;
  line-height:1.4;
}

/* Switch (toggle) */
.fx-switch{
  display:flex;
  align-items:center;
  gap:10px;
}
.fx-switch input[type="checkbox"]{
  width:44px;
  height:24px;
  appearance:none;
  background:rgba(255,255,255,0.15);
  border:1px solid rgba(255,255,255,0.18);
  border-radius:999px;
  position:relative;
  outline:none;
  cursor:pointer;
  transition:all .2s ease;
}
.fx-switch input[type="checkbox"]::after{
  content:"";
  width:18px;
  height:18px;
  background:#fff;
  border-radius:50%;
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  left:3px;
  transition:all .2s ease;
}
.fx-switch input[type="checkbox"]:checked{
  background:rgba(16,185,129,0.35);
  border-color:rgba(16,185,129,0.55);
}
.fx-switch input[type="checkbox"]:checked::after{
  left:23px;
}

/* PRO controls (range + number) */
.fx-adv{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255,255,255,0.12);
}
.fx-adv-title{
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fx-adv-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.fx-adv-row label{
  color: #cbd5e1;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}
.fx-adv-controls{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
}
.fx-range{
  flex: 1;
  accent-color: var(--primary);
}
.fx-number{
  width: 96px;
  max-width: 35vw;
  text-align: center;
}
.fx-pill{
  font-family: monospace;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
}



/* PRO+ UI grid (Profile) */
.fx-plus-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px 12px;
  margin-top: 10px;
}
.fx-plus-grid label{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: #cbd5e1;
  font-size: 0.92rem;
}
.fx-plus-grid input{
  accent-color: var(--primary);
}

/* ---------------------------------------------------------
   PRO+ FX (Spotlight / Ripple / Tilt / Magnetic / Orbs / Progress)
   - Bật/tắt trong Profile (PRO+)
--------------------------------------------------------- */

/* Cursor spotlight (nhẹ, sang) */
.cursor-spotlight{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity .25s ease;
  background: radial-gradient(520px circle at var(--spot-x, 50vw) var(--spot-y, 30vh),
    var(--fx-spot-a),
    var(--fx-spot-b) 35%,
    transparent 70%);
}
body.fx-spotlight .cursor-spotlight{ opacity: 1; }

/* Scroll progress bar */
.scroll-progress{
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 2500; /* above sidebar, below sweetalert maybe */
  pointer-events: none;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 0 18px rgba(99,102,241,0.25);
  border-bottom-right-radius: 999px;
}
@media (prefers-reduced-motion: reduce){
  .scroll-progress{ display:none; }
}

/* Background orbs (parallax) */
.fx-orbs{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.fx-orbs .orb{
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.18;
  transform: translate3d(0,0,0);
  will-change: transform;
}
.fx-orbs .orb1{ width: 520px; height: 520px; top: -140px; left: -160px; background: var(--fx-orb1); animation: orbFloat1 16s ease-in-out infinite; }
.fx-orbs .orb2{ width: 420px; height: 420px; bottom: -160px; right: -140px; background: var(--fx-orb2); animation: orbFloat2 18s ease-in-out infinite; }
.fx-orbs .orb3{ width: 360px; height: 360px; top: 35%; right: 10%; background: var(--fx-orb3); animation: orbFloat3 20s ease-in-out infinite; }
@keyframes orbFloat1{ 0%,100%{ transform: translate3d(0,0,0) } 50%{ transform: translate3d(40px, 30px, 0) } }
@keyframes orbFloat2{ 0%,100%{ transform: translate3d(0,0,0) } 50%{ transform: translate3d(-36px, -26px, 0) } }
@keyframes orbFloat3{ 0%,100%{ transform: translate3d(0,0,0) } 50%{ transform: translate3d(22px, -18px, 0) } }
@media (prefers-reduced-motion: reduce){
  .fx-orbs{ display:none; }
}

/* Ripple click */
.fx-ripple{
  position: relative;
  overflow: hidden;
}
.fx-ripple .ripple-wave{
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: rippleWave .6s ease-out forwards;
  background: rgba(255,255,255,0.35);
  pointer-events: none;
}
@keyframes rippleWave{
  to{ transform: scale(3.8); opacity: 0; }
}

/* Tilt + Magnetic (nghiêng theo chuột) */
.fx-tilt{
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 170ms ease;
  transform:
    perspective(900px)
    translate3d(var(--fx-mag-x, 0px), var(--fx-mag-y, 0px), 0px)
    rotateX(var(--fx-tilt-rx, 0deg))
    rotateY(var(--fx-tilt-ry, 0deg));
}
.fx-tilt.fx-tilt-leave{ transition: transform 280ms ease; }
.fx-tilt::after{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events:none;
  opacity: var(--fx-glare, 0);
  transition: opacity .22s ease;
  background: radial-gradient(circle at var(--fx-glare-x, 50%) var(--fx-glare-y, 50%),
    rgba(255,255,255,0.28),
    rgba(255,255,255,0.10) 35%,
    transparent 60%);
  mix-blend-mode: overlay;
}
.fx-tilt.fx-tilt-active::after{ opacity: 1; }

/* Hover zoom images */
body.fx-hoverzoom .shop-list-card:hover .card-icon img,
body.fx-hoverzoom .blog-card:hover .blog-thumb{
  transform: scale(1.06);
}
.card-icon img, .blog-thumb{
  transition: transform .35s ease;
  will-change: transform;
}

/* Micro animations */
@keyframes coinBump{
  0%{ transform: translateY(0) scale(1); }
  45%{ transform: translateY(-2px) scale(1.08); }
  100%{ transform: translateY(0) scale(1); }
}
.coin-bump{
  animation: coinBump .35s ease;
}
@keyframes badgePulse{
  0%,100%{ transform: scale(1); }
  50%{ transform: scale(1.08); }
}
.badge-pulse{
  animation: badgePulse .9s ease-in-out infinite;
}


/* ==================== PATCH: UI Fix + Smooth Effects (2025-12-27) ==================== */

/* Keyframes (được dùng ở modal nhưng file cũ thiếu) */
@keyframes zoomIn {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Mobile overlay (để đóng menu khi bấm ra ngoài) */
.mobile-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.mobile-overlay.active{
  opacity: 1;
  pointer-events: auto;
}

/* Notification badge: hỗ trợ hiển thị số (badge cũ bị bé quá) */
.notif-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 800;
  color: #fff;
  background: #ef4444;
  border: 2px solid rgba(15,23,42,0.85);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}

/* Skeleton Loader (JS đã dùng class nhưng CSS cũ chưa có) */
.skeleton-box{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,23,42,0.55);
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
}
.skeleton-box::after{
  content: "";
  position: absolute;
  top: 0;
  left: -160px;
  width: 160px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: shimmer 1.1s infinite;
}
@keyframes shimmer{
  0%   { transform: translateX(0); }
  100% { transform: translateX(720px); }
}
.sk-icon{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
}
.sk-info{ flex: 1; }
.sk-line{
  height: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  margin-bottom: 8px;
}
.sk-line.short{ width: 60%; margin-bottom: 0; }
.sk-btn{
  width: 90px;
  height: 32px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
}
@media (prefers-reduced-motion: reduce){
  .skeleton-box::after{ animation: none; }
}

/* Scroll reveal (nhẹ, mượt) */
.reveal{
  opacity: 0;
  transform: translateY(12px);
  filter: blur(2px);
  transition: opacity .55s ease, transform .55s ease, filter .55s ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}
.reveal.reveal-in{
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform: none; filter: none; transition: none; }
}

/* Shop: các class JS/HTML đang dùng nhưng CSS cũ thiếu */
.shop-category-section{ margin-bottom: 16px; }
.category-header{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 10px;
  font-weight: 800;
  color: #e2e8f0;
}
.product-list{ display: flex; flex-direction: column; gap: 10px; }

.card-icon-fallback{
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 900;
  color: #e2e8f0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
}
.card-meta-compact{ display: flex; align-items: center; gap: 8px; color: #94a3b8; font-size: 0.92rem; }

.card-badge-hot{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 8px;
  margin-left: 8px;
  background: rgba(234,179,8,0.12);
  border: 1px solid rgba(234,179,8,0.35);
  color: #eab308;
}

.flash-badge{
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(239,68,68,0.18);
  border: 1px solid rgba(239,68,68,0.35);
  color: #fecaca;
  letter-spacing: 0.2px;
}
.flash-old-price{
  color: #94a3b8;
  text-decoration: line-through;
  margin-right: 6px;
  font-size: 0.85rem;
}

/* Bọc table để scroll mượt (HTML đang dùng class này) */
.table-scroll-container{
  width: 100%;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,23,42,0.35);
}
.table-scroll-container table{
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
.table-scroll-container thead th{
  position: sticky;
  top: 0;
  background: rgba(15,23,42,0.95);
  backdrop-filter: blur(8px);
  z-index: 1;
}
.table-scroll-container th,
.table-scroll-container td{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: left;
  vertical-align: middle;
}
.scroll-limit-10{ max-height: 460px; }
.scroll-limit-15{ max-height: 640px; }

/* Deposit card (HTML có class nhưng CSS cũ thiếu) */
.deposit-card{
  background: rgba(17,24,39,0.72);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.deposit-card h3{ margin-top: 10px; font-weight: 900; color: #e2e8f0; }
.deposit-card p{ color: #94a3b8; }

/* Admin grid (HTML có class nhưng CSS cũ thiếu) */
.admin-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 900px){
  .admin-grid{ grid-template-columns: 1fr; }
}

/* Mobile: hiển thị menu labels + language switch (tránh phụ thuộc hover) */
@media (max-width: 768px){
  .sidebar .brand{
    opacity: 1 !important;
    transform: none !important;
    text-align: left !important;
  }
  .sidebar .profile-info{
    opacity: 1 !important;
    width: auto !important;
    transform: none !important;
    pointer-events: auto !important;
  }
  .sidebar .menu li span{
    opacity: 1 !important;
    transform: none !important;
  }
  .sidebar .lang-switch{
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }
  .sidebar .copyright{
    opacity: 1 !important;
    transform: none !important;
  }
  .btn-login-sidebar span{ display: inline-block !important; }

  /* topbar: tránh margin âm quá lớn trên mobile */
  .top-bar{
    margin: -15px -15px 20px -15px;
    padding: 12px 15px;
  }
}



/* =========================================================
   SHOP UI (giống image104/image105)
   - Card dạng grid + filter dạng pill trong box
========================================================= */

/* Center layout giống ảnh */
#shop .intro-card,
#shop .shop-toolbar,
#shop #shopContainer,
#shop .live-activity-box{
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Toolbar */
.shop-toolbar{
  gap: 14px;
}

/* Filter box */
.category-filters{
  background: rgba(17, 24, 39, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 14px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  box-shadow: 0 18px 45px rgba(0,0,0,0.25);
}

/* Filter pill */
.cat-btn{
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.2px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255,255,255,0.10);
  color: #cbd5e1;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.cat-btn i{ opacity: 0.95; }
.cat-btn .cat-count{
  opacity: 0.85;
  font-weight: 900;
}
.cat-btn:hover{
  background: rgba(30, 41, 59, 0.55);
  border-color: rgba(255,255,255,0.16);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}
.cat-btn.active{
  background: linear-gradient(135deg, rgba(244,63,94,0.95) 0%, rgba(236,72,153,0.92) 100%);
  border-color: rgba(236,72,153,0.45);
  color: #fff;
  box-shadow: 0 12px 30px rgba(236,72,153,0.25);
}

/* Category header */
.shop-category-section{ margin-top: 20px; }
.category-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin: 18px 0 10px;
}
.category-title{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  color: #f1f5f9;
}
.category-title i{
  color: #93c5fd;
}
.category-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  color: #fff;
  background: rgba(236, 72, 153, 0.18);
  border: 1px solid rgba(236,72,153,0.28);
}
.category-divider{
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06), rgba(255,255,255,0.10));
  margin-bottom: 14px;
}

/* Product grid */
.product-list{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}
@media (max-width: 900px){
  .product-list{ grid-template-columns: 1fr; }
}

/* Product card */
.shop-list-card{
  background: rgba(17, 24, 39, 0.70);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  padding: 16px;
  position: relative;
  display:flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.shop-list-card:hover{
  border-color: rgba(236,72,153,0.28);
  background: rgba(17, 24, 39, 0.82);
  box-shadow: 0 18px 44px rgba(0,0,0,0.30);
}

/* ID badge (top-right) */
.product-id-badge{
  position:absolute;
  top: 12px;
  right: 12px;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #fda4af;
  border: 1px solid rgba(244,63,94,0.55);
  background: rgba(15, 23, 42, 0.65);
}

/* Card layout */
.card-top{
  display:flex;
  gap: 14px;
  align-items: flex-start;
}

.card-icon{
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex-shrink: 0;
}
.shop-list-card .card-icon img{
  width:100%;
  height:100%;
  object-fit: cover;
}
.shop-list-card .card-icon-fallback{
  width: 100%;
  height: 100%;
  border-radius: 16px;
}

.card-info{
  flex: 1;
  display:flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.card-title{
  margin: 0;
  color: #fff;
  font-weight: 900;
  font-size: 1.0rem;
  line-height: 1.25;
  letter-spacing: 0.2px;
}

/* Badges row */
.pill-row{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  white-space: nowrap;
}
.pill i{ opacity: 0.95; }
.pill-price{
  background: rgba(236,72,153,0.14);
  border-color: rgba(236,72,153,0.28);
  color: #f472b6;
}
.pill-stock{
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.22);
  color: #93c5fd;
}
.pill-stock.out{
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.24);
  color: #fca5a5;
}
.pill-discount{
  background: rgba(245,158,11,0.14);
  border-color: rgba(245,158,11,0.24);
  color: #fbbf24;
}

/* Public desc */
.card-public-desc{
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.35;
  white-space: pre-line;
}

/* Actions */
.card-actions{
  display:flex;
  gap: 12px;
  margin-top: 2px;
}
.btn-info-compact,
.btn-buy-compact{
  flex: 1;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 0.92rem;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.10);
}

.btn-info-compact{
  background: rgba(148,163,184,0.12);
  border-color: rgba(148,163,184,0.22);
  color: #e2e8f0;
}
.btn-info-compact:hover{
  background: rgba(148,163,184,0.18);
}

.btn-buy-compact{
  background: linear-gradient(135deg, rgba(244,63,94,0.95) 0%, rgba(236,72,153,0.92) 100%);
  border-color: rgba(236,72,153,0.30);
  color: #fff;
  box-shadow: 0 12px 28px rgba(236,72,153,0.18);
}
.btn-buy-compact:hover{
  box-shadow: 0 14px 34px rgba(236,72,153,0.22);
}
.btn-buy-compact:disabled{
  background: rgba(148,163,184,0.18);
  border-color: rgba(148,163,184,0.20);
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

/* Mobile: buttons stack nhẹ */
@media (max-width: 420px){
  .card-actions{ flex-direction: column; }
}

/* Search box align với filter box */
.search-box-shop{
  max-width: 520px;
}
/* ================================
   AUTH (Login / Register) UI
================================= */
.auth-card { max-width: 560px; margin: 0 auto; }
.auth-subtitle { color:#94a3b8; margin-top:-8px; margin-bottom: 15px; text-align:center; }
.auth-methods { display:flex; flex-direction:column; gap:12px; }

.btn-provider.auth-google { 
    flex-direction: row; 
    align-items: center; 
    justify-content: flex-start; 
    gap: 12px; 
    min-height: auto; 
    padding: 16px 14px; 
    text-align: left;
}
.btn-provider.auth-google i { font-size: 1.6rem; }
.btn-provider.auth-google .auth-provider-text { display:flex; flex-direction:column; gap:2px; }
.auth-provider-title { font-weight: 700; color: #fff; }
.auth-provider-desc { font-size: 0.85rem; color: #94a3b8; }

.auth-divider { display:flex; align-items:center; gap:12px; margin:22px 0; color:#94a3b8; font-size:0.9rem; }
.auth-divider::before, .auth-divider::after { content:""; flex:1; height:1px; background:rgba(255,255,255,0.1); }

.auth-stack { display:flex; flex-direction:column; gap:10px; margin-top:15px; }

.auth-footer { margin-top: 14px; display:flex; justify-content:center; gap:8px; flex-wrap:wrap; }
.auth-link { color: #a5b4fc; text-decoration:none; font-weight:700; }
.auth-link:hover { text-decoration:underline; }

/* Extra actions under Login form (Forgot password / Change email) */
.auth-actions{
    margin-top: 10px;
    display:flex;
    justify-content:space-between;
    gap:10px;
    flex-wrap:wrap;
}
.auth-actions a{
    font-size: 0.92rem;
    font-weight: 700;
}
.auth-actions .auth-link-muted{
    color:#94a3b8;
    font-weight:600;
    font-size:0.85rem;
}

.auth-note { 
    margin-top: 18px; 
    display:flex; 
    gap:10px; 
    align-items:flex-start; 
    background: rgba(255,255,255,0.04); 
    border: 1px solid rgba(255,255,255,0.08); 
    padding: 12px 14px; 
    border-radius: 12px; 
    color: #94a3b8; 
    font-size: 0.9rem;
}
.auth-note i { margin-top:2px; color: #60a5fa; }
.auth-note.warning { border-left: 4px solid #eab308; }
.auth-note.warning i { color: #fbbf24; }

/* ================================
   hCaptcha UI
================================= */
.hcaptcha-wrap{
    margin-top: 12px;
    display: flex;
    justify-content: center;
}
/* tránh tràn ngang ở màn nhỏ */
@media (max-width: 420px){
    .hcaptcha-wrap{ overflow-x: auto; }
}
