@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');

:root {
    /* نظام الألوان الداكن المتميز */
    --bg-primary: #0a0e17;        /* خلفية رئيسية - أسود مزرق عميق */
    --bg-secondary: #111827;      /* خلفية ثانوية */
    --bg-card: #1a2234;           /* خلفية البطاقات */
    --bg-card-hover: #1e2a3f;     /* بطاقة عند التمرير */
    --accent-primary: #f59e0b;    /* ذهبي - اللون الأساسي */
    --accent-secondary: #ef4444;  /* أحمر - ألعاب قتالية */
    --accent-success: #10b981;    /* أخضر */
    --accent-info: #3b82f6;       /* أزرق */
    --text-primary: #f1f5f9;      /* نص رئيسي */
    --text-secondary: #94a3b8;    /* نص ثانوي */
    --text-muted: #64748b;        /* نص خافت */
    --border: #2a3548;            /* حدود */
    --border-focus: #f59e0b;      /* حدود عند التركيز */
    --glass: rgba(26, 34, 52, 0.85);  /* تأثير زجاجي */
    --glass-border: rgba(255, 255, 255, 0.05);
    
    /* الخطوط والمقاسات */
    --font-family: 'Cairo', sans-serif;
    
    /* التأثيرات والظلال */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --shadow-gold: 0 0 15px rgba(245, 158, 11, 0.15);
    --shadow-red: 0 0 15px rgba(239, 68, 68, 0.15);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* تخصيص شريط التمرير */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* أنماط أساسية */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

button, input, select, textarea {
    font-family: inherit;
    background: none;
    border: none;
    color: inherit;
}

button {
    cursor: pointer;
}

/* شاشة التحميل الرئيسية */
#app-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-primary);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-normal);
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--accent-primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loader-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.loader-logo span {
    color: var(--accent-primary);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* تنسيق التخطيط الرئيسي للتطبيق */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-right: 260px; /* مكان القائمة الجانبية */
    transition: margin-right var(--transition-normal);
}

.app-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* حالات إخفاء القائمة الجانبية في الشاشات الصغيرة */
@media (max-width: 1024px) {
    .app-main {
        margin-right: 0;
    }
}
