/* تصميم تطبيق الدردشة الجديد - مفهوم عصري مختلف تماماً */

/* استيراد الخطوط */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* متغيرات التصميم الجديد */
:root {
    /* الألوان الأساسية - مفهوم Glassmorphism */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    
    /* ألوان الخلفية - مفهوم Neumorphism */
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.25);
    --bg-dark: #1a1a2e;
    --bg-dark-secondary: #16213e;
    
    /* ألوان النص */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --text-white: #ffffff;
    
    /* الظلال - مفهوم Soft UI */
    --shadow-neumorphic: 20px 20px 60px #bebebe, -20px -20px 60px #ffffff;
    --shadow-inset: inset 20px 20px 60px #bebebe, inset -20px -20px 60px #ffffff;
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --shadow-floating: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* نصف القطر */
    --radius-small: 12px;
    --radius-medium: 20px;
    --radius-large: 30px;
    --radius-xl: 40px;
    
    /* المسافات */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    
    /* الانتقالات */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* إعادة تعيين شاملة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    direction: rtl;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* خلفية متحركة */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* حاوية التطبيق الرئيسية */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* شريط التنقل العلوي - مفهوم Glassmorphism */
.navbar {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--space-sm) var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-glass);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo::before {
    content: "💬";
    font-size: 2rem;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* أزرار Neumorphic */
.btn {
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-medium);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-neumorphic);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-floating);
}

.btn-primary:active {
    box-shadow: var(--shadow-inset);
    transform: translateY(0);
}

.btn-gradient {
    background: var(--primary-gradient);
    color: var(--text-white);
    box-shadow: var(--shadow-glass);
}

.btn-gradient:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-floating);
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-gradient:hover::before {
    left: 100%;
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.1rem;
}

/* المحتوى الرئيسي */
.main-content {
    flex: 1;
    padding: var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* بطاقات Glassmorphism */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-large);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-glass);
    padding: var(--space-lg);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-floating);
}

/* بطاقات Neumorphic */
.neuro-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-neumorphic);
    padding: var(--space-lg);
    transition: var(--transition-smooth);
}

.neuro-card:hover {
    box-shadow: var(--shadow-floating);
    transform: translateY(-3px);
}

/* قسم الترحيب */
.welcome-section {
    margin-bottom: var(--space-xl);
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

/* الإجراءات السريعة */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.action-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-medium);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.action-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.action-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* قسم الإحصائيات */
.stats-section {
    margin-top: var(--space-xl);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.stat-card {
    text-align: center;
    padding: var(--space-lg);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-medium);
    background: var(--secondary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    margin: 0 auto var(--space-md);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* قسم البطل للزوار */
.hero-section {
    padding: var(--space-xl) 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* العناصر العائمة */
.hero-visual {
    position: relative;
    height: 400px;
}

.floating-elements {
    position: relative;
    height: 100%;
}

.floating-card {
    position: absolute;
    padding: var(--space-md);
    border-radius: var(--radius-medium);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 500;
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    top: 50%;
    left: 20%;
    animation-delay: 2s;
}

.floating-card:nth-child(3) {
    bottom: 20%;
    right: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* قسم المميزات */
.features-section {
    margin-top: var(--space-xl);
    padding: var(--space-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    text-align: center;
    padding: var(--space-xl);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-medium);
    background: var(--success-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    margin: 0 auto var(--space-md);
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* تأثيرات الحركة */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.slide-up {
    animation: slideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .navbar {
        padding: var(--space-sm);
    }
    
    .main-content {
        padding: var(--space-sm);
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.9rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* الوضع المظلم */
[data-theme="dark"] {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-glass: rgba(26, 26, 46, 0.25);
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e0;
    --text-light: #a0aec0;
    --shadow-neumorphic: 20px 20px 60px #0a0a1a, -20px -20px 60px #1e1e32;
    --shadow-inset: inset 20px 20px 60px #0a0a1a, inset -20px -20px 60px #1e1e32;
}

[data-theme="dark"] body::before {
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
}
