:root {
  
    --bg-main: #0b071a; 
    --card-bg: rgba(25, 18, 48, 0.65); 
    --card-border: rgba(168, 85, 247, 0.25); 
    
    --primary: #a855f7; 
    --primary-grad: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%); 
    --primary-glow: rgba(168, 85, 247, 0.4);
    
    --secondary: #3b82f6; 
    
    --gold: #FBBF24; 
    --gold-glow: rgba(251, 191, 36, 0.4);
    --cyan: #00F2EA; 
    --cyan-glow: rgba(0, 242, 234, 0.4);
    --purple: #d946ef;
    --purple-glow: rgba(217, 70, 239, 0.4);
    --red: #f43f5e;
    --green: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }

body { 
    background-color: var(--bg-main); 
    color: var(--text-main); 
    height: 100vh; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    position: relative; 
    background-image: 
        radial-gradient(circle at 15% 0%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 100%, rgba(147, 51, 234, 0.15) 0%, transparent 50%);
}

/* --- Animated Ambient Background --- */
.ambient-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; filter: blur(90px); opacity: 0.5; border-radius: 50%; animation: float 10s infinite ease-in-out alternate; }
.blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: #4f46e5; animation-delay: 0s; }
.blob-2 { bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: rgba(147, 51, 234, 0.6); animation-delay: -5s; }
.blob-3 { top: 40%; left: 50%; width: 40vw; height: 40vw; background: rgba(59, 130, 246, 0.3); animation-delay: -2s; transform: translate(-50%, -50%); }
@keyframes float { 0% { transform: translateY(0) scale(1); } 100% { transform: translateY(30px) scale(1.1); } }

a { text-decoration: none; } 
input, button { outline: none; border: none; font-family: inherit; }

::-webkit-scrollbar { width: 0px; background: transparent; }

#auth-screen, #main-app, .modal, #toast-container, .floating-tele { position: relative; z-index: 10; }

/* --- LOGO --- */
.logo-container { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 30px; }
.custom-logo-large { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 0 10px var(--primary-glow)); animation: pulse 2.5s infinite ease-in-out; }
.custom-logo-small { width: 32px; height: 32px; object-fit: contain; }
.logo-txt-main { font-size: 32px; font-family: 'Montserrat', sans-serif; font-weight: 900; letter-spacing: -1.5px; color: white; }
.logo-txt-sub { font-family: 'Oswald', sans-serif; font-size: 32px; font-style: italic; color: var(--primary); text-shadow: 0 0 15px var(--primary-glow); }
@keyframes pulse { 0% {transform: scale(1);} 50% {transform: scale(1.08);} 100% {transform: scale(1);} }

/* --- Auth Screen --- */
#auth-screen { position: absolute; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; background: rgba(5, 3, 10, 0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.auth-box { width: 90%; max-width: 420px; background: var(--card-bg); border: 1px solid var(--card-border); padding: 40px 30px; border-radius: 32px; text-align: center; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.05); animation: zoomIn 0.5s cubic-bezier(0.16, 1, 0.3, 1); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
@keyframes zoomIn { 0%{transform:scale(0.9); opacity:0;} 100%{transform:scale(1); opacity:1;} }

.input-group { margin-bottom: 22px; text-align: left; position: relative; } 
.input-group label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; display: block; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.auth-input { width: 100%; padding: 16px 20px; background: rgba(0,0,0,0.4); border: 1px solid rgba(168, 85, 247, 0.15); color: white; border-radius: 16px; font-size: 15px; font-weight: 600; transition: all 0.3s; }
.auth-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); background: rgba(0,0,0,0.6); }
.auth-input::placeholder { color: #64748b; }

.btn-main { width: 100%; padding: 16px; border-radius: 16px; font-weight: 900; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden; font-family: 'Montserrat', sans-serif;}
.btn-main:active { transform: scale(0.96); }
.btn-main:hover { filter: brightness(1.1); }

.btn-primary { background: var(--primary-grad); color: white; box-shadow: 0 10px 20px -5px var(--primary-glow); }
.btn-gold { background: var(--gold-grad); color: #422006; box-shadow: 0 10px 20px -5px var(--gold-glow); }
.btn-cyan { background: var(--cyan-grad); color: #083344; box-shadow: 0 10px 20px -5px var(--cyan-glow); }
.btn-purple { background: linear-gradient(135deg, #d946ef 0%, #a855f7 100%); color: white; box-shadow: 0 10px 20px -5px var(--purple-glow); }
.btn-white { background: #f8fafc; color: #0f172a; box-shadow: 0 10px 20px -5px rgba(255,255,255,0.2); }
.btn-green { background: linear-gradient(135deg, #34D399 0%, #10B981 100%); color: #022C22; box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.4); }

.switch-auth { margin-top: 25px; font-size: 14px; color: var(--text-muted); cursor: pointer; font-weight: 500; padding: 10px; border-radius: 12px; transition: 0.2s; }
.switch-auth:hover { background: rgba(168, 85, 247, 0.05); }
.switch-auth b { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; transition: 0.2s; font-size: 15px; }

/* --- Main App Layout --- */
#main-app { display: none; flex-direction: column; height: 100%; position: relative; z-index: 10; }
header { padding: 20px; background: rgba(11, 7, 26, 0.8); backdrop-filter: blur(20px); border-bottom: 1px solid var(--card-border); display: flex; justify-content: space-between; align-items: center; }
.header-logo { display: flex; align-items: center; gap: 8px; } 
.header-logo .logo-txt-main { font-size: 18px; font-family: 'Montserrat', sans-serif;} 
.header-logo .logo-txt-sub { font-size: 18px; }

.user-profile { display: flex; align-items: center; gap: 12px; background: rgba(25, 18, 48, 0.5); padding: 6px 6px 6px 16px; border-radius: 100px; border: 1px solid var(--card-border); }
.user-info { text-align: right; }
.user-welcome { font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; } 
.user-name { font-weight: 900; color: var(--primary); font-size: 13px; } 
.icon-btn { width: 32px; height: 32px; background: rgba(255,255,255,0.05); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; cursor: pointer; transition: 0.2s; }
.icon-btn:hover { background: rgba(244,63,94,0.1); color: var(--red); }

.nav-tabs { display: flex; gap: 10px; padding: 15px 20px; } 
.nav-item { flex: 1; padding: 12px; text-align: center; font-weight: 800; font-size: 13px; color: var(--text-muted); cursor: pointer; border-radius: 16px; transition: all 0.3s; background: rgba(255,255,255,0.03); border: 1px solid transparent; } 
.nav-item.active { background: var(--primary-grad); color: white; box-shadow: 0 4px 15px var(--primary-glow); border-color: transparent; }

.content-area { flex: 1; overflow-y: auto; padding: 0 20px 100px 20px; } 
.tab-content { display: none; } .tab-content.active { display: block; animation: fadeInUp 0.4s ease-out; } 
@keyframes fadeInUp { from{opacity:0; transform:translateY(15px);} to{opacity:1; transform:translateY(0);} }

.vip-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) { .vip-grid { grid-template-columns: 1fr 1fr; } }

.card { background: var(--card-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 28px; padding: 24px; border: 1px solid var(--card-border); position: relative; overflow: hidden; display: flex; flex-direction: column; transition: all 0.3s; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.card:active { transform: scale(0.98); }
.card:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(0,0,0,0.5); }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: rgba(168,85,247,0.3); }

.badge-hot { position: absolute; top: 15px; right: 15px; font-size: 10px; font-weight: 900; padding: 6px 12px; border-radius: 100px; text-transform: uppercase; letter-spacing: 1px; box-shadow: -2px 2px 10px rgba(0,0,0,0.2); }
.plan-name { font-size: 15px; font-weight: 800; font-family: 'Montserrat', sans-serif; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; } 
.plan-price { font-size: 32px; font-weight: 900; color: var(--text-main); margin-bottom: 20px; font-family: 'Oswald', sans-serif; letter-spacing: 0.5px; }

.features { list-style: none; margin-bottom: 25px; flex: 1; } 
.features li { font-size: 14px; font-weight: 500; color: #cbd5e1; margin-bottom: 12px; display: flex; gap: 10px; align-items: flex-start; background: rgba(255,255,255,0.03); padding: 8px 12px; border-radius: 8px;} 
.features li i { font-size: 16px; margin-top: 2px; }

.card-cyan { border-color: rgba(0, 242, 234, 0.3); background: linear-gradient(180deg, rgba(0,242,234,0.08) 0%, rgba(25,18,48,0.8) 100%); }
.card-cyan::before { background: var(--cyan); }

.card-gold { border-color: rgba(255, 215, 0, 0.3); background: linear-gradient(180deg, rgba(251,191,36,0.1) 0%, rgba(25,18,48,0.8) 100%); box-shadow: 0 10px 30px -10px var(--gold-glow); transform: scale(1.02); }
.card-gold::before { background: var(--gold); }

.card-purple { border-color: rgba(217, 70, 239, 0.3); background: linear-gradient(180deg, rgba(217,70,239,0.08) 0%, rgba(25,18,48,0.8) 100%); }
.card-purple::before { background: var(--purple); }

/* --- Nút Mua Nổi Bật --- */
.btn-buy-action {
    margin-top: auto; 
    font-size: 16px;
    padding: 16px;
    border-radius: 16px;
    animation: pulse-btn 2s infinite alternate;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}
@keyframes pulse-btn {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.03); filter: brightness(1.2); box-shadow: 0 5px 25px rgba(255, 255, 255, 0.2); }
}

/* --- Admin & Demo Section --- */
.info-section { margin-top: 40px; padding-top: 30px; border-top: 1px dashed var(--card-border); }
.section-title { font-size: 18px; font-weight: 900; color: white; font-family: 'Montserrat', sans-serif; text-transform: uppercase; margin-bottom: 20px; text-align: center; }
.admin-card { background: rgba(25, 18, 48, 0.5); border: 1px solid var(--primary); border-radius: 20px; padding: 20px; display: flex; align-items: center; gap: 15px; margin-bottom: 25px; box-shadow: 0 10px 25px var(--primary-glow); }
.admin-avatar { width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--primary); object-fit: cover; }
.admin-info h4 { color: var(--gold); font-size: 16px; margin-bottom: 4px; font-family: 'Montserrat', sans-serif; }
.admin-info p { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.demo-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.demo-img-item { width: 100%; border-radius: 12px; border: 1px solid var(--card-border); object-fit: cover; aspect-ratio: 9/16; transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.demo-img-item:hover { transform: scale(1.03); border-color: var(--primary); box-shadow: 0 10px 25px var(--primary-glow); }

/* --- History Tab --- */
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.history-title { font-size: 18px; font-weight: 900; color: white; font-family: 'Montserrat', sans-serif; }
.btn-reload { background: rgba(25, 18, 48, 0.6); color: white; border: 1px solid var(--card-border); padding: 8px 16px; border-radius: 100px; font-size: 12px; font-weight: 700; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 6px; }
.btn-reload:hover { background: rgba(168,85,247,0.2); }

.hist-item { background: rgba(25, 18, 48, 0.5); backdrop-filter: blur(10px); border: 1px solid var(--card-border); padding: 20px; border-radius: 24px; margin-bottom: 15px; transition: 0.2s; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.hist-item:hover { border-color: var(--primary); }
.hist-header { display: flex; justify-content: space-between; margin-bottom: 8px; align-items: center; }
.hist-name { font-weight: 900; font-size: 16px; color: white; font-family: 'Montserrat', sans-serif;}
.hist-price { font-weight: 900; font-size: 16px; font-family: 'Oswald'; color: var(--primary); letter-spacing: 0.5px;}
.hist-time { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }

.status-badge { padding: 6px 12px; border-radius: 100px; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; border: 1px solid; text-transform: uppercase; letter-spacing: 0.5px; }
.status-pending { background: rgba(168, 85, 247, 0.1); color: var(--primary); border-color: rgba(168,85,247,0.3); }
.status-success { background: rgba(16, 185, 129, 0.1); color: var(--green); border-color: rgba(16, 185, 129, 0.3); }
.status-cancelled { background: rgba(244, 63, 94, 0.1); color: var(--red); border-color: rgba(244, 63, 94, 0.3); }

.account-box { background: rgba(0,0,0,0.3); border: 1px dashed var(--green); border-radius: 16px; padding: 15px; margin-top: 15px; }
.account-box-title { color: var(--green); font-size: 12px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; text-transform: uppercase; }
.acc-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 8px; }
.acc-row:last-child { margin-bottom: 0; }
.acc-label { color: var(--text-muted); font-weight: 600; }
.acc-val { color: white; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.acc-val i { color: var(--primary); cursor: pointer; padding: 6px; background: rgba(168, 85, 247, 0.1); border-radius: 6px; transition: 0.2s; }
.acc-val i:active { transform: scale(0.8); }


#toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 5000; display: flex; flex-direction: column; gap: 10px; width: 90%; max-width: 350px; pointer-events: none; }
.toast { background: rgba(25, 18, 48, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 16px 20px; border-radius: 100px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--card-border); color: white; font-weight: 600; font-size: 13px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1); pointer-events: auto; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
.toast-success i { color: var(--green); } .toast-error i { color: var(--red); } .toast-info i { color: var(--primary); }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 3000; display: none; justify-content: center; align-items: center; padding: 20px; }
.modal-content { background: var(--card-bg); width: 100%; max-width: 380px; padding: 30px; border-radius: 32px; border: 1px solid var(--card-border); text-align: center; position: relative; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6); animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); backdrop-filter: blur(16px); }
.close-btn { position: absolute; top: 20px; right: 20px; width: 32px; height: 32px; background: rgba(255,255,255,0.05); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); cursor: pointer; transition: 0.2s; }
.close-btn:hover { background: rgba(255,255,255,0.1); color: white; }

.qr-box { background: white; padding: 15px; border-radius: 24px; margin: 20px auto; width: 220px; height: 220px; box-shadow: 0 10px 25px var(--primary-glow); } 
.qr-img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px;}
.pay-info { background: rgba(0,0,0,0.4); padding: 20px; border-radius: 20px; text-align: left; font-size: 13px; border: 1px solid var(--card-border); margin-bottom: 20px; } 
.pay-row { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--text-muted); align-items: center; font-weight: 500; } 
.pay-row:last-child { margin-bottom: 0; }
.pay-val { color: var(--text-main); font-weight: 800; font-size: 14px; text-align: right; }

.floating-tele { position: fixed; bottom: 30px; right: 20px; width: 60px; height: 60px; background: var(--primary-grad); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 30px; z-index: 900; box-shadow: 0 10px 25px var(--primary-glow); transition: 0.3s; }
.floating-tele:active { transform: scale(0.9); }
.floating-tele:hover { transform: scale(1.1); box-shadow: 0 15px 35px var(--primary-glow); }

#loader { position: fixed; inset: 0; background: rgba(11, 7, 26, 0.9); z-index: 9999; display: none; align-items: center; justify-content: center; flex-direction: column; backdrop-filter: blur(10px); }
.spinner { width: 50px; height: 50px; border: 4px solid rgba(168, 85, 247, 0.2); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 15px; }
@keyframes spin { to { transform: rotate(360deg); } }
