/* Lilista.com - Global Style (V76 Logic + V42 QR Icons) */

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: #f0f2f5; 
    text-align: center; 
    padding: 15px; 
    margin: 0; 
    transition: direction 0.3s; 
}

.container { 
    max-width: 100%; 
    width: 450px; 
    margin: auto; 
    background: white; 
    padding: 25px; 
    border-radius: 25px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    box-sizing: border-box; 
}

/* --- شريط اختيار اللغة (أيقونات QR الرمادية) --- */
.lang-bar { 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
    gap: 15px; 
    margin-bottom: 20px; 
}

.lang-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s;
}

.lang-item:active { transform: scale(0.95); }

/* مربع الأيقونة الرمادي */
.qr-thumb {
    width: 58px;
    height: 58px;
    background: #f8f9fa; 
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* حالة اللغة النشطة */
.lang-item.active .qr-thumb {
    border-color: #3498db;
    background: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.lang-label {
    font-size: 11px;
    font-weight: 800;
    color: #95a5a6;
    transition: 0.3s;
}

.lang-item.active .lang-label {
    color: #3498db;
}

/* --- منطقة المعاينة (الكاميرا) --- */
.preview-box { 
    width: 100%; 
    min-height: 280px; 
    background: #000; 
    border-radius: 20px; 
    margin: 15px 0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden; 
    position: relative; 
    border: 2px solid #eef0f2; 
}

/* مربع التحديد الذكي (Smart Focus) */
.scanner-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: none; pointer-events: none; z-index: 10; }
.scanner-shroud { position: absolute; width: 100%; height: 100%; box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.4); }
.focus-box { 
    position: absolute; width: 220px; height: 220px; top: 50%; left: 50%; transform: translate(-50%, -50%); 
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 15px; z-index: 11; 
}

/* زوايا المربع (Orange Corners) */
.corner { position: absolute; width: 25px; height: 25px; border-color: #e67e22; border-style: solid; border-width: 0; }
.top-left { top: -2px; left: -2px; border-top-width: 4px; border-left-width: 4px; border-radius: 10px 0 0 0; }
.top-right { top: -2px; right: -2px; border-top-width: 4px; border-right-width: 4px; border-radius: 0 10px 0 0; }
.bottom-left { bottom: -2px; left: -2px; border-bottom-width: 4px; border-left-width: 4px; border-radius: 0 0 0 10px; }
.bottom-right { bottom: -2px; right: -2px; border-bottom-width: 4px; border-right-width: 4px; border-radius: 0 0 10px 0; }

#qr-video { width: 100%; height: 100%; object-fit: cover; display: none; }
#orig-view { max-width: 100%; max-height: 100%; display: none; }

/* --- الأزرار --- */
.btn { 
    padding: 16px; border: none; border-radius: 15px; cursor: pointer; 
    font-weight: bold; color: white; width: 100%; font-size: 1.1em; 
    transition: 0.3s; margin-bottom: 12px; display: flex; 
    align-items: center; justify-content: center; gap: 10px; 
}
.btn-camera { background: #27ae60; box-shadow: 0 4px 10px rgba(39, 174, 96, 0.2); }
.btn-capture { background: #e67e22; display: none; z-index: 20; }
.btn-switch { background: #8e44ad; display: none; }
.btn-torch { background: #f1c40f; color: #333; display: none; }
.btn-file { background: #3498db; box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2); }

.btn:hover { opacity: 0.95; transform: translateY(-1px); }

/* --- الحالة والنتائج --- */
#status { 
    margin: 15px 0; font-size: 14px; color: #7f8c8d; 
    font-weight: bold; min-height: 24px; padding: 10px; 
    background: #f9f9f9; border-radius: 10px; line-height: 1.4; 
}

#result-box { 
    display: none; margin-top: 15px; padding: 18px; 
    background: #e7f3ff; border-radius: 15px; 
    border: 1px solid #b2d4ff; word-break: break-all; 
}

#result-link { color: #3498db; text-decoration: none; font-weight: bold; }

/* عناصر مخفية */
canvas, #reader-hidden { display: none; }

/* --- تنسيق البنر الجديد --- */
.banner-container {
    width: 100%;
    margin: 0 auto 15px auto;
    background: #ffffff; /* فريم أبيض متناسق مع الحاوية */
    border-radius: 20px; /* زوايا منحنية تشبه بقية عناصر الموقع */
    overflow: hidden;
    padding: 5px; /* مسافة بسيطة لإظهار الإطار الأبيض */
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* ظل خفيف جداً */
}

.main-banner {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px; /* انحناء داخلي للصورة */
}