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

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(to bottom, #0f172a, #1e293b);
    color: #e2e8f0;
    min-height: 100vh;
}

.logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 2.5rem 0;
    position: relative;
    z-index: 10;
    min-height: 50px; 
}

.sidebar {
    background-color: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-item {
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    font-size: 0.875rem; 
    color: #cbd5e1;
}

.filter-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #f8fafc;
}

.radio-btn {
    width: 16px;
    height: 16px;
    border: 2px solid #475569;
    border-radius: 50%;
    margin-left: 10px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

[dir="ltr"] .radio-btn {
    margin-left: 0;
    margin-right: 10px;
}

.filter-item.active {
    color: #3b82f6;
    font-weight: 600;
}

.filter-item.active .radio-btn {
    border-color: #3b82f6;
}

.filter-item.active .radio-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.course-card {
    background-color: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}
.course-card:hover {
    transform: translateY(-4px);
    background-color: rgba(30, 41, 59, 0.8);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Reusable Button Style */
.primary-btn {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    color: #3b82f6;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.primary-btn:hover {
    background: #3b82f6;
    color: white;
}

/* Specific positioning for the Language Button */
#lang-toggle {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 50;
}
[dir="ltr"] #lang-toggle {
    left: auto;
    right: 2rem;
}

/* Specific style for Back Button matching Lang Button visuals but different positioning */
.back-btn {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    color: #3b82f6;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.back-btn:hover {
    background: #3b82f6;
    color: white;
}

.instructor-tag {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.golden-description {
    color: #d4af37;
}

/* Detail View Styles */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.episode-item {
    padding: 1rem;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.episode-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}
.episode-item.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    border-right: 4px solid #3b82f6; /* RTL */
}
[dir="ltr"] .episode-item.active {
    border-right: 1px solid #3b82f6;
    border-left: 4px solid #3b82f6;
}