:root {
    --primary-grad: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --secondary-grad: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --bg-color: #f4f5f9; --surface-color: #ffffff;
    --text-main: #1e293b; --text-muted: #64748b;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Prevent Text Copy & Image Interaction */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Noto Sans Bengali', sans-serif; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
input, textarea, select { user-select: text; -webkit-user-select: text; }
img { -webkit-touch-callout: none; -webkit-user-drag: none; pointer-events: none; user-select: none; }

body { background-color: #e2e8f0; display: flex; justify-content: center; align-items: center; min-height: 100vh; }
input:focus, button:focus, select:focus { outline: none !important; box-shadow: none !important; }

.app-container { background-color: var(--bg-color); width: 100%; max-width: 400px; height: 100vh; position: relative; overflow: hidden; display: flex; flex-direction: column; }
@media (min-width: 420px) { .app-container { height: 850px; border-radius: 24px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); border: 8px solid #333; } }

/* Toast z-index set to 9999 to show above modals */
.toast-msg { position: absolute; top: -100px; left: 50%; transform: translateX(-50%); background-color: #1e293b; color: #fff; padding: 14px 24px; border-radius: 50px; font-size: 14px; font-weight: 600; z-index: 9999 !important; transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: var(--shadow-lg); white-space: nowrap; }
.toast-msg.show { top: 25px; }

.loader-overlay { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; z-index: 1500; opacity: 0; visibility: hidden; transition: 0.3s ease; }
.loader-overlay.active { opacity: 1; visibility: visible; }
.spinner { width: 45px; height: 45px; border: 4px solid #f3f4f6; border-top-color: #a855f7; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.view { display: none; height: 100%; width: 100%; overflow-y: auto; background: var(--bg-color); scrollbar-width: none;}
.view::-webkit-scrollbar { display: none; }
.view.active { display: block; animation: fadeIn 0.4s ease; }
.auth-view { background: var(--surface-color); padding: 30px 24px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.auth-header-art { position: absolute; top: 0; left: 0; width: 100%; height: 200px; background: var(--primary-grad); clip-path: ellipse(150% 100% at 50% 0%); z-index: 0; }
.logo-container { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; margin-top: 40px; margin-bottom: 50px; }
.new-logo-icon { width: 70px; height: 70px; background: #fff; border-radius: 20px; display: flex; justify-content: center; align-items: center; box-shadow: var(--shadow-md); margin-bottom: 15px; transform: rotate(10deg); }
.new-logo-icon svg { width: 40px; fill: url(#grad1); transform: rotate(-10deg); }
.logo-container h2 { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: 1px; }
.auth-form-area { position: relative; z-index: 1; background: #fff; border-radius: 24px; padding: 30px 20px; box-shadow: var(--shadow-lg); margin-top: -20px; }

.header { display: flex; align-items: center; margin-bottom: 25px; position: relative; z-index: 1; color: #fff; padding: 20px; padding-bottom: 0;}
.back-btn { width: 40px; height: 40px; background: rgba(255,255,255,0.2); border-radius: 12px; display: flex; justify-content: center; align-items: center; border: none; cursor: pointer; margin-right: 15px; backdrop-filter: blur(4px); }
.back-btn svg { width: 20px; height: 20px; fill: #fff; }
.header h1 { font-size: 22px; font-weight: 700; }

.form-group { margin-bottom: 20px; }
.label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.input-wrapper { display: flex; align-items: center; border: 2px solid #e2e8f0; border-radius: 16px; padding: 0 15px; height: 55px; background: #f8fafc; transition: 0.3s; }
.input-wrapper input, .input-wrapper select { border: none; outline: none; flex: 1; font-size: 15px; background: transparent; color: var(--text-main); width: 100%; font-weight: 500; }
.prefix-880 { font-weight: 700; color: var(--text-main); margin-right: 12px; font-size: 15px; }
.icon-btn { background: none; border: none; cursor: pointer; padding-left: 10px; }
.icon-btn svg { width: 22px; height: 22px; fill: #94a3b8; }

.captcha-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.captcha-image { background: var(--bg-color); border: 2px dashed #cbd5e1; padding: 5px 15px; border-radius: 12px; display: flex; gap: 5px; align-items: center; user-select: none; cursor: pointer; }
.captcha-image span { font-family: 'Courier New', monospace; font-size: 18px; font-weight: bold; display: inline-block; }

.btn-primary { width: 100%; background: var(--primary-grad); color: #fff; border: none; border-radius: 16px; height: 55px; font-size: 16px; font-weight: 700; margin-top: 10px; cursor: pointer; transition: 0.2s; box-shadow: 0 10px 20px -5px rgba(168, 85, 247, 0.4); }
.btn-primary:active { transform: scale(0.97); }
.footer-text { text-align: center; margin-top: 25px; font-size: 14px; color: var(--text-muted); font-weight: 500; }
.footer-text span { color: #a855f7; font-weight: 700; cursor: pointer; text-decoration: none; }

.home-content { padding: 20px; padding-bottom: 100px; }
.home-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.header-brand { display: flex; align-items: center; gap: 10px; }
.header-brand .icon { width: 35px; height: 35px; background: var(--primary-grad); border-radius: 10px; display: flex; justify-content: center; align-items: center; }
.header-brand .icon svg { width: 20px; fill: #fff; }
.header-brand h2 { font-size: 22px; font-weight: 800; background: var(--primary-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.slider-wrapper { position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-md); margin-bottom: 30px; }
.slider-container { width: 100%; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slider-container::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; }
.slide img { width: 100%; height: 180px; object-fit: cover; display: block; }

.section-title { font-size: 18px; font-weight: 800; margin-bottom: 15px; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 4px; height: 18px; background: var(--primary-grad); border-radius: 4px; }

.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.product-card { background: var(--surface-color); border-radius: 20px; padding: 15px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; position: relative; overflow: hidden; border: 1px solid #f1f5f9; }
.product-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--primary-grad); }
.card-badge { background: #f3e8ff; color: #7e22ce; padding: 6px 12px; border-radius: 12px; font-size: 12px; font-weight: 700; display: inline-block; margin-bottom: 15px; text-align: center; }
.card-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.card-row span:last-child { font-weight: 700; color: var(--text-main); font-size: 13px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding-top: 12px; border-top: 1px dashed #e2e8f0; }
.price { background: var(--primary-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; font-size: 16px; }
.buy-btn { width: 32px; height: 32px; border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0; color: #a855f7; display: flex; justify-content: center; align-items: center; cursor: pointer; font-weight: bold; font-size: 18px; transition: 0.2s; }

.team-top { background: var(--primary-grad); padding: 30px 20px 80px 20px; position: relative; border-bottom-left-radius: 30px; border-bottom-right-radius: 30px; box-shadow: var(--shadow-md); }
.team-title-row { font-size: 22px; font-weight: 800; margin-bottom: 25px; text-align: center; letter-spacing: 1px; color: #ffffff; }
.main-balance-area { text-align: center; margin-bottom: 30px; }
.main-balance-area .amount { font-size: 40px; font-weight: 800; text-shadow: 0 2px 4px rgba(0,0,0,0.1); color: #ffffff; }
.main-balance-area .amount span { font-size: 24px; margin-right: 4px; vertical-align: top; line-height: 2; }
.main-balance-area .label { font-size: 14px; opacity: 0.9; margin-top: 5px; text-transform: uppercase; font-weight: 600; color: #ffffff; }

.commission-card { background: var(--surface-color); border-radius: 24px; padding: 25px 20px; box-shadow: var(--shadow-lg); text-align: center;}
.comm-header { font-size: 18px; font-weight: 800; margin-bottom: 15px; background: var(--primary-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.return-rate { background: #fdf4ff; padding: 20px; border-radius: 16px; border: 1px dashed #f0abfc; margin-bottom: 10px; }
.return-rate p { color: #d946ef; font-weight: 800; font-size: 16px; line-height: 1.5;}

.page-title { font-size: 22px; font-weight: 800; padding: 25px 20px 15px; color: var(--text-main); }
.withdraw-container { padding: 0 20px 100px; }

.grad-card { background: var(--primary-grad); border-radius: 24px; padding: 30px 20px; color: #fff; margin-bottom: 25px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.grad-card::before { content: ''; position: absolute; top: -50px; right: -50px; width: 150px; height: 150px; background: rgba(255,255,255,0.1); border-radius: 50%; }
.grad-card .bal-amt { font-size: 36px; font-weight: 800; margin-bottom: 5px; position: relative; z-index: 1; }
.grad-card .input-lbl { font-size: 14px; font-weight: 700; margin-bottom: 12px; position: relative; z-index: 1; }

.withdraw-input { display: flex; align-items: center; background: rgba(255,255,255,0.2); backdrop-filter: blur(5px); border-radius: 16px; height: 55px; padding: 0 20px; border: 1px solid rgba(255,255,255,0.3); position: relative; z-index: 1; }
.withdraw-input span { color: #fff; font-weight: 800; font-size: 18px; margin-right: 12px; }
.withdraw-input input { border: none; outline: none; flex: 1; font-size: 18px; color: #fff; background: transparent; font-weight: 700; }
.withdraw-input input::placeholder { color: rgba(255,255,255,0.6); }
.withdraw-bank-select { background: #fff !important; color: #333 !important; padding: 15px; border-radius: 16px; border:none; outline:none; width: 100%; font-size: 15px; font-weight: bold; margin-bottom: 15px;}

.advice-card { background: #fff; border-radius: 20px; padding: 25px; margin-top: 25px; margin-bottom: 25px; box-shadow: var(--shadow-sm); border: 1px solid #f1f5f9; }
.advice-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 15px; color: #a855f7; display: flex; align-items: center; gap: 8px; }
.advice-card h3::before { content: '💡'; font-size: 20px; }
.advice-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.6; font-weight: 500; }

.mine-container { padding: 25px 20px 100px; }
.mine-header-text { font-size: 24px; font-weight: 800; margin-bottom: 25px; color: var(--text-main); }
.mine-user-info { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; background: var(--surface-color); padding: 20px; border-radius: 24px; box-shadow: var(--shadow-sm); border: 1px solid #f1f5f9; }
.mine-avatar { width: 65px; height: 65px; background: var(--primary-grad); border-radius: 20px; display: flex; justify-content: center; align-items: center; transform: rotate(-5deg); }
.mine-avatar svg { width: 35px; fill: #fff; transform: rotate(5deg); }
.mine-details { flex: 1; }
.mine-details .id { font-size: 13px; color: var(--text-muted); margin-bottom: 5px; font-weight: 600; text-transform: uppercase; }
.mine-details .bal { font-size: 22px; font-weight: 800; color: var(--text-main); }

.mine-actions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 25px; }
.mine-action-btn { background: var(--surface-color); border-radius: 20px; padding: 20px 10px; text-align: center; cursor: pointer; box-shadow: var(--shadow-sm); border: 1px solid #f1f5f9; }
.mine-action-btn .icon-bg { width: 45px; height: 45px; background: #f3e8ff; border-radius: 15px; display: flex; justify-content: center; align-items: center; margin: 0 auto 12px; }
.mine-action-btn svg { width: 22px; height: 22px; fill: #a855f7; }
.mine-action-btn .lbl { font-size: 13px; font-weight: 700; color: var(--text-main); }

.invite-box { background: var(--primary-grad); border-radius: 20px; padding: 20px; display: flex; justify-content: space-between; align-items: center; color: #fff; }
.invite-text { font-size: 14px; font-weight: 600; }
.invite-text .code { display: block; font-size: 22px; font-weight: 800; margin-top: 5px; }
.copy-btn { background: #fff; color: #a855f7; border: none; border-radius: 14px; padding: 12px 25px; font-weight: 800; cursor: pointer; }

.mine-section-title { font-size: 18px; font-weight: 800; margin-bottom: 15px; color: var(--text-main); }
.func-list { display: flex; flex-direction: column; gap: 10px; }
.func-item { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: var(--surface-color); border-radius: 20px; cursor: pointer; box-shadow: var(--shadow-sm); border: 1px solid #f1f5f9; }
.func-left { display: flex; align-items: center; gap: 15px; font-size: 15px; font-weight: 700; color: var(--text-main); }
.func-icon { width: 40px; height: 40px; background: #f8fafc; border-radius: 12px; display: flex; justify-content: center; align-items: center; color: #64748b; }
.func-icon svg { width: 20px; height: 20px; fill: currentColor; }

.bottom-nav { position: absolute; bottom: 20px; left: 5%; width: 90%; height: 70px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(15px); display: flex; justify-content: space-around; align-items: center; border-radius: 24px; box-shadow: 0 15px 30px rgba(0,0,0,0.1); z-index: 100; border: 1px solid rgba(255,255,255,0.5); }
.nav-item { display: flex; flex-direction: column; align-items: center; color: #94a3b8; font-size: 12px; gap: 6px; cursor: pointer; font-weight: 700; width: 60px; }
.nav-item.active { color: #a855f7; transform: translateY(-3px); }
.nav-item svg { width: 24px; height: 24px; fill: currentColor; }

.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: center; z-index: 3000; opacity: 0; visibility: hidden; transition: 0.3s; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-box { background: #fff; width: 85%; max-width: 320px; border-radius: 24px; padding: 25px; text-align: center; box-shadow: var(--shadow-lg); transform: translateY(20px); transition: 0.3s; max-height: 80vh; overflow-y: auto;}
.modal-overlay.active .modal-box { transform: translateY(0); }
.modal-title { font-size: 18px; font-weight: 800; color: var(--text-main); margin-bottom: 10px; }
.modal-text { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; font-weight: 500; }
.modal-btn-row { display: flex; gap: 10px; }
.btn-cancel, .btn-confirm { flex: 1; border: none; padding: 12px; border-radius: 12px; font-weight: 700; cursor: pointer; }
.btn-cancel { background: #f1f5f9; color: var(--text-muted); }
.btn-confirm { background: var(--primary-grad); color: #fff; }

.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border-radius: 12px; text-decoration: none; font-weight: bold; margin-bottom: 10px; color: #fff; }
.social-btn.tg { background: #0088cc; } .social-btn.wa { background: #25D366; }

.list-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px; padding: 15px; margin-bottom: 10px; text-align: left;}
.list-card-title { font-weight: 800; color: #a855f7; margin-bottom: 5px; font-size: 15px;}
.list-card-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); margin-bottom: 4px; font-weight: 600;}
.list-card-row span:last-child { color: var(--text-main); }

.history-title { padding: 0 20px; font-size: 18px; font-weight: 800; color: var(--text-main); margin-bottom: 15px; margin-top: 10px;}
.empty-text { text-align: center; color:#94a3b8; font-size: 14px; font-weight: 600; padding: 20px; }

.recharge-info-box { background: #fff; border: 1px dashed #a855f7; border-radius: 16px; padding: 20px; margin-bottom: 20px; text-align: center; }
.recharge-info-box .number { font-size: 24px; font-weight: 800; color: #a855f7; margin-bottom: 10px; letter-spacing: 1px; cursor: pointer; user-select: text; }

.btn-claim { background: var(--primary-grad); color: #fff; border: none; padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: 12px; cursor: pointer; transition: 0.2s; box-shadow: var(--shadow-sm); }
.btn-claim:active { transform: scale(0.95); }
.btn-claim:disabled { background: #cbd5e1; color: #64748b; cursor: not-allowed; box-shadow: none; }
.btn-claim.expired { background: #fef2f2; color: #ef4444; border: 1px dashed #f87171; box-shadow: none; }