/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: hsl(222.2, 84%, 4.9%);
    --foreground: hsl(210, 40%, 98%);
    --white: #fff;
    --card: hsl(222.2, 84%, 4.9%);
    --card-foreground: hsl(210, 40%, 98%);
    --muted: hsl(217.2, 32.6%, 17.5%);
    --muted-foreground: hsl(215, 20.2%, 65.1%);
    --primary: #EC4899;
    --primary-foreground: hsl(222.2, 47.4%, 11.2%);
    --secondary: hsl(217.2, 32.6%, 17.5%);
    --secondary-foreground: hsl(210, 40%, 98%);
    --accent: hsl(217.2, 32.6%, 17.5%);
    --accent-foreground: hsl(210, 40%, 98%);
    --destructive: hsl(0, 62.8%, 30.6%);
    --destructive-foreground: hsl(210, 40%, 98%);
    --border: hsl(217.2, 32.6%, 17.5%);
    --input: hsl(217.2, 32.6%, 17.5%);
    --ring: hsl(212.7, 26.8%, 83.9%);
}

[data-theme="light"] {
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(222.2, 84%, 4.9%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(222.2, 84%, 4.9%);
    --muted: hsl(210, 40%, 96.1%);
    --muted-foreground: hsl(215.4, 16.3%, 46.9%);
    --primary: #EC4899;
    --primary-foreground: hsl(210, 40%, 98%);
    --secondary: hsl(210, 40%, 96.1%);
    --secondary-foreground: hsl(222.2, 47.4%, 11.2%);
    --accent: hsl(210, 40%, 96.1%);
    --accent-foreground: hsl(222.2, 47.4%, 11.2%);
    --destructive: hsl(0, 84.2%, 60.2%);
    --destructive-foreground: hsl(210, 40%, 98%);
    --border: hsl(214.3, 31.8%, 91.4%);
    --input: hsl(214.3, 31.8%, 91.4%);
    --ring: hsl(222.2, 84%, 4.9%);
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    border-bottom: 1px solid var(--border);
    background: var(--background);
    backdrop-filter: blur(8px);
    padding: 1rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon i {
    color: var(--white);

}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

.logo-text p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--accent);
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 100px);
}

/* Tabs */
.tabs-container {
    margin-bottom: 2rem;
}

.tabs-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.25rem;
    gap: 0.25rem;
}

.tab-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 1rem;
}

.tab-trigger:hover {
    color: var(--foreground);
}

.tab-trigger.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    margin-bottom: 30px;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Input Container - Matching React Version */
.input-container {
    max-width: 48rem;
    margin: 0 auto;
    margin-bottom: 2rem;
}

.input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.url-input {
    width: 100%;
    padding: 1rem 3rem 1rem 3rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    background: var(--background);
    color: var(--foreground);
    transition: all 0.2s;
    outline: none;
}

.url-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.url-input::placeholder {
    color: var(--muted-foreground);
}

.input-icon-left {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
    pointer-events: none;
}

.paste-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary);
    border: none;
    color: var(--secondary-foreground);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.paste-button:hover {
    background: var(--accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
}

.btn-outline:hover {
    background: var(--accent);
}

.btn-full {
    width: 100%;
}

/* New Video Button */
.new-video-btn {
    background: var(--secondary);
    color: var(--secondary-foreground);
    margin-left: 1rem;
}

.new-video-btn:hover {
    background: var(--accent);
}

/* Button Container */
.button-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Download Header */
.download-header {
    text-align: center;
    margin-bottom: 2rem;
}

.download-header-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.download-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.download-header p {
    color: var(--muted-foreground);
    max-width: 24rem;
    margin: 0 auto;
}

#check-url-btn {
    color: var(--white);
}

/* Loading, Error States */
.loading-state,
.error-state {
    text-align: center;
    padding: 3rem 0;
}

.loading-icon,
.error-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.error-state {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 0.75rem;
    padding: 2rem;
}

.error-icon {
    background: rgba(239, 68, 68, 0.1);
}

.hidden {
    display: none;
}

/* Video Preview */
.video-info-card {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.video-thumbnail {
    flex: 0 0 200px;
}

.video-thumbnail img {
    width: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.video-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.video-author {
    color: rgba(59, 130, 246, 1);
    font-weight: 600;
}

.video-description {
    color: var(--muted-foreground);
    line-height: 1.6;
}

.video-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--muted);
    border-radius: 0.5rem;
}

.stat-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-weight: 600;
    color: var(--foreground);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Download Options */
.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.download-option {
    text-align: center;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.download-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.download-option-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.mp4-icon {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.2);
}

.mp3-icon {
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.2);
}

.m4a-icon {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid rgba(34, 197, 94, 0.2);
}

.download-option h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.quality-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.mp4-badge {
    background: rgba(239, 68, 68, 1);
    color: white;
}

.mp3-badge {
    background: rgba(59, 130, 246, 1);
    color: white;
}

.m4a-badge {
    background: rgba(34, 197, 94, 1);
    color: white;
}

.download-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mp4-btn {
    background: rgba(239, 68, 68, 1);
    color: white;
}

.mp4-btn:hover {
    background: rgba(220, 38, 38, 1);
}

.mp3-btn {
    background: rgba(59, 130, 246, 1);
    color: white;
}

.mp3-btn:hover {
    background: rgba(37, 99, 235, 1);
}

.m4a-btn {
    background: rgba(34, 197, 94, 1);
    color: white;
}

.m4a-btn:hover {
    background: rgba(22, 163, 74, 1);
}

/* Progress */
.progress-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.progress-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--secondary);
    border-radius: 0.25rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: transform 0.3s ease;
    transform: translateX(-100%);
}

/* History */
.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.history-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: var(--primary);
}

.history-thumbnail {
    flex: 0 0 80px;
}

.history-thumbnail img {
    width: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    border-radius: 0.5rem;
}

.history-details {
    flex: 1;
}

/* FAQ */
.faq-item {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.faq-trigger {
    width: 100%;
    padding: 1rem;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--foreground);
}

.faq-content {
    padding: 0 1rem 1rem;
    color: var(--muted-foreground);
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    .video-info-card {
        flex-direction: column;
    }

    .video-thumbnail {
        flex: none;
    }

    .video-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .download-options {
        grid-template-columns: 1fr;
    }

    .tab-trigger span {
        display: none;
    }

    .history-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .button-container {
        flex-direction: column;
        align-items: stretch;
    }

    .new-video-btn {
        margin-left: 0;
    }
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

.toast-success {
    background: rgba(34, 197, 94, 1);
    color: white;
}

.toast-error {
    background: rgba(239, 68, 68, 1);
    color: white;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rotate-180 {
    transform: rotate(180deg);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bordered-text-bubble {
    /* 1. Set the background to be transparent (no fill) */
    background-color: transparent; 


    /* 2. Set a white border (The "bubble" or "square frame") */
    border: 2px solid white; /* 2px thickness, solid line, white color */
    
    /* 3. Set the text color to white */
    background-color: var(--background);
    color: var(--foreground);
    
    /* Optional: Styling for a better look */
    max-width: 800px; /* Control the width of the box */
    margin: 40px auto; /* Center the box and add space around it */
    padding: 20px; /* Space between the text and the border */
    border-radius: 8px; /* Slightly rounded corners */
    text-align: start; /* Align text to the right for Arabic */
    font-family: Arial, sans-serif;
}

.bordered-text-bubble p {
    margin: 0; /* Remove default paragraph margin for tight packing */
}


/* ====== Language Dropdown (SVG Flags + Animation + Responsive) ====== */
.lang-container {
  position: relative; /* بدل fixed، حتى يكون تحت الفوتر */
  display: flex;
  justify-content: center;
  margin-top: 20px; /* المسافة فوق الزر */
  z-index: 1000; /* أعلى من العناصر المجاورة */
}

.lang-dropdown {
  position: relative;
}

.lang-btn {
  background-color: #20232a; /* اللون الغامق */
  color: #fff; /* لون النص */
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 15px;
  gap: 8px;
  transition: background 0.3s;
  position: relative;
  z-index: 1000;
}

.lang-btn:hover {
  background-color: #2f333b;
}

.lang-menu {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #20232a; /* نفس لون الزر */
  list-style: none;
  margin: 0;
  padding: 5px 0;
  border-radius: 8px;
  display: none;
  min-width: 160px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 1000;
}

.lang-menu.show {
  display: block;
}

.lang-menu li a {
  color: #fff; /* نص أبيض */
  text-decoration: none;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s;
}

.lang-menu li a:hover {
  background-color: #2f333b;
}

.flag {
  width: 24px;
  height: 18px;
  object-fit: cover;
}

/*arabic*/
/* 1. تطبيق خط Cairo على كل المحتوى العربي */
[lang="ar"],
[lang="ar"] * {
  font-family: 'Cairo', sans-serif;
}

/* 2. الأهم: إلغاء تطبيق خط Cairo على الأيقونات وتطبيق الخط الأصلي لها */

/* استثني فئات Font Awesome الأساسية (fas, far, fab, fa-solid, إلخ) */
[lang="ar"] .fa,
[lang="ar"] .fas,
[lang="ar"] .far,
[lang="ar"] .fab,
[lang="ar"] .fa-solid,
[lang="ar"] .fa-regular,
[lang="ar"] .fa-brands,
[lang="ar"] i[class*="fa-"] {
  /* قم بإعادة تعيين font-family إلى "Font Awesome 6 Free" أو حسب إصدارك */
  /* يمكنك استخدام اسم الخط الافتراضي لـ Font Awesome وهو "Font Awesome 6 Free" أو "Font Awesome 5 Free" */
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "Font Awesome 6 Brands", sans-serif !important; 
  /* إذا كنت لا تعرف اسم الخط بالضبط، يمكنك محاولة استخدام القيمة الافتراضية للخطوط الغربية */
  /* أو يمكنك فقط كتابة sans-serif أو الخط الإنجليزي الأساسي */
}


/* ------------------------------------------- */
/* تنسيقات قسم الخطوات (متوافقة مع المتغيرات) */
/* ------------------------------------------- */

/* 1. تنسيق الحاوية الرئيسية باستخدام المتغيرات */
.how-it-works {
    text-align: center;
    padding: 60px 20px;
    direction: ltr; 
    /* استخدام متغيرات CSS لضمان التوافق مع الوضع الليلي/النهاري */
    background-color: var(--background);
    color: var(--foreground);
}

/* 2. تعديل ألوان النصوص الخارجية لتستخدم المتغيرات */
.how-it-works .section-title {
    color: var(--foreground); 
    font-size: 2.2em;
    margin-bottom: 10px;
}

.how-it-works .section-description {
    color: var(--foreground); 
    opacity: 0.8; /* جعل النص أقل وضوحًا قليلاً */
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* 3. رابط الدليل والسهم - (تم إبقائه بلون ثابت وجذاب) */
.guide-link {
    color: #4dd0e1; /* لون أزرق سماوي لامع وثابت */
    font-weight: 600;
    font-size: 1.1em;
    margin-top: 30px;
}

.guide-arrow .arrow-icon {
    display: block;
    color: #4dd0e1; 
    font-size: 2.5em;
    margin-bottom: 15px;
    animation: bounce 2s infinite; 
}

/* حركة السهم (تبقى كما هي) */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 4. الصندوق البنفسجي (يبقى ثابتاً ومميزاً) */
.guide-box {
    background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%); 
    color: white;
    padding: 40px 30px;
    border-radius: 25px; 
    max-width: 750px; 
    margin: 20px auto; 
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7); 
    text-align: right; 
    border: 3px solid rgba(255, 255, 255, 0.1); 
    position: relative;
    overflow: hidden; 
}

/* باقي تنسيقات .guide-box h3, .step, .step-number, .step-content h4, .step-content h4::after, .step-content p تبقى كما هي لأنها تستخدم اللون الأبيض والبنفسجي */
/* ... (أضف بقية الكود الذي زودتك به سابقاً هنا)
/* ------------------------------------------- */
/* تنسيقات قسم الخطوات (وضع ليلي مُحسّن) */
/* ------------------------------------------- */

/* 1. إلغاء الخلفية الفاتحة (للتوافق مع الوضع الليلي للموقع) */
.how-it-works {
    text-align: center;
    padding: 60px 20px;
    direction: ltr; 
    /* تم حذف: background-color: #f4f7f9; */
    background-color: transparent; /* ليتناسب مع خلفية الموقع الداكنة */
}

/* 2. تعديل ألوان النصوص الخارجية لتكون فاتحة */
.how-it-works h2 {
    color: #f0f0f0; /* لون فاتح ناعم للعناوين الكبيرة */
    font-size: 2.2em;
    margin-bottom: 10px;
}

.how-it-works p {
    color: #cccccc; /* لون رمادي فاتح للنصوص العادية */
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* 3. رابط الدليل والسهم - (تم إبقائه ساطعاً ليلفت الانتباه) */
.guide-link {
    color: #4dd0e1; /* لون أزرق سماوي لامع وجذاب في الوضع الليلي */
    font-weight: 600;
    font-size: 1.1em;
    margin-top: 30px;
}

.guide-arrow .arrow-icon {
    display: block;
    color: #4dd0e1; /* نفس لون الرابط */
    font-size: 2.5em;
    margin-bottom: 15px;
    animation: bounce 2s infinite; 
}

/* حركة السهم (تبقى كما هي) */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ------------------------------------------- */
/* تنسيقات قسم الخطوات (RTL - اللغة العربية) */
/* ------------------------------------------- */

/* 1. تنسيق الحاوية الرئيسية باستخدام المتغيرات والاتجاه RTL */
.how-it-works {
    text-align: center;
    padding: 60px 20px;
    direction: rtl; /* ✅ تم التعديل ليكون من اليمين لليسار */
    /* استخدام متغيرات CSS للوضع الليلي/النهاري */
    background-color: var(--background); 
    color: var(--foreground); 
}

/* 2. تعديل ألوان النصوص الخارجية لتستخدم المتغيرات */
.how-it-works .section-title {
    color: var(--foreground); 
    font-size: 2.2em;
    margin-bottom: 10px;
}

.how-it-works .section-description {
    color: var(--foreground); 
    opacity: 0.85;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

/* 3. رابط الدليل والسهم */
.guide-link {
    color: #4dd0e1;
    font-weight: 600;
    font-size: 1.1em;
    margin-top: 30px;
}

.guide-arrow .arrow-icon {
    display: block;
    color: #4dd0e1; 
    font-size: 2.5em;
    margin-bottom: 15px;
    animation: bounce 2s infinite; 
}

/* حركة السهم (تبقى كما هي) */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 4. الصندوق البنفسجي (يبقى ثابتاً ومميزاً) */
.guide-box {
    background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%); 
    color: white;
    padding: 40px 30px;
    border-radius: 25px; 
    max-width: 750px; 
    margin: 20px auto; 
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7); 
    text-align: right; /* ✅ محاذاة النص لليمين */
    border: 3px solid rgba(255, 255, 255, 0.1); 
    position: relative;
    overflow: hidden; 
}

/* عنوان الصندوق */
.guide-box h3 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); 
}

/* تنسيق الخطوة الفردية */
.step {
    display: flex; 
    flex-direction: row; /* ✅ تم تغييرها من 'row-reverse' إلى 'row' لجعل الرقم على اليمين */
    margin-bottom: 30px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15); 
}

/* تنسيق الرقم */
.step-number {
    font-size: 4.5em; 
    font-weight: 900;
    color: rgba(255, 255, 255, 0.15); 
    margin-right: 20px; /* ✅ تم تغيير margin-left إلى margin-right */
    margin-left: 0; 
    line-height: 1; 
    position: relative;
    top: -10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* تنسيق محتوى الخطوة */
.step-content {
    flex-grow: 1; 
    text-align: right; /* ✅ محاذاة لليمين */
}

.step-content h4 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 700;
    color: #ffccff; 
    position: relative;
    padding-bottom: 5px;
}

/* شريط زخرفي تحت العنوان الفرعي */
.step-content h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 3px;
    background-color: #ffccff;
    position: absolute;
    left: 0; /* ✅ تم تغيير right: 0; إلى left: 0; (ليكون الشريط أسفل العنوان ومحاذياً لليسار) */
    right: auto;
    bottom: 0;
    border-radius: 5px;
}

.step-content p {
    margin-top: 10px;
    font-size: 1em;
    color: rgba(255, 255, 255, 0.95); 
    line-height: 1.6;
}

/* إزالة الفاصل من آخر خطوة */
.step:last-child {
    border-bottom: none;
}

/* تعريف حول تطبيق وصف*/
.install-app-section {
  text-align: center;
  color: #fff;
  background: var(--background);
  margin-top: 50px;
  padding: 40px 20px;
  border-radius: 16px;
  box-shadow: 0 0 15px rgba(123, 31, 162, 0.1);
  transition: all 0.3s ease;
}

.install-app-section:hover {
  box-shadow: 0 0 25px rgba(123, 31, 162, 0.2);
}

.install-app-section h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #b26ff1;
}

.install-app-section p {
  font-size: 1.1rem;
  color: #ccc;
  max-width: 700px;
  margin: 0 auto 20px auto;
  line-height: 1.8;
}

.install-btn {
  background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%);
  color: #fff;
  padding: 12px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
  display: inline-block;
}

.install-btn:hover {
  background: linear-gradient(135deg, #4a148c 0%, #7b1fa2 100%);
  transform: scale(1.05);
}

