* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Tiro Bangla', serif; }

body, html { 
    height: 100%; width: 100%; 
    background: #eef2f3; 
    display: flex; justify-content: center; align-items: center; 
}

/* মেইন ফ্রেম */
.app-shell {
    width: 100%; height: 100%;
    max-width: 450px; /* মোবাইল ফ্রেম সাইজ */
    max-height: 850px;
    padding: 15px;
    display: flex; justify-content: center; align-items: center;
}

.main-card {
    background: #fff;
    width: 100%; height: 100%;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    display: flex; flex-direction: column;
    overflow: hidden;
    position: relative;
}

header { 
    background: linear-gradient(135deg, #006a4e, #004d39); 
    padding: 35px 20px; color: #fff; text-align: center; 
}
.logo-box { 
    width: 40px; height: 40px; background: #f42a41; margin: 0 auto 10px; 
    border-radius: 10px; line-height: 40px; font-weight: bold; font-size: 20px; 
}
header h1 { font-size: 28px; }
header p { font-size: 16px; opacity: 0.8; }

.content-area { 
    flex: 1; display: flex; flex-direction: column; 
    justify-content: center; align-items: center; padding: 20px; 
}

/* স্ক্যানার ফ্রেম */
.reader-frame {
    position: relative; width: 280px; height: 280px;
    background: #000; border-radius: 20px; overflow: hidden;
    border: 5px solid #fff; box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
#reader video { width: 100% !important; height: 100% !important; object-fit: cover !important; }

/* সাকসেস ইন্টারফেস */
.success-badge { width: 50px; height: 50px; background: #006a4e; color: #fff; border-radius: 50%; line-height: 50px; font-size: 25px; margin-bottom: 10px; text-align: center; }
.result-title { font-size: 24px; color: #006a4e; margin-bottom: 10px; }
.output-box { 
    background: #f1f4f6; padding: 15px; border-radius: 12px; 
    font-size: 18px; font-weight: bold; border: 2px dashed #006a4e;
    width: 100%; word-break: break-all; text-align: center; margin-bottom: 15px;
}

/* মেইল ফর্ম */
.mail-form { width: 100%; background: #fafafa; padding: 15px; border-radius: 15px; margin-bottom: 15px; border: 1px solid #eee; }
.mail-form label { display: block; font-size: 14px; margin-bottom: 8px; color: #666; }
#userEmail { width: 100%; padding: 12px; border: 2px solid #ddd; border-radius: 8px; font-size: 16px; text-align: center; outline: none; transition: 0.3s; }
#userEmail:focus { border-color: #006a4e; }
.btn-mail { width: 100%; background: #f42a41; color: #fff; border: none; padding: 12px; border-radius: 8px; font-size: 16px; font-weight: bold; margin-top: 10px; cursor: pointer; }

.action-row { display: flex; gap: 10px; width: 100%; }
.btn-copy { flex: 1; background: #006a4e; color: #fff; border: none; padding: 15px; border-radius: 10px; font-size: 16px; cursor: pointer; }
.btn-rescan { flex: 1; background: #eee; color: #333; border: none; padding: 15px; border-radius: 10px; font-size: 16px; cursor: pointer; }

/* পপ-আপ */
.popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); display: flex; justify-content: center; align-items: center; z-index: 100; }
.popup-card { background: #fff; width: 85%; max-width: 320px; padding: 30px; border-radius: 20px; text-align: center; animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes pop { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
.popup-icon { font-size: 40px; color: #006a4e; margin-bottom: 15px; }
.btn-ok { background: #006a4e; color: #fff; border: none; padding: 10px 40px; border-radius: 50px; font-size: 18px; margin-top: 15px; cursor: pointer; }

/* ওভারলে ও লেজার */
.scan-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
.corner { position: absolute; width: 20px; height: 20px; border: 4px solid #f42a41; }
.tl { top: 15px; left: 15px; border-right: 0; border-bottom: 0; }
.tr { top: 15px; right: 15px; border-left: 0; border-bottom: 0; }
.bl { bottom: 15px; left: 15px; border-right: 0; border-top: 0; }
.br { bottom: 15px; right: 15px; border-left: 0; border-top: 0; }
.laser-beam { position: absolute; width: 80%; height: 2px; background: #f42a41; left: 10%; top: 20%; animation: scan 2s infinite linear; box-shadow: 0 0 10px #f42a41; }
@keyframes scan { 0% { top: 20%; } 100% { top: 80%; } }

.hidden { display: none !important; }
.btn-start { background: #006a4e; color: #fff; border: none; padding: 15px 30px; border-radius: 50px; font-size: 18px; cursor: pointer; margin-bottom: 10px; }
.welcome-icon { font-size: 60px; margin-bottom: 20px; }
.hint { color: #888; font-size: 14px; }
.app-footer { padding: 15px; background: #f9f9f9; text-align: center; font-size: 12px; color: #aaa; border-top: 1px solid #eee; }