/* =============================================== */
/* ULTRA PREMIUM CSS VARIABLES                     */
/* =============================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-dark: #047857;
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #0f172a;
    --text-sub: #64748b;
    --border: #e2e8f0;
    --accent: #d1fae5;
    --nagad: #f97316;
    --bkash: #e11d48;
    --focus-ring: rgba(16, 185, 129, 0.25);
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.main-container {
    width: 100%;
    max-width: 520px;
    perspective: 1000px;
}

/* =============================================== */
/* MAIN CARD (GLASSMORPHISM)                       */
/* =============================================== */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    box-shadow: var(--shadow-hover);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
}

.header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 35px 25px 30px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.header::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,0.05)' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.himg {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.fav {
    width: 45px;
    height: 45px;
    margin-right: 12px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 5px;
    position: relative;
    z-index: 2;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.social-link:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Content Area */
.content {
    padding: 30px 25px;
}

.section-label {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #334155;
}

.section-label i {
    color: var(--primary);
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 20px;
}

.ctrl-input, .ctrl-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.ctrl-input:focus, .ctrl-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--focus-ring);
    outline: none;
}

.premium-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-color: #f8fafc;
}

/* Upload Area */
.file-input-hidden { display: none; }

.upload-label {
    border: 2px dashed #a7f3d0;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s ease;
}

.upload-label:hover {
    border-color: var(--primary);
    background: #ecfdf5;
    transform: scale(1.02);
}

.upload-icon-wrapper {
    background: var(--accent);
    padding: 15px;
    border-radius: 50%;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.upload-label .icon {
    font-size: 2.5rem;
    color: var(--primary);
}

.main-text {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.sub-text {
    color: var(--text-sub);
    font-size: 0.85rem;
}

.tag-text {
    background: #e2e8f0;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Files List */
.files-list {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.truncate {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 15px;
}

.file-size {
    color: var(--primary);
    background: var(--accent);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
}

.settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-sub);
    margin-bottom: 6px;
    display: block;
}

.page-display {
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-main);
}

.range-input, .copies-input {
    text-align: center;
    padding: 10px;
}

.flex-grow { flex: 1; min-width: 160px; }

.mode-select {
    padding: 10px 14px;
    background-position: right 10px center;
}

.mode-select.color-active {
    background-color: #fff1f2;
    border-color: #fda4af;
    color: #e11d48;
}

.color-badge {
    margin-top: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e11d48;
    background: #ffe4e6;
    padding: 6px;
    border-radius: 6px;
    text-align: center;
}

.btn-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    transform: scale(1.15) rotate(90deg);
}

/* Cost & Actions */
.cost-summary {
    margin-top: 30px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.cost-label { font-weight: 600; opacity: 0.9; }
.cost-amount { font-size: 1.5rem; font-weight: 800; color: #34d399; }

.actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.btn {
    padding: 16px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    flex: 2;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    flex: 1;
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Checkbox Toggle */
.pickup-option-container {
    background: #f0fdfa;
    border: 2px solid #a7f3d0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.pickup-option-container:hover {
    background: #d1fae5;
}

.pickup-label {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.pickup-checkbox {
    width: 24px;
    height: 24px;
    accent-color: var(--primary);
    cursor: pointer;
}

.pickup-text strong {
    color: var(--primary-dark);
    font-size: 1rem;
}

.pickup-text small {
    color: var(--primary);
    font-weight: 500;
}

.user-info-section {
    transition: opacity 0.3s ease;
}

/* Payment Modal */
.payment-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.payment-overlay.show { display: flex; animation: fadeIn 0.3s ease-out; }

.payment-card {
    background: white;
    width: 90%;
    max-width: 420px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: scale(0.95);
    animation: popIn 0.3s ease-out forwards;
}

@keyframes popIn {
    to { transform: scale(1); }
}

.modal-header {
    background: #f8fafc;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.25rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header i { color: var(--primary); font-size: 1.4rem; }

.payment-body { padding: 25px; }

.number-box {
    padding: 16px 20px;
    border-radius: 16px;
    color: white;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.number-box::after {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 100px; height: 200%;
    background: rgba(255,255,255,0.1);
    transform: rotate(35deg);
}

.number-box.nagad { background: linear-gradient(135deg, #f97316, #ea580c); }
.number-box.bkash { background: linear-gradient(135deg, #e11d48, #be123c); }

.nb-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.copy-icon {
    background: rgba(255,255,255,0.2);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.copy-icon:hover { background: rgba(255,255,255,0.4); }

.nb-bottom {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.8rem;
    text-align: center;
    opacity: 0.9;
}

.warning-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    margin: 20px 0;
    color: #b45309;
}

.warning-icon i { font-size: 1.5rem; color: #f59e0b; }
.highlight-amt { font-size: 1.1rem; color: #d97706; background: #fef3c7; padding: 2px 6px; border-radius: 4px; }

.low-amount-warning {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    border: 1px solid #fecaca;
}

.trx-input {
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.modal-footer {
    padding: 20px 25px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.verify-btn {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.verify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.4);
}

.verify-btn:disabled {
    background: #94a3b8;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-sub);
    font-weight: 600;
    cursor: pointer;
    padding: 10px;
}

.btn-text:hover { color: var(--text-main); }

/* WhatsApp & Status Banners */
.status-banner {
    display: none;
    margin-bottom: 20px;
    animation: fadeIn 0.3s;
}

.status-banner.show { display: block; }

.offline-alert {
    background: #fef2f2;
    border: 2px solid #fecaca;
    padding: 15px;
    border-radius: 12px;
    color: #991b1b;
    display: flex;
    align-items: center;
    gap: 15px;
}

.offline-alert i { font-size: 2rem; color: #ef4444; }

.whatsapp-contact-section {
    margin-top: 30px;
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

.whatsapp-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.wa-icon-pulse {
    width: 40px; height: 40px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #22c55e;
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.whatsapp-number {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: #334155;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.whatsapp-number:hover {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
    transform: translateX(5px);
}

.whatsapp-number i:first-child { color: #22c55e; font-size: 1.5rem; }
.whatsapp-number span { flex: 1; }
.whatsapp-number i:last-child { color: #94a3b8; }

/* Loading & Toast */
.loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    display: none; flex-direction: column;
    justify-content: center; align-items: center;
    z-index: 999;
}
.loading-overlay.show { display: flex; }

.spinner-wrapper {
    background: white;
    padding: 20px;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.spinner {
    width: 40px; height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.toast {
    position: fixed; bottom: -100px; left: 50%;
    transform: translateX(-50%);
    background: #1e293b; color: white;
    padding: 16px 24px; border-radius: 12px;
    font-weight: 600; font-size: 0.95rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show { bottom: 40px; }
.toast.success { background: #059669; border: 1px solid #34d399; }
.toast.error { background: #dc2626; border: 1px solid #f87171; }

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 480px) {
    .files-list .settings-row { flex-direction: column; }
    .input-group.flex-grow { width: 100%; }
    .actions { flex-direction: column; }
    .btn { width: 100%; }
}