/* ========================================
   متغيرات CSS للألوان والقيم المتكررة
======================================== */
:root {
    /* ألوان الوضع الفاتح */
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #f093fb;
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-color: #4ecdc4;
    --warning-color: #ffd93d;
    --danger-color: #ff6b6b;
    --info-color: #4facfe;
    
  /* الخلفيات المحسنة */
:root {
    --bg-primary: linear-gradient(135deg, #fdfbfb, #ebedee); /* تدرج ناعم للصفحة */
    --bg-secondary: #ffffff; /* البطاقات والقوائم */
    --bg-tertiary: #f5f6f7; /* فواصل أو أقسام ثانوية */
    --bg-glass: rgba(255, 255, 255, 0.2); /* خلفية شفافة زجاجية */
    --bg-glass-strong: rgba(255, 255, 255, 0.85); /* شفافية أقوى */
}

    /* النصوص */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    
    /* الحدود والظلال */
    --border-color: #e2e8f0;
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);
    
    /* المسافات */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* الانتقالات */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}



/* ========================================
   إعدادات عامة محسنة
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.75;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all var(--transition-normal);
    overflow-x: hidden;
}

/* ========================================
   شاشة التحميل المتطورة
======================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity var(--transition-slow);
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-animation {
    text-align: center;
    color: white;
}

.loading-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.loading-dots div {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: loadingBounce 1.5s ease-in-out infinite both;
}

.loading-dots div:nth-child(1) { animation-delay: -0.32s; }
.loading-dots div:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}





/* ========================================
   الحاوية الرئيسية
======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* ========================================
   شريط التنقل العلوي
======================================== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    padding: 15px 25px;
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.nav-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ========================================
   قسم البطل المحسن
======================================== */
.hero-section {
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 80px;
    background: var(--primary-gradient);
    border-radius: var(--border-radius-lg);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    line-height: 1.2;
}

.title-icon {
    font-size: 1.2em;
    animation: titleIconFloat 3s ease-in-out infinite;
}

@keyframes titleIconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(10deg); }
}

.title-badge {
    font-size: 0.3em;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 1px;
}

.subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.6;
}

.subtitle-highlight {
    display: block;
    font-weight: 600;
    margin-top: 10px;
    color: var(--warning-color);
}

/* ========================================
   مؤشرات الإحصائيات
======================================== */
.stats-preview {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
}

.stat-card i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ========================================
   البحث المحسن
======================================== */
.search-box {
    margin-bottom: 40px;
    text-align: center;
}

.search-box input,
.quick-search input {
    width: 100%;
    max-width: 600px;
    padding: 20px 30px;
    font-size: 1.2rem;
    border: 3px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    outline: none;
    transition: all var(--transition-normal);
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    font-family: 'Cairo', sans-serif;
    font-weight: 500;
    text-align: center;
}

.search-box input:focus,
.quick-search input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), var(--shadow-lg);
    transform: translateY(-3px);
    background: white;
}

.search-box input::placeholder,
.quick-search input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.quick-search {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    margin-top: 10px;
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.search-suggestions.active {
    opacity: 1;
    visibility: visible;
}

.search-suggestions .suggestion {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.search-suggestions .suggestion:hover {
    background: var(--bg-tertiary);
}

/* ========================================
   العناصر العائمة المتحركة
======================================== */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    font-size: 2rem;
    opacity: 0.1;
    animation: floatAround 20s linear infinite;
    animation-delay: var(--delay);
}

.floating-element:nth-child(1) { top: 20%; left: 10%; }
.floating-element:nth-child(2) { top: 30%; right: 15%; }
.floating-element:nth-child(3) { bottom: 40%; left: 20%; }
.floating-element:nth-child(4) { top: 60%; right: 25%; }
.floating-element:nth-child(5) { bottom: 20%; left: 40%; }

@keyframes floatAround {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-20px, -60px) rotate(180deg);
    }
    75% {
        transform: translate(-40px, 20px) rotate(270deg);
    }
}

/* ========================================
   عناوين الأقسام
======================================== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i {
    color: var(--primary-color);
}

/* ========================================
   شبكة الفئات المحسنة
======================================== */
.categories-section {
    margin-bottom: 100px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 40px;
    perspective: 1000px;
}

.category-card {
    position: relative;
    text-decoration: none;
    color: inherit;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    transform-style: preserve-3d;
    min-height: 280px;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
}

.category-card.emails::before {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.9), rgba(155, 89, 182, 0.9));
}

.category-card.congratulations::before {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.9), rgba(241, 196, 15, 0.9));
}

.category-card.complaints::before {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.9), rgba(231, 76, 60, 0.9));
}

.category-card.invitations::before {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.9), rgba(26, 188, 156, 0.9));
}

.category-card.condolences::before {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(127, 140, 141, 0.9));
}
.category-card.mix::before {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.9), rgba(41, 128, 185, 0.9));
}


.card-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.card-content {
    position: relative;
    z-index: 3;
    padding: 40px 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-align: center;
    transition: all var(--transition-normal);
}

.card-icon i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    text-align: center;
}

.category-card p {
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-hover-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-slow);
    z-index: 2;
}

.category-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: var(--shadow-xl);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover .card-background {
    transform: scale(1.02);
    border-color: var(--primary-color);
}

.category-card:hover .card-icon {
    transform: scale(1.1) rotateY(360deg);
}

.category-card:hover .card-hover-effect {
    width: 300px;
    height: 300px;
}

.category-card:hover h3 {
    color: white;
}

.category-card:hover p {
    color: rgba(255, 255, 255, 0.9);
}

.category-card:hover .card-stats {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   قسم الميزات
======================================== */
.features-section {
    margin-bottom: 100px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-secondary);
    padding: 40px 30px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    transition: all var(--transition-normal);
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left var(--transition-slow);
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: all var(--transition-normal);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(360deg);
}

.feature-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   التذييل المحسن
======================================== */
/* ========================================
   التذييل (Footer) المحسن
======================================== */
.main-footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 60px 30px 30px;
    margin-top: 100px;
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100"><polygon fill="rgba(102,126,234,0.1)" points="0,0 0,100 1000,0"/></svg>') no-repeat;
    background-size: cover;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* عمودين فقط */
    gap: 40px;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto 40px auto;
}


.footer-section {
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255,255,255,0.1);
}

.footer-section h3,
.footer-section h4 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.footer-section h3 i,
.footer-section h4 i {
    color: var(--primary-color);
    font-size: 1.4rem;
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 15px;
    padding: 8px 15px;
    position: relative;
    color: rgba(255,255,255,0.7);
    transition: all var(--transition-fast);
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
}

.footer-section ul li:before {
    content: "✓";
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--success-color);
    font-size: 1rem;
    font-weight: bold;
}

.footer-section ul li:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(-8px);
    color: #fff;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.footer-section a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 25px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    font-weight: 500;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 45px;
    height: 45px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-normal);
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.footer-social a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.footer-social a:hover::before {
    left: 100%;
}

.footer-social a:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* تحسين الاستجابة للفوتر */
@media (max-width: 768px) {
    .main-footer {
        padding: 40px 20px 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* ========================================
   صفحات النصوص المحسنة
======================================== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px; /* خفّض الزر قليلاً من الأعلى */
    margin-bottom: 30px;
    padding: 12px 24px;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.search-box {
    margin-bottom: 40px;
    text-align: center;
}

.search-box input {
    width: 100%;
    max-width: 500px;
    padding: 15px 25px;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    outline: none;
    transition: all var(--transition-fast);
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* ========================================
   بطاقات النصوص المحسنة
======================================== */
.texts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.text-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.text-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.text-card:hover::before {
    transform: scaleY(1);
}

.text-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.text-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-card h3::before {
    content: '📄';
    font-size: 1.2rem;
}

.text-card h3:hover {
    color: var(--primary-color);
}

.text-preview {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-style: italic;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.text-preview:hover {
    color: var(--text-secondary);
}

.text-content {
    background: var(--bg-tertiary);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    white-space: pre-line;
    font-size: 0.95rem;
    line-height: 1.7;
    border-right: 4px solid var(--primary-color);
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    box-shadow: inset var(--shadow-sm);
}

.text-content.expanded {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: expandContent var(--transition-normal) ease-out;
}

@keyframes expandContent {
    from {
        opacity: 0;
        transform: translateY(20px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 1000px;
    }
}

/* ========================================
   أزرار النسخ المحسنة
======================================== */
.copy-btn {
    width: 100%;
    padding: 15px 25px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: 'Cairo', sans-serif;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.copy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-normal);
}

.copy-btn:hover::before {
    left: 100%;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.success {
    background: var(--success-color) !important;
}

/* إضافة أزرار إضافية لكل نص */
.text-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.action-btn {
    flex: 1;
    padding: 8px 15px;
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.action-btn.active {
    border-color: var(--danger-color);
    color: var(--danger-color);
    background: rgba(255, 107, 107, 0.1);
}



/* ========================================
   التوست المحسن
======================================== */
.toast {
    position: fixed;
    top: 50px;
    right: 30px;
    background: var(--success-color);
    color: white;
    padding: 0;
    border-radius: var(--border-radius);
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    z-index: 4000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100px);
    transition: all var(--transition-normal);
    overflow: hidden;
    min-width: 300px;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    flex: 1;
}

.toast-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
}

.toast-progress::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: white;
    width: 100%;
    transform: translateX(-100%);
    animation: toastProgress 3s linear;
}

@keyframes toastProgress {
    to {
        transform: translateX(0);
    }
}

.toast.error {
    background: var(--danger-color);
}

.toast.warning {
    background: var(--warning-color);
    color: var(--text-primary);
}

.toast.info {
    background: var(--info-color);
}



/* ========================================
   تحسينات إضافية
======================================== */

/* حالة فارغة محسنة */
.empty-state {
    text-align: center;
    padding: 60px 30px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.empty-state::before {
    content: '🔍';
    display: block;
    font-size: 3rem;
    margin-bottom: 20px;
}

/* إخفاء النصوص المفلترة */
.text-card.hidden {
    display: none;
}

/* رسالة عدم وجود نتائج */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
    animation: fadeIn var(--transition-normal);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   التصميم المتجاوب المحسن
======================================== */
@media (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }
    
    .floating-controls {
        right: 15px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px;
    }
    
    .stats-preview {
        gap: 20px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .texts-grid {
        grid-template-columns: 1fr;
    }
    
    .floating-controls {
        bottom: 20px;
        top: auto;
        transform: none;
        flex-direction: row;
        right: 50%;
        transform: translateX(50%);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .search-container {
        flex-direction: column;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-section {
        padding: 40px 15px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .text-card {
        padding: 20px;
    }
    
    .category-card .card-content {
        padding: 25px 20px;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        right: 10px;
    }
    
    .modal-content {
        padding: 25px;
        margin: 20px 10px;
    }
}

/* ========================================
   تحسينات إمكانية الوصول
======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}



/* Focus states for accessibility */
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========================================
   أزرار المشاركة
======================================== */
.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-family: 'Cairo', sans-serif;
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.share-btn:hover::before {
    left: 100%;
}

.share-btn i {
    font-size: 1rem;
}

/* أزرار المشاركة المخصصة */
.share-whatsapp {
    background: linear-gradient(45deg, #25d366, #128c7e);
    color: white;
}

.share-whatsapp:hover {
    background: linear-gradient(45deg, #128c7e, #075e54);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.share-telegram {
    background: linear-gradient(45deg, #0088cc, #006bb3);
    color: white;
}

.share-telegram:hover {
    background: linear-gradient(45deg, #006bb3, #004d80);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 136, 204, 0.4);
}

.share-facebook {
    background: linear-gradient(45deg, #4267B2, #365899);
    color: white;
}

.share-facebook:hover {
    background: linear-gradient(45deg, #365899, #2d4373);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 103, 178, 0.4);
}

.share-twitter {
    background: linear-gradient(45deg, #1DA1F2, #0d8bd9);
    color: white;
}

.share-twitter:hover {
    background: linear-gradient(45deg, #0d8bd9, #0a6ba8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(29, 161, 242, 0.4);
}

@media (max-width: 768px) {
    .share-buttons {
        justify-content: center;
    }
    
    .share-btn {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

/* Print styles */
@media print {
    .floating-controls,
    .particles,
    .loading-screen,
    .global-search {
        display: none !important;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .hero-section {
        background: none !important;
        color: var(--text-primary) !important;
    }
}
.load-more-btn {
    display: block;
    margin: 20px auto;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(135deg, #764ba2, #667eea);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.load-more-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#scrollToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #4a90e2, #9013fe);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  transition: all 0.3s;
  z-index: 9999;
}

#scrollToTop:hover {
  transform: scale(1.1);
}



