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

body {
    font-family: 'Inter', sans-serif;
    background: 
        radial-gradient(circle at 15% 50%, rgba(79,70,229,0.12), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(124,58,237,0.15), transparent 40%),
        linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #e0f2fe 100%);
    min-height: 100vh;
    color: #0f172a;
}

#particles-js {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
}

.dashboard {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 280px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-right: 1px solid rgba(255,255,255,0.5);
    padding: 28px 16px;
    position: fixed;
    left: 0;
    right: auto;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 5px 0 25px rgba(0,0,0,0.08);
}

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

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding: 0 8px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 8px 18px rgba(79,70,229,0.25);
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #1e1b4b, #4f46e5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sidebar-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #94a3b8;
    margin: 28px 0 14px 12px;
    font-weight: 600;
}

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

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 16px;
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    transition: 0.2s;
    margin-bottom: 6px;
}

.sidebar-menu-link:hover, .sidebar-menu-link.active {
    background: rgba(79,70,229,0.12);
    color: #4f46e5;
}

.sidebar-menu-link i {
    width: 20px;
    font-size: 16px;
}

.sidebar-user {
    margin-top: 40px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(145deg, #4f46e5, #a855f7);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: 0;
    margin-right: 0;
    padding: 20px 18px 40px;
    width: 100%;
    transition: margin 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ========== TOP NAVBAR ========== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    margin-bottom: 28px;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(20px);
    border-radius: 60px;
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    z-index: 100;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
}

.page-title i {
    color: #4f46e5;
    font-size: 20px;
}

.mobile-menu-inline {
    display: none;
    width: 42px;
    height: 42px;
    background: rgba(79,70,229,0.1);
    border-radius: 30px;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(79,70,229,0.2);
}

.mobile-menu-inline:hover {
    background: #4f46e5;
    color: white;
}

.nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    font-size: 14px;
    transition: 0.2s;
    padding: 6px 12px;
    border-radius: 40px;
}

.nav-links a:hover {
    background: rgba(79,70,229,0.1);
    color: #4f46e5;
}

.join-btn {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 40px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79,70,229,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79,70,229,0.4);
}

/* ========== SLIDESHOW ========== */
.live-showcase {
    margin-bottom: 40px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.2);
    animation: fadeInUp 0.6s ease-out;
}

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

.slideshow-container {
    position: relative;
    width: 100%;
}

.slide-card {
    display: flex;
    flex-direction: column;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 32px;
    padding: 32px 28px;
    min-height: 320px;
    position: relative;
}

.slide-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.3) 100%);
    border-radius: 32px;
    z-index: 1;
}

.slide-card > * {
    position: relative;
    z-index: 2;
}

.live-badge-slide {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(220,38,38,0.95);
    color: white;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 700;
    width: fit-content;
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
    animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}

.live-badge-slide i {
    font-size: 10px;
    animation: beat 1.2s infinite;
}

@keyframes beat {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.slide-title {
    font-size: 28px;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    margin-bottom: 12px;
}

.slide-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.92);
    margin-bottom: 20px;
    max-width: 80%;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.slide-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.audience-count {
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
    padding: 7px 16px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
    color: white;
    display: flex;
    gap: 8px;
}

.btn-watch {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    padding: 9px 24px;
    border-radius: 40px;
    font-weight: 600;
    color: white;
    display: flex;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-watch:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(79,70,229,0.5);
}

.carousel-controls {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
}

.carousel-btn {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    color: #4f46e5;
    font-weight: bold;
}

.carousel-btn:hover {
    background: #4f46e5;
    color: white;
    transform: scale(1.05);
}

.slide-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 14px 0 18px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: 32px;
    background: linear-gradient(90deg, #4f46e5, #8b5cf6);
    box-shadow: 0 0 6px rgba(79,70,229,0.6);
}

/* ========== CARDS GRID ========== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.service-card {
    background: rgba(255,255,255,0.78);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 28px;
    padding: 22px 20px;
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.03);
    animation: cardReveal 0.5s ease-out backwards;
    animation-delay: calc(var(--order, 0) * 0.05s);
}

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

.service-card:hover {
    transform: translateY(-6px) scale(1.01);
    background: rgba(255,255,255,0.95);
    border-color: rgba(79,70,229,0.4);
    box-shadow: 0 20px 35px -12px rgba(79,70,229,0.2);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
    display: block;
}

.service-card:hover .card-icon {
    transform: scale(1.08);
}

.card-icon i {
    background: linear-gradient(135deg, #4f46e5, #a855f7, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 48px;
    display: inline-block;
}

@supports not (background-clip: text) {
    .card-icon i {
        background: none;
        color: #4f46e5;
    }
}

.service-card h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #0f172a;
}

.service-card p {
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
    margin-bottom: 18px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.trend-badge {
    background: rgba(79,70,229,0.12);
    padding: 5px 12px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 600;
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.trend-badge i {
    font-size: 10px;
}

.explore-link {
    font-size: 12px;
    font-weight: 600;
    color: #4f46e5;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.service-card:hover .explore-link {
    transform: translateX(4px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 20px 0 20px;
    flex-wrap: wrap;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: #4f46e5;
    font-size: 26px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #a855f7);
    border-radius: 3px;
}

footer {
    text-align: center;
    padding: 25px 0 20px;
    font-size: 12px;
    color: #5b6e8c;
    border-top: 1px solid rgba(203,213,225,0.3);
}

/* ========== DESKTOP LAYOUT (LTR) ========== */
@media (min-width: 1024px) {
    .mobile-menu-inline {
        display: none !important;
    }
    
    .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 280px;
        margin-right: 0;
        padding: 32px 40px;
    }
}

/* ========== RTL LAYOUT FIX - Complete sidebar and margin flip ========== */
body[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
    transform: translateX(100%);
    border-right: none;
    border-left: 1px solid rgba(255,255,255,0.5);
    box-shadow: -5px 0 25px rgba(0,0,0,0.08);
}

body[dir="rtl"] .sidebar.active {
    transform: translateX(0);
}

body[dir="rtl"] .sidebar-logo {
    direction: rtl;
    justify-content: flex-end;
}

body[dir="rtl"] .logo-icon {
    margin-left: 12px;
    margin-right: 0;
}

body[dir="rtl"] .sidebar-section-title {
    text-align: right;
    margin: 28px 12px 14px 0;
}

body[dir="rtl"] .sidebar-menu-link {
    direction: rtl;
    justify-content: flex-end;
}

body[dir="rtl"] .sidebar-menu-link i {
    margin-left: 14px;
    margin-right: 0;
    order: 2;
}

body[dir="rtl"] .sidebar-menu-link span {
    order: 1;
}

body[dir="rtl"] .sidebar-user {
    direction: rtl;
}

body[dir="rtl"] .user-avatar {
    margin-left: 12px;
    margin-right: 0;
}

body[dir="rtl"] .user-info {
    text-align: right;
}

/* CRITICAL: Desktop RTL Layout - This is what you're missing */
@media (min-width: 1024px) {
    /* LTR Desktop */
    .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 280px;
        margin-right: 0;
        padding: 32px 40px;
    }
    
    /* RTL Desktop - Sidebar on RIGHT side */
    body[dir="rtl"] .sidebar {
        left: auto;
        right: 0;
        transform: translateX(0) !important;
    }
    
    body[dir="rtl"] .main-content {
        margin-left: 0;
        margin-right: 280px;
        padding: 32px 40px;
    }
}


/* Stats Dashboard */
.stats-dashboard {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 24px;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,0.4);
}

.stat-card-mini {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.stat-card-mini:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.8);
}

.stat-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

@media (max-width: 640px) {
    .stats-dashboard {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-card-mini {
        width: 100%;
    }
}

/* RTL Text and Content Adjustments */
body[dir="rtl"] {
    /* font-family: 'Cairo', 'Inter', sans-serif; */
}

body[dir="rtl"] .top-bar {
    direction: rtl;
}

body[dir="rtl"] .page-title {
    direction: rtl;
}

body[dir="rtl"] .page-title i {
    margin-left: 8px;
    margin-right: 0;
}

body[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

body[dir="rtl"] .join-btn i {
    margin-left: 6px;
    margin-right: 0;
}

body[dir="rtl"] .cards-grid {
    direction: rtl;
}

body[dir="rtl"] .service-card {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .card-footer {
    flex-direction: row-reverse;
}

body[dir="rtl"] .explore-link i {
    transform: rotate(180deg);
    display: inline-block;
}

body[dir="rtl"] .service-card:hover .explore-link {
    transform: translateX(-4px);
}

body[dir="rtl"] .trend-badge i {
    margin-left: 4px;
    margin-right: 0;
}

body[dir="rtl"] .section-header h2 {
    direction: rtl;
}

body[dir="rtl"] .section-header h2 i {
    margin-left: 8px;
    margin-right: 0;
}

body[dir="rtl"] .section-header h2::after {
    left: auto;
    right: 0;
}

body[dir="rtl"] footer {
    direction: rtl;
}

/* Slideshow stays LTR for English content */
.slide-card, .live-badge-slide, .slide-title, .slide-desc, .slide-meta {
    direction: ltr !important;
    text-align: left !important;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 1023px) {
    .mobile-menu-inline {
        display: flex !important;
    }
    .nav-links {
        display: none !important;
    }
    .top-bar {
        justify-content: space-between;
    }
    
    /* Mobile sidebar - LTR */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Mobile sidebar - RTL */
    body[dir="rtl"] .sidebar {
        transform: translateX(100%);
    }
    
    body[dir="rtl"] .sidebar.active {
        transform: translateX(0);
    }
}
@media (max-width: 640px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .slide-title {
        font-size: 22px;
    }
    .slide-desc {
        max-width: 100%;
        font-size: 13px;
    }
    .top-bar {
        padding: 8px 16px;
        border-radius: 50px;
    }
    .slide-card {
        padding: 24px 20px;
        min-height: 280px;
    }
    .card-icon {
        font-size: 40px;
    }
    .card-icon i {
        font-size: 40px;
    }
    .service-card h3 {
        font-size: 18px;
    }
    .section-header h2 {
        font-size: 22px;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


