#v2PodcastModal .modal-content {
    background-color: #f8fafc;
    border-radius: 24px;
}

.podcast-layout-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 85vh;
}

@media (max-width: 768px) {
    .podcast-layout-wrapper { max-height: 100vh; height: 100vh; }
    #v2PodcastModal .modal-dialog { margin: 0; max-width: 100%; height: 100%; }
    #v2PodcastModal .modal-content { border-radius: 0; height: 100%; }
}

.podcast-scroll-area {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    background-color: #f1f5f9;
}

.podcast-node {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease;
    position: relative;
}

/* ترقيم الحوار لتوضيح الترتيب الزمني */
.podcast-order-badge {
    position: absolute;
    top: -10px;
    right: 25px; /* يمين الأفاتار */
    background: #1e1b4b;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 20px;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.podcast-avatar {
    width: 45px;
    height: 45px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-top: 10px; /* ليتناسب مع الترقيم */
}

.podcast-bubble {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0 20px 20px 20px;
    box-shadow: 0 4px 15px -3px rgba(0,0,0,0.05);
    transition: all 0.2s;
    width: 100%;
    overflow: hidden;
    margin-top: 10px;
}

.podcast-bubble:focus-within {
    border-color: #818cf8;
    box-shadow: 0 4px 20px -3px rgba(79, 70, 229, 0.15);
}

.podcast-bubble-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* تحسين شكل قائمة الأصوات (إضافة إطار واضح) */
.voice-select-custom {
    background-color: #ffffff;
    border: 1px solid #cbd5e1; /* إطار واضح ومميز */
    border-radius: 8px;
    font-weight: 700;
    color: #334155;
    font-size: 0.9rem;
    padding: 0.4rem 2rem 0.4rem 0.8rem; /* مساحة للأيقونة */
    width: auto;
    max-width: 200px;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
    transition: 0.2s;
}

.voice-select-custom:focus, .voice-select-custom:hover {
    border-color: #6366f1;
    background-color: #f5f3ff;
    outline: none;
}

.podcast-textarea {
    border: none;
    width: 100%;
    resize: none;
    padding: 1rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #0f172a;
    background: transparent;
    outline: none;
    min-height: 60px;
}

.podcast-bubble-footer {
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.magic-btn-pro {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e1b4b;
    border: none;
    border-radius: 50px;
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.magic-btn-pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.podcast-sticky-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.02);
    z-index: 100;
}


html {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
}

body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    position: relative !important;
}

/* Fix Bootstrap .row negative margins on mobile */
@media (max-width: 768px) {
    .container, 
    .container-fluid,
    .main-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        overflow-x: hidden !important;
    }
    
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Animation for the red card shine */
@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

body, h1, h2, h3, h4, h5, h6, p, span, button, input, textarea, select, label, a, div {
    font-family: 'Cairo', sans-serif;
}

/* 2. حماية واستثناء خطوط الأيقونات والأعلام من التداخل */
i, 
.fa, 
.fas, 
.far, 
.fab, 
[class^="fa-"], 
[class*=" fa-"],
.fi, 
[class^="fi-"], 
[class*=" fi-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", "flag-icons" !important;
}
        /* حالة التبويب غير النشط (الافتراضية) */
        #ttsTabs .nav-link {
            background-color: #f8fafc;
            color: #475569;
            transition: all 0.3s ease;
        }
        
        #ttsTabs .nav-link .fa-bolt {
            color: #94a3b8; /* لون الأيقونة في الحالة غير النشطة */
        }

        /* حالة التبويب النشط (Active) */
        #ttsTabs .nav-link.active {
            background: linear-gradient(135deg, #4f46e5, #7c3aed);
            color: white !important;
            box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3) !important;
        }

        #ttsTabs .nav-link.active .fa-bolt {
            color: #ffc107; /* لون الأيقونة (ذهبي) في التبويب النشط */
        }
        
      .v2-editor-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Toolbar */
.v2-editor-toolbar {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
}

.v2-tool-btn, .v2-tool-select {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.v2-tool-btn:hover, .v2-tool-select:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.v2-tool-btn.icon-only {
    padding: 0.35rem 0.6rem;
}

.v2-voice-name-truncate {
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Textarea */
.v2-editor-body {
    position: relative;
    flex-grow: 1;
}

.v2-textarea {
    width: 100%;
    border: none;
    resize: none;
    padding: 1.25rem;
    font-size: 1rem;
    line-height: 1.7;
    color: #111827;
    background: transparent;
    outline: none;
}

.v2-textarea:focus {
    box-shadow: inset 0 0 0 1px #3b82f6;
}

/* Floating Random Button */
.v2-random-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: 0.2s;
}

.v2-random-btn:hover {
    color: #3b82f6;
    border-color: #3b82f6;
}

/* Footer / Action */
.v2-editor-footer {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 1.25rem;
}

.v2-submit-btn {
    background: #111827;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.v2-submit-btn:hover {
    background: #1f2937;
    color: #ffffff;
}

/* Top Credits Pill */
.v2-credits-pill {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5563;
}



.v2-play-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.08); /* لون شفاف أنيق */
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.15);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    backdrop-filter: blur(4px); /* تأثير الزجاج */
    flex-shrink: 0;
}

/* توسيط أيقونة التشغيل لأنها تكون مائلة قليلاً لليسار طبيعياً */
.v2-play-btn i.fa-play {
    margin-left: 2px; 
}

.v2-play-btn:hover {
    background: #4f46e5;
    color: #ffffff;
    transform: scale(1.1); /* تكبير ناعم عند مرور الماوس */
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.v2-play-btn.playing {
    background: #4f46e5;
    color: #ffffff;
    animation: v2-pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.v2-play-btn.playing i {
    margin-left: 0; /* إعادة التوسيط لأيقونة الإيقاف أو التحميل */
}

@keyframes v2-pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(79, 70, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}



#buyCreditsModal .modal-content.v2m-shell {
    background: #0b0f19;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    position: relative;
}
#buyCreditsModal .v2m-x {
    position: absolute;
    top: 18px;
    left: 18px; /* RTL */
    filter: invert(1);
    opacity: 0.7;
    z-index: 10;
    transition: 0.2s;
}
#buyCreditsModal .v2m-x:hover {
    opacity: 1;
    transform: scale(1.15);
}
#buyCreditsModal .v2m-body {
    padding: 2.25rem 1.75rem;
}
#buyCreditsModal .v2m-head {
    text-align: center;
    margin-bottom: 1.75rem;
}
#buyCreditsModal .v2m-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}
#buyCreditsModal .v2m-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 0.4rem;
}
#buyCreditsModal .v2m-sub {
    color: #94a3b8;
    font-size: 0.9rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Spotlight Card (VIP $39) */
#buyCreditsModal .v2m-spotlight {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(49, 46, 129, 0.85) 100%);
    border: 2px solid #fbbf24;
    border-radius: 20px;
    padding: 1.75rem;
    position: relative;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.15);
    display: grid;
    grid-template-columns: 1.1fr 1.4fr;
    gap: 1.75rem;
    align-items: center;
}
#buyCreditsModal .v2m-ribbon {
    position: absolute;
    top: -12px;
    right: 25px;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
}
#buyCreditsModal .v2m-spot-info {
    text-align: right;
}
#buyCreditsModal .v2m-plan-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fbbf24;
    margin-bottom: 2px;
}
#buyCreditsModal .v2m-plan-sub {
    font-size: 0.8rem;
    color: #cbd5e1;
    margin-bottom: 0.75rem;
}
#buyCreditsModal .v2m-price-box {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 1rem;
}
#buyCreditsModal .v2m-old-price {
    color: #64748b;
    text-decoration: line-through;
    font-size: 1rem;
}
#buyCreditsModal .v2m-new-price {
    font-size: 2.4rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}
#buyCreditsModal .v2m-price-per {
    font-size: 0.8rem;
    color: #94a3b8;
}
#buyCreditsModal .v2m-cta-gold {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    color: #0f172a !important;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    width: 100%;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
    transition: all 0.2s ease;
    border: none;
}
#buyCreditsModal .v2m-cta-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}
#buyCreditsModal .v2m-feats-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
#buyCreditsModal .v2m-feats-2col li,
#buyCreditsModal .v2m-feats-single li {
    font-size: 0.82rem;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}
#buyCreditsModal .v2m-feats-2col li i,
#buyCreditsModal .v2m-feats-single li i {
    color: #10b981;
    font-size: 0.85rem;
    flex-shrink: 0;
}

#buyCreditsModal .v2m-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 أعمدة متساوية */
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

#buyCreditsModal .v2m-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}
#buyCreditsModal .v2m-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}
#buyCreditsModal .v2m-card.featured {
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}
#buyCreditsModal .v2m-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    width: fit-content;
}
#buyCreditsModal .v2m-tag-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}
#buyCreditsModal .v2m-tag-indigo {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}
#buyCreditsModal .v2m-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2px;
}
#buyCreditsModal .v2m-card-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.6rem;
}
#buyCreditsModal .v2m-feats-single {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
#buyCreditsModal .v2m-cta-btn {
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: 0.2s;
}
#buyCreditsModal .v2m-cta-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee !important;
    border: 1px solid rgba(6, 182, 212, 0.4);
}
#buyCreditsModal .v2m-cta-cyan:hover {
    background: #06b6d4;
    color: #0f172a !important;
}
#buyCreditsModal .v2m-cta-indigo {
    background: #4f46e5;
    color: #fff !important;
    border: 1px solid #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
#buyCreditsModal .v2m-cta-indigo:hover {
    background: #4338ca;
}

/* Trust badges & footer */
#buyCreditsModal .v2m-trust {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
}
#buyCreditsModal .v2m-trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
#buyCreditsModal .v2m-trust i {
    color: #10b981;
}
#buyCreditsModal .v2m-dismiss {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 0.8rem;
    display: block;
    width: 100%;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}
#buyCreditsModal .v2m-dismiss:hover {
    color: #94a3b8;
}

/* Responsive Rules for Mobile */
@media (max-width: 991px) {
    #buyCreditsModal .v2m-spotlight {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    #buyCreditsModal .v2m-spot-info {
        text-align: center;
    }
    #buyCreditsModal .v2m-price-box {
        justify-content: center;
    }
}
@media (max-width: 768px) {
    #buyCreditsModal .v2m-body {
        padding: 1.75rem 1rem;
    }
    #buyCreditsModal .v2m-title {
        font-size: 1.35rem;
    }
    #buyCreditsModal .v2m-feats-2col {
        grid-template-columns: 1fr;
        text-align: right;
    }
    #buyCreditsModal .v2m-grid {
        grid-template-columns: 1fr;
    }
    #buyCreditsModal .v2m-trust {
        gap: 0.8rem;
        flex-direction: column;
        align-items: center;
    }
}



#v2VoiceListModal .modal-content {
    border-radius: 24px;
    overflow: hidden;
    background: #f8fafc;
}

.v2-voice-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.85rem;
    cursor: pointer;
    position: relative;
    height: 100%;
}

.v2-voice-card:hover {
    border-color: #6366f1;
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -6px rgba(99, 102, 241, 0.12);
}

/* حالة الصوت المختار */
.v2-voice-card.selected {
    border-color: #4f46e5;
    background: linear-gradient(160deg, #ffffff 0%, #f5f3ff 100%);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3), 0 12px 25px -4px rgba(79, 70, 229, 0.15);
}

/* أيقونة الصوت */
.v2-voice-avatar-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.12);
    transition: 0.2s ease;
}

.v2-voice-card.selected .v2-voice-avatar-box {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* الأصوات المقفلة لغير المشتركين */
.v2-voice-card.locked-voice-card {
    background: #fffdf5;
    border-color: #fde68a;
}

.v2-voice-card.locked-voice-card .v2-voice-avatar-box {
    background: #fef3c7;
    color: #d97706;
    border-color: #fcd34d;
}

/* أزرار الفلترة */
#v2DialectFilters {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#v2DialectFilters::-webkit-scrollbar {
    display: none;
}

/* التجاوب مع شاشات الجوال */
@media (max-width: 576px) {
    .v2-voice-card {
        padding: 0.9rem;
    }
    .v2-voice-avatar-box {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
}

.v2-floating-actions {
    position: absolute;
    bottom: 15px; 
    left: 15px; /* Puts icons on the bottom left (RTL end) */
    display: flex; 
    gap: 8px;
    z-index: 10;
}
.v2-action-icon {
    width: 36px; height: 36px;
    border-radius: 8px; background: #ffffff; border: 1px solid #d1d5db;
    display: flex; align-items: center; justify-content: center;
    color: #4b5563; cursor: pointer; transition: all 0.2s ease; font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.v2-action-icon:hover { color: #4f46e5; border-color: #4f46e5; background: #eef2ff; transform: translateY(-2px); }
.v2-action-icon.active-feature { background: #4f46e5; color: #ffffff; border-color: #4f46e5; }

.v2-editor-fullscreen {
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1060;
    border-radius: 0 !important;
    height: 100vh !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
}
.v2-editor-fullscreen .v2-editor-body { flex-grow: 1; display: flex; }
.v2-editor-fullscreen .v2-textarea { height: auto !important; flex-grow: 1; font-size: 1.15rem; }

.v2m-spotlight-responsive {
    border: 2px solid #ef4444 !important;
    background: linear-gradient(135deg, #2a0a0a 0%, #450a0a 100%) !important;
    position: relative;
    overflow: hidden;
    padding: 2.5rem 1.25rem 1.5rem 1.25rem !important; /* مساحة علوية كافية للشريط */
    border-radius: 20px;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.2);
}

.v2m-ribbon-fixed {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%); /* توسيط مثالي في منتصف البطاقة بالضبط */
    background: #ef4444;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 0 0 12px 12px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
    white-space: nowrap;
}

.v2m-shine-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.08), transparent);
    transform: skewX(-20deg);
    animation: shine 3s infinite;
    pointer-events: none;
}

/* تظبيط القائمة على الجوال */
@media (max-width: 991px) {
    #buyCreditsModal .v2m-feats-2col {
        grid-template-columns: 1fr !important; /* عمود واحد لسهولة القراءة في الجوال */
        gap: 0.75rem !important;
        text-align: right !important;
    }
    #buyCreditsModal .v2m-feats-2col li {
        font-size: 0.85rem !important;
        display: flex !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
}


@keyframes slideUp { from { bottom: -100px; } to { bottom: 0; } }
/* ضمان عدم تغطية الشريط السفلي لمحتوى الفوتر أو أزرار المشغل في الموبايل */
@media (max-width: 768px) { 
    body { padding-bottom: 85px !important; } 
    #fixed-audio-player { bottom: 85px !important; }
    #mobile-action-bar { bottom: 85px !important; }
}


.v2-floating-actions {
    position: absolute;
    bottom: 10px; 
    left: 10px;
    right: 10px; /* التمدد لتمكين التمرير */
    display: flex; 
    gap: 8px;
    z-index: 10;
    overflow-x: auto; /* تفعيل التمرير الأفقي */
    -webkit-overflow-scrolling: touch; /* تمرير ناعم في الموبايل */
    scrollbar-width: none; /* إخفاء شريط التمرير (فايرفوكس) */
    padding-bottom: 5px;
}
.v2-floating-actions::-webkit-scrollbar {
    display: none; /* إخفاء شريط التمرير (كروم وسفاري) */
}
.v2-action-icon {
    width: 36px; height: 36px;
    border-radius: 8px; background: #ffffff; border: 1px solid #d1d5db;
    display: flex; align-items: center; justify-content: center;
    color: #4b5563; cursor: pointer; transition: all 0.2s ease; font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0; /* هام جداً: يمنع انكماش الأيقونات عند كثرتها */
}
.v2-action-icon:hover { color: #4f46e5; border-color: #4f46e5; background: #eef2ff; transform: translateY(-2px); }
.v2-action-icon.active-feature { background: #4f46e5; color: #ffffff; border-color: #4f46e5; }

/* ترك مساحة في الأسفل حتى لا يختفي النص خلف الأيقونات */
.v2-textarea {
    padding-bottom: 55px !important; 
}

/* تحسينات الموبايل للنموذج V2 */
@media (max-width: 576px) {
    .v2-editor-toolbar {
        flex-wrap: wrap; 
    }
    .v2-tool-select {
        flex-grow: 1; /* جعل القائمة تملأ الفراغ */
    }
    #v2GenerateBtn {
        width: 100% !important;
        max-width: none !important;
    }
}

.v2-floating-actions {

    position: absolute;
    bottom: 10px; 
    left: 10px;
    right: 10px; /* لتمتد على عرض المربع */
    display: flex; 
    flex-wrap: nowrap; /* إجبار الأيقونات على البقاء في سطر واحد */
    gap: 8px;
    z-index: 10;
    overflow-x: auto; /* تفعيل التمرير الأفقي */
    -webkit-overflow-scrolling: touch; /* تمرير سلس (Smooth) في الجوال */
    scrollbar-width: none; /* إخفاء شريط التمرير (فايرفوكس) */
    padding-bottom: 5px;
}

.v2-floating-actions::-webkit-scrollbar {
    display: none; /* إخفاء شريط التمرير (كروم وسفاري) */
}

.v2-action-icon {
    width: 36px; 
    height: 36px;
    border-radius: 8px; 
    background: #ffffff; 
    border: 1px solid #d1d5db;
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: #4b5563; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0; /* هام جداً: يمنع انكماش الأيقونات عند السحب */
}

@media (max-width: 576px) {
    .v2-credits-pill {
        padding: 0.4rem 0.8rem !important; /* تقليل الحواف الداخلية */
    }
    .v2-credits-pill i.fa-coins {
        font-size: 1.1rem !important; /* تصغير أيقونة العملة */
    }
    .v2-credits-pill .text-muted.fw-bold {
        font-size: 0.8rem !important; /* تصغير كلمة "الرصيد المتاح" */
    }
    #v2UserCredits {
        font-size: 1.1rem !important; /* تصغير رقم الرصيد */
        margin-right: 0.5rem !important; /* تقليل المسافة بين الرقم والزر */
    }
    .v2-credits-pill button {
        font-size: 0.8rem !important; /* تصغير خط الزر */
        padding: 0.4rem 1rem !important; /* تصغير حجم الزر */
    }
}


.v2-floating-actions {
    position: absolute;
    bottom: 10px; 
    left: 10px;
    right: 10px;
    display: flex; 
    flex-wrap: nowrap; /* إجبار الأيقونات في سطر واحد */
    gap: 8px;
    z-index: 10;
    overflow-x: auto; /* تفعيل التمرير الأفقي */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px; /* مساحة صغيرة في الأسفل لشريط التمرير */
    
    /* إظهار شريط تمرير رفيع في متصفح فايرفوكس */
    scrollbar-width: thin; 
    scrollbar-color: #cbd5e1 transparent; 
}

/* تصميم شريط التمرير لمتصفحات كروم وسفاري */
.v2-floating-actions::-webkit-scrollbar {
    height: 4px; /* ارتفاع (سُمك) شريط التمرير الأفقي */
    display: block; /* إظهار الشريط (كان مخفياً سابقاً) */
}

/* مسار شريط التمرير (الخلفية) */
.v2-floating-actions::-webkit-scrollbar-track {
    background: transparent; 
    border-radius: 10px;
}

/* الجزء المتحرك من شريط التمرير */
.v2-floating-actions::-webkit-scrollbar-thumb {
    background: #cbd5e1; /* لون رمادي فاتح أنيق */
    border-radius: 10px;
}

/* لون الشريط عند تمرير الماوس عليه */
.v2-floating-actions::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; 
}

/* تصميم الأيقونات (يبقى كما هو لمنع الانكماش) */
.v2-action-icon {
    width: 36px; 
    height: 36px;
    border-radius: 8px; 
    background: #ffffff; 
    border: 1px solid #d1d5db;
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: #4b5563; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0; /* يمنع انكماش الأيقونات */
}


.v2-floating-actions {
    position: absolute;
    bottom: 10px; 
    left: 10px;
    right: 10px;
    display: flex; 
    flex-wrap: nowrap;
    justify-content: flex-start; /* يضمن بدء العناصر من نقطة البداية (اليمين في حالتنا) */
    direction: rtl; /* تأكيد اتجاه اليمين لليسار */
    gap: 8px;
    z-index: 10;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    scrollbar-width: thin; 
    scrollbar-color: #cbd5e1 transparent; 
}


/* إصلاح ظهور مشغل الصوت الثابت بشكل افتراضي وخالي في شاشات الموبايل */
#fixed-audio-player.hidden,
.fixed-audio-player.hidden,
#audio-player-toggle.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}



body {
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* 2. Fix the floating audio player so it doesn't overlap the iPhone home bar */
#fixed-audio-player {
    padding-bottom: max(15px, env(safe-area-inset-bottom)) !important;
}

/* 3. Make all buttons Apple-friendly (Minimum tap target 44x44px) */
.v2-action-icon, .btn, .nav-link, .dialect-flag-btn {
    min-width: 44px;
    min-height: 44px;
    /* Prevent the ugly grey tap highlight on iOS */
    -webkit-tap-highlight-color: transparent; 
    /* Prevent text selection when tapping quickly */
    user-select: none; 
    -webkit-user-select: none;
}

/* 4. Smooth horizontal scrolling for your toolbars on iPhone */
.scroll-container-fix, .v2-floating-actions {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Super smooth iOS scroll */
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}
.scroll-container-fix::-webkit-scrollbar, 
.v2-floating-actions::-webkit-scrollbar {
    display: none; /* Hide scrollbar on iOS/Chrome for clean look */
}


.v2-textarea {
    background-color: #f8fafc; /* Very soft blue/grey */
    border: 1px solid #e2e8f0;
    border-radius: 16px; /* softer edges */
    padding: 1.5rem;
    font-size: 1.1rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.v2-textarea:focus {
    background-color: #ffffff;
    border-color: #4f46e5; /* Your brand purple */
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}



    /* إجبار حاوية الأيقونات العائمة على عدم تجاوز عرض المربع لتفعيل السحب */
    .v2-editor-body .v2-floating-actions {
        position: absolute !important;
        bottom: 10px !important;
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important; /* هذا هو السطر السحري الذي سيحل المشكلة */
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important; /* تفعيل سحب ناعم جداً على الآيفون والأندرويد */
        gap: 8px !important;
        z-index: 50 !important; /* ضمان بقائها فوق مربع الكتابة كي لا يسرق اللمس */
        padding-bottom: 8px !important;
    }

    /* منع الأيقونات من الانكماش للحفاظ على حجمها عند السحب */
    .v2-editor-body .v2-action-icon {
        flex: 0 0 auto !important; 
        width: 38px !important;
        height: 38px !important;
    }

    /* إخفاء شريط التمرير القبيح لتبدو واجهة الجوال نظيفة (سيظل السحب باللمس يعمل) */
    .v2-editor-body .v2-floating-actions::-webkit-scrollbar {
        display: none !important;
    }
    
    
    
    .v2-editor-body .v2-floating-actions {
    position: absolute !important;
    bottom: 10px !important;
    left: 10px !important;
    right: 10px !important;
    width: calc(100% - 20px) !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important; /* Smooth iOS scroll */
    scrollbar-width: none !important; /* Hide Firefox scrollbar */
    padding-bottom: 5px !important;
    z-index: 50 !important; /* Keeps touches above the textarea */
    pointer-events: auto !important; /* Enforces touch grabbing */
    overscroll-behavior-x: contain !important; /* Prevents page swipe */
}

.v2-editor-body .v2-floating-actions::-webkit-scrollbar {
    display: none !important; /* Hide Chrome/Safari scrollbar */
}

.v2-editor-body .v2-action-icon {
    flex: 0 0 auto !important; /* Prevents icons from shrinking */
    width: 38px !important;
    height: 38px !important;
    -webkit-user-drag: none !important; /* Prevents image drag instead of scroll */
    touch-action: pan-x pan-y !important; /* Allows browser to pass scroll events */
}

/* 2. Dialect Tags Modal */
#v2DialectFilters {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 5px !important;
    width: 100% !important;
    max-width: 100vw !important;
    overscroll-behavior-x: contain !important;
    pointer-events: auto !important;
}

#v2DialectFilters::-webkit-scrollbar {
    display: none !important;
}

#v2DialectFilters .v2-filter-btn {
    flex: 0 0 auto !important; /* Prevents buttons from shrinking */
    -webkit-user-drag: none !important;
    touch-action: pan-x pan-y !important;
}


.v2-capacity-perk-box {
    background: linear-gradient(135deg, #fffdf5 0%, #eff6ff 100%);
    border: 1.5px dashed #6366f1;
    transition: all 0.25s ease-in-out;
    max-width: 95%;
}

.v2-capacity-perk-box:hover {
    transform: translateY(-2px);
    border-color: #4f46e5;
    background: linear-gradient(135deg, #fffbeb 0%, #e0e7ff 100%);
    box-shadow: 0 6px 16px -2px rgba(79, 70, 229, 0.15) !important;
}

@media (max-width: 576px) {
    .v2-capacity-perk-box {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.75rem !important;
    }
}


/* ==========================================================
   HERO FEATURE PILLS (Fluid Responsive Micro-Cloud)
========================================================== */
.hero-features-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px 6px !important;
    width: 100% !important;
    max-width: 780px !important;
    margin: 1.25rem auto 0 auto !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    overflow: visible !important; /* Prevents edge-cutting */
}

/* Individual Pill */
.hero-features-pills .feature-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    
    /* Modern Glassmorphism effect */
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    
    color: #ffffff !important;
    padding: 6px 13px !important;
    border-radius: 50px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s ease-in-out !important;
    flex: 0 0 auto !important;
}



/* Green Checkmark Icon */
.hero-features-pills .feature-pill i {
    color: #10b981 !important; /* Emerald glowing green */
    font-size: 0.8rem !important;
    flex-shrink: 0 !important;
}

/* Clickable Links (مغير الأصوات & مولد الفيديو) */
.hero-features-pills a.feature-pill {
    cursor: pointer !important;
    background: rgba(99, 102, 241, 0.2) !important; /* Subtle indigo tint for interactive links */
    border-color: rgba(165, 180, 252, 0.4) !important;
}

.hero-features-pills a.feature-pill:hover,
.hero-features-pills a.feature-pill:active {
    background: rgba(99, 102, 241, 0.45) !important;
    transform: translateY(-2px) scale(1.03) !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

/* ==========================================================
   📱 MOBILE SCREENS (iPhones & Small Androids < 576px)
========================================================== */
@media (max-width: 576px) {
    .hero-features-pills {
        gap: 6px 4px !important; /* Tight gaps to save space */
        margin-top: 0.85rem !important;
        padding: 0 4px !important;
    }

    .hero-features-pills .feature-pill {
        padding: 4.5px 9px !important; /* Micro-padding */
        font-size: 0.72rem !important;  /* Ultra-sharp readable text */
        gap: 4px !important;
        border-radius: 30px !important;
        background: rgba(255, 255, 255, 0.09) !important;
    }

    .hero-features-pills .feature-pill i {
        font-size: 0.68rem !important;
    }
}


.v2-credits-pill {
    background: #fffdf5;
    border: 2px solid #fbbf24 !important;
    border-radius: 50px;
    width: fit-content;
    max-width: 100%;
    padding: 0.5rem 1.1rem;
    gap: 0.85rem;
    box-sizing: border-box;
}

.v2-pill-icon { 
    font-size: 1.3rem; 
}

.v2-pill-label { 
    font-size: 0.92rem; 
    margin-inline-end: 0.35rem; 
}

.v2-pill-count { 
    font-size: 1.3rem; 
    margin-inline-end: 0.6rem; 
}

.v2-pill-btn {
    padding: 0.42rem 1.15rem;
    font-size: 0.9rem;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%) !important;
    border: none !important;
    white-space: nowrap;
}

/* 📱 MOBILE OPTIMIZATION (< 576px) */
@media (max-width: 576px) {
    .v2-credits-pill {
        padding: 0.28rem 0.65rem !important; /* Reduces pill height significantly */
        border-width: 1.5px !important;
        gap: 0.4rem !important;
    }

    .v2-pill-icon {
        font-size: 0.95rem !important;
        margin-inline-end: 0.2rem !important;
    }

    .v2-pill-label {
        font-size: 0.75rem !important;
        margin-inline-end: 0.2rem !important;
    }

    .v2-pill-count {
        font-size: 0.98rem !important;
        margin-inline-end: 0.35rem !important;
    }

    .v2-pill-btn {
        padding: 0.26rem 0.7rem !important;
        font-size: 0.75rem !important;
        border-radius: 25px !important;
    }

    .v2-pill-btn i {
        font-size: 0.68rem !important;
        margin-inline-end: 2px !important;
    }
}


@media (max-width: 991px) {
    /* 1. إيقاف تأثيرات الزجاج الثقيلة جداً على الآيفون بالكامل */
    *, *::before, *::after {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    /* توفير خلفيات صلبة بديلة للحفاظ على وضوح النصوص */
    .hero-feature, .feature-pill, .nav-points, .dialect-icon {
        background-color: rgba(30, 58, 138, 0.95) !important;
    }
    .v2-play-btn, .text-action-btn, .voice-card-control-btn {
        background-color: #f8fafc !important;
    }
    
    /* 2. إيقاف القص (clip-path) الثقيل في القسم العلوي واستبداله بخط سفلي أنيق */
    .modern-hero {
        clip-path: none !important;
        border-bottom: 3px solid #ffc107;
        padding-bottom: 3rem !important;
    }

    /* 3. إيقاف أنيميشن الدخول (FadeIn) المتعدد الذي يسبب تعليق الشاشة عند التحميل */
    .modern-hero .animate__animated {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    /* إيقاف الحركات اللانهائية الثقيلة للظلال */
    .animate__infinite {
        animation-iteration-count: 1 !important;
    }
}

/* 4. تحسين حركة زر الواتساب (منع استنزاف البطارية والتقطيع) */
#whatsapp-float {
    animation: none !important; /* إيقاف أنيميشن الظلال القديم */
    transform: translateZ(0); /* تفعيل Hardware Acceleration */
}
/* استخدام عنصر وهمي للحركة بوزن خفيف جداً */
#whatsapp-float::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background-color: rgba(37, 211, 102, 0.5);
    z-index: -1;
    animation: hw-pulse 2s infinite ease-out;
}

@keyframes hw-pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* 5. تحرير الذاكرة العشوائية (RAM) في الآيفون */
.dialect-icon {
    will-change: auto !important; /* will-change المتعدد يسبب Crash في سفاري */
}

/* 6. تأجيل تحميل الأقسام السفلية حتى يصل إليها المستخدم (Lazy Rendering) */
.stats-section, 
.features-section, 
#ai-avatar-showcase,
#saudi-reviews-pro,
#auto-voiceover-section,
#tiktok-voices-section {
    content-visibility: auto;
    contain-intrinsic-size: 500px;
}


.v2m-video-shell {
  background: #020617;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  position: relative;
}
.v2m-video-x {
  position: absolute; top: 20px; left: 20px;
  filter: invert(1); opacity: 0.7; z-index: 20; transition: 0.2s;
}
.v2m-video-x:hover { opacity: 1; transform: scale(1.15) rotate(90deg); }
.v2m-video-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(245, 158, 11, 0.12); color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 5px 16px; border-radius: 50px; font-size: 0.82rem; font-weight: 700;
}
.v2m-video-title { font-size: 2rem; font-weight: 900; color: #ffffff; }
.v2m-video-sub { color: #94a3b8; font-size: 0.92rem; max-width: 650px; margin: 0 auto; }

.v2m-video-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px; padding: 2rem;
  transition: all 0.3s ease;
}
.v2m-video-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}
.v2m-video-card.featured {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 2px solid #f59e0b;
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.15);
}
.v2m-video-ribbon {
  position: absolute; top: 16px; right: -35px;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  color: #fff; font-size: 0.72rem; font-weight: 800;
  padding: 4px 40px; transform: rotate(45deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.v2m-video-tag {
  display: inline-block; padding: 4px 12px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 700;
}
.v2m-video-tag.tag-cyan { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.v2m-video-tag.tag-gold { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

.v2m-video-price-box { display: flex; align-items: baseline; gap: 8px; }
.v2m-video-old { color: #64748b; text-decoration: line-through; font-size: 1.1rem; }
.v2m-video-now { font-size: 3rem; font-weight: 900; color: #ffffff; line-height: 1; }
.v2m-video-per { font-size: 0.85rem; color: #94a3b8; }

.v2m-video-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.v2m-video-list li { font-size: 0.88rem; color: #e2e8f0; display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.v2m-video-list li i { font-size: 0.95rem; margin-top: 3px; flex-shrink: 0; }

.v2m-video-btn {
  padding: 0.9rem 1.5rem; border-radius: 14px; font-weight: 800; font-size: 1.05rem;
  text-align: center; text-decoration: none; display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease; width: 100%; border: none; margin-top: 1.5rem;
}
.v2m-video-btn.btn-cyan { background: #06b6d4; color: #0f172a !important; box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3); }
.v2m-video-btn.btn-cyan:hover { background: #22d3ee; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4); }
.v2m-video-btn.btn-gold { background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%); color: #0f172a !important; box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35); }
.v2m-video-btn.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5); }

@media (max-width: 768px) {
  .v2m-video-title { font-size: 1.4rem; }
  .v2m-video-now { font-size: 2.3rem; }
  .v2m-video-card { padding: 1.25rem; }
}


/* إصلاح التمرير في الموبايل داخل نافذة البودكاست */
#v2PodcastModal .modal-body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important; /* سر التمرير السلس في الآيفون */
    overscroll-behavior-y: contain; /* يمنع تحديث الصفحة عند السحب لأسفل */
    max-height: calc(100vh - 140px); /* ترك مساحة للهيدر والفوتر */
}

@media (max-width: 991px) {
    #v2PodcastModal .modal-body {
        max-height: calc(100vh - 80px);
        padding-bottom: 90px !important; /* مساحة إضافية كي لا يختفي الزر الأخير تحت شريط الآيفون */
    }
}


@media (max-width: 576px) {
    /* جعل النافذة ممتدة بالكامل (App-Like) */
    #v2VoiceListModal .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        height: 100% !important;
    }
    #v2VoiceListModal .modal-content {
        height: 100% !important;
        border-radius: 0 !important;
    }
    
    /* تقليص مساحات الهيدر الثابت لزيادة مساحة عرض الأصوات */
    #v2VoiceListModal .sticky-top {
        padding: 10px 15px 5px 15px !important;
    }
    #v2VoiceListModal .modal-header {
        padding: 15px 15px 10px 15px !important;
        border-radius: 0 !important;
    }
    
    /* احترام مساحة الآيفون السفلية (Home Indicator) */
    #v2VoiceListModal .modal-body {
        padding-bottom: env(safe-area-inset-bottom, 25px) !important;
    }

    /* ضغط كروت الأصوات لتعرض 6-8 أصوات في الشاشة بدلاً من 3 */
    .v2-voice-card {
        padding: 10px 12px !important;
        border-radius: 12px !important;
        gap: 0 !important;
    }
    
    /* تصغير الأفاتار ليناسب التصميم المدمج */
    .v2-voice-avatar-box {
        width: 38px !important;
        height: 38px !important;
        font-size: 1rem !important;
        border-radius: 10px !important;
    }
    
    /* تعديل حجم الخطوط بدقة عالية */
    .v2-voice-card .text-truncate h6 {
        font-size: 0.9rem !important;
        margin-bottom: 2px !important;
    }
    .v2-voice-card .badge {
        font-size: 0.65rem !important;
        padding: 2px 6px !important;
    }
    
    /* تصغير أزرار الاستخدام السفلية */
    .v2-card-action {
        margin-top: 8px !important;
    }
    .v2-card-action .btn {
        padding: 6px !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
    }

    /* تصغير المسافات في الشبكة (Grid) */
    #v2ModalVoiceGrid {
        gap: 6px !important;
        padding: 0 5px !important;
    }
    #v2ModalVoiceGrid > .v2-voice-item {
        padding-left: 4px !important;
        padding-right: 4px !important;
        margin-top: 0 !important;
    }
}

/* =========================================================
   إصلاح مشكلة لون زر التشغيل (تجنب بقاء اللون الأبيض في الآيفون)
   ========================================================= */

/* الشكل الافتراضي */
.v2-play-btn {
    background-color: #eef2ff !important;
    color: #4f46e5 !important;
    border: 1px solid #c7d2fe !important;
    -webkit-tap-highlight-color: transparent !important;
    transform: translateZ(0); /* تسريع الأداء في iOS */
}

/* إجبار الأيقونة على وراثة اللون الصحيح */
.v2-play-btn i {
    color: inherit !important;
    margin-left: 2px; /* توسيط دقيق لأيقونة Play */
}

/* حالة التشغيل (اللون يتغير للبنفسجي والأيقونة بيضاء) */
.v2-play-btn.playing,
.v2-play-btn:active {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
    border-color: #4f46e5 !important;
}

/* توسيط أيقونة Pause أثناء التشغيل */
.v2-play-btn.playing i.fa-pause {
    margin-left: 0 !important;
}

/* 
  السر هنا: 
  تطبيق الـ Hover للماوس فقط! هذا يمنع الآيفون من تعليق اللون الأبيض للأيقونة
  بسبب لمس الشاشة (Touch)
*/
@media (hover: hover) {
    .v2-play-btn:hover {
        background-color: #4f46e5 !important;
        color: #ffffff !important;
    }
}



.podcast-sample-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #eef2ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}
.podcast-sample-wrapper:hover {
    box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.15);
    transform: translateY(-2px);
}
.podcast-play-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #312e81 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}
.podcast-play-circle i { margin-left: 3px; } /* توسيط أيقونة التشغيل */
.podcast-play-circle.playing i { margin-left: 0; }
.podcast-play-circle:hover { transform: scale(1.05); }

/* تأثير الموجات الصوتية الوهمية */
.podcast-wave-bars {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
    opacity: 0.5;
}
.podcast-wave-bar {
    width: 4px;
    background-color: #4f46e5;
    border-radius: 2px;
    height: 4px; /* Default height when paused */
    transition: height 0.2s ease;
}
/* حركة الموجات عند التشغيل */
.podcast-sample-wrapper.is-playing .podcast-wave-bar {
    animation: podcastWave 1s infinite ease-in-out alternate;
}
.podcast-sample-wrapper.is-playing .podcast-wave-bar:nth-child(1) { animation-delay: 0.0s; }
.podcast-sample-wrapper.is-playing .podcast-wave-bar:nth-child(2) { animation-delay: 0.2s; }
.podcast-sample-wrapper.is-playing .podcast-wave-bar:nth-child(3) { animation-delay: 0.4s; }
.podcast-sample-wrapper.is-playing .podcast-wave-bar:nth-child(4) { animation-delay: 0.6s; }
.podcast-sample-wrapper.is-playing .podcast-wave-bar:nth-child(5) { animation-delay: 0.8s; }

@keyframes podcastWave {
    0% { height: 4px; }
    100% { height: 24px; }
}


.effect-card-label {
    transition: all 0.2s ease;
    border-color: #e2e8f0;
    background-color: #ffffff;
}
.effect-card-label:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.effect-card-label.selected {
    border-color: #4f46e5;
    background-color: #eef2ff;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}



