/* ================================================
   Coming Soon Overlay — منصة حروف
   كارد شفاف Glassmorphism مع لوجو الموقع
================================================ */

/*
=== HTML المطلوب إضافته قبل </body> ===

<div id="cs-overlay">
  <div class="cs-card">

    <div class="cs-logo-wrap">
      <img src="/assets/images/favicon/logo.png" alt="حروف" class="cs-logo">
    </div>

    <h2 class="cs-title">جاري تجهيز المنصة</h2>
    <p class="cs-desc">نعمل على تهيئة أفضل تجربة أدبية لك<br>عُد مرة ثانية قريباً</p>

    <div class="cs-progress">
      <div class="cs-progress-bar"></div>
    </div>

    <div class="cs-dots">
      <span></span><span></span><span></span>
    </div>

  </div>
</div>

<script>document.body.classList.add('cs-active');</script>

*/

 
body.cs-active {
    overflow: hidden;
}

 
body.cs-active > *:not(#cs-overlay) {
    filter: blur(3px) brightness(0.88) saturate(0.8);
    pointer-events: none;
    user-select: none;
    transition: filter 0.5s ease;
}

/* ══════════════════════════════
   الـ Overlay — شفاف جداً
══════════════════════════════ */
#cs-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 20, 50, 0.18);
}

/* ══════════════════════════════
   البطاقة — Glassmorphism
══════════════════════════════ */
.cs-card {
     
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);

    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 28px;
    padding: 44px 40px 36px;
    max-width: 370px;
    width: 86%;
    text-align: center;
    direction: rtl;
    position: relative;
    overflow: hidden;

    box-shadow:
        0 0 0 1px rgba(79, 209, 255, 0.12),
        0 20px 60px rgba(0, 0, 0, 0.18),
        0 4px 20px rgba(168, 85, 247, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);

    animation: csCardIn 0.65s cubic-bezier(0.34, 1.5, 0.64, 1) forwards;
}

 
.cs-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2.5px;
    background: linear-gradient(90deg, #4FD1FF, #A855F7, #3B82F6, #4FD1FF);
    background-size: 200% 100%;
    animation: csLineShimmer 2.8s linear infinite;
    border-radius: 28px 28px 0 0;
}

 
.cs-card::after {
    content: '';
    position: absolute;
    bottom: -60px; right: -60px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

@keyframes csCardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes csLineShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ══════════════════════════════
   اللوجو
══════════════════════════════ */
.cs-logo-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 22px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 20px rgba(79, 209, 255, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    animation: csLogoFloat 3.5s ease-in-out infinite;
}

.cs-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(79, 209, 255, 0.4));
}

@keyframes csLogoFloat {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-6px); }
}

/* ══════════════════════════════
   النصوص
══════════════════════════════ */
.cs-title {
    font-family: 'Amiri', serif;
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 10px;
    background: linear-gradient(135deg, #4FD1FF, #A855F7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.4;
}

.cs-desc {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    font-size: 0.93rem;
     
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 28px;
    line-height: 1.85;
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* ══════════════════════════════
   شريط التقدم
══════════════════════════════ */
.cs-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 22px;
}

.cs-progress-bar {
    height: 100%;
    width: 40%;
    border-radius: 99px;
    background: linear-gradient(90deg, #4FD1FF, #A855F7, #3B82F6);
    background-size: 200% 100%;
    animation: csBarMove 2.2s ease-in-out infinite, csBarShimmer 2s linear infinite;
}

@keyframes csBarMove {
    0%   { transform: translateX(-130%); }
    50%  { transform: translateX(200%); }
    100% { transform: translateX(-130%); }
}

@keyframes csBarShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ══════════════════════════════
   النقاط
══════════════════════════════ */
.cs-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
}

.cs-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4FD1FF, #A855F7);
    animation: csDotBounce 1.3s ease-in-out infinite;
}

.cs-dots span:nth-child(2) { animation-delay: 0.2s; }
.cs-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes csDotBounce {
    0%, 80%, 100% { transform: scale(0.65); opacity: 0.35; }
    40%           { transform: scale(1.3); opacity: 1; }
}

/* ══════════════════════════════
   موبايل
══════════════════════════════ */
@media (max-width: 480px) {
    .cs-card {
        padding: 34px 24px 28px;
        border-radius: 22px;
        width: 90%;
    }
    .cs-title      { font-size: 1.4rem; }
    .cs-desc       { font-size: 0.87rem; }
    .cs-logo-wrap  { width: 68px; height: 68px; }
    .cs-logo       { width: 40px; height: 40px; }
}