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: #0a0e1a;
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

/* الجهة اليسرى: بروفايل + اشتراك + دخول */
.left-side {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* الجهة اليمنى: إشعارات + شعار */
.right-side {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* الشعار */
.logo-icon {
    width: 45px;
    height: 45px;
    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 {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #38bdf8;
    position: relative;
}

.notification-bell:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: scale(1.05);
    border-color: #38bdf8;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #dc3545;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* القائمة المنسدلة للإشعارات */
.notification-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 340px;
    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);
}

.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: #FFFFFF;
    box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
}

.subscribe-text-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: scale(1.02);
}

.btn-login-top {
    padding: 8px 18px;
    border: 1px solid #6c757d;
    background: rgba(108, 117, 125, 0.1);
    border-radius: 25px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s;
    color: #adb5bd;
}

.btn-login-top:hover {
    background: rgba(108, 117, 125, 0.25);
    color: #f8f9fa;
}

/* ملف التعريف */
.profile-icon {
    width: 40px;
    height: 40px;
    background: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    color: #38bdf8;
    font-size: 20px;
}

.profile-icon:hover {
    background: #334155;
    transform: scale(1.05);
}

/* إخفاء الأزرار في صفحات القائمة والامتحانات */
body:has(#list.active) .btn-login-top,
body:has(#list.active) .subscribe-text-btn,
body:has(#exam.active) .btn-login-top,
body:has(#exam.active) .subscribe-text-btn {
    display: none !important;
}

body:has(#list.active) .profile-icon,
body:has(#exam.active) .profile-icon {
    display: flex !important;
}

/* زر الإعدادات */
.settings-icon-btn {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-size: 18px;
    padding: 6px 12px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.settings-icon-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: scale(1.05);
    border-color: #38bdf8;
}

/* عندما تكون صفحة القائمة أو الامتحانات نشطة */
body:has(#list.active) .top-bar,
body:has(#exam.active) .top-bar {
    background: rgba(45, 58, 82, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.03) inset;
    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 Button
   ======================================== */

.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;
}

/* ========================================
   باقي الأنماط
   ======================================== */

.profile-dropdown {
    position: absolute;
    top: 60px;
    left: 30px;
    background: #0f172a;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    padding: 15px 20px;
    min-width: 250px;
    z-index: 200;
    display: none;
    direction: rtl;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.profile-dropdown.show {
    display: block;
}

.profile-email {
    font-weight: bold;
    color: #38bdf8;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #334155;
}

.profile-expiry {
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 8px;
}

.profile-status {
    font-size: 13px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #334155;
}

.status-premium {
    color: #10b981;
    font-weight: bold;
}

.status-free {
    color: #f59e0b;
}

.profile-logout {
    margin-top: 12px;
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 25px;
    cursor: pointer;
    width: 100%;
    font-size: 13px;
}

.profile-logout:hover {
    background: #dc2626;
}

.login-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.login-popup-content {
    background: #0f172a;
    padding: 35px;
    border-radius: 25px;
    width: 380px;
    text-align: center;
    direction: rtl;
    box-shadow: 0 25px 45px rgba(0,0,0,0.3);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.login-popup-content h3 {
    color: #38bdf8;
    margin-bottom: 10px;
}

.login-popup-content p {
    color: #94a3b8;
}

.login-popup-content input {
    width: 90%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 30px;
    border: 1px solid #334155;
    font-size: 15px;
    background: #1e293b;
    color: white;
}

.btn-popup-login {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0a0e1a;
    border: none;
    padding: 12px;
    border-radius: 30px;
    width: 95%;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

.btn-popup-close {
    background: #334155;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 12px;
}

.teil-item {
    background: rgba(15, 23, 42, 0.75);
    color: #e2e8f0;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    transition: 0.3s;
    min-width: 140px;
    margin-bottom: 0;
    border: 1px solid rgba(56, 189, 248, 0.15);
}

.teil-item:hover {
    background: rgba(30, 41, 59, 0.95);
    color: #38bdf8;
    transform: translateY(-2px);
    border-color: #38bdf8;
}

.teile-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: flex-start;
    direction: ltr;
}

.exam-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.back-home-btn {
    background: #38bdf8;
    color: #0a0e1a;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 30px;
    font-weight: bold;
}

.back-home-btn:hover {
    background: #0ea5e9;
}

.back-list-btn {
    background: #38bdf8;
    color: #0a0e1a;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
}

.back-list-btn:hover {
    background: #0ea5e9;
}

.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: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s ease;
    border: 1px solid #e2e8f0;
}

.item:hover {
    background: #f1f5f9;
    transform: translateX(5px);
    border-color: #2F80ED;
    box-shadow: 0 2px 8px rgba(47, 128, 237, 0.15);
}

/* شارة Premium الجديدة - تصميم أنيق واحترافي */
.premium-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.65);
    color: #f5e6a0;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    margin-right: 5px;
    line-height: 1.2;
    letter-spacing: 0.3px;
    backdrop-filter: blur(2px);
    border: 0.5px solid rgba(245, 230, 160, 0.3);
    transition: all 0.2s ease;
}

/* أيقونة القفل المصغرة (اختيارية، يمكن حذفها) */
.lock-icon-mini {
    font-size: 8px;
    margin-left: 3px;
    opacity: 0.8;
}

/* حاوية الأيقونات على اليسار */
.exam-right-icons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 5px;
}

.item:hover .premium-badge {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.02);
}

/* للشاشات الصغيرة (الهواتف) */
@media (max-width: 768px) {
    .item {
        padding: 10px 12px;
    }
    
    .premium-badge {
        font-size: 7px;
        padding: 1px 5px;
        margin-right: 3px;
    }
    
    .lock-icon-mini {
        font-size: 6px;
    }
    
    .exam-right-icons {
        gap: 3px;
        margin-right: 3px;
    }
    
    .exam-title {
        font-size: 13px;
    }
}

/* للشاشات الكبيرة (الحاسوب) */
@media (min-width: 769px) {
    .premium-badge {
        font-size: 9px;
        padding: 2px 8px;
    }
}

.exam-title {
    flex: 1;
    transition: color 0.2s ease;
    font-weight: 500;
}

.item:hover .exam-title {
    color: #1e293b;
}

/* ========================================
   تنسيق مربع النتيجة الجديد (بطاقة حمراء في وسط الشاشة)
   ======================================== */

.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);
    }
}

/* ========================================
   إصلاح مشكلة الهاتف
   ======================================== */

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    #home {
        overflow-x: hidden;
        padding: 20px 15px 0 15px;
    }
    
    .hero-wrapper {
        overflow-x: hidden;
    }
    
    .hero-container {
        flex-direction: column;
        gap: 30px;
        padding: 0;
    }
    
    .hero-content-side {
        min-width: 100%;
        padding: 0 5px;
        overflow-x: hidden;
    }
    
    .hero-image-side {
        min-width: 100%;
        margin-bottom: 20px;
    }
    
    .certificate-img {
        max-width: 280px;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .hero-desc {
        font-size: 0.95rem;
        text-align: center;
    }
    
    .hero-btn-primary {
        padding: 12px 25px;
        font-size: 1rem;
        margin: 0 auto;
        display: block;
    }
    
    .info-glass-card {
        margin: 20px 0;
        text-align: center;
    }
    
   @media (max-width: 768px) {
    .top-bar {
        padding: 8px 15px;
    }
    
    .left-side {
        gap: 8px;
    }
    
    .right-side {
        gap: 8px;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .notification-bell {
        font-size: 16px;
        padding: 5px 10px;
    }
    
    .subscribe-text-btn, .btn-login-top {
        padding: 5px 12px;
        font-size: 11px;
    }
    
    .profile-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .notification-dropdown {
        width: 300px;
        right: -50px;
    }
    
    .reviews-widget {
        margin-top: 20px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .widget-bubble {
        padding: 6px 12px;
        font-size: 0.75rem;
        margin: 0 auto;
        display: inline-flex;
        max-width: calc(100% - 20px);
    }
    
    .widget-expanded-content {
        padding: 10px 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        max-height: 280px;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .widget-header {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .widget-header-title {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .widget-subtitle {
        font-size: 0.7rem;
        text-align: center;
    }
    
    .widget-slider-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .widget-slider {
        gap: 8px;
        animation: none !important;
        transform: none !important;
    }
    
    .widget-slide {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }
    
    .features-section {
        padding: 40px 5%;
    }
    
    .features-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .features-content {
        min-width: 100%;
        text-align: center;
    }
    
    .features-title {
        font-size: 1.6rem;
        text-align: center;
    }
    
    .features-description {
        font-size: 0.9rem;
        text-align: center;
    }
    
    .features-btn {
        margin: 0 auto;
        display: block;
    }
    
    .features-images {
        min-width: 100%;
    }
    
    .image-stack {
        max-width: 320px;
        min-height: 350px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .widget-expanded-content {
        max-height: 260px;
    }
    
    .widget-slide {
        width: 45px;
        height: 45px;
    }
    
    .widget-header-title {
        font-size: 0.7rem;
    }
    
    .widget-subtitle {
        font-size: 0.65rem;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-desc {
        font-size: 0.85rem;
    }
    
    .certificate-img {
        max-width: 240px;
    }
    
    .result-box {
        bottom: 15px;
        padding: 8px 16px;
        font-size: 13px;
        min-width: 140px;
    }
}

/* ========================================
   ترتيب الأزرار في الجهة اليسرى
   ======================================== */

.left-side {
    display: flex;
    align-items: center;
    gap: 12px;
    direction: ltr;
}

/* ترتيب الأزرار من اليسار إلى اليمين: بروفايل ثم اشتراك ثم دخول ثم إعدادات */
.left-side .profile-icon {
    order: 1;
}

.left-side .subscribe-text-btn {
    order: 2;
}

.left-side .btn-login-top {
    order: 3;
}

.left-side .settings-icon-btn {
    order: 4;
}
/* إخفاء رمز القفل (إذا أردت) */
.lock-icon-mini {
    display: none;
}
/* ========================================
   تصغير حجم عناوين الأجزاء (Teile) في الهواتف
   ======================================== */

@media (max-width: 768px) {
    /* جعل الأزرار في شبكة بعمودين */
    .teile-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 5px;
        margin-bottom: 20px;
    }
    
    /* تصغير حجم الأزرار نفسها */
    .teile-row .teil-item {
        padding: 8px 4px !important;
        font-size: 0.65rem !important;
        min-height: auto;
        text-align: center;
        line-height: 1.3;
        white-space: normal;
        word-break: break-word;
    }
    
    /* تصغير النص داخل الأزرار */
    .teile-row .teil-item,
    .teile-row .item {
        font-size: 0.6rem !important;
        font-weight: 500;
    }
}

/* للهواتف الصغيرة جداً */
@media (max-width: 480px) {
    .teile-row {
        gap: 6px;
    }
    
    .teile-row .teil-item,
    .teile-row .item {
        font-size: 0.55rem !important;
        padding: 6px 3px !important;
    }
}
