/* ======================================================== */
/* IQ Uruk Store - Main Stylesheet (Deep Cosmic Glassmorphism) */
/* ======================================================== */

:root { 
    --primary: #0ea5e9;   
    --primary-hover: #0284c7;
    --bg-base: #020617;   
    --card-bg: rgba(15, 23, 42, 0.6); 
    --card-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

/* قفل الشاشة لمنع الاهتزاز والتقريب في الآيفون */
html, body.store-body { 
    font-family: 'Cairo', sans-serif; 
    background-color: var(--bg-base);
    color: var(--text-main); 
    margin: 0; 
    padding: 0;
    width: 100vw;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    -webkit-tap-highlight-color: transparent;
}

/* الخلفية الفضائية المضيئة (Aurora Orbs) */
.bg-ambient {
    position: fixed; 
    top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1;
    background-color: var(--bg-base);
    overflow: hidden;
}
.bg-ambient::before, .bg-ambient::after {
    content: ''; position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.35;
    animation: floatOrb 20s infinite alternate ease-in-out;
}
.bg-ambient::before { width: 50vw; height: 50vw; background: #0ea5e9; top: -10%; left: -10%; }
.bg-ambient::after { width: 40vw; height: 40vw; background: #3b82f6; bottom: -10%; right: -10%; animation-delay: -10s; }
@keyframes floatOrb { 100% { transform: translate(100px, 50px) scale(1.1); } }

/* البطاقات الزجاجية العميقة */
.glass-card {
    background: var(--card-bg); 
    backdrop-filter: blur(24px); 
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border); 
    border-radius: 24px; 
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

/* نظام التحميل (Skeleton) المتوافق مع الوضع الليلي */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%; 
    animation: skeleton-load 1.5s infinite;
    border-radius: 12px;
}
@keyframes skeleton-load { 100% { background-position: -200% 0; } }

/* أزرار الخيارات (السلة الذكية) */
.option-item {
    border: 1px solid rgba(255,255,255,0.1); 
    transition: all 0.3s ease; 
    cursor: pointer; 
    background: rgba(30, 41, 59, 0.5);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.option-item.selected { 
    border-color: var(--primary); 
    background: rgba(14, 165, 233, 0.15); 
    transform: translateY(-2px); 
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.2);
}

/* الحقول */
input, textarea { 
    background: var(--input-bg) !important; 
    border: 1px solid rgba(255,255,255,0.1) !important; 
    color: var(--text-main) !important; 
    border-radius: 16px !important; 
    transition: 0.3s ease; 
    width: 100%; 
}
input::placeholder, textarea::placeholder { color: var(--text-muted) !important; font-weight: 600; }
input:focus, textarea:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25) !important; outline: none; }

/* القائمة المنسدلة (المحافظات) للوضع الليلي */
.custom-select-wrapper { position: relative; user-select: none; width: 100%; }
.custom-select-trigger { 
    background: var(--input-bg); border: 1px solid rgba(255,255,255,0.1); color: var(--text-main); 
    border-radius: 16px; padding: 16px; display: flex; justify-content: space-between; 
    align-items: center; cursor: pointer; transition: 0.3s; font-weight: 700;
}
.custom-select-trigger.open { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25); }
.custom-options { 
    position: absolute; top: 100%; left: 0; right: 0; z-index: 50; max-height: 220px; overflow-y: auto; display: none; 
    background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1); 
    border-radius: 16px; margin-top: 8px; box-shadow: 0 15px 40px rgba(0,0,0,0.5); 
}
.custom-options.open { display: block; animation: fadeIn 0.2s ease-out; }
.custom-option { padding: 14px 16px; cursor: pointer; transition: 0.2s; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.875rem; font-weight: bold; }
.custom-option:hover { background: rgba(14, 165, 233, 0.15); color: var(--primary); padding-right: 24px; }

/* تأثير رفع الصورة (الماء الصافي) */
.img-preview-wrapper { position: relative; width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.4); display: none; }
.water-overlay { position: absolute; bottom: 0; left: 0; width: 100%; height: 0%; background: rgba(14, 165, 233, 0.3); backdrop-filter: blur(3px); z-index: 10; transition: height 1s ease-in-out, opacity 0.5s ease-out; }
.water-overlay::before, .water-overlay::after { content: ""; position: absolute; width: 200vw; height: 200vw; bottom: 95%; left: -50vw; border-radius: 40%; animation: spin-wave 5s linear infinite; }
.water-overlay::before { background: rgba(56, 189, 248, 0.4); }
.water-overlay::after { background: rgba(2, 132, 199, 0.3); border-radius: 45%; animation: spin-wave 7s linear infinite; }
@keyframes spin-wave { 100% { transform: rotate(360deg); } }
/* جعل صورة الرفع ديناميكية الطول */
#preview-img-element { width: 100%; height: auto; display: block; max-height: 400px; object-fit: contain; }

/* الأزرار الرئيسية */
.premium-btn { background: linear-gradient(to left, #0284c7, #0ea5e9); color: white; transition: 0.3s; border: none; box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4); }
.premium-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(14, 165, 233, 0.6); }

.fade-in-up { animation: fadeInUp 0.5s ease-out forwards; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ======================================================== */
/* الواتساب التفاعلي المستقل */
/* ======================================================== */
.wa-container { position: fixed; bottom: 105px; right: 20px; z-index: 95; display: flex; flex-direction: column; align-items: center; }
.wa-tooltip { background: white; color: #25d366; padding: 6px 12px; border-radius: 12px; font-size: 12px; font-weight: 900; box-shadow: 0 4px 15px rgba(0,0,0,0.3); margin-bottom: 8px; animation: bounceTooltip 4s infinite; }
.wa-tooltip::after { content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); border-width: 5px 5px 0; border-style: solid; border-color: white transparent transparent transparent; }
@keyframes bounceTooltip { 0%, 100% { transform: translateY(10px); opacity: 0; } 10%, 90% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-5px); } }
.floating-wa { width: 55px; height: 55px; background-color: #25d366; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); transition: 0.3s; }
.floating-wa:hover { transform: scale(1.1); box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6); }

/* ======================================================== */
/* الهاتف الحي (Live Smartphone Mockup - المحرك الشامل) */
/* ======================================================== */
.smartphone-mockup {
    border: 10px solid #0f172a; border-radius: 40px; width: 100%; max-width: 340px; aspect-ratio: 9/19;
    margin: 0 auto; position: relative; background: #000; overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), inset 0 0 0 2px rgba(255,255,255,0.1);
}
.mockup-layer-bg { position: absolute; inset: 0; z-index: 1; }
.mockup-layer-canvas { position: absolute; inset: 0; z-index: 2; display: none; pointer-events: none; }
.mockup-layer-content { position: absolute; inset: 0; z-index: 3; overflow-y: auto; scrollbar-width: none; }
.mockup-layer-content::-webkit-scrollbar { display: none; }
.mockup-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 25px; background: #0f172a; border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; z-index: 50; }

/* كلاسات السحب والإفلات وتحديد الأوسمة */
.drag-handle { cursor: grab; color: var(--text-muted); }
.drag-handle:active { cursor: grabbing; color: var(--primary); }
.sortable-ghost { opacity: 0.3; background: rgba(14, 165, 233, 0.2); border-radius: 12px; }

.badge-selector-item { cursor: pointer; border: 2px solid transparent; transition: 0.2s; background: rgba(255,255,255,0.05); border-radius: 12px; padding: 6px; }
.badge-selector-item.selected { border-color: var(--primary); background: rgba(14, 165, 233, 0.1); transform: scale(1.1); }

/* الستايلات الافتراضية للمعاينة (تتغير بواسطة ملفات الـ CSS الخاصة بالثيم) */
#live-preview-content { padding: 40px 20px 20px; text-align: center; min-height: 100%; display: flex; flex-direction: column; align-items: center; }
.theme-profile-img { width: 100px; height: 100px; object-fit: cover; margin: 0 auto 12px auto; display: block; border-radius: 50%; border: 2px solid rgba(255,255,255,0.1); }
.theme-name { font-size: 18px; font-weight: 900; color: white; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.theme-bio { font-size: 12px; color: rgba(255,255,255,0.7); margin-bottom: 24px; line-height: 1.5; padding: 0 10px; }
.theme-links-container { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.theme-link-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 12px; border-radius: 12px; color: white; text-decoration: none; font-size: 13px; font-weight: bold; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; }
.theme-link-logo { width: 20px; height: 20px; object-fit: contain; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }