body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #333; /* Dark background color */
    color: #fff; /* Light text color */
}

#container {
    display: flex;
    flex-wrap: wrap;
}

#sidebar {
    width: 50px;
    background-color: #222; /* Dark sidebar background color */
    color: #fff;
    padding: 20px;
    position: fixed;
    height: 100%;
    overflow: hidden;
    transition: width 0.3s ease;
}

#sidebar:hover {
    width: 250px;
}

#sidebar a {
    color: #fff;
}

#main-content {
    flex: 1;
    padding: 10px 50px 0 50px; /* Adjusted padding (top: 0, right: 50px, bottom: 50px, left: 0) */
    margin-left: 50px;
    transition: margin-left 0.3s ease;
    display: flex;
    flex-wrap: wrap;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    color: #fff; /* Light text color */
}

/* For Webkit browsers (Chrome, Safari) */
#main-content::-webkit-scrollbar {
    width: 6px;
}

#main-content::-webkit-scrollbar-thumb {
    background-color: transparent;
}

#sidebar:hover + #main-content {
    margin-left: 150px; /* Adjusted margin for larger screens */
}

.video-card {
    border: 1px solid #555; /* Darker border color */
    margin-bottom: 20px;
    background-color: #666; /* Dark video card background color */
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    width: calc(25% - 20px); /* Adjusted width for two columns on smaller screens */
    margin-right: 18px;
    
}

.video-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.video-card h3 {
    margin: 0;
    padding: 10px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.video-card p {
    padding: 5px;
    margin: 0;
    color: #fff;
}

.scholar-card {
    width: 300px;
    height: 200px;
    border: 1px solid #555; /* Darker border color */
    margin-right: 20px;
    margin-bottom: 20px; /* Adjust the margin-bottom to add space between cards */
    background-color: #666; /* Dark scholar card background color */
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center the content vertically */
}

.scholar-card-image {
    width: 80px; /* Adjusted width for the circular image container */
    height: 80px; /* Adjusted height for the circular image container */
    overflow: hidden;
    border-radius: 50%;
    background-color: #777;
}

.scholar-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the image covers the entire container */
    border-radius: 50%; /* Make the image circular within the container */
}

.scholar-card h3 {
    margin: 0;
    padding: 10px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    margin-top: 50px;
}

@media (max-width: 768px) {
    #main-content {
        flex-direction: column;
        align-items: center; /* Optional: Center the content horizontally */
    }

    .video-card {
        width: 100%; /* Full width for one column */
        margin-right: 0;
    }

    .scholar-card {
        margin-top: 20px; /* Adjusted margin-top for better spacing */
        margin-right: 0;
    }
    iframe {
        width: 100%;
        height: 200px; /* Adjust the height as needed for smaller screens */
    }
}

/* Add this CSS for the sidebar button */
#open-sidebar-btn {
    display: none; /* Hide the button by default */
}

@media (max-width: 768px) {
    #sidebar {
        width: 50px; /* Set the initial width of the sidebar */
    }

    #open-sidebar-btn {
        display: block; /* Show the button in mobile view */
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 999; /* Ensure the button is on top of other elements */
        background-color: #333;
        color: #fff;
        padding: 10px;
        border: none;
        cursor: pointer;
    }
}

#preloader-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#preloader {
    border: 16px solid #f3f3f3;
    border-top: 16px solid #3498db;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
