:root {
    --primary-blue: #2A4B8C;
    --secondary-blue: #3A6BC5;
    --light-blue: #4CC9F0;
    --dark-blue: #1A365D;
    --gradient-blue: linear-gradient(135deg, #2A4B8C 0%, #4CC9F0 100%);
    --success-green: #10B981;
    --warning-orange: #F59E0B;
    --danger-red: #EF4444;
    --purple-accent: #8B5CF6;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-dark: #1E293B;
    --text-light: #64748B;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-md: 0 4px 12px rgba(42, 75, 140, 0.15);
    --shadow-lg: 0 10px 30px rgba(42, 75, 140, 0.2);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #E6F0FF 0%, #F0F7FF 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* الشريط الجانبي */
.sidebar {
    width: 280px;
    background: var(--dark-blue);
    color: white;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    text-decoration: none;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.logo-text {
    font-size: 24px;
    font-weight: 900;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #ffffff;
}

.user-details p {
    font-size: 0.85rem;
    opacity: 0.8;
}

.sidebar-level-card {
    padding: 15px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sidebar-level-card .level-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 700;
}

.sidebar-progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-progress-bar {
    height: 8px;
    width: 0%;
    border-radius: 8px;
    transition: width 0.4s ease;
    background: var(--primary-blue);
}

.sidebar-progress-bar.beginner {
    background: linear-gradient(135deg, #10B981, #059669);
}

.sidebar-progress-bar.intermediate {
    background: linear-gradient(135deg, #F59E0B, #D97706);
}

.sidebar-progress-bar.advanced {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
}

.sidebar-progress-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 8px;
}

.sidebar-progress-msg {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 8px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(-5px);
}

.nav-link.active {
    background: var(--gradient-blue);
    color: white;
    box-shadow: var(--shadow-md);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.badge#notificationsCountBadge {
    display: none;
    background: var(--danger-red);
    color: #fff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    margin-right: 6px;
}

.sidebar-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* المحتوى الرئيسي */
.main-content {
    flex: 1;
    margin-right: 280px;
    padding: 0;
    transition: var(--transition);
    width: calc(100% - 280px);
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-right: 0;
        width: 100%;
    }
    
    .menu-toggle {
        display: flex;
    }
}

.top-nav {
    background: white;
    padding: 20px 40px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 90;
}

.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(42, 75, 140, 0.1);
}

.input,
select.input,
textarea.input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    background: #FFFFFF;
    color: var(--text-dark);
    transition: var(--transition);
}

.input:focus,
select.input:focus,
textarea.input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(42, 75, 140, 0.1);
    background: #EFF6FF;
}

.input::placeholder,
textarea.input::placeholder {
    color: var(--text-light);
}

.input[disabled],
select.input[disabled],
textarea.input[disabled] {
    background: #F1F5F9;
    color: #94A3B8;
    border-color: #E2E8F0;
    cursor: not-allowed;
}

select.input {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%2364748B' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M5.5 7l4.5 4 4.5-4'/></svg>");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 36px;
}

textarea.input {
    resize: vertical;
    min-height: 100px;
}

.search-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 1.1rem;
    cursor: pointer;
}

/* نتائج البحث المنسدلة */
.search-results-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 100%;
    max-height: 360px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow-y: auto;
    z-index: 95;
}
.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #F1F5F9;
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-title {
    font-weight: 800;
    color: var(--dark-blue);
}
.search-result-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}
.search-result-actions .btn {
    padding: 8px 14px;
    font-size: 13px;
}

/* تمييز العنوان في صفحة نمط التعلم */
#learningStylePage .section-title {
    color: #ffffff;
}

.top-nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 10px;
}

.notification-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--danger-red);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--gradient-blue);
    color: white;
    padding: 15px 25px;
    border-radius: var(--radius-md);
    margin: 0 40px 40px;
    box-shadow: var(--shadow-md);
}

.progress-circle {
    width: 80px;
    height: 80px;
    position: relative;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 6;
}

.circle-progress {
    fill: none;
    stroke: white;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 800;
}

.progress-details {
    flex: 1;
}

.progress-details h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.progress-details p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* مكونات المنصة */
.dashboard-sections {
    padding: 0 40px 40px;
}

.section-header {
    margin-bottom: 30px;
}

.section-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--dark-blue);
    margin-bottom: 10px;
}

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

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.level-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
}

.level-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--light-blue);
}

.level-header {
    padding: 30px;
    position: relative;
    min-height: 180px;
}

.level-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    color: var(--primary-blue);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.level-badge.locked {
    background: #E2E8F0;
    color: #94A3B8;
}

.level-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.level-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
}

.level-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.level-content {
    padding: 25px 30px;
}

.level-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.meta-item {
    text-align: center;
}

.meta-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark-blue);
    display: block;
}

.meta-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 5px;
}

.level-progress {
    margin-bottom: 25px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.progress-bar {
    height: 10px;
    background: #E2E8F0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-blue);
    border-radius: 5px;
    transition: width 1s ease;
}

.level-actions {
    display: grid;
    gap: 12px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-blue);
    color: white;
}

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

.btn-success {
    background: linear-gradient(135deg, var(--success-green), #059669);
    color: white;
}

.notification-card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid #E2E8F0;
    margin-bottom: 12px;
    overflow: hidden;
}
.notification-card.unread {
    background: #F1F5F9;
    border-left: 4px solid var(--primary-blue);
}
.notification-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
}
.notification-card-title {
    font-weight: 800;
    color: var(--dark-blue);
}
.notification-card-time {
    font-size: 0.85rem;
    color: var(--text-light);
}
.notif-status {
    padding: 2px 8px;
    border-radius: 999px;
    background: #E2E8F0;
    color: var(--text-dark);
    font-weight: 700;
}
.notification-card-body {
    padding: 16px;
    color: var(--text-dark);
}
.notification-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #E2E8F0;
    background: #FAFBFF;
}
.notification-card-actions .btn.btn-outline.danger {
    color: var(--danger-red);
    border-color: var(--danger-red);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-orange), #D97706);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background: rgba(42, 75, 140, 0.1);
}

.btn-disabled {
    background: #E2E8F0;
    color: #94A3B8;
    cursor: not-allowed;
}

.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* المودال الرئيسي */
.modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

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

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s ease;
}

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

/* مودال الملف الشخصي */
.profile-modal .modal {
    max-width: 800px;
}

.profile-header {
    background: var(--gradient-blue);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.profile-avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid white;
    background: var(--gradient-blue);
    overflow: hidden;
    margin: 0 auto;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.change-avatar-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.profile-content {
    padding: 30px;
    display: grid;
    gap: 25px;
}

.profile-section {
    background: #F8FAFC;
    border-radius: var(--radius-md);
    padding: 25px;
}

.profile-section h3 {
    color: var(--dark-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-blue);
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.info-value {
    background: white;
    padding: 12px 15px;
    border-radius: var(--radius-md);
    border: 2px solid #E2E8F0;
}

.info-value.editable {
    cursor: pointer;
    transition: var(--transition);
}

.info-value.editable:hover {
    border-color: var(--primary-blue);
    background: #EFF6FF;
}

.phone-number {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-direction: row-reverse;
}
.phone-number .phone-digits {
    direction: ltr;
    unicode-bidi: bidi-override;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: left;
}
input[type="tel"] {
    direction: ltr;
    unicode-bidi: bidi-override;
    text-align: left;
    font-weight: 700;
    letter-spacing: 0.5px;
}
/* مودال الشات بوت */
.chatbot-modal .modal {
    max-width: 900px;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.chatbot-header {
    background: var(--gradient-blue);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chatbot-avatar {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-blue);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #F8FAFC;
}

.message {
    max-width: 80%;
    padding: 15px 20px;
    border-radius: var(--radius-md);
    position: relative;
}

.message.bot {
    background: white;
    align-self: flex-start;
    border-right: 4px solid var(--primary-blue);
}

.message.user {
    background: var(--gradient-blue);
    color: white;
    align-self: flex-end;
    border-left: 4px solid var(--secondary-blue);
}

.message-time {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
    text-align: left;
}

.chatbot-input-container {
    padding: 20px;
    border-top: 2px solid #E2E8F0;
    display: flex;
    gap: 15px;
}

.chatbot-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    resize: none;
    height: 60px;
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-actions-container {
    padding: 15px 20px;
    background: #F8FAFC;
    border-top: 2px solid #E2E8F0;
}

.quick-action {
    padding: 8px 16px;
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.quick-action:hover {
    border-color: var(--primary-blue);
    background: #EFF6FF;
}

/* مودال تغيير نمط التعلم */
.settings-modal .modal {
    max-width: 600px;
}

.settings-header {
    background: var(--gradient-blue);
    color: white;
    padding: 25px 30px;
}

.settings-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.settings-subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

.settings-content {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section-title {
    font-size: 1.3rem;
    color: var(--dark-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E2E8F0;
}

.settings-item {
    background: #F8FAFC;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 15px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.settings-item:hover {
    border-color: var(--primary-blue);
    background: white;
    transform: translateX(-5px);
}

.settings-item.selected {
    border-color: var(--primary-blue);
    background: #EFF6FF;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-info h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--dark-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success-green);
}

input:checked + .slider:before {
    transform: translateX(30px);
}

/* إشعارات التوست */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 20px 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 400px;
    z-index: 1100;
    transform: translateX(150%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-right: 4px solid;
}

.notification-toast.show {
    transform: translateX(0);
}

.notification-toast.success {
    border-right-color: var(--success-green);
}

.notification-toast.warning {
    border-right-color: var(--warning-orange);
}

.notification-toast.error {
    border-right-color: var(--danger-red);
}

.notification-toast.info {
    border-right-color: var(--primary-blue);
}

.notification-toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.notification-toast.success .notification-toast-icon {
    background: var(--success-green);
}

.notification-toast.warning .notification-toast-icon {
    background: var(--warning-orange);
}

.notification-toast.error .notification-toast-icon {
    background: var(--danger-red);
}

.notification-toast.info .notification-toast-icon {
    background: var(--primary-blue);
}

.notification-toast-content h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark-blue);
}

.notification-toast-content p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.notification-toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
}

/* روبوت المساعد */
.robot-assistant {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 100;
    cursor: pointer;
}

.robot-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    animation: float 6s infinite ease-in-out;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.robot-icon:hover {
    transform: scale(1.1) rotate(10deg);
}

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

/* زر القائمة للجوال */
.menu-toggle {
    display: none;
    background: var(--gradient-blue);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

/* أقسام المحتوى حسب نمط التعلم */
.learning-style-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 10px;
}

.style-audio {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.style-visual {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 2px solid #ef4444;
}

.style-text {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 2px solid #10b981;
}

/* مستوى التقدم */
.level-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #F8FAFC;
    border-radius: var(--radius-md);
}

.level-badge-large {
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    background: var(--gradient-blue);
    color: white;
}

.level-badge-large.beginner {
    background: linear-gradient(135deg, #10B981, #059669);
}

.level-badge-large.intermediate {
    background: linear-gradient(135deg, #F59E0B, #D97706);
}

.level-badge-large.advanced {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
}

/* أنماط إضافية للمحتوى الديناميكي */
.content-pages {
    display: none;
    padding: 40px;
}

.content-pages.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--dark-blue);
}

.empty-state-text {
    font-size: 1rem;
    line-height: 1.6;
}

/* مودال الدروس */
.level-lessons-modal .modal {
    max-width: 1000px;
}

.level-lessons-header {
    background: var(--gradient-blue);
    color: white;
    padding: 25px 30px;
}

.level-lessons-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.level-lessons-subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

.level-lessons-content {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.learning-style-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.learning-style-tab {
    padding: 12px 24px;
    border: none;
    background: #E2E8F0;
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.learning-style-tab.active {
    background: var(--gradient-blue);
    color: white;
    box-shadow: var(--shadow-md);
}

.lesson-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 25px;
    border: 2px solid #E2E8F0;
    transition: var(--transition);
    position: relative;
    margin-bottom: 20px;
}

.lesson-item.completed {
    border-color: var(--success-green);
    background: #F0FDF4;
}

.lesson-item.available {
    border-color: var(--primary-blue);
    background: #EFF6FF;
}

.lesson-item.locked {
    opacity: 0.7;
    pointer-events: none;
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.lesson-type-badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.lesson-type-audio {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.lesson-type-visual {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.lesson-type-text {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid #10b981;
}

.lesson-status {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 6px 15px;
    border-radius: 20px;
    background: #E2E8F0;
    color: var(--text-light);
}

.lesson-item.completed .lesson-status {
    background: var(--success-green);
    color: white;
}

.lesson-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 10px;
}

.lesson-desc {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.lesson-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.lesson-actions {
    display: flex;
    gap: 12px;
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

/* مودال الاختبار */
.exam-modal .modal {
    max-width: 900px;
}

.exam-header {
    background: var(--gradient-blue);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.exam-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.exam-subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

.exam-content {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

/* مودال النتائج */
.results-container {
    text-align: center;
    padding: 40px;
}

.results-icon {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: white;
    margin: 0 auto 30px;
}

.results-icon.success {
    background: linear-gradient(135deg, var(--success-green), #059669);
}

/* مودال الشهادات */
.certificates-modal .modal {
    max-width: 1000px;
}

.certificates-header {
    background: linear-gradient(135deg, var(--success-green), #059669);
    color: white;
    padding: 25px 30px;
}

.certificates-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.certificates-subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

.certificates-content {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.certificate-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 25px;
    border: 2px solid #E2E8F0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--success-green);
}

.certificate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.certificate-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--success-green), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.certificate-badge {
    background: var(--gradient-blue);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* محتوى الدروس */
.lesson-content-container {
    max-width: 900px;
    margin: 0 auto;
}

.lesson-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
}

.video-container video {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
}

.audio-player {
    background: var(--gradient-blue);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    color: white;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.text-content {
    background: #F8FAFC;
    border-radius: var(--radius-md);
    padding: 25px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.text-content h3 {
    color: var(--dark-blue);
    margin-bottom: 15px;
}

.text-content p {
    margin-bottom: 15px;
}

.lesson-quiz {
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-md);
    padding: 25px;
    margin-top: 30px;
}

.quiz-question {
    margin-bottom: 20px;
}

/* صفحة الإحصائيات */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

/* إضافة أنماط للأسئلة */
.question-container {
    background: white;
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #E2E8F0;
}

.question-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-blue);
}

.question-timer {
    background: var(--gradient-blue);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.question-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 30px;
    line-height: 1.5;
}

.options-container {
    display: grid;
    gap: 15px;
}

.option {
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.option:hover {
    border-color: var(--primary-blue);
    background: #EFF6FF;
}

.option.selected {
    border-color: var(--success-green);
    background: #F0FDF4;
}

.option-letter {
    width: 40px;
    height: 40px;
    background: var(--gradient-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.option.selected .option-letter {
    background: var(--success-green);
}

.question-navigation {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.btn-nav {
    padding: 12px 30px;
}

@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
        width: 100%;
    }
    
    .levels-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 15px 20px;
    }
    
    .dashboard-sections {
        padding: 0 20px 20px;
    }
    
    .progress-summary {
        margin: 0 20px 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .certificates-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .modal {
        margin: 10px;
    }
    
    .robot-assistant {
        bottom: 20px;
        left: 20px;
    }
    
    .robot-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
}
