body {
    margin: 0;
    font-family: 'Segoe UI', 'Poppins', Arial, sans-serif;
    background: #f5f5f5;
}

.page {
    display: none;
    min-height: 100vh;
    padding: 30px;
}

.active {
    display: block;
}

/* ========================================
   Hero Section
   ======================================== */

#home {
    background: #0a0e1a;
    min-height: calc(100vh - 70px);
    position: relative;
    overflow: hidden;
    padding: 40px 5% 0 5%;
}

.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(56, 189, 248, 0.08) 1px, transparent 1px);
    background-size: 35px 35px;
    pointer-events: none;
    z-index: 0;
}

.hero-wrapper {
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    flex-wrap: wrap;
}

.hero-image-side {
    flex: 1;
    min-width: 350px;
    position: relative;
    display: flex;
    justify-content: center;
}

.image-glow {
    position: absolute;
    width: 85%;
    height: 85%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2), transparent 70%);
    border-radius: 40px;
    filter: blur(35px);
    z-index: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.image-card {
    position: relative;
    z-index: 2;
    background: rgba(20, 25, 45, 0.7);
    backdrop-filter: blur(8px);
    padding: 12px;
    border-radius: 28px;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(56, 189, 248, 0.2);
    transition: all 0.3s ease;
}

.image-card:hover {
    box-shadow: 0 30px 50px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.certificate-img {
    width: 100%;
    max-width: 420px;
    height: auto;
    border-radius: 20px;
    display: block;
    transition: transform 0.3s ease;
}

.certificate-img:hover {
    transform: scale(1.02);
}

.hero-content-side {
    flex: 1;
    min-width: 350px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.2;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.blue-text {
    color: #38bdf8;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.hero-description-wrapper {
    margin-bottom: 30px;
}

.hero-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #b0b8c9;
    margin-bottom: 16px;
}

.second-desc {
    margin-bottom: 0;
}

.info-glass-card {
    background: rgba(56, 189, 248, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 20px;
    padding: 14px 22px;
    margin: 25px 0 35px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
}

.info-glass-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.1);
}

.info-icon {
    font-size: 1.6rem;
}

.info-text {
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.hero-btn-primary {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    border: none;
    padding: 15px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0a0e1a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.3);
}

.hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.5);
    gap: 16px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.btn-arrow-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.hero-btn-primary:hover .btn-arrow-icon {
    transform: translateX(5px);
}

/* ========================================
   Features Section
   ======================================== */

.features-section {
    padding: 80px 5%;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
    margin-top: 60px;
    border-radius: 40px 40px 0 0;
}

.features-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    flex-wrap: wrap;
}

.features-content {
    flex: 1;
    min-width: 380px;
    max-width: 550px;
}

.features-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 28px;
    line-height: 1.3;
    color: #0a0e1a;
}

.features-description {
    font-size: 1rem;
    line-height: 1.75;
    color: #475569;
    margin-bottom: 18px;
    letter-spacing: 0.2px;
}

.features-description.second {
    margin-bottom: 35px;
}

.features-btn {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    color: #0a0e1a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.features-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4);
    gap: 16px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.features-btn .btn-arrow {
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.features-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.features-images {
    flex: 1;
    min-width: 650px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-stack {
    position: relative;
    width: 100%;
    max-width: 700px;
    min-height: 520px;
}

.image-card-feature {
    background: white;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.35s ease;
    overflow: hidden;
    width: 100%;
}

.image-card-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.15);
}

.image-top {
    position: absolute;
    top: 40px;
    right: 20px;
    width: 78%;
    z-index: 2;
    transform: rotate(3deg);
}

.image-bottom {
    position: absolute;
    bottom: 40px;
    left: 20px;
    width: 78%;
    z-index: 1;
    transform: rotate(-2deg);
}

.feature-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
    background: white;
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ========================================
   TOP BAR
   ======================================== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    background: linear-gradient(135deg, #161922 0%, #202534 50%, #262D40 100%);
    box-shadow: 0 1px 0 rgba(255,255,255,0.03), 0 8px 25px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}
.left-side {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    direction: ltr;
}

.right-side {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.logo-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.notification-container {
    position: relative;
}
.notification-bell {
    position: relative;
}
.notification-badge {
    position: absolute;
    top: -5px;
    left: -7px;
    width: 12px;
    height: 12px;
    min-width: 12px;
    font-size: 7px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-weight: bold;
    box-shadow: 0 1px 4px rgba(220, 53, 69, 0.3);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.25);
    animation: badgePulse 2.5s ease-in-out infinite;
}
.notification-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 340px;
    max-width: 90vw;
    max-height: 400px;
    background: #0f172a;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    display: none;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    min-width: 280px !important;
}

.notification-dropdown.active {
    display: flex;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    background: #0a0e1a;
}

.notification-header span {
    color: #38bdf8;
    font-weight: bold;
    font-size: 14px;
}

.mark-all-read {
    background: rgba(56, 189, 248, 0.15);
    border: none;
    color: #38bdf8;
    font-size: 11px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.mark-all-read:hover {
    background: #38bdf8;
    color: #0a0e1a;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.notification-list::-webkit-scrollbar {
    width: 5px;
}

.notification-list::-webkit-scrollbar-track {
    background: #1e293b;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #38bdf8;
    border-radius: 5px;
}

.notification-item {
    display: flex;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: rgba(56, 189, 248, 0.08);
}

.notification-item.unread {
    background: rgba(56, 189, 248, 0.05);
    border-right: 3px solid #38bdf8;
}

.notification-icon {
    font-size: 18px;
    margin-left: 12px;
    min-width: 30px;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: bold;
    font-size: 14px;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-time {
    font-size: 10px;
    color: #64748b;
}

.notification-empty {
    text-align: center;
    padding: 30px 20px;
    color: #64748b;
    font-size: 13px;
}

.notification-show-all,
.notification-show-less {
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid rgba(56, 189, 248, 0.2);
    background: #0a0e1a;
}

.show-all-btn,
.show-less-btn {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid #38bdf8;
    color: #38bdf8;
    font-size: 12px;
    padding: 8px 15px;
    border-radius: 25px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
}

.show-all-btn:hover,
.show-less-btn:hover {
    background: #38bdf8;
    color: #0a0e1a;
}

.subscribe-text-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.subscribe-text-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: scale(1.02);
}


/* ===== زر الملف الشخصي - تصميم Apple Premium ===== */
.profile-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    object-fit: cover;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 0;
}

.profile-icon:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 25px rgba(56, 189, 248, 0.12);
}

.profile-icon:active {
    transform: scale(0.94);
    transition-duration: 0.05s;
}

body.dark-mode .profile-icon {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .profile-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}
/* إخفاء زر تسجيل الدخول فقط في صفحات الامتحانات */
body:has(#list.active) .btn-login-top,
body:has(#exam.active) .btn-login-top {
    display: none !important;
}

/* زر اشترك يظهر في صفحات الامتحانات فقط إذا لم يكن مخفياً بواسطة JavaScript */
body:has(#list.active) .subscribe-text-btn:not([style*="display: none"]),
body:has(#exam.active) .subscribe-text-btn:not([style*="display: none"]) {
    display: inline-flex !important;
}

/* أيقونة الملف الشخصي تظهر في صفحات الامتحانات (بنفس تصميم Logo) */
body:has(#list.active) .profile-icon,
body:has(#exam.active) .profile-icon {
    display: flex !important;
}

/* في الصفحة الرئيسية: إخفاء أيقونة الملف الشخصي وزر Study Planner */
#home .profile-icon {
    display: none !important;
}

#home .study-planner-icon-btn {
    display: none !important;
}

/* في صفحات القائمة والامتحان: إظهار زر Study Planner (نفس سلوك زر الملف الشخصي) */
#list .study-planner-icon-btn,
#exam .study-planner-icon-btn {
    display: inline-flex !important;
}

/* إلغاء أي تأثير دائري سابق على هذه الأزرار */
.profile-icon,
.settings-icon-btn,
.study-planner-icon-btn,
.notification-bell,
.study-session-btn {
    border-radius: 12px !important;
}

/* ===== التصميم الموحد للأزرار الوظيفية (⚙️، 🎮، 🔔، ⏰) ===== */
.settings-icon-btn,
.study-planner-icon-btn,
.notification-bell,
.study-session-btn {
    height: 35px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    color: #E5E7EB;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-size: 16px;
    gap: 5px;
    font-family: inherit;
    flex-shrink: 0;
    position: relative;
}

.settings-icon-btn:hover,
.study-planner-icon-btn:hover,
.notification-bell:hover,
.study-session-btn:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.04);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
}

.settings-icon-btn:active,
.study-planner-icon-btn:active,
.notification-bell:active,
.study-session-btn:active {
    transform: scale(0.95);
    transition-duration: 0.05s;
}

/* ===== أيقونات الصور داخل الأزرار ===== */
.icon-img {
    width: 20px;
    height: 20px;
    display: block;
    object-fit: contain;
    pointer-events: none;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.settings-icon-btn:hover .icon-img,
.study-session-btn:hover .icon-img {
    opacity: 1;
}

/* ===== أيقونة الجرس (Uiverse) ===== */
.notification-bell .bell-icon {
    width: 18px;
    height: 18px;
    fill: rgba(255, 255, 255, 0.75);
    display: block;
    transition: fill 0.2s ease;
}

.notification-bell:hover .bell-icon {
    fill: rgba(255, 255, 255, 0.95);
    animation: bellRing 0.9s both;
}

/* تم دمج تعريف .notification-bell .notification-badge مع التعريف الأساسي، لا حاجة لهذا التعريف */

/* ===== اهتزاز الجرس ===== */
@keyframes bellRing {
    0%, 100% {
        transform-origin: top center;
        transform: rotate(0deg);
    }
    15% {
        transform: rotate(12deg);
    }
    30% {
        transform: rotate(-10deg);
    }
    45% {
        transform: rotate(6deg);
    }
    60% {
        transform: rotate(-4deg);
    }
    75% {
        transform: rotate(2deg);
    }
}


body:has(#list.active) .top-bar,
body:has(#exam.active) .top-bar {
    background: rgba(22, 25, 34, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.settings-modal.active {
    visibility: visible;
    opacity: 1;
}

.settings-modal-content {
    background: #0f172a;
    border-radius: 28px;
    padding: 25px 30px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(56, 189, 248, 0.2);
    direction: rtl;
}

.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.settings-modal-header h3 {
    color: #38bdf8;
    margin: 0;
    font-size: 1.2rem;
}

.close-settings-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}

.close-settings-btn:hover {
    color: #38bdf8;
    transform: scale(1.1);
}
.settings-desc {
    color: #cbd5e1;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 20px;
}

.font-size-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.font-size-btn {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid #38bdf8;
    color: #38bdf8;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 8px 18px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.font-size-btn:hover {
    background: #38bdf8;
    color: #0a0e1a;
    transform: scale(1.05);
}

.font-size-value {
    color: white;
    font-size: 1rem;
    font-weight: bold;
    background: #1e293b;
    padding: 5px 15px;
    border-radius: 30px;
}

.reset-font-btn {
    background: rgba(100, 116, 139, 0.3);
    border: 1px solid #64748b;
    color: #cbd5e1;
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.reset-font-btn:hover {
    background: #64748b;
    color: white;
    transform: scale(1.02);
}
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 45px;
    height: 45px;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: transparent;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.whatsapp-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

/* ========================================
   Floating Reviews Widget
   ======================================== */

.reviews-widget {
    position: relative;
    margin-top: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.reviews-widget.collapsed .widget-expanded-content {
    display: none;
}

.reviews-widget.collapsed .widget-bubble {
    display: inline-flex;
}

.reviews-widget.collapsed-keep .widget-expanded-content {
    display: none;
}

.reviews-widget.collapsed-keep .widget-bubble {
    display: inline-flex;
}

.reviews-widget.expanded .widget-bubble {
    display: none;
}

.reviews-widget.expanded .widget-expanded-content {
    display: block;
    animation: widgetExpand 0.5s ease forwards;
}

.widget-bubble {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 50px;
    padding: 8px 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.widget-bubble:hover {
    transform: scale(1.02);
    border-color: #38bdf8;
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.2);
}

.widget-icon {
    font-size: 1rem;
}

.widget-text {
    font-size: 0.8rem;
    color: #cbd5e1;
    font-weight: 500;
}

.widget-badge {
    background: #38bdf8;
    color: #0a0e1a;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 30px;
}

.widget-expanded-content {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 24px;
    padding: 15px 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

@keyframes widgetExpand {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.widget-header-icon {
    font-size: 1.2rem;
}

.widget-header-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #38bdf8;
}

.widget-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0 0 12px 0;
}

.widget-slider-container {
    overflow: hidden;
    width: 100%;
}

.widget-slider {
    display: flex;
    gap: 10px;
    width: fit-content;
    animation: scrollWidget 25s linear infinite;
    animation-play-state: running;
}

.widget-slider:hover {
    animation-play-state: paused;
}

.widget-slide {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(56, 189, 248, 0.2);
    background: #1e293b;
}

.widget-slide:hover {
    transform: scale(1.05);
    border-color: #38bdf8;
}

.widget-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes scrollWidget {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ========================================
   Modals
   ======================================== */

.review-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.review-modal.active {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-content img {
    width: auto;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 10px;
}

.modal-prev, .modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 15px 20px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-prev:hover, .modal-next:hover {
    background: rgba(56, 189, 248, 0.5);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

.reviews-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(15px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.reviews-modal.active {
    visibility: visible;
    opacity: 1;
}

.reviews-modal-content {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 32px;
    padding: 30px;
    width: 85%;
    max-width: 1000px;
    max-height: 85vh;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.reviews-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.reviews-modal-header h3 {
    font-size: 1.5rem;
    color: #38bdf8;
    margin: 0 0 8px 0;
}

.reviews-modal-header p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
}

.close-reviews-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-reviews-modal:hover {
    color: #38bdf8;
    transform: scale(1.1);
}

.reviews-modal-slider-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
    padding: 20px 0;
    border-radius: 20px;
}

.reviews-modal-slider-container::-webkit-scrollbar {
    height: 8px;
}

.reviews-modal-slider-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.reviews-modal-slider-container::-webkit-scrollbar-thumb {
    background: #38bdf8;
    border-radius: 10px;
}

.reviews-modal-slider {
    display: inline-flex;
    gap: 20px;
    padding: 0 10px;
}

.reviews-modal-item {
    display: inline-block;
    width: 280px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(56, 189, 248, 0.2);
    background: #1e293b;
}

.reviews-modal-item:hover {
    transform: translateY(-5px);
    border-color: #38bdf8;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.2);
}

.reviews-modal-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
}

.reviews-modal-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 25px;
}

.modal-control-btn {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid #38bdf8;
    color: #38bdf8;
    font-size: 1.3rem;
    padding: 10px 18px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-control-btn:hover {
    background: #38bdf8;
    color: #0a0e1a;
    transform: scale(1.05);
}

.modal-counter-text {
    color: #cbd5e1;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 15px;
    border-radius: 30px;
}



/* ========================================
   Exam List & Teile Styles
   ======================================== */
.teile-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 !important;
    padding-bottom: 8px !important;
    margin: 0 !important;
    width: 100% !important;
    scrollbar-width: thin !important;
    -webkit-overflow-scrolling: touch !important;
    justify-content: flex-start !important;
}

.teile-row::-webkit-scrollbar {
    height: 4px !important;
}

.teile-row::-webkit-scrollbar-track {
    background: rgba(56, 189, 248, 0.1) !important;
    border-radius: 10px !important;
}

.teile-row::-webkit-scrollbar-thumb {
    background: #38bdf8 !important;
    border-radius: 10px !important;
}

/* ✅ تساوي المسافات على الشاشات الكبيرة (1080px فأكثر) */
@media (min-width: 1080px) {
    .teile-row {
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
}

/* ✅ المحاذاة إلى اليسار على الهواتف والشاشات الصغيرة */
@media (max-width: 1079px) {
    .teile-row {
        justify-content: flex-start !important;
    }
}

.teil-item {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 18px !important;
    height: 42px !important;
    background: #3B414C !important;
    border: none !important;
    border-radius: 14px !important;
    color: #BFC6D4 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.teil-item::before {
    content: "📚";
    font-size: 0.7rem;
    opacity: 0.8;
}

.teil-item:hover {
    background: rgba(56, 189, 248, 0.2) !important;
    border-color: #38bdf8 !important;
    transform: translateY(-2px) !important;
    color: #ffffff !important;
}

.teil-item:active {
    transform: scale(0.97) !important;
}

.exam-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
}
/* ===== زر الرئيسية والعودة إلى القائمة (بعد التعديل) ===== */
.back-home-btn,
.back-list-btn {
    padding: 8px 24px;
    background: linear-gradient(135deg, #161922, #202534, #262D40);
    border: 1px solid #4a5568;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #B0B8C9;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-align: center;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
}

/* Hover – سطوع وظل خفيف */
.back-home-btn:hover,
.back-list-btn:hover {
    filter: brightness(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

/* Pressed – تصغير بسيط */
.back-home-btn:active,
.back-list-btn:active {
    transform: scale(0.98);
}
.arrow-back-btn {
    background: none !important;
    border: none !important;
    font-size: 28px !important;
    cursor: pointer !important;
    color: #38bdf8 !important;
    padding: 0 !important;
}

.arrow-back-btn:hover {
    transform: scale(1.1);
    color: #0ea5e9 !important;
}

#prevExamBtn, #nextExamBtn {
    background: #6c757d !important;
    color: white !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    margin: 5px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
}

#prevExamBtn:hover, #nextExamBtn:hover {
    background: #5a6268 !important;
}

.item {
    background: white;
    padding: 8px 12px !important;
    margin-bottom: 8px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s ease;
    border: 1px solid #e2e8f0;
    min-height: 44px;
    height: auto;
}

.item:hover {
    background: #f1f5f9;
    transform: translateX(5px);
    border-color: #2F80ED;
    box-shadow: 0 2px 8px rgba(47, 128, 237, 0.15);
}

.premium-badge {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(0, 0, 0, 0.65);
    color: #f5e6a0;
    font-size: 8px !important;
    font-weight: 600;
    padding: 2px 6px !important;
    border-radius: 20px;
    margin-right: 5px;
    line-height: 1;
    white-space: nowrap;
}

.lock-icon-mini {
    font-size: 8px;
    margin-left: 3px;
    opacity: 0.8;
    display: none;
}

.exam-right-icons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 5px;
}
.exam-right-icons {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px;
    flex-shrink: 0;
    line-height: 1;
}
.item:hover .premium-badge {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.02);
}

.exam-title {
    flex: 1;
    transition: color 0.2s ease;
    font-weight: 500;
}

.item:hover .exam-title {
    color: #1e293b;
}

/* ========================================
   Result Box
   ======================================== */

.result-box {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff6b6b;
    color: white;
    padding: 12px 25px;
    border-radius: 40px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: auto;
    min-width: 180px;
    animation: fadeInUp 0.3s ease;
    margin: 0 !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ========================================
   ترتيب الأزرار وهيكلة شريط (Left Side) حسب الصفحة
   ======================================== */
/* 1. الصفحة الرئيسية (Home) */
#home .profile-icon { display: none !important; }
#home #studyPlannerBtn { display: none !important; }

/* نرتب زر الاشتراك وزر تسجيل الدخول في الرئيسية */
#home .left-side #navSubscribeBtn { order: 1 !important; }
#home .left-side #navLoginBtn { order: 2 !important; }

/* 2. صفحة القائمة والامتحان (List & Exam) */
/* نخفي زر تسجيل الدخول في القائمة والامتحان */
body:has(#list.active) #navLoginBtn { display: none !important; }
body:has(#exam.active) #navLoginBtn { display: none !important; }

/* نظهر أزرار الملف الشخصي والإعدادات وخطة اليوم وترتيبهم */
body:has(#list.active) .profile-icon { display: flex !important; }
body:has(#exam.active) .profile-icon { display: flex !important; }

body:has(#list.active) #settingsBtn { display: inline-flex !important; }
body:has(#exam.active) #settingsBtn { display: inline-flex !important; }

body:has(#list.active) #studyPlannerBtn { display: inline-flex !important; }
body:has(#exam.active) #studyPlannerBtn { display: inline-flex !important; }

/* ترتيب البداية: (أقصى اليسار) -> 1-Profile -> 2-Settings -> 3-Planner -> 4-Subscribe */
body:has(#list.active) .left-side .profile-icon { order: 1 !important; }
body:has(#exam.active) .left-side .profile-icon { order: 1 !important; }

body:has(#list.active) .left-side #settingsBtn { order: 2 !important; }
body:has(#exam.active) .left-side #settingsBtn { order: 2 !important; }

body:has(#list.active) .left-side #studyPlannerBtn { order: 3 !important; }
body:has(#exam.active) .left-side #studyPlannerBtn { order: 3 !important; }

body:has(#list.active) .left-side #navSubscribeBtn { order: 4 !important; }
body:has(#exam.active) .left-side #navSubscribeBtn { order: 4 !important; }

@media (max-width: 768px) {
    body, html {
        overflow-x: hidden;
    }
    
    .page {
        padding: 10px !important;
    }
    
    /* الشريط العلوي */
    .top-bar {
        padding: 6px 12px !important;
    }
    
    .left-side {
        gap: 5px !important;
    }
    
    .right-side {
        gap: 5px !important;
    }
    
    .logo-icon {
        width: 28px !important;
        height: 28px !important;
    }
    
    .notification-bell {
        font-size: 12px !important;
        padding: 4px 8px !important;
    }
    
    .subscribe-text-btn, .btn-login-top {
        padding: 4px 10px !important;
        font-size: 9px !important;
    }
    
    .profile-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
    }
    
    .settings-icon-btn,
    .study-planner-icon-btn,
    .notification-bell,
    .study-session-btn {
        height: 26px !important;
        padding: 0 8px !important;
        font-size: 12px !important;
        gap: 3px !important;
        border-radius: 10px !important;
        min-width: auto !important;
        width: auto !important;
        flex-shrink: 0 !important;
    }
    .notification-badge {
        min-width: 10px !important;
        height: 10px !important;
        font-size: 6px !important;
        top: -4px !important;
        left: -6px !important;
        animation: badgePulse 2.5s ease-in-out infinite !important;
        border-width: 0.5px !important;
    }
@media (min-width: 769px) {
    /* توحيد جميع الأزرار الأربعة في الحاسوب */
    .settings-icon-btn,
    .study-planner-icon-btn,
    .notification-bell,
    .study-session-btn {
        height: 35px !important;
        padding: 0 12px !important;
        font-size: 16px !important;
        gap: 5px !important;
        border-radius: 12px !important;
        min-width: auto !important;
        width: auto !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 768px) {
    .settings-icon-btn,
    .study-planner-icon-btn,
    .notification-bell,
    .study-session-btn {
        height: 26px !important;
        padding: 0 8px !important;
        font-size: 12px !important;
        gap: 3px !important;
        border-radius: 10px !important;
        min-width: auto !important;
        width: auto !important;
        flex-shrink: 0 !important;
    }
    
    .icon-img {
        width: 16px !important;
        height: 16px !important;
    }
    
    .notification-bell .bell-icon {
        width: 14px !important;
        height: 14px !important;
    }
}
    /* أزرار الأقسام في الهاتف */
    .teile-row {
        gap: 6px !important;
        overflow-x: auto !important;
    }
    
    .teil-item {
        padding: 5px 12px !important;
        font-size: 0.65rem !important;
    }
    
    .teil-item::before {
        font-size: 0.6rem;
    }
    
/* قائمة الامتحانات في الهاتف */
.item {
    padding: 6px 8px !important;
    min-height: 40px !important;
    margin-bottom: 5px !important;
}

.item .exam-title {
    font-size: 0.55rem !important;
    line-height: 1.2 !important;
}

.premium-badge {
    font-size: 7px !important;
    padding: 2px 4px !important;
    margin-right: 4px !important;
}

    /* ===== تحسينات عامة لصفحات الامتحانات ===== */
    
    /* عنوان الامتحان */
    #examTitle {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        margin: 0 4px !important;
        text-align: center !important;
        line-height: 1.3 !important;
        word-break: break-word !important;
        padding: 0 4px !important;
    }
    
    /* حاوية العنوان والأزرار العلوية */
    #exam .exam-box > div:first-child {
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    
    /* أزرار التنقل العلوية */
    #examNavButtons {
        gap: 8px !important;
        flex-wrap: wrap !important;
        margin-bottom: 12px !important;
        justify-content: center !important;
    }
    
    #examNavButtons .nav-exam-btn {
        padding: 8px 14px !important;
        font-size: 0.7rem !important;
        border-radius: 25px !important;
        min-height: 36px !important;
        flex: 0 1 auto !important;
        background: #eef2f6 !important;
        border: 1px solid #dce3e8 !important;
        color: #334155 !important;
        font-weight: 500 !important;
    }
    
    #examNavButtons .nav-exam-btn:active {
        transform: scale(0.96) !important;
    }
    
    /* زر المساعدة (Memory Trainer) */
    #memoryTrainerBtn {
        padding: 8px 14px !important;
        font-size: 0.7rem !important;
        border-radius: 25px !important;
        min-height: 36px !important;
        margin-left: 0 !important;
    }
    
    /* صف الأزرار (تخليط، لعبة، تلوين) */
    #interleavingRow {
        gap: 6px !important;
        margin-bottom: 12px !important;
        padding-left: 0 !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
    
    #interleavingRow .interleaving-icon-btn {
        width: 32px !important;
        height: 32px !important;
        border-radius: 10px !important;
    }
    
    #interleavingRow .interleaving-icon-btn .material-symbols-outlined {
        font-size: 18px !important;
    }
    
    /* ===== بطاقات الأسئلة ===== */
    .question-card {
        padding: 14px 12px !important;
        margin-bottom: 14px !important;
        border-radius: 14px !important;
        background: #ffffff !important;
        border: 1px solid #eef2f6 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
        transition: all 0.15s ease !important;
    }
    
    /* رقم السؤال */
    .question-number {
        font-size: 0.65rem !important;
        font-weight: 600 !important;
        color: #94a3b8 !important;
        margin-bottom: 4px !important;
        display: block !important;
    }
    
    /* نص السؤال */
    .question-text {
        font-size: 0.8rem !important;
        line-height: 1.6 !important;
        margin-bottom: 10px !important;
        color: #1e293b !important;
        font-weight: 500 !important;
        word-break: break-word !important;
    }
    
    /* خيارات الإجابة */
    .option-label {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 10px 12px !important;
        font-size: 0.75rem !important;
        font-weight: 400 !important;
        line-height: 1.4 !important;
        margin-bottom: 6px !important;
        border-radius: 12px !important;
        background: #f8fafc !important;
        border: 1px solid #eef2f6 !important;
        cursor: pointer !important;
        transition: all 0.15s ease !important;
        color: #334155 !important;
        word-break: break-word !important;
    }
    
    .option-label:active {
        background: #f1f5f9 !important;
        transform: scale(0.99) !important;
    }
    
    .option-label.selected {
        background: #e3f2fd !important;
        border-color: #38bdf8 !important;
    }
    
    .option-label.correct {
        background: #d4edda !important;
        border-color: #28a745 !important;
    }
    
    .option-label.wrong {
        background: #fef0e0 !important;
        border-color: #e67e22 !important;
    }
    
    .option-label .option-letter {
        font-weight: 600 !important;
        color: #64748b !important;
        min-width: 18px !important;
        font-size: 0.7rem !important;
    }
    
    .option-label .option-text {
        flex: 1 !important;
    }
    
    .option-input {
        transform: scale(0.9) !important;
        margin-left: auto !important;
        flex-shrink: 0 !important;
    }
    
    .check-btn {
        padding: 10px 20px !important;
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        border-radius: 30px !important;
        margin-top: 10px !important;
        min-height: 44px !important;
        width: 100% !important;
        background: #1a202c !important;
        color: #cbd5e1 !important;
        border: 1px solid #2d3748 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
        font-family: inherit !important;
        letter-spacing: 0.3px !important;
    }
    .check-btn:hover {
        background: #2d3748 !important;
        color: #e2e8f0 !important;
    }
    .check-btn:active {
        background: #0d1117 !important;
        transform: scale(0.97) !important;
    }
    
    .check-btn:hover {
        background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
        box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35) !important;
        transform: translateY(-2px) !important;
    }
    
    .check-btn:active {
        transform: scale(0.97) !important;
    }
    
    .check-btn:disabled {
        opacity: 0.5 !important;
        pointer-events: none !important;
    }

    /* ===== تحسينات Hören ===== */
    #hoeren1 .question-text,
    #hoeren2 .question-text,
    #hoeren3 .question-text {
        font-size: 0.8rem !important;
        line-height: 1.7 !important;
        padding: 4px 0 !important;
    }
    
    #hoeren1 .option-label,
    #hoeren2 .option-label,
    #hoeren3 .option-label {
        font-size: 0.75rem !important;
        padding: 10px 12px !important;
    }
    
    /* ===== تحسينات Lesen Teil 2 (نصوص طويلة) ===== */
    #lesen2 .question-card {
        padding: 16px 14px !important;
    }
    
    #lesen2 .question-text {
        font-size: 0.8rem !important;
        line-height: 1.8 !important;
        padding: 4px 0 !important;
        max-height: none !important;
    }
    
    #lesen2 .question-text p {
        margin-bottom: 10px !important;
    }
    
    #lesen2 .option-label {
        font-size: 0.75rem !important;
        padding: 10px 12px !important;
        line-height: 1.5 !important;
    }

    /* ===== تحسينات Lesen Teil 1 و Teil 3 (القوائم المنسدلة) ===== */
    
    /* قوائم Select المحسّنة */
    #teil1 select,
    #teil3 select,
    select, 
    .teil3-original-select {
        width: 100% !important;
        padding: 10px 12px !important;
        font-size: 0.75rem !important;
        border-radius: 12px !important;
        background: #f8fafc !important;
        color: #1e293b !important;
        border: 1.5px solid #e2e8f0 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2364748b'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: left 12px center !important;
        background-size: 12px !important;
        padding-left: 32px !important;
        min-height: 44px !important;
        font-weight: 500 !important;
    }
    
    #teil1 select:focus,
    #teil3 select:focus,
    select:focus, 
    .teil3-original-select:focus {
        outline: none !important;
        border-color: #38bdf8 !important;
        box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15) !important;
    }
    
    /* ===== تحسينات Lesen Teil 3 (Anzeigen + بطاقات) ===== */
    #teil3 .question-card {
        padding: 14px 12px !important;
        margin-bottom: 12px !important;
        border-radius: 14px !important;
        background: #ffffff !important;
        border: 1px solid #eef2f6 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
    }
    
    #teil3 .question-card .question-text {
        font-size: 0.8rem !important;
        line-height: 1.6 !important;
        margin-bottom: 10px !important;
    }
    
    #teil3 .question-card div[style*="font-size: 13px"] {
        font-size: 0.75rem !important;
        line-height: 1.6 !important;
        padding: 8px 10px !important;
        background: #f8fafc !important;
        border-radius: 8px !important;
        margin-bottom: 10px !important;
        border-right: 3px solid #38bdf8 !important;
    }
    
    /* زر القائمة المنسدلة (Teil 3) */
    .mobile-dropdown-btn,
    .mobile-dropdown-btn-teil3 {
        padding: 10px 14px !important;
        font-size: 0.75rem !important;
        min-height: 44px !important;
        border-radius: 12px !important;
        background: #f8fafc !important;
        border: 1.5px solid #e2e8f0 !important;
    }
    
    .mobile-dropdown-btn:active,
    .mobile-dropdown-btn-teil3:active {
        transform: scale(0.98) !important;
    }
    
    /* القائمة المنسدلة */
    .mobile-dropdown-menu,
    .mobile-dropdown-menu-teil3 {
        border-radius: 12px !important;
        margin-top: 6px !important;
        box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
        max-height: 200px !important;
        overflow-y: auto !important;
    }
    
    .mobile-dropdown-item {
        padding: 10px 14px !important;
        font-size: 0.7rem !important;
        min-height: 40px !important;
        border-bottom: 1px solid #eef2f6 !important;
    }
    
    .mobile-dropdown-item:active {
        transform: scale(0.98) !important;
    }

    /* ===== تحسينات Sprachbausteine Teil 1 و Teil 2 للهواتف ===== */
    
    /* الحاويات الرئيسية - تسمح بعرض النص بالكامل */
    #sprach1,
    #sprach2 {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 6px !important;
        overflow: visible !important;
    }
    
    /* جميع النصوص الطويلة داخل الأقسام (تستثني الخيارات والأزرار) */
    #sprach1 div:not(.option-label):not(.check-btn):not(.nav-exam-btn),
    #sprach1 p,
    #sprach1 span:not(.option-label span),
    #sprach2 div:not(.option-label):not(.check-btn):not(.nav-exam-btn),
    #sprach2 p,
    #sprach2 span:not(.option-label span) {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
        display: block !important;
        padding: 4px 8px !important;
        font-size: 0.8rem !important;
        line-height: 1.7 !important;
    }
    
    /* العناصر التي تحوي الفراغات (__(1)__) */
    #sprach1 [style*="background"],
    #sprach1 [style*="background-color"],
    #sprach2 [style*="background"],
    #sprach2 [style*="background-color"] {
        display: inline-block !important;
        min-width: 35px !important;
        padding: 2px 6px !important;
        margin: 2px !important;
        text-align: center !important;
        word-break: break-word !important;
        background: #f1f5f9 !important;
        border: 1px dashed #cbd5e1 !important;
        border-radius: 6px !important;
        font-size: 0.7rem !important;
    }
    
    /* خيارات الإجابة - تبقى كما هي مع تحسينات بسيطة */
    #sprach1 .option-label,
    #sprach2 .option-label {
        padding: 10px 12px !important;
        font-size: 0.75rem !important;
        margin-bottom: 6px !important;
        border-radius: 12px !important;
        background: #f8fafc !important;
        border: 1px solid #eef2f6 !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        min-height: 44px !important;
        word-break: break-word !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    #sprach1 .option-label:active,
    #sprach2 .option-label:active {
        transform: scale(0.99) !important;
    }
    
    /* أزرار الفجوات */
    .sprach1-gap-btn,
    .sprach2-gap-btn {
        padding: 6px 10px !important;
        font-size: 0.7rem !important;
        min-height: 36px !important;
        border-radius: 10px !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        color: #1e293b !important;
        font-weight: 500 !important;
        transition: all 0.2s ease !important;
    }
    
    .sprach1-gap-btn:active,
    .sprach2-gap-btn:active {
        transform: scale(0.96) !important;
    }
    
    /* Sprach Teil 2 - قائمة الكلمات */
    #sprach2 .sprach2-word-card {
        padding: 6px 8px !important;
        font-size: 0.65rem !important;
        border-radius: 10px !important;
        background: #f8fafc !important;
        border: 1px solid #eef2f6 !important;
        margin: 4px 0 !important;
    }

    /* ===== تحسينات إضافية للتوحيد ===== */
    
    /* أزرار العودة */
    .back-home-btn,
    .back-list-btn {
        padding: 10px 20px !important;
        font-size: 0.75rem !important;
        min-height: 44px !important;
        border-radius: 30px !important;
        margin-top: 16px !important;
        width: 100% !important;
        max-width: 300px !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* زر السهم للخلف */
    .arrow-back-btn {
        font-size: 22px !important;
        padding: 4px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* نافذة النتيجة */
    .result-box {
        bottom: 16px !important;
        padding: 8px 16px !important;
        font-size: 0.75rem !important;
        min-width: 120px !important;
        border-radius: 30px !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    }
    
    /* حاوية الامتحان */
    .exam-box {
        padding: 12px !important;
        border-radius: 16px !important;
        background: #ffffff !important;
    }
    
    /* ===== توحيد ألوان التصحيح ===== */
    .correct-answer {
        background: #d4edda !important;
        border-color: #28a745 !important;
        color: #155724 !important;
    }
    
    .wrong-answer {
        background: #fef0e0 !important;
        border-color: #e67e22 !important;
        color: #856404 !important;
    }

    /* ========================================
       الصفحة الرئيسية - تصميم محسّن للهاتف
       ======================================== */
    #home {
        padding: 20px 16px 0 16px !important;
        background: #0a0e1a;
        min-height: auto !important;
        overflow: visible !important;
        padding-bottom: 30px !important;
    }

    /* إزالة تأثير الخلفية الزائد */
    .bg-pattern {
        opacity: 0.4;
        height: 100% !important;
        min-height: 100vh !important;
    }

    /* الحاوية الرئيسية - عمودي */
    .hero-container {
        flex-direction: column !important;
        gap: 24px !important;
        padding-top: 8px;
    }

    /* صورة الشهادة */
    .hero-image-side {
        min-width: unset !important;
        width: 100%;
        order: 0;
        margin-bottom: 0;
    }

    .image-glow {
        width: 90%;
        height: 90%;
        filter: blur(50px);
        opacity: 0.6;
    }

    .image-card {
        padding: 10px;
        border-radius: 24px;
        max-width: 280px;
        margin: 0 auto;
        backdrop-filter: blur(12px);
        background: rgba(20, 25, 45, 0.6);
    }

    .certificate-img {
        max-width: 100% !important;
        border-radius: 16px;
        height: auto;
    }

    /* المحتوى النصي */
    .hero-content-side {
        min-width: unset !important;
        width: 100%;
        order: 1;
        padding: 0 4px;
    }

    .hero-title {
        font-size: 1.6rem !important;
        text-align: center;
        margin-bottom: 16px;
        line-height: 1.3;
        letter-spacing: -0.3px;
    }

    .hero-description-wrapper {
        margin-bottom: 20px;
    }

    .hero-desc {
        font-size: 0.85rem !important;
        text-align: center;
        line-height: 1.7;
        padding: 0 2px;
        color: #b0b8c9;
    }

    .hero-desc.second-desc {
        margin-top: 10px;
        font-size: 0.8rem !important;
    }

    /* البطاقة الزجاجية */
    .info-glass-card {
        margin: 16px 0 24px 0;
        padding: 14px 18px;
        border-radius: 18px;
        background: rgba(56, 189, 248, 0.06);
        backdrop-filter: blur(12px);
        border: 1px solid rgba(56, 189, 248, 0.15);
        gap: 12px;
    }

    .info-glass-card .hero-desc {
        font-size: 0.8rem !important;
        padding: 0;
        text-align: center;
    }

    .info-icon {
        font-size: 1.3rem;
        flex-shrink: 0;
    }

    /* زر البداية */
    .hero-btn-primary {
        padding: 14px 28px !important;
        font-size: 0.9rem !important;
        display: flex !important;
        margin: 0 auto 24px auto !important;
        border-radius: 50px;
        width: fit-content;
        min-width: 180px;
        justify-content: center;
        box-shadow: 0 4px 20px rgba(56, 189, 248, 0.25);
    }

    .hero-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 28px rgba(56, 189, 248, 0.35);
    }

    /* بطاقة الثقة */
    .reviews-widget {
        margin: 0 auto 8px auto;
        width: fit-content;
        max-width: 100%;
    }

    .widget-bubble {
        padding: 8px 16px;
        border-radius: 50px;
        background: rgba(15, 23, 42, 0.85);
        backdrop-filter: blur(12px);
        border: 1px solid rgba(56, 189, 248, 0.2);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }

    .widget-text {
        font-size: 0.7rem !important;
    }

    .widget-badge {
        font-size: 0.6rem;
        padding: 2px 8px;
    }

    .widget-slide {
        width: 48px !important;
        height: 48px !important;
        border-radius: 12px !important;
        border: 2px solid rgba(56, 189, 248, 0.15);
    }

    /* ===== قسم المميزات - إصلاح كامل للهاتف مع منع التجاوز ===== */
    .features-section {
        padding: 40px 16px !important;
        margin-top: 30px !important;
        border-radius: 28px 28px 0 0 !important;
        background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .features-container {
        flex-direction: column !important;
        gap: 30px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .features-content {
        min-width: unset !important;
        max-width: 100% !important;
        width: 100% !important;
        flex: 1 1 100% !important;
        text-align: center;
        padding: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .features-title {
        font-size: 1.4rem !important;
        margin-bottom: 16px;
        line-height: 1.3;
        width: 100% !important;
        max-width: 100% !important;
        text-align: center;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        hyphens: auto !important;
        box-sizing: border-box !important;
    }

    .features-description {
        font-size: 0.85rem !important;
        line-height: 1.7;
        padding: 0 4px !important;
        color: #475569;
        width: 100% !important;
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }

    .features-description.second {
        margin-bottom: 24px;
    }

    /* حاوية الأزرار - عمودية وعرض كامل */
    .features-content > div {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: center !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* زر اشترك الآن */
    .features-btn {
        padding: 14px 24px !important;
        font-size: 0.95rem !important;
        border-radius: 50px !important;
        box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: unset !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }

    /* زر 💡 طريقة الاشتراك */
    .subscribe-guide-btn {
        width: 48px !important;
        height: 48px !important;
        font-size: 20px !important;
        align-self: center !important;
        flex-shrink: 0 !important;
        box-sizing: border-box !important;
    }

    /* زر عرض البطاقات - تحسين الهاتف */
    .show-cards-btn {
        display: inline-flex !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 50px !important;
        padding: 12px 20px !important;
        font-size: 0.8rem !important;
        font-weight: 500 !important;
        color: #475569 !important;
        transition: all 0.2s ease !important;
        min-height: 48px !important;
        width: 100% !important;
        justify-content: center !important;
        gap: 8px !important;
        box-sizing: border-box !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }
    
    .show-cards-btn:active {
        background: #e2e8f0 !important;
        transform: scale(0.97) !important;
    }
    
    /* نافذة البطاقات المنبثقة */
    .premium-card-popup {
        max-width: 280px !important;
        padding: 12px !important;
        border-radius: 24px !important;
    }
    
    .premium-card-popup img {
        border-radius: 18px !important;
    }

    /* البطاقات المصورة - إخفاء */
    .features-images .image-stack {
        display: none !important;
    }
    /* بانر الهاتف */
    .mobile-banner {
        display: flex !important;
        align-items: center;
        gap: 6px;
        background: rgba(56, 189, 248, 0.08);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(56, 189, 248, 0.15);
        border-radius: 14px;
        padding: 8px 14px;
        margin-bottom: 16px;
        width: fit-content;
        max-width: 90%;
        animation: bannerFadeIn 0.4s ease forwards;
    }

    .mobile-banner span {
        font-size: 0.6rem !important;
        color: #cbd5e1;
        letter-spacing: 0.3px;
    }

    .mobile-banner .banner-icon {
        font-size: 0.7rem;
    }

    /* ===== النوافذ المنبثقة - تحسين الهاتف ===== */


    /* --- الملف الشخصي - حجم مناسب للهاتف --- */
    .profile-dropdown {
        left: 10px !important;
        right: 10px !important;
        top: 56px !important;
        min-width: unset !important;
        width: 88% !important;
        max-width: 280px !important;
        padding: 12px 14px !important;
        border-radius: 16px !important;
        box-shadow: 0 12px 30px rgba(0,0,0,0.3) !important;
        margin: 0 auto !important;
    }
    
    .profile-dropdown .profile-email {
        font-size: 12px !important;
        padding-bottom: 8px !important;
        margin-bottom: 6px !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        flex-wrap: wrap !important;
    }
    
    .profile-dropdown .profile-email .material-symbols-outlined {
        font-size: 16px !important;
    }
    
    .profile-dropdown .profile-email #profileEmailText {
        font-size: 12px !important;
        word-break: break-word !important;
    }
    
    .profile-dropdown .profile-expiry {
        font-size: 11px !important;
        padding: 4px 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        flex-wrap: wrap !important;
    }
    
    .profile-dropdown .profile-expiry .material-symbols-outlined {
        font-size: 14px !important;
    }
    
    .profile-dropdown .profile-status {
        font-size: 11px !important;
        padding-top: 6px !important;
        margin-top: 4px !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }
    
    .profile-dropdown .profile-uid {
        font-size: 10px !important;
        padding: 4px 0 !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .profile-dropdown .profile-uid .uid-value {
        font-size: 9px !important;
        word-break: break-all !important;
        max-width: 100px !important;
    }
    
    .profile-dropdown .profile-report-btn {
        font-size: 11px !important;
        padding: 8px 10px !important;
        margin-top: 6px !important;
        min-height: 38px !important;
        border-radius: 25px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
    }
    
    .profile-dropdown .profile-logout {
        font-size: 12px !important;
        padding: 8px 10px !important;
        margin-top: 6px !important;
        min-height: 38px !important;
        border-radius: 25px !important;
    }
    
    #dropdownUpgradeBtn {
        font-size: 12px !important;
        padding: 8px 10px !important;
        margin-top: 6px !important;
        min-height: 38px !important;
        border-radius: 25px !important;
    }
    
    #profilePlannerRow {
        padding: 4px 0 !important;
        font-size: 10px !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        flex-wrap: wrap !important;
    }
    
    .planner-tooltip {
        max-width: 130px !important;
        font-size: 9px !important;
        padding: 6px 8px !important;
        right: -5px !important;
        min-width: 100px !important;
        border-radius: 8px !important;
    }
    
    /* --- نافذة تسجيل الدخول --- */
    .login-popup-content {
        padding: 18px !important;
        width: 260px !important;
    }
    
    .login-popup-content h3 {
        font-size: 1rem !important;
    }
    
    .login-popup-content input {
        padding: 8px !important;
        font-size: 12px !important;
    }
    
    .btn-popup-login, .btn-popup-close {
        padding: 8px !important;
        font-size: 12px !important;
    }

    /* --- نافذة الإعدادات - تحسين الهاتف --- */
    .settings-modal-content {
        padding: 20px 18px !important;
        max-width: 340px !important;
        width: 92% !important;
        border-radius: 26px !important;
        box-shadow: 0 25px 50px rgba(0,0,0,0.35) !important;
    }
    
    .settings-modal-header {
        margin-bottom: 16px !important;
        padding-bottom: 12px !important;
        border-bottom: 1px solid rgba(56, 189, 248, 0.1) !important;
    }
    
    .settings-modal-header h3 {
        font-size: 1.1rem !important;
        color: #38bdf8 !important;
    }
    
    .settings-desc {
        font-size: 0.8rem !important;
        margin-bottom: 18px !important;
        color: #94a3b8 !important;
    }
    
    .font-size-controls {
        gap: 16px !important;
        margin-bottom: 16px !important;
    }
    
    .font-size-btn {
        font-size: 1.1rem !important;
        padding: 8px 16px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        border-radius: 40px !important;
    }
    
    .font-size-value {
        font-size: 0.9rem !important;
        padding: 6px 14px !important;
        min-width: 55px !important;
        text-align: center !important;
        background: #1e293b !important;
        border-radius: 30px !important;
    }
    
    .reset-font-btn {
        font-size: 0.8rem !important;
        padding: 12px 18px !important;
        min-height: 48px !important;
        border-radius: 40px !important;
    }
    
    .reading-mode-btn {
        font-size: 0.85rem !important;
        padding: 12px 18px !important;
        min-height: 48px !important;
        border-radius: 40px !important;
    }
    /* --- نافذة الإشعارات - حجم مناسب للهاتف --- */
    .notification-dropdown {
        width: 90% !important;
        max-width: 340px !important;
        right: 5% !important;
        left: 5% !important;
        top: 54px !important;
        border-radius: 20px !important;
        max-height: 400px !important;
        box-shadow: 0 20px 50px rgba(0,0,0,0.4) !important;
        border: 1px solid rgba(56, 189, 248, 0.15) !important;
    }
    
    .notification-dropdown::before {
        display: none !important;
    }
    
    .notification-header {
        font-size: 0.8rem !important;
        padding: 14px 18px !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        border-bottom: 1px solid rgba(56, 189, 248, 0.1) !important;
    }
    
    .notification-header span {
        font-size: 14px !important;
        font-weight: 600 !important;
    }
    
    .notification-list {
        max-height: 300px !important;
        padding: 4px 0 !important;
    }
    
    .notification-item {
        padding: 12px 16px !important;
        font-size: 0.8rem !important;
        gap: 12px !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    }
    
    .notification-item .notification-icon {
        font-size: 18px !important;
        min-width: 28px !important;
        margin-left: 6px !important;
    }
    
    .notification-item .notification-title {
        font-size: 14px !important;
        font-weight: 600 !important;
        margin-bottom: 4px !important;
    }
    
    .notification-item .notification-message {
        font-size: 12px !important;
        line-height: 1.5 !important;
        color: #cbd5e1 !important;
    }
    
    .notification-item .notification-time {
        font-size: 10px !important;
        color: #64748b !important;
        margin-top: 4px !important;
    }
    
    .mark-all-read {
        font-size: 0.7rem !important;
        padding: 6px 14px !important;
        min-height: 36px !important;
        border-radius: 25px !important;
        font-weight: 500 !important;
    }
    
    .notification-empty {
        padding: 28px 16px !important;
        font-size: 13px !important;
    }
    
    .notification-show-all,
    .notification-show-less {
        padding: 12px 14px !important;
        border-top: 1px solid rgba(56, 189, 248, 0.1) !important;
    }
    
    .show-all-btn,
    .show-less-btn {
        font-size: 12px !important;
        padding: 10px 14px !important;
        min-height: 40px !important;
        border-radius: 30px !important;
        font-weight: 500 !important;
    }

    /* --- نافذة الخطة اليومية --- */
    #studyPlannerModal .session-modal-content {
        padding: 16px 12px 18px !important;
        max-width: 96% !important;
        width: 96% !important;
        border-radius: 20px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    
    #studyPlannerModal .session-modal-content::-webkit-scrollbar {
        width: 3px !important;
    }
    
    .planner-welcome-title {
        font-size: 0.85rem !important;
        margin-bottom: 16px !important;
        padding: 0 4px !important;
    }
    
    .planner-input-row {
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 14px !important;
    }
    
    .planner-input-group label {
        font-size: 0.6rem !important;
        margin-bottom: 2px !important;
    }
    
    .planner-input-group input[type="date"],
    .planner-input-group input[type="number"] {
        font-size: 0.75rem !important;
        padding: 10px 12px !important;
        min-height: 44px !important;
        border-radius: 12px !important;
    }
    
    .planner-check-btn {
        font-size: 0.8rem !important;
        padding: 12px !important;
        min-height: 48px !important;
        border-radius: 30px !important;
    }
    
    .planner-section-title {
        font-size: 0.8rem !important;
        margin: 8px 0 14px 0 !important;
        padding: 0 4px !important;
        line-height: 1.5 !important;
    }
    
    .planner-sections-grid {
        gap: 6px !important;
        margin-bottom: 6px !important;
    }
    
    .planner-sections-grid .planner-section-btn {
        font-size: 0.7rem !important;
        padding: 12px 4px !important;
        min-height: 44px !important;
        border-radius: 12px !important;
    }
    
    .planner-sections-grid.two-col .planner-section-btn {
        font-size: 0.7rem !important;
        padding: 12px 4px !important;
        min-height: 44px !important;
    }
    
    #customSystemBtn {
        font-size: 0.75rem !important;
        padding: 12px 0 !important;
        min-height: 44px !important;
        margin-top: 8px !important;
    }
    
    .planner-top-bar {
        padding-top: 2px !important;
        padding-bottom: 8px !important;
        margin-bottom: 8px !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    
    .planner-top-bar .left-icons button {
        font-size: 16px !important;
        padding: 6px !important;
        min-height: 36px !important;
        min-width: 36px !important;
    }
    
    .planner-top-bar .right-date {
        font-size: 0.65rem !important;
        gap: 4px !important;
    }
    
    .planner-top-bar .right-date .material-symbols-outlined {
        font-size: 16px !important;
    }
    
    .planner-card .planner-header {
        padding-bottom: 10px !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    
    .planner-card .planner-date {
        font-size: 0.65rem !important;
        gap: 4px !important;
    }
    
    .planner-card .planner-date .material-symbols-outlined {
        font-size: 16px !important;
    }
    
    .planner-card .planner-remaining {
        font-size: 0.65rem !important;
        gap: 4px !important;
    }
    
    .planner-card .planner-remaining .material-symbols-outlined {
        font-size: 16px !important;
    }
    
    .planner-card .planner-title {
        font-size: 0.85rem !important;
        margin: 10px 0 2px 0 !important;
    }
    
    .planner-card .planner-subtitle {
        font-size: 0.65rem !important;
        margin-bottom: 12px !important;
    }
    
    .planner-card .exam-list {
        gap: 6px !important;
    }
    
    .planner-card .exam-card {
        padding: 10px 12px !important;
        border-radius: 12px !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    
    .planner-card .exam-card > span:first-child {
        font-size: 0.75rem !important;
        white-space: normal !important;
        word-break: break-word !important;
        flex: 1 1 100% !important;
        text-align: center !important;
    }
    
    .planner-card .exam-card > div {
        gap: 8px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        width: 100% !important;
    }
    
    .planner-card .exam-card .exam-info-item {
        font-size: 0.6rem !important;
        gap: 3px !important;
    }
    
    .planner-card .exam-card .exam-info-item .material-symbols-outlined {
        font-size: 14px !important;
    }
    
    .planner-toggle-wrapper {
        padding: 4px 10px !important;
        margin: 4px 0 6px 0 !important;
        border-radius: 10px !important;
        justify-content: center !important;
    }
    
    .ios-toggle-container {
        width: 40px !important;
        height: 24px !important;
    }
    
    .ios-toggle-slider {
        width: 20px !important;
        height: 20px !important;
        top: 2px !important;
        left: 2px !important;
    }
    
    .ios-toggle-container input:checked + .ios-toggle-label .ios-toggle-slider {
        left: calc(100% - 22px) !important;
    }

    /* --- نافذة تسجيل الدخول (Auth Modal) --- */
    #authModal .settings-modal-content {
        padding: 20px 16px !important;
        max-width: 340px !important;
        width: 92% !important;
        border-radius: 24px !important;
    }
    
    #authModal .settings-modal-header h3 {
        font-size: 1rem !important;
    }
    
    #authModal .settings-modal-body label {
        font-size: 12px !important;
    }
    
    #authModal .settings-modal-body input {
        font-size: 14px !important;
        padding: 10px 12px !important;
        min-height: 44px !important;
        border-radius: 12px !important;
    }
    
    #authModal .password-wrapper .password-toggle-icon {
        font-size: 20px !important;
        width: 22px !important;
        height: 22px !important;
        left: 12px !important;
    }
    
    #authModal .settings-modal-body button {
        font-size: 14px !important;
        padding: 12px !important;
        min-height: 48px !important;
        border-radius: 12px !important;
    }
    
    #authModal .settings-modal-body div[style*="display:flex; justify-content:space-between"] {
        font-size: 12px !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
    }

    /* ========================================
       نافذة طريقة الاشتراك - تحسين الهاتف
    ======================================== */
    .subscribe-guide-modal .modal-container {
        width: 94% !important;
        max-width: 400px !important;
        max-height: 90vh !important;
        border-radius: 24px !important;
    }
    
    .subscribe-guide-modal .modal-header {
        padding: 14px 16px !important;
    }
    
    .subscribe-guide-modal .modal-header h3 {
        font-size: 1rem !important;
        gap: 6px !important;
    }
    
    .subscribe-guide-modal .close-modal-btn {
        font-size: 24px !important;
    }
    
    .subscribe-slider-container {
        padding: 20px 10px !important;
    }
    
    .subscribe-slide {
        width: 180px !important;
        margin-right: 12px !important;
    }
    
    .subscribe-slide img {
        border-radius: 16px !important;
    }
    
    .subscribe-slide-caption {
        font-size: 0.65rem !important;
        margin-top: 6px !important;
        padding: 0 4px !important;
    }
    
    .slider-nav-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.2rem !important;
        border-radius: 50% !important;
    }
    
    .slider-nav-prev {
        left: 2px !important;
    }
    
    .slider-nav-next {
        right: 2px !important;
    }

    /* ========================================
       إصلاح ألوان الـ Select في الهاتف لـ Lesen Teil 1 و Teil 3
    ======================================== */
    
    /* إعادة تعيين لون خلفية الـ select في Teil 1 و Teil 3 */
    #teil1 select,
    #teil3 select,
    select, 
    .teil3-original-select {
        width: 100% !important;
        padding: 6px 8px !important;
        font-size: 0.6rem !important;
        border-radius: 12px !important;
        background: #eef2f5 !important;
        color: #2d3e50 !important;
        border: 1px solid #dce5ec !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }
    
    /* ألوان التصحيح */
    .correct-answer-card select {
        background: #d4edda !important;
        border: 2px solid #28a745 !important;
        color: #155724 !important;
    }
    
    .wrong-answer-card select {
        background: #fef0e0 !important;
        border: 2px solid #e67e22 !important;
        color: #856404 !important;
    }
    
    /* ========================================
       تحسين قوائم الهاتف لـ Lesen Teil 1 و Teil 3 (Dropdown)
    ======================================== */
    
    /* تصميم الزر الأساسي - خلفية رمادية */
    .mobile-dropdown-btn,
    .mobile-dropdown-btn-teil3 {
        background: #eef2f5 !important;
        border: 1px solid #dce3e8 !important;
        border-radius: 14px !important;
        padding: 12px 14px !important;
        font-size: 0.75rem !important;
        font-weight: 500 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        cursor: pointer !important;
        transition: all 0.25s ease !important;
        color: #334155 !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
    }
    
    /* تأثير الضغط على الزر (للهاتف - بديل hover) */
    .mobile-dropdown-btn:active,
    .mobile-dropdown-btn-teil3:active {
        background-color: #d4e0e8 !important;
        transform: scale(0.97) !important;
        transition: all 0.05s ease !important;
    }
    
    /* السهم */
    .dropdown-arrow {
        font-size: 0.65rem !important;
        transition: transform 0.25s ease !important;
        color: #94a3b8 !important;
    }
    
    /* القائمة المنسدلة - خلفية رمادية فاتحة */
    .mobile-dropdown-menu,
    .mobile-dropdown-menu-teil3 {
        display: none;
        margin-top: 8px !important;
        background: #eef2f5 !important;
        border: 1px solid #dce3e8 !important;
        border-radius: 14px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
        animation: fadeInDown 0.25s ease !important;
    }
    
    /* عناصر القائمة - خلفية رمادية */
    .mobile-dropdown-item {
        padding: 12px 14px !important;
        font-size: 0.7rem !important;
        color: #334155 !important;
        cursor: pointer !important;
        transition: background 0.2s ease !important;
        border-bottom: 1px solid #dce3e8 !important;
        background: #eef2f5 !important;
    }
    
    /* آخر عنصر بدون border */
    .mobile-dropdown-item:last-child {
        border-bottom: none !important;
    }
    
    /* تأثير اللمس على عناصر القائمة (للهاتف) */
    .mobile-dropdown-item:active {
        background: #d4e0e8 !important;
        transform: scale(0.98) !important;
        transition: all 0.05s ease !important;
    }
    
    /* العنصر المحدد حالياً */
    .mobile-dropdown-item.selected {
        background: #d4e0e8 !important;
        color: #1e293b !important;
        font-weight: 500 !important;
    }
    
    /* الأنيميشن */
    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* ===== تحسين Teil 3 للهواتف الصغيرة (عرض ≤ 550px) ===== */
    @media (max-width: 550px) {
        /* إخفاء العمود الأيمن (Situationen) */
        #teil3 > div[style*="display: flex"] > div:last-child {
            display: none !important;
        }
        
        /* العمود الأيسر يأخذ العرض بالكامل */
        #teil3 > div[style*="display: flex"] > div:first-child {
            width: 100% !important;
            max-width: 100% !important;
            flex: none !important;
        }
        
        /* الحاوية الأم تسمح بالتمرير الأفقي */
        #teil3 > div[style*="display: flex"] {
            overflow-x: auto !important;
            overflow-y: visible !important;
            width: 100% !important;
            max-width: 100% !important;
            display: block !important;
            scroll-behavior: smooth !important;
            -webkit-overflow-scrolling: touch !important;
        }
        
        /* الشبكة تصبح أعرض من الشاشة للسماح بالتمرير */
        #teil3 [style*="grid-template-columns: 1fr 1fr"] {
            display: grid !important;
            width: fit-content !important;
            min-width: 650px !important;
            grid-template-columns: repeat(2, 300px) !important;
            column-gap: 18px !important;
            padding-right: 120px !important;
            /* نضمن عدم قص المحتوى */
            overflow: visible !important;
        }
        
        /* ضبط البطاقات الفردية لتأخذ العرض الكامل داخل الخلية */
        #teil3 [style*="grid-template-columns: 1fr 1fr"] > * {
            width: 100% !important;
            min-width: 0 !important;
            max-width: 100% !important;
            box-sizing: border-box !important;
        }
    }
    
    /* تحسين Teil 1 */
    #teil1 .question-card {
        padding: 12px !important;
        margin-bottom: 12px !important;
        background: #ffffff !important;
        border-radius: 16px !important;
        border: 1px solid #e2e8f0 !important;
    }
    
    /* نص السؤال */
    #teil1 .question-text,
    #teil3 .question-text {
        font-size: 0.75rem !important;
        font-weight: 600 !important;
        margin-bottom: 10px !important;
        color: #1e293b !important;
        line-height: 1.4 !important;
    }
    
    /* نص الفقرة في Teil 3 */
    #teil3 div[style*="font-size: 13px"] {
        font-size: 0.6rem !important;
        line-height: 1.4 !important;
        margin-bottom: 8px !important;
        color: #475569 !important;
    }
    
    /* عنوان الفقرة */
    #teil3 div[style*="font-weight: bold"] {
        font-size: 0.65rem !important;
        margin-bottom: 6px !important;
        color: #3b82f6 !important;
    }

    /* ===== إصلاح حاوية الصور في الهاتف ===== */
    .features-images {
        min-width: unset !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        margin-top: 10px !important;
    }
}
/* للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .teile-row {
        gap: 5px !important;
    }
    
    .teil-item {
        padding: 4px 10px !important;
        font-size: 0.6rem !important;
    }
    
    .exam-title {
        font-size: 0.6rem !important;
    }
    
    .hero-title {
        font-size: 1.2rem !important;
    }
    
    .question-text {
        font-size: 0.65rem !important;
    }
    
    .option-label {
        font-size: 0.6rem !important;
        padding: 5px 6px !important;
    }
    
    .widget-slide {
        width: 35px !important;
        height: 35px !important;
    }
}

/* للهواتف الكبيرة والتابلت */
@media (min-width: 769px) and (max-width: 1024px) {
    .teil-item {
        font-size: 0.7rem !important;
        padding: 8px 12px !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
    
    .exam-title {
        font-size: 0.8rem !important;
    }
}


/* تأثير التمرير السلس لقائمة الامتحانات */
#examsList {
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
}

/* تأثير عند الضغط على عنصر القائمة */
.item:active {
    background-color: #e2e8f0 !important;
    transform: scale(0.99) !important;
    transition: all 0.05s ease !important;
}
/* ============================================
   تصميم Premium Access الاحترافي
   ============================================ */

.premium-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(6px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.premium-modal.active {
    visibility: visible;
    opacity: 1;
}

.premium-card {
    background: #ffffff;
    border-radius: 28px;
    max-width: 380px;
    width: 85%;
    padding: 0;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.premium-modal.active .premium-card {
    transform: scale(1);
}

.premium-card-header {
    text-align: center;
    padding: 32px 24px 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 6px 16px;
    margin-bottom: 20px;
}

.premium-badge span {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #475569;
}

.premium-icon {
    font-size: 0.85rem;
}

.premium-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.premium-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.premium-card-body {
    padding: 24px;
    text-align: center;
}

.premium-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
}

.premium-features li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.85rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.premium-features li:last-child {
    border-bottom: none;
}

.premium-features .check {
    color: #10b981;
    font-size: 0.9rem;
}

.premium-btn {
    background: #60a5fa;
    border: none;
    border-radius: 44px;
    padding: 14px 24px;
    width: 100%;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.premium-btn:hover {
    background: #3b82f6;
    transform: translateY(-1px);
}

.premium-later {
    background: transparent;
    border: none;
    padding: 10px 20px;
    font-size: 0.75rem;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s ease;
    width: 100%;
}

.premium-later:hover {
    color: #64748b;
}


/* توحيد حجم الامتحانات في الحاسوب */
.item .exam-title,
.exam-title {
    font-size: 0.65rem !important;
    font-weight: 500 !important;
}

/* ========================================
   تنسيق أزرار الأجزاء (Teile) - التصميم الجديد
   ======================================== */

.teil-item {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 18px !important;
    height: 42px !important;
    background: linear-gradient(90deg, #161922 0%, #2D3138 50%, #161922 100%) !important;
    border: 1px solid #D5E0EC !important;
    border-radius: 14px !important;
    color: #4F6F94 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* إزالة الأيقونة */
.teil-item::before {
    content: none !important;
    display: none !important;
}

/* Hover effect */
.teil-item:hover {
    background: #E3EDF8 !important;
    border-color: #BFD3E8 !important;
    color: #4F6F94 !important;
    transform: none !important;
}

/* Active (المضغوط) - عند الضغط */
.teil-item:active {
    background: #095BBB !important;
    border-color: #095BBB !important;
    color: #FFFFFF !important;
    transform: none !important;
}

/* ============================================
   أيقونة Info الجديدة (علاش غتنجح معانا؟)
   ============================================ */
.why-premium-icon-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 25px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #E5E7EB;
    padding: 0;
    font-family: inherit;
    
    position: fixed !important;
    top: 82px !important;
    right: 30px !important;
    z-index: 9999 !important;
}

.why-premium-icon-btn:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.15);
    transform: scale(1.05);
}

.why-premium-icon-btn .material-symbols-outlined {
    font-size: 20px;
    color: #E5E7EB;
}

.why-premium-icon-btn .premium-info-card {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(120, 170, 255, 0.16);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.22s ease;
    z-index: 1001;
    cursor: default;
    text-align: right;
}

.why-premium-icon-btn .premium-info-card::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: rgba(15, 23, 42, 0.96);
    border-left: 1px solid rgba(120, 170, 255, 0.16);
    border-top: 1px solid rgba(120, 170, 255, 0.16);
    transform: rotate(45deg);
    backdrop-filter: blur(10px);
}

.why-premium-icon-btn .premium-info-card .card-icon {
    font-size: 1rem;
    margin-left: 6px;
    color: #60a5fa;
}

.why-premium-icon-btn .premium-info-card .card-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.7;
    color: #d7e1ee;
}

.why-premium-icon-btn.active .premium-info-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#home .why-premium-icon-btn,
#exam .why-premium-icon-btn {
    display: none !important;
}

@media (max-width: 1079px) {
    .why-premium-icon-btn {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .why-premium-icon-btn {
        width: 32px;
        height: 32px;
    }
    .why-premium-icon-btn .material-symbols-outlined {
        font-size: 18px;
    }
    .why-premium-icon-btn .premium-info-card {
        width: 290px;
        right: -10px;
        padding: 12px 14px;
    }
    .why-premium-icon-btn .premium-info-card .card-text {
        font-size: 11px;
    }
}

/* ============================================
   نافذة الاشتراك المنبثقة (Subscription Modal)
   ============================================ */

.subscription-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 17, 23, 0.55);
    backdrop-filter: blur(6px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.subscription-modal.active {
    visibility: visible;
    opacity: 1;
}

.subscription-card {
    background: linear-gradient(135deg, #161922 0%, #2D3138 50%, #202534 100%);
    border-radius: 18px;
    width: 90%;
    max-width: 380px;
    padding: 28px 24px;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-align: center;
}

.subscription-modal.active .subscription-card {
    transform: scale(1);
}

.subscription-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.subscription-subtitle {
    font-size: 0.8rem;
    color: #9CA3AF;
    margin-bottom: 28px;
    line-height: 1.5;
}

.subscription-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subscription-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
    box-sizing: border-box;
}

.subscription-btn.primary {
    background: #FFFFFF;
    color: #1A1D27;
    border: 1px solid #E2E8F0;
}

.subscription-btn.primary:hover {
    background: #F1F5F9;
    transform: translateY(-1px);
}

.subscription-btn.whatsapp {
    background: #25D366;
    color: #FFFFFF;
    border: none;
}

.subscription-btn.whatsapp:hover {
    background: #128C7E;
    transform: translateY(-1px);
}

.close-subscription-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #E5E7EB;
    font-size: 0.85rem;
    padding: 10px 16px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 8px;
    font-weight: 500;
}

.close-subscription-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}
.subscription-card {
    background: linear-gradient(135deg, #1A1D27 0%, #252A35 50%, #1A1D27 100%);
    border-radius: 24px;
    width: 90%;
    max-width: 360px;
    padding: 24px 22px;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.4);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.subscription-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 6px;
}

.subscription-subtitle {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-bottom: 24px;
    line-height: 1.5;
}
/* ============================================
   نافذة نقل الحساب - تصميم أنيق
   ============================================ */

.transfer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 20002;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.transfer-modal.active {
    visibility: visible;
    opacity: 1;
}

.transfer-card {
    background: linear-gradient(135deg, #1a1d27, #252a35);
    border-radius: 24px;
    padding: 30px 28px;
    max-width: 400px;
    width: 90%;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-align: center;
}

.transfer-modal.active .transfer-card {
    transform: scale(1);
}

.transfer-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.transfer-title {
    color: #f1f5f9;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.transfer-subtitle {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.transfer-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.transfer-btn {
    padding: 12px 28px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 120px;
}

.transfer-btn.confirm {
    background: #38bdf8;
    color: #0a0e1a;
}

.transfer-btn.confirm:hover {
    background: #0ea5e9;
    transform: translateY(-2px);
}

.transfer-btn.cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.transfer-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}
/* ============================================
   Toast Notifications
   ============================================ */

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

/* ============================================
   Modal العام
   ============================================ */

.zertiva-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.7);
    backdrop-filter: blur(8px);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.zertiva-modal.active {
    visibility: visible;
    opacity: 1;
}

.zertiva-modal-content {
    background: #1a1d27;
    border-radius: 24px;
    padding: 32px 28px;
    max-width: 420px;
    width: 90%;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-align: center;
}

.zertiva-modal.active .zertiva-modal-content {
    transform: scale(1) translateY(0);
}

.zertiva-modal .modal-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.zertiva-modal .modal-title {
    color: #f1f5f9;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.zertiva-modal .modal-text {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 28px;
}

.zertiva-modal .modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.zertiva-modal .modal-btn {
    padding: 12px 28px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    min-width: 120px;
}

.zertiva-modal .modal-btn.primary {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0a0e1a;
}

.zertiva-modal .modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.3);
}

.zertiva-modal .modal-btn.secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.zertiva-modal .modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

/* ============================================
   Loading Spinner داخل الزر
   ============================================ */

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 2px solid #ffffff;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   Welcome Card - بطاقة ترحيب مصغرة وأنيقة
   ============================================ */

.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.welcome-overlay.active {
    visibility: visible;
    opacity: 1;
}

.welcome-card {
    background: #111827;
    border-radius: 18px;
    padding: 18px 22px;
    width: 90%;
    max-width: 340px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.92) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-align: center;
    direction: rtl;
    position: relative;
}

.welcome-overlay.active .welcome-card {
    transform: scale(1) translateY(0);
}

.welcome-title {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.3;
}

.welcome-email {
    color: #d1d5db;
    font-size: 0.65rem;
    font-weight: 400;
    margin-bottom: 10px;
    word-break: break-all;
    opacity: 0.8;
}

.welcome-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 6px 0 10px 0;
}

.welcome-status {
    font-size: 0.8rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 2px;
}

.welcome-status span {
    color: #38bdf8;
    font-weight: 600;
}

.welcome-message {
    font-size: 0.65rem;
    color: #9ca3af;
    line-height: 1.4;
    margin-top: 2px;
}

.welcome-subscribe-btn {
    margin-top: 10px;
    background: #38bdf8;
    color: #0a0e1a;
    border: none;
    padding: 5px 14px;
    border-radius: 40px;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.welcome-subscribe-btn:hover {
    background: #0ea5e9;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .welcome-card {
        padding: 14px 16px;
        max-width: 300px;
        width: 92%;
        border-radius: 16px;
    }
    
    .welcome-title {
        font-size: 0.8rem;
    }
    
    .welcome-email {
        font-size: 0.55rem;
        margin-bottom: 8px;
    }
    
    .welcome-status {
        font-size: 0.7rem;
    }
    
    .welcome-message {
        font-size: 0.55rem;
    }
    
    .welcome-subscribe-btn {
        padding: 4px 12px;
        font-size: 0.55rem;
        margin-top: 8px;
    }
}

/* ============================================
   Premium Modal
   ============================================ */

.premium-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.premium-modal.active {
    visibility: visible;
    opacity: 1;
}

.premium-card {
    background: #ffffff;
    border-radius: 28px;
    max-width: 380px;
    width: 85%;
    padding: 0;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.premium-modal.active .premium-card {
    transform: scale(1);
}

.premium-card-header {
    text-align: center;
    padding: 28px 24px 16px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 4px 14px;
    margin-bottom: 16px;
}

.premium-badge span {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #475569;
}

.premium-icon {
    font-size: 0.8rem;
}

.premium-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}

.premium-subtitle {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.premium-card-body {
    padding: 20px 24px 24px 24px;
    text-align: center;
}

.premium-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.premium-features li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.8rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.premium-features li:last-child {
    border-bottom: none;
}

.premium-features .check {
    color: #10b981;
    font-size: 0.85rem;
}

.premium-btn {
    background: #60a5fa;
    border: none;
    border-radius: 44px;
    padding: 12px 20px;
    width: 100%;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.premium-btn:hover {
    background: #3b82f6;
    transform: translateY(-1px);
}

.premium-later {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 0.7rem;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s ease;
    width: 100%;
}

.premium-later:hover {
    color: #64748b;
}

/* ============================================
   Zertiva Modal (عام)
   ============================================ */

.zertiva-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.7);
    backdrop-filter: blur(8px);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.zertiva-modal.active {
    visibility: visible;
    opacity: 1;
}

.zertiva-modal-content {
    background: #1a1d27;
    border-radius: 24px;
    padding: 28px 24px;
    max-width: 400px;
    width: 90%;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-align: center;
}

.zertiva-modal.active .zertiva-modal-content {
    transform: scale(1) translateY(0);
}

.zertiva-modal .modal-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.zertiva-modal .modal-title {
    color: #f1f5f9;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.zertiva-modal .modal-text {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.zertiva-modal .modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.zertiva-modal .modal-btn {
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    min-width: 100px;
}

.zertiva-modal .modal-btn.primary {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0a0e1a;
}

.zertiva-modal .modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.3);
}

.zertiva-modal .modal-btn.secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.zertiva-modal .modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

/* ============================================
   Toast
   ============================================ */

.zertiva-center-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(56, 189, 248, 0.92);
    color: #0a0e1a;
    padding: 10px 20px;
    border-radius: 14px;
    z-index: 99999;
    max-width: 90%;
    width: auto;
    min-width: 160px;
    max-width: 360px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    font-weight: 500;
    opacity: 0;
    transition: all 0.15s ease;
    pointer-events: auto;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    direction: rtl;
    word-break: break-word;
}

@media (max-width: 768px) {
    .zertiva-center-toast {
        padding: 6px 14px;
        font-size: 10px;
        min-width: 120px;
        max-width: 85%;
        border-radius: 12px;
    }
}

/* ============================================ 
   Toast Notifications - نظام حديث (أعلى الشاشة)
   ============================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: 100%;
    pointer-events: none;
}
.toast-item {
    background: #111827;
    border-radius: 14px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    pointer-events: auto;
    direction: rtl;
    min-width: 200px;
    max-width: 380px;
    transition: all 0.2s ease;
}

.toast-item.removing {
    animation: toastSlideOut 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.toast-message {
    color: #d1d5db;
    font-size: 0.7rem;
    line-height: 1.4;
    margin-top: 1px;
}

.toast-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.toast-close:hover {
    color: #94a3b8;
}

.toast-item.success .toast-icon {
    color: #22c55e;
}

.toast-item.warning .toast-icon {
    color: #ffd54f;
}

.toast-item.error .toast-icon {
    color: #ef4444;
}

.toast-item.info .toast-icon {
    color: #38bdf8;
}

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(30px) scale(0.95);
    }
}

@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: 100%;
        width: auto;
    }
    
    .toast-item {
        padding: 12px 14px;
        border-radius: 12px;
        max-width: 100%;
    }
    
    .toast-icon {
        font-size: 1rem;
        width: 24px;
    }
    
    .toast-title {
        font-size: 0.75rem;
    }
    
    .toast-message {
        font-size: 0.65rem;
    }
}

.zertiva-center-toast {
    display: none !important;
}

.exam-info-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 4px;
    margin-bottom: 2px;
    align-items: center;
}

.exam-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.5;
}

.exam-chip .material-symbols-outlined {
    font-size: 14px !important;
    color: #94a3b8 !important;
}

/* ألوان المؤشرات حسب القيمة */
.chip-gray { color: #94a3b8; }
.chip-gray .material-symbols-outlined { color: #94a3b8 !important; }

.chip-orange { color: #f59e0b; }
.chip-orange .material-symbols-outlined { color: #f59e0b !important; }

.chip-green { color: #22c55e; }
.chip-green .material-symbols-outlined { color: #22c55e !important; }

/* تصغير حجم المؤشرات في قائمة الامتحانات فقط */
#examsList .exam-chip {
    font-size: 8px;
    gap: 2px;
}
#examsList .exam-chip .material-symbols-outlined {
    font-size: 12px !important;
}

/* للهواتف حتى عرض 350 بكسل */
@media (max-width: 768px) {
    #examsList .exam-chip {
        font-size: 7px;
        gap: 1px;
    }
    #examsList .exam-chip .material-symbols-outlined {
        font-size: 10px !important;
    }
}
@media (max-width: 480px) {
    #examsList .exam-chip {
        font-size: 6px;
        gap: 1px;
    }
    #examsList .exam-chip .material-symbols-outlined {
        font-size: 9px !important;
    }
}
/* ضمان أصغر حجم للشاشات الضيقة جداً */
@media (max-width: 350px) {
    #examsList .exam-chip {
        font-size: 5.5px;
        gap: 0px;
    }
    #examsList .exam-chip .material-symbols-outlined {
        font-size: 8px !important;
    }
}

@media (max-width: 768px) {
    .exam-chip {
        font-size: 9px;
        gap: 2px;
    }
    .exam-chip .material-symbols-outlined {
        font-size: 12px !important;
    }
    .exam-info-chips {
        gap: 4px 8px;
    }
}
/* ========================================
   MEMORY TRAINER V3 - تحسينات السرعة V2
   ======================================== */

.memory-trainer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.10);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: memoryFadeIn 0.12s ease;
}

@keyframes memoryFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes memorySlideUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.memory-trainer-card-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: memorySlideUp 0.12s ease;
}

.memory-trainer-intro,
.memory-trainer-card,
.memory-trainer-recall,
.memory-trainer-results {
    background: #FFFFFF;
    border: 1px solid #E8EEF5;
    border-radius: 12px;
    padding: 20px 24px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    position: relative;
}

.memory-trainer-recall {
    background: #FAFFFA;
    border-color: #DDF7E5;
}

.memory-trainer-results {
    background: #F8FFFB;
    border-color: #B8E6B8;
}

.memory-trainer-results.phase-complete {
    background: #FFFDF5;
    border-color: #FDE68A;
}

.memory-trainer-results.final {
    background: #F0FDF4;
    border-color: #86EFAC;
}

.memory-trainer-icon {
    font-size: 26px;
    display: block;
    margin-bottom: 4px;
}

.memory-trainer-intro h2,
.memory-trainer-results h2 {
    color: #1565C0;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.memory-trainer-results h2 {
    color: #2E7D32;
}

.memory-trainer-intro p,
.memory-trainer-hint {
    color: #64748B;
    font-size: 13px;
    margin-bottom: 10px;
}

.memory-trainer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #F1F5F9;
}

.memory-trainer-progress {
    font-size: 12px;
    color: #94A3B8;
    font-weight: 500;
}

.memory-trainer-focus {
    font-size: 13px;
    font-weight: 600;
    color: #2D6A4F;
}

.memory-trainer-hint {
    font-size: 14px;
    color: #4A7C59;
    margin-bottom: 8px;
}

.memory-trainer-answer {
    background: #F8FAFC;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 8px 0 12px 0;
    font-size: 17px;
    font-weight: 500;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #EDF2F7;
}

.memory-trainer-question {
    color: #334155;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 10px;
}

.memory-trainer-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0;
}

.memory-trainer-option {
    background: #FFFFFF;
    border: 1.5px solid #E8EEF5;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.08s ease !important;
    text-align: left;
}

.memory-trainer-option:hover:not(:disabled) {
    border-color: #38bdf8 !important;
    background: #f0f7ff !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12) !important;
    transform: none !important;
}

.memory-trainer-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.memory-trainer-option.correct {
    border-color: #28a745 !important;
    background-color: #d4edda !important;
}

.memory-trainer-option.wrong {
    border-color: #e67e22 !important;
    background-color: #fef0e0 !important;
}

.memory-trainer-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 6px;
}

.memory-trainer-btn.primary {
    background: #1565C0;
    color: white;
    box-shadow: 0 2px 6px rgba(21, 101, 192, 0.15);
}

.memory-trainer-btn.primary:hover {
    background: #0D47A1;
}

.memory-trainer-btn.secondary {
    background: #F59E0B;
    color: white;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

.memory-trainer-btn.secondary:hover {
    background: #D97706;
}

.memory-trainer-btn.small {
    padding: 6px 14px;
    font-size: 13px;
    margin-top: 4px;
}

.memory-trainer-stats {
    display: flex;
    justify-content: space-around;
    margin: 10px 0 14px 0;
    padding: 8px 0;
    border-top: 1px solid #F1F5F9;
    border-bottom: 1px solid #F1F5F9;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 10px;
    color: #94A3B8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #1565C0;
    margin-top: 2px;
}

.memory-progress-bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    margin: 4px 0 8px 0;
}

.memory-progress-label {
    display: none !important;
}

.memory-progress-track {
    flex: 1;
    min-width: 60px;
    height: 6px;
    background: #e9eef5;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid #E2E8F0;
    background-color: #FFFFFF;
    padding: 1px;
}

.memory-progress-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #1565C0, #38bdf8);
    transition: width 0.3s ease;
    width: 0%;
}

.memory-progress-percent {
    font-size: 12px;
    font-weight: 600;
    color: #1565C0;
    min-width: 35px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.memory-progress-btn {
    background: none;
    border: none;
    font-size: 13px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.15s ease;
    color: #94A3B8;
    line-height: 1;
}

.memory-progress-btn:hover {
    background: #F1F5F9;
    color: #475569;
}

.memory-progress-btn.reset {
    font-size: 13px;
}

.memory-trainer-intro .progress-box {
    background: #FFFFFF;
    border: 1px solid #E8EEF5;
    border-radius: 6px;
    padding: 6px 10px;
    margin: 10px 0 14px 0;
}

.memory-trainer-intro .progress-box .track {
    flex: 1;
    height: 5px;
    background: #e9eef5;
    border-radius: 6px;
    overflow: hidden;
}

.memory-trainer-intro .progress-box .fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #1565C0, #38bdf8);
    transition: width 0.3s ease;
}

.memory-trainer-intro .progress-box .percent {
    font-size: 12px;
    font-weight: 600;
    color: #1565C0;
    min-width: 35px;
    text-align: right;
}

@media (max-width: 640px) {
    .memory-trainer-intro,
    .memory-trainer-card,
    .memory-trainer-recall,
    .memory-trainer-results {
        padding: 14px 12px;
        max-width: 95%;
        border-radius: 10px;
    }

    .memory-trainer-answer {
        font-size: 15px;
        padding: 10px 12px;
    }

    .memory-trainer-option {
        font-size: 13px;
        padding: 8px 12px;
    }

    .memory-trainer-btn {
        font-size: 13px;
        padding: 8px 16px;
        width: 100%;
    }

    .memory-trainer-intro h2,
    .memory-trainer-results h2 {
        font-size: 16px;
    }

    .memory-progress-bar-container {
        padding: 2px 0;
        gap: 6px;
    }

    .memory-progress-track {
        min-width: 40px;
        height: 4px;
    }

    .memory-progress-percent {
        font-size: 10px;
        min-width: 28px;
    }

    .memory-progress-btn {
        font-size: 12px;
        padding: 2px 4px;
    }

    #memory-trainer-feedback .memory-trainer-btn {
        width: auto;
    }
}
/* ============================================
   Sentence Puzzle - أداة ترتيب الجمل (النسخة النهائية)
   ============================================ */

.sentence-puzzle-icon {
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 10px;
    display: inline-block;
    color: #64748b;
    opacity: 0.6;
}

.sentence-puzzle-icon:hover {
    color: #2c3e66;
    opacity: 1;
    transform: scale(1.1);
}

#sentencePuzzleOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.25s ease;
}

#sentencePuzzleCard {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 28px;
    max-width: 620px;
    width: 92%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    transform: scale(0.96) translateY(8px);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #e8edf4;
}

.sentence-slot {
    flex: 1;
    min-width: 100px;
    min-height: 50px;
    padding: 10px 16px;
    border: 2px dashed #dce2ec;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.85rem;
    color: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    font-weight: 400;
    box-sizing: border-box;
}

.sentence-slot:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.sentence-slot[data-has-part="true"] {
    border-style: solid;
    background: #ffffff;
    color: #1e293b;
}

.sentence-card {
    flex: 1;
    min-width: 120px;
    padding: 12px 18px;
    background: #ffffff;
    border: 1px solid #dce2ec;
    border-radius: 8px;
    cursor: grab;
    font-size: 0.85rem;
    color: #1e293b;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    user-select: none;
    font-weight: 400;
    text-align: center;
    word-break: break-word;
    line-height: 1.5;
    box-sizing: border-box;
}

.sentence-card:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.sentence-card:active {
    cursor: grabbing;
}

.sentence-card[data-placed="true"] {
    display: none;
}

@media (max-width: 768px) {
    #sentencePuzzleCard {
        padding: 18px 16px;
        max-width: 96%;
        border-radius: 12px;
    }
    
    .sentence-slot {
        min-width: 60px;
        min-height: 40px;
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .sentence-card {
        min-width: 60px;
        padding: 8px 12px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    #sentencePuzzleCard {
        padding: 14px 12px;
        border-radius: 10px;
    }
    
    .sentence-slot {
        min-width: 40px;
        min-height: 32px;
        padding: 4px 6px;
        font-size: 0.65rem;
    }
    
    .sentence-card {
        min-width: 40px;
        padding: 6px 8px;
        font-size: 0.65rem;
    }
}


/* ============================================
   نافذة تسجيل الدخول الجديدة (مودال موحد)
   ============================================ */
#authModal .settings-modal-content {
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.15);
}

#authModal input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

#authModal .settings-modal-body label {
    color: #94a3b8;
}



/* ============================================
   Password Wrapper - حل المشكلة النهائي
   ============================================ */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .password-toggle-icon {
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    margin: auto 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #9CA3AF;
    font-size: 22px;
    font-family: 'Material Symbols Outlined', sans-serif;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 22;
    transition: color 0.2s ease, transform 0.2s ease;
    user-select: none;
    z-index: 5;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    line-height: 1;
}

.password-wrapper .password-toggle-icon:hover {
    color: #38bdf8;
    transform: scale(1.1);
}
/* ============================================
   توسيط عنوان نافذة تسجيل الدخول
   ============================================ */
#authModal .settings-modal-header {
    display: flex;
    justify-content: center !important;
    align-items: center;
    position: relative;
}

#authModal .settings-modal-header h3 {
    text-align: center;
    flex: 1;
    margin: 0;
}

#authModal .close-settings-btn {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}
/* ============================================
   وضع القراءة (Reading Mode) - 4 درجات
   ============================================ */

.reading-mode-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 10px;
}

.reading-mode-btn {
    background: rgba(255, 190, 80, 0.12);
    border: 1px solid rgba(255, 190, 80, 0.25);
    border-radius: 40px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #f1f5f9;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.reading-mode-btn:hover {
    background: rgba(255, 190, 80, 0.2);
    border-color: rgba(255, 190, 80, 0.4);
    transform: scale(1.02);
}

.reading-mode-btn:active {
    transform: scale(0.97);
}

#readingModeStatus {
    color: #fbbf24;
    font-weight: 600;
}

#readingModeOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: rgba(255, 190, 80, 0);
    transition: background 0.4s ease;
}


@keyframes toastFadeIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
/* ============================================
   زر تبديل شكل القائمة (فقط أيقونة)
   ============================================ */
.view-mode-toggle-btn {
    position: absolute;
    right: 5px;
    top: 26%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6b7a8f;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    font-family: inherit;
    font-size: 20px;
}

.view-mode-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #2c3e66;
    transform: translateY(-50%) scale(1.1);
}

.view-mode-toggle-btn .material-symbols-outlined {
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s ease;
}

@media (max-width: 768px) {
    .view-mode-toggle-btn {
        width: 26px;
        height: 26px;
        font-size: 18px;
        right: 3px;
    }
    .view-mode-toggle-btn .material-symbols-outlined {
        font-size: 18px;
    }
}
/* ============================================
   أزرار تبديل شكل القائمة
   ============================================ */

.view-mode-toggle-btn-1 {
    position: absolute;
    right: 40px;
    top: 26%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6b7a8f;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    font-family: inherit;
    font-size: 20px;
}

.view-mode-toggle-btn-1:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #2c3e66;
    transform: translateY(-50%) scale(1.1);
}

.view-mode-toggle-btn-1 .material-symbols-outlined {
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s ease;
}

.view-mode-toggle-btn-2 {
    position: absolute;
    right: 5px;
    top: 26%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6b7a8f;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    font-family: inherit;
    font-size: 20px;
}

.view-mode-toggle-btn-2:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #2c3e66;
    transform: translateY(-50%) scale(1.1);
}

.view-mode-toggle-btn-2 .material-symbols-outlined {
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s ease;
}

@media (max-width: 768px) {
    .view-mode-toggle-btn-1,
    .view-mode-toggle-btn-2 {
        width: 26px;
        height: 26px;
        font-size: 18px;
    }
    .view-mode-toggle-btn-1 {
        right: 32px;
    }
    .view-mode-toggle-btn-2 {
        right: 3px;
    }
    .view-mode-toggle-btn-1 .material-symbols-outlined,
    .view-mode-toggle-btn-2 .material-symbols-outlined {
        font-size: 18px;
    }
}
/* ============================================
   Version Badge - شارة التعديلات
   ============================================ */

.version-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #334155, #1e293b);
    color: #f1f5f9;
    border-radius: 999px;
    padding: 0 8px;
    height: 20px;
    font-size: 9px;
    font-weight: 600;
    margin-left: 6px;
    cursor: pointer;
    flex-shrink: 0;
    border: 1px solid #475569;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    user-select: none;
}

.version-badge:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.version-badge:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .version-badge {
        height: 18px;
        font-size: 8px;
        padding: 0 6px;
        margin-left: 4px;
    }
}

/* ============================================
   Versions Popup - نافذة التعديلات
   ============================================ */

#versionsPopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: versionsFadeIn 0.2s ease;
}

#versionsPopup .versions-modal {
    background: #1a1f2e;
    border-radius: 20px;
    padding: 28px 24px;
    max-width: 340px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a3042;
    animation: versionsScaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #e2e8f0;
    text-align: center;
}

#versionsPopup .versions-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #a8b5d9;
}

#versionsPopup .versions-divider {
    border-top: 1px solid #2a3042;
    margin-bottom: 14px;
}

#versionsPopup .version-item {
    background: #0f1421;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid #4a6fa5;
    cursor: pointer;
    transition: background 0.2s ease;
}

#versionsPopup .version-item:hover {
    background: #1a2340;
}

#versionsPopup .version-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2a3042;
    color: #a8b5d9;
    border-radius: 999px;
    width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

#versionsPopup .version-text {
    font-size: 13px;
    font-weight: 500;
    text-align: left;
}

@keyframes versionsFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes versionsScaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    #versionsPopup .versions-modal {
        padding: 20px 16px;
        max-width: 300px;
    }
    
    #versionsPopup .version-item {
        padding: 8px 10px;
    }
    
    #versionsPopup .version-number {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    #versionsPopup .version-text {
        font-size: 12px;
    }
}
/* ============================================
   Custom Badge - مع أيقونة layers (نسخة جديدة)
   ============================================ */

.custom-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    background: linear-gradient(135deg, #334155, #1e293b) !important;
    color: #f1f5f9 !important;
    border-radius: 999px !important;
    padding: 0 8px 0 4px !important;
    height: 22px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #475569 !important;
    user-select: none !important;
    line-height: 1 !important;
}

.custom-badge:hover {
    transform: scale(1.08) !important;
}

.custom-badge:active {
    transform: scale(0.95) !important;
}

.custom-badge .material-symbols-outlined {
    font-size: 12px !important;
    line-height: 1 !important;
}

.custom-badge span:last-child {
    font-size: 9px !important;
    font-weight: 600 !important;
}

@media (max-width: 768px) {
    .custom-badge {
        height: 18px !important;
        padding: 0 5px 0 2px !important;
        gap: 1px !important;
    }
    .custom-badge .material-symbols-outlined {
        font-size: 10px !important;
    }
    .custom-badge span:last-child {
        font-size: 7px !important;
    }
}
/* ============================================
   زر الاختصارات و Popover
   ============================================ */

.shortcuts-toggle-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    opacity: 0.6;
}

.shortcuts-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    opacity: 1;
    transform: scale(1.05);
}

.shortcuts-toggle-btn .material-symbols-outlined {
    font-size: 22px;
}

.shortcuts-popover {
    position: fixed;
    top: 68px;
    right: 20px;
    background: #1a1f2e;
    border: 1px solid #2a3042;
    border-radius: 12px;
    padding: 16px 18px;
    width: 240px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: popoverFadeIn 0.15s ease;
    backdrop-filter: blur(8px);
}

.shortcuts-popover-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a3042;
}

.shortcuts-popover-header .material-symbols-outlined {
    font-size: 18px;
    color: #94a3b8;
}

.shortcuts-popover-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #cbd5e1;
    padding: 4px 0;
}

.shortcut-item kbd {
    background: #0f1421;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    border: 1px solid #2a3042;
    font-family: inherit;
}

.shortcut-item span:last-child {
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
}

@keyframes popoverFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#shortcutsToggleBtn {
    display: none;
}
/* ============================================
   Loading Spinner داخل الزر
   ============================================ */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   نافذة خطة اليوم (Study Planner Modal)
   ============================================ */

#studyPlannerModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    z-index: 15000;
    justify-content: center;
    align-items: center;
}

#studyPlannerModal .session-modal-content {
    background: #f8f9fc;
    border-radius: 20px;
    max-width: 480px;
    width: 90%;
    padding: 28px 24px 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    margin: auto;
}

#studyPlannerContainer {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 4px;
}

#studyPlannerContainer::-webkit-scrollbar {
    width: 4px;
}

#studyPlannerContainer::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

#studyPlannerContainer::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

body.dark-mode #studyPlannerModal .session-modal-content {
    background: #14141e;
    border-color: rgba(255, 255, 255, 0.04);
}

body.dark-mode #studyPlannerModal h3 {
    color: #e8ecf0;
}

@media (max-width: 768px) {
    #studyPlannerModal .session-modal-content {
        padding: 20px 16px 16px;
        max-width: 95%;
    }
}
@media (max-width: 480px) {
    #studyPlannerModal .session-modal-content {
        padding: 16px 12px 12px;
    }
}
/* ============================================
   خطة اليوم - التصميم النهائي
   ============================================ */

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
    font-size: 18px;
    color: #94a3b8;
}

.planner-card {
    font-family: 'Segoe UI', 'SF Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 4px 0;
    color: #1e293b;
}

.planner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid #eef2f6;
    margin-bottom: 0;
}

.planner-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #1e293b;
}

.planner-date .material-symbols-outlined {
    font-size: 18px;
    color: #94a3b8;
}

.planner-remaining {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #1e293b;
}

.planner-remaining .material-symbols-outlined {
    font-size: 18px;
    color: #94a3b8;
}

.planner-remaining .days-number {
    color: #2c3e66;
    font-weight: 600;
}

.planner-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
    margin: 16px 0 2px 0;
}

.planner-subtitle {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 16px;
}

.planner-subtitle strong {
    color: #2c3e66;
    font-weight: 600;
}

.exam-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exam-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 10px 14px;
    border: 1px solid #eef2f6;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.exam-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.exam-card:active {
    transform: scale(0.99);
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.exam-id {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
}

.exam-badge-new {
    font-size: 0.55rem;
    color: #94a3b8;
    background: #f1f4f8;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid #e8ecf0;
}

.exam-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.exam-info-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #64748b;
}

.exam-info-item .material-symbols-outlined {
    font-size: 16px;
    color: #94a3b8;
}

.exam-info-item .score-value {
    font-weight: 500;
}

.score-red { color: #ef4444; }
.score-orange { color: #f59e0b; }
.score-yellow { color: #eab308; }
.score-green { color: #22c55e; }

.review-green { color: #22c55e; }
.review-lightgreen { color: #4ade80; }
.review-gold { color: #eab308; }
.review-red { color: #ef4444; }
.review-gray { color: #94a3b8; }

body.dark-mode .planner-card {
    color: #e8ecf0;
}

body.dark-mode .planner-header {
    border-bottom-color: #2a2a3a;
}

body.dark-mode .planner-date,
body.dark-mode .planner-remaining {
    color: #e8ecf0;
}

body.dark-mode .planner-title {
    color: #e8ecf0;
}

body.dark-mode .planner-subtitle {
    color: #94a3b8;
}

body.dark-mode .exam-card {
    background: #14141e;
    border-color: #2a2a3a;
}

body.dark-mode .exam-card:hover {
    border-color: #3a3a4a;
}

body.dark-mode .exam-id {
    color: #e8ecf0;
}

body.dark-mode .exam-badge-new {
    background: #1e1e2e;
    color: #94a3b8;
    border-color: #2a2a3a;
}

body.dark-mode .exam-info-item {
    color: #94a3b8;
}

body.dark-mode .exam-info-item .material-symbols-outlined {
    color: #64748b;
}

@media (max-width: 768px) {
    .planner-card {
        padding: 2px 0;
    }
    
    .planner-date,
    .planner-remaining {
        font-size: 0.7rem;
    }
    
    .planner-title {
        font-size: 0.9rem;
    }
    
    .exam-card {
        padding: 8px 12px;
    }
    
    .exam-id {
        font-size: 0.75rem;
    }
    
    .exam-info-item {
        font-size: 0.6rem;
        gap: 3px;
    }
    
    .exam-info-item .material-symbols-outlined {
        font-size: 14px;
    }
}




/* ============================================
   Study Planner - تدفق جديد
   ============================================ */

.planner-card {
    font-family: 'Segoe UI', 'SF Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 4px 0;
    color: #1e293b;
}

.planner-welcome-title {
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    color: #1e293b;
    margin-bottom: 20px;
}

.planner-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.planner-input-group {
    flex: 1;
}

.planner-input-group label {
    display: block;
    font-size: 0.65rem;
    color: #94a3b8;
    margin-bottom: 4px;
    font-weight: 500;
}

.planner-input-group input[type="date"],
.planner-input-group input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e8ecf0;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #1e293b;
    background: #ffffff;
    font-family: inherit;
    box-sizing: border-box;
}

.planner-input-group input:focus {
    outline: none;
    border-color: #2c3e66;
    box-shadow: 0 0 0 2px rgba(44, 62, 102, 0.1);
}

.planner-check-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #2c3e66;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.planner-check-btn:hover {
    background: #1a2a4a;
}

.planner-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.planner-loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

.planner-loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #2c3e66;
    border-radius: 50%;
    animation: plannerSpin 0.8s linear infinite;
    background: rgba(255, 255, 255, 0.8);
    padding: 12px;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@keyframes plannerSpin {
    to { transform: rotate(360deg); }
}

.planner-section-title {
    font-size: 0.95rem;
    font-weight: 400;
    text-align: center;
    color: #1e293b;
    margin: 16px 0 18px 0;
}

.planner-sections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.planner-sections-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.planner-section-btn {
    padding: 10px 6px;
    background: linear-gradient(90deg, #161922 0%, #2D3138 50%, #161922 100%);
    border: 1px solid #D5E0EC;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #B0B8C9;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-align: center;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.planner-section-btn:hover {
    background: linear-gradient(90deg, #161922 0%, #2D3138 50%, #161922 100%);
    border-color: #BFD3E8;
    transform: translateY(-2px) scale(1.01);
    color: #4F6F94;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.planner-section-btn:active {
    transform: scale(0.97) translateY(0px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
.planner-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f6;
    margin-bottom: 10px;
}

.planner-top-bar .left-icons {
    display: flex;
    gap: 8px;
}
.planner-top-bar .left-icons button {
    background: none;
    border: none;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.planner-top-bar .left-icons button:hover {
    background: #f1f4f8;
    color: #2c3e66;
}

.planner-top-bar .right-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #1e293b;
    font-weight: 500;
}

.planner-top-bar .right-date .material-symbols-outlined {
    font-size: 18px;
    color: #94a3b8;
}

.planner-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.planner-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.planner-popup-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 22px;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8ecf0;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.planner-popup-overlay.active .planner-popup-card {
    transform: scale(1);
}

.planner-popup-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
    text-align: center;
}

.planner-popup-body {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
}

.planner-popup-close-btn {
    display: block;
    width: 100%;
    padding: 8px;
    background: #f1f4f8;
    border: none;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.planner-popup-close-btn:hover {
    background: #e2e8f0;
}

body.dark-mode .planner-input-group input {
    background: #1e1e2e;
    border-color: #2a2a3a;
    color: #e8ecf0;
}

body.dark-mode .planner-check-btn {
    background: #4a6fa5;
}

body.dark-mode .planner-check-btn:hover {
    background: #5a7fb5;
}

body.dark-mode .planner-section-btn {
    background: #1e1e2e;
    border-color: #2a2a3a;
    color: #e8ecf0;
}

body.dark-mode .planner-section-btn:hover {
    background: #2a2a3a;
    border-color: #3a3a4a;
}

body.dark-mode .planner-top-bar .left-icons button:hover {
    background: #2a2a3a;
}

body.dark-mode .planner-top-bar .right-date {
    color: #e8ecf0;
}

body.dark-mode .planner-popup-card {
    background: #14141e;
    border-color: #2a2a3a;
}

body.dark-mode .planner-popup-title {
    color: #e8ecf0;
}

body.dark-mode .planner-popup-body {
    color: #94a3b8;
}

body.dark-mode .planner-popup-close-btn {
    background: #2a2a3a;
    color: #e8ecf0;
}

body.dark-mode .planner-popup-close-btn:hover {
    background: #3a3a4a;
}

body.dark-mode .planner-loader-spinner {
    background: rgba(20, 20, 30, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    border-top-color: #4a6fa5;
}

body.dark-mode .planner-welcome-title {
    color: #e8ecf0;
}

body.dark-mode .planner-section-title {
    color: #e8ecf0;
}
.study-planner-icon-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    background-clip: padding-box;
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    
    transform: scale(0.85);
    transform-origin: center center;
}

.study-planner-icon-btn:hover {
    transform: scale(0.884) !important;
}

.study-planner-icon-btn .planner-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
    pointer-events: none;
    border-radius: 4px;
    animation: none;
    transform: none;
}

.study-planner-icon-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 14px;
    z-index: -1;
    padding: 2px;
    background: linear-gradient(135deg, #7dd3fc, #60a5fa, #8b5cf6, #38bdf8, #7dd3fc);
    background-size: 300% 300%;
    animation: gradientMove 4s linear infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.study-planner-icon-btn::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 16px;
    z-index: -2;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.2);
    opacity: 0.5;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
}

.study-planner-icon-btn:hover::after {
    opacity: 1;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

@keyframes gradientMove {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

#backHomeBtn {
    display: none !important;
}

/* ✅ يظهر فقط في صفحة القائمة (وليس في الامتحان) */
body:has(#list.active) #backHomeBtn {
    display: block !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    position: relative;
    width: fit-content;
    transform: translateY(-8px);
}

#examsList {
    padding-bottom: 5px !important;
}
#examsList .item:last-child {
    margin-bottom: 0px !important;
    padding-bottom: 0px !important;
}

#profilePlannerRow .profile-planner-text-active {
    color: #38bdf8 !important;
    font-weight: 500;
}
#profilePlannerBtn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    transform: scale(1.05);
}
#profilePlannerRow {
    position: relative;
}
.planner-info-icon {
    cursor: pointer;
    font-size: 16px;
    color: #94a3b8;
    transition: color 0.2s ease;
    margin-left: 4px;
    user-select: none;
}
.planner-info-icon:hover {
    color: #38bdf8;
}
.planner-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1a1f2e;
    color: #e2e8f0;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 12px;
    max-width: 240px;
    min-width: 180px;
    border: 1px solid #2a3042;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    text-align: right;
    line-height: 1.6;
    backdrop-filter: blur(8px);
    pointer-events: none;
}
.planner-tooltip.visible {
    display: block;
}
@media (max-width: 768px) {
    .planner-tooltip {
        max-width: 180px;
        font-size: 11px;
        padding: 10px 12px;
        right: -10px;
        min-width: 150px;
    }
}

/* ============================================
   LOGIN UNIVERS BUTTON (Uiverse Skin - Fully Scoped)
   ============================================ */
.login-uiverse-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.login-uiverse-glow {
    position: absolute;
    inset: 0;
    border-radius: 0.75rem;
    background: linear-gradient(to right, #6366f1, #ec4899, #facc15);
    filter: blur(16px);
    opacity: 0.6;
    transition: all 1s;
    pointer-events: none;
}
.login-uiverse-wrapper:hover .login-uiverse-glow {
    opacity: 1;
    transition-duration: 0.2s;
}
.login-uiverse-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border-radius: 0.75rem;
    background-color: #111827;
    color: white;
    padding: 12px 24px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    gap: 8px;
    white-space: nowrap;
    font-family: inherit;
    min-height: 44px;
}
.login-uiverse-btn:hover {
    background-color: #1f2937;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}
.login-uiverse-btn:active {
    transform: scale(0.98);
}
.login-uiverse-arrow {
    margin-top: 1px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}
.login-uiverse-arrow-stroke {
    transition: opacity 0.2s;
    opacity: 0;
}
.login-uiverse-arrow-head {
    transition: transform 0.2s;
}
.login-uiverse-wrapper:hover .login-uiverse-arrow-head {
    transform: translateX(-3px);
}
.login-uiverse-wrapper:hover .login-uiverse-arrow-stroke {
    opacity: 1;
}

@media (max-width: 768px) {
    .login-uiverse-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
        min-height: 32px;
        gap: 6px;
    }
}

/* ============================================
   SUBSCRIBE UNIVERS BUTTON (Uiverse Skin - Fully Scoped)
   ============================================ */
.subscribe-uiverse-btn {
    position: relative;
    padding: 12px 24px;
    font-size: 16px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    height: 44px;
    font-family: inherit;
}
.subscribe-uiverse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}
.subscribe-uiverse-icon-container {
    position: relative;
    width: 24px;
    height: 24px;
}
.subscribe-uiverse-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    color: #22c55e;
    opacity: 0;
    visibility: hidden;
}
.subscribe-uiverse-default-icon {
    opacity: 1;
    visibility: visible;
}
.subscribe-uiverse-btn:hover .subscribe-uiverse-icon {
    animation: none;
}
.subscribe-uiverse-btn:hover .subscribe-uiverse-wallet-icon {
    opacity: 0;
    visibility: hidden;
}
.subscribe-uiverse-btn:hover .subscribe-uiverse-card-icon {
    animation: subscribeIconRotate 2.5s infinite;
    animation-delay: 0s;
}
.subscribe-uiverse-btn:hover .subscribe-uiverse-payment-icon {
    animation: subscribeIconRotate 2.5s infinite;
    animation-delay: 0.5s;
}
.subscribe-uiverse-btn:hover .subscribe-uiverse-dollar-icon {
    animation: subscribeIconRotate 2.5s infinite;
    animation-delay: 1s;
}
.subscribe-uiverse-btn:hover .subscribe-uiverse-check-icon {
    animation: subscribeIconRotate 2.5s infinite;
    animation-delay: 1.5s;
}
.subscribe-uiverse-btn:active .subscribe-uiverse-icon {
    animation: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.subscribe-uiverse-btn:active .subscribe-uiverse-check-icon {
    animation: subscribeCheckmarkAppear 0.6s ease forwards;
    visibility: visible;
}
.subscribe-uiverse-text {
    font-weight: 600;
    font-family: system-ui, -apple-system, sans-serif;
}
@keyframes subscribeIconRotate {
    0% { opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.5); }
    5% { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
    15% { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
    20% { opacity: 0; visibility: hidden; transform: translateY(-10px) scale(0.5); }
    100% { opacity: 0; visibility: hidden; transform: translateY(-10px) scale(0.5); }
}
@keyframes subscribeCheckmarkAppear {
    0% { opacity: 0; transform: scale(0.5) rotate(-45deg); }
    50% { opacity: 0.5; transform: scale(1.2) rotate(0deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@media (max-width: 768px) {
    .subscribe-uiverse-btn {
        padding: 8px 14px;
        font-size: 14px;
        height: 34px;
        gap: 6px;
    }
    .subscribe-uiverse-icon-container {
        width: 18px;
        height: 18px;
    }
    .subscribe-uiverse-icon {
        width: 18px;
        height: 18px;
    }
}


/* ===== صفحة تعديل الهدف الجديدة ===== */
.goal-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.goal-icon-wrapper .material-symbols-outlined {
    font-size: 32px;
    color: #38bdf8;
}

.goal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px 0;
    text-align: center;
}
.goal-description {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0 0 24px 0;
    text-align: center;
}

.goal-selector {
    width: 100%;
    max-width: 280px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    user-select: none;
}
.goal-selector:hover {
    border-color: #38bdf8;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.12);
}
.goal-selector .clock-icon {
    font-size: 22px;
    color: #64748b;
}
.goal-selector-text {
    flex: 1;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
}
.goal-selector .arrow-icon {
    font-size: 22px;
    color: #94a3b8;
    transition: transform 0.25s ease;
}
.goal-selector.open .arrow-icon {
    transform: rotate(180deg);
}

.goal-dropdown {
    width: 100%;
    max-width: 280px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease;
    margin-top: 0;
}
.goal-dropdown.open {
    max-height: 400px;
    opacity: 1;
    margin-top: 8px;
}
.goal-dropdown .dropdown-item {
    padding: 12px 18px;
    font-size: 0.95rem;
    color: #1e293b;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}
.goal-dropdown .dropdown-item:last-child {
    border-bottom: none;
}
.goal-dropdown .dropdown-item:hover {
    background: #f8fafc;
}
.goal-dropdown .dropdown-item.active {
    background: rgba(56, 189, 248, 0.08);
    color: #0ea5e9;
    font-weight: 500;
}
.goal-dropdown .dropdown-item .check-icon {
    opacity: 0;
    font-size: 18px;
    color: #0ea5e9;
}
.goal-dropdown .dropdown-item.active .check-icon {
    opacity: 1;
}

.goal-save-btn {
    width: 100%;
    max-width: 280px;
    padding: 14px 0;
    border: none;
    border-radius: 40px;
    background: linear-gradient(135deg, #1a2a4a, #2c3e66);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(26, 42, 74, 0.25);
    margin-top: 20px;
    margin-bottom: 28px;
}
.goal-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 42, 74, 0.3);
}
.goal-save-btn:active {
    transform: scale(0.97);
}
.goal-save-btn .material-symbols-outlined {
    font-size: 20px;
}

.achievement-card {
    width: 100%;
    max-width: 280px;
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eef2f6;
    transition: all 0.2s ease;
}
.achievement-card:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}
.achievement-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.achievement-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}
.achievement-icon .material-symbols-outlined {
    font-size: 24px;
    color: #22c55e;
}
.achievement-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}
.achievement-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 2px;
}
.achievement-value #statsStreakNumberGoal {
    font-size: 1.5rem;
    font-weight: 700;
    color: #22c55e;
}
.achievement-unit {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}
.achievement-right svg {
    opacity: 0.5;
}

@media (max-width: 480px) {
    .goal-selector, .goal-dropdown, .goal-save-btn, .achievement-card {
        max-width: 100%;
    }
    .goal-title {
        font-size: 1.1rem;
    }
    .goal-icon-wrapper {
        width: 54px;
        height: 54px;
    }
    .goal-icon-wrapper .material-symbols-outlined {
        font-size: 26px;
    }
} 
/* ============================================
   نبض شارة الإشعارات (خفيف جداً)
   ============================================ */

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.notification-badge:not([style*="display: none"]) {
    animation: badgePulse 2s ease-in-out infinite;
}
/* ============================================
   studySession.css - النسخة النهائية (متكاملة)
   ============================================ */

/* زر العداد */
.study-session-btn {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.study-session-btn:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

/* ====== نافذة الجلسة ====== */
.session-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    z-index: 15000;
    justify-content: center;
    align-items: center;
}

.session-modal.active {
    display: flex;
}

.session-modal-content {
    background: #f8f9fc;
    border-radius: 24px;
    max-width: 480px;
    width: 94%;
    padding: 18px 20px 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    position: relative;
}

/* ===== الصفحات الرئيسية والداخلية ===== */
.stats-main-page {
    display: block;
}

.stats-inner-page {
    display: none;
    flex-direction: column;
    height: 100%;
    min-height: 260px;
}

.stats-inner-page.active {
    display: flex;
}

/* ===== صف الأزرار العلوية ===== */
.stats-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding: 0 2px;
}

.stats-header-spacer {
    flex: 1;
}

.stats-icon-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.stats-icon-btn .material-symbols-outlined {
    font-size: 24px;
}

.stats-icon-btn:hover {
    background: rgba(0,0,0,0.06);
    color: #1e293b;
}

/* ===== صف المنتصف ===== */
.stats-middle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 8px 0;
    gap: 6px;
}

.stats-side-box {
    text-align: center;
    flex: 1;
    padding: 6px 2px;
}

.stats-side-label {
    display: block;
    font-size: 0.6rem;
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.stats-side-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.stats-side-unit {
    display: block;
    font-size: 0.55rem;
    color: #94a3b8;
    font-weight: 400;
}

.stats-yesterday-box .stats-side-value {
    color: #1e293b;
}

.stats-streak-box .stats-side-value {
    color: #38bdf8;
}

/* ===== الدائرة ===== */
.stats-ring-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.stats-progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.stats-ring-bg {
    fill: none;
    stroke: #e9edf4;
    stroke-width: 6;
}

.stats-ring-fg {
    fill: none;
    stroke: #38bdf8;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stats-ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    line-height: 1.2;
}

.stats-ring-goal-label {
    display: block;
    font-size: 0.55rem;
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.stats-ring-goal-text {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.1;
}

.stats-ring-goal-unit {
    display: block;
    font-size: 0.55rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ===== صف Completed ===== */
.stats-completed-row {
    text-align: center;
    padding: 6px 0 10px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 12px;
}

.stats-completed-label {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

.stats-completed-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    margin-left: 4px;
}

/* ===== أزرار المدة ===== */
.session-times-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-bottom: 12px;
}

.time-option {
    background: #ffffff;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    padding: 8px 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: inherit;
}

.time-option:hover {
    background: #f1f4f8;
    border-color: #c8d0d8;
    transform: translateY(-1px);
}

.time-option:active {
    transform: scale(0.97);
}

/* ===== مجموع ساعات الدراسة ===== */
.session-total-hours {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid #e8ecf0;
}

.session-total-hours .label {
    font-size: 0.6rem;
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.session-total-hours .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.session-total-hours .value-unit {
    font-size: 0.65rem;
    font-weight: 400;
    color: #64748b;
    margin-left: 4px;
}

/* ===== الصفحات الداخلية (Edit و History) ===== */
.stats-inner-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 14px;
}

.stats-back-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.stats-back-btn .material-symbols-outlined {
    font-size: 26px;
}

.stats-back-btn:hover {
    color: #1e293b;
}

.stats-inner-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}

.stats-inner-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stats-goal-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #1e293b;
    background: #ffffff;
    font-family: inherit;
}

.stats-goal-select:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56,189,248,0.15);
}

.stats-inner-save {
    background: #2c3e66;
    border: none;
    border-radius: 30px;
    padding: 10px 16px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    width: 100%;
}

.stats-inner-save:hover {
    background: #1a2a4a;
}

/* ===== سجل الأيام ===== */
.stats-history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.stats-history-list::-webkit-scrollbar {
    width: 4px;
}

.stats-history-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.stats-history-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0,0,0,0.02);
    font-size: 0.75rem;
    color: #1e293b;
}

.stats-history-item .date {
    color: #94a3b8;
}

.stats-history-item .time {
    font-weight: 500;
}

.stats-history-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 16px 0;
}

/* ===== Timer Bar مع Pause و Cancel ===== */
.session-timer-bar {
    position: fixed;
    top: 85px;
    right: 20px;
    background: #2d2f36;
    backdrop-filter: blur(4px);
    border-radius: 32px;
    padding: 3px 8px 3px 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 14000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.timer-display {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #f5f7fa;
}

.timer-control-btn {
    background: rgba(255, 255, 255, 0.10);
    border: none;
    border-radius: 30px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    transition: all 0.2s;
    opacity: 0.7;
    padding: 0;
}

.timer-control-btn:hover {
    opacity: 1;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.timer-control-btn.pause-btn {
    font-size: 16px;
}

/* ===== نافذة النهاية ===== */
.session-end-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.session-end-card {
    background: #f8f9fc;
    border-radius: 20px;
    padding: 32px 28px;
    text-align: center;
    max-width: 260px;
    width: 85%;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.session-end-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.session-end-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 16px;
}

.end-overlay-btn {
    background: #2c3e66;
    border: none;
    border-radius: 60px;
    padding: 10px 28px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.end-overlay-btn:hover {
    background: #1a2a4a;
}

/* ===== الوضع الليلي ===== */
body.dark-mode .session-modal-content {
    background: #14141e;
    border-color: rgba(255, 255, 255, 0.04);
}

body.dark-mode .stats-icon-btn {
    color: #64748b;
}

body.dark-mode .stats-icon-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #e8ecf0;
}

body.dark-mode .stats-side-value {
    color: #e8ecf0;
}

body.dark-mode .stats-side-label,
body.dark-mode .stats-side-unit {
    color: #64748b;
}

body.dark-mode .stats-ring-bg {
    stroke: #2a2a3a;
}

body.dark-mode .stats-ring-goal-label {
    color: #64748b;
}

body.dark-mode .stats-ring-goal-text {
    color: #e8ecf0;
}

body.dark-mode .stats-ring-goal-unit {
    color: #64748b;
}

body.dark-mode .stats-completed-row {
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .stats-completed-label {
    color: #64748b;
}

body.dark-mode .stats-completed-value {
    color: #e8ecf0;
}

body.dark-mode .time-option {
    background: #1e1e2e;
    border-color: #2a2a3a;
    color: #c8d0d8;
}

body.dark-mode .time-option:hover {
    background: #2a2a3a;
    border-color: #3a3a4a;
}

body.dark-mode .session-total-hours {
    border-top-color: #2a2a3a;
}

body.dark-mode .session-total-hours .value {
    color: #e8ecf0;
}

body.dark-mode .session-total-hours .value-unit {
    color: #94a3b8;
}

body.dark-mode .stats-inner-header {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .stats-inner-title {
    color: #e8ecf0;
}

body.dark-mode .stats-back-btn {
    color: #64748b;
}

body.dark-mode .stats-back-btn:hover {
    color: #e8ecf0;
}

body.dark-mode .stats-goal-select {
    background: #1e1e2e;
    border-color: #2a2a3a;
    color: #e8ecf0;
}

body.dark-mode .stats-goal-select option {
    background: #1e1e2e;
}

body.dark-mode .stats-history-item {
    background: rgba(255,255,255,0.03);
    color: #e8ecf0;
}

body.dark-mode .stats-history-item .date {
    color: #64748b;
}

body.dark-mode .stats-history-empty {
    color: #64748b;
}

body.dark-mode .session-end-card {
    background: #14141e;
    border-color: rgba(255, 255, 255, 0.04);
}

body.dark-mode .session-end-title {
    color: #e8ecf0;
}

body.dark-mode .session-end-sub {
    color: #94a3b8;
}

body.dark-mode .session-timer-bar {
    background: #1e1e2e;
    border-color: rgba(255, 255, 255, 0.06);
}

/* ===== الهواتف ===== */
@media (max-width: 768px) {
    .study-session-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .session-modal-content {
        padding: 14px 12px 16px;
        border-radius: 20px;
        max-width: 98%;
    }

    .stats-icon-btn {
        width: 30px;
        height: 30px;
        padding: 4px;
    }
    .stats-icon-btn .material-symbols-outlined {
        font-size: 20px;
    }

    .stats-ring-wrapper {
        width: 100px;
        height: 100px;
    }

    .stats-ring-bg,
    .stats-ring-fg {
        stroke-width: 5;
    }

    .stats-ring-goal-label {
        font-size: 0.5rem;
    }
    .stats-ring-goal-text {
        font-size: 1.2rem;
    }
    .stats-ring-goal-unit {
        font-size: 0.5rem;
    }

    .stats-side-value {
        font-size: 1.1rem;
    }
    .stats-side-label {
        font-size: 0.5rem;
    }
    .stats-side-unit {
        font-size: 0.5rem;
    }

    .stats-completed-row {
        padding: 4px 0 8px;
        margin-bottom: 10px;
    }
    .stats-completed-label {
        font-size: 0.6rem;
    }
    .stats-completed-value {
        font-size: 0.7rem;
    }

    .session-times-grid {
        gap: 4px;
        margin-bottom: 10px;
    }
    .time-option {
        padding: 6px 2px;
        font-size: 0.65rem;
        border-radius: 8px;
    }

    .session-total-hours .value {
        font-size: 0.95rem;
    }

    .stats-inner-page {
        min-height: 200px;
    }
    .stats-inner-header {
        padding-bottom: 6px;
        margin-bottom: 10px;
    }
    .stats-inner-title {
        font-size: 0.85rem;
    }
    .stats-back-btn .material-symbols-outlined {
        font-size: 22px;
    }
    .stats-goal-select {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    .stats-inner-save {
        font-size: 0.75rem;
        padding: 8px 12px;
    }

    .stats-history-item {
        font-size: 0.65rem;
        padding: 4px 8px;
    }

    .session-timer-bar {
        top: 60px;
        right: 10px;
        padding: 2px 6px 2px 10px;
    }
    .timer-display {
        font-size: 0.6rem;
    }
    .timer-control-btn {
        width: 18px;
        height: 18px;
        font-size: 12px;
    }
}
