body {
    font-family: Arial, sans-serif;
    background-color: #292929;
    margin: 0;
    padding: 0;
}

.header {
    background-color: #1c1c1c !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 99999;
    gap: 20px;
}

/* Logo Styles */
.logo {
    height: 30px;
    display: flex;
    align-items: center;
    margin-right: 0;
    color: #fd0505;
}

.logo img {
    max-height: 100%;
    width: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.1);
}
.nav-container {
    display: flex;
    gap: 20px;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}
.nav-buttons a {
    text-decoration: none;
    color: #ffffff;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}
.nav-buttons a:hover {
    background-color: #303030;
}
.search-bar {
    display: flex;
    align-items: center;
    max-width: 400px;
    flex-grow: 1;
    margin: 0 20px;
}

.search-bar input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 15px 0 0 15px;
    font-size: 12px;
    outline: none;
}

.search-bar button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 0 15px 15px 0;
    background-color: #f8f8f8;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 12px;
}

.search-bar button:hover {
    background-color: #e0e0e0;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
    margin-right: 0;
}

.sidebar {
    width: 240px;
    background-color: #1c1c1c;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: fixed;
    height: 100vh;
    top: 0;
    left: -240px;
    transition: left 0.3s ease;
    z-index: 1001;
}
.sidebar.active {
    left: 0;
}
.sidebar a {
    display: block;
    text-decoration: none;
    color: #ffffff;
    font-size: 14px;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}
.sidebar a:hover {
    background-color: #797575;
}
.sidebar a i {
    margin-right: 10px;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}
.overlay.active {
    display: block;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s;
    z-index: 99999;
}
.popup {
    width: 240px;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.close-button {
    background: #f83324;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}
.popup img {
    width: 30vw;
    height: 100%;
    object-fit: cover;
}
.popup-overlay.visible {
    visibility: visible;
    opacity: 1;
}

.announcement-leaderboard {
    border: 2px solid #ff9700;
    background-color: #1a1002;
    padding: 15px 30px;
    text-align: center;
    font-size: 15px;
    font-weight: light;
    color: #ffffff;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    border-radius: 1px;
    z-index: 9999;
    overflow: hidden;
}

.announcement-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.announcement-text {
    margin-right: 30px;
    display: inline-block;
    white-space: nowrap;
    animation: marquee 10s linear infinite;
}

.announcement-text a {
    color: #ff9700;
    text-decoration: none;
    font-weight: bold;
}

.announcement-text a:hover {
    color: #e68900;
    text-decoration: underline;
}


.main-content {
    padding: 20px;
}
.video-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.video-link:hover {
    opacity: 0.9;
}
.video-card {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background-color: #1c1c1c;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
}
.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: #000; /* Black background for consistency */
}

.thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Default for horizontal images */
}

.thumbnail img.vertical {
    object-fit: contain; /* Ensures vertical images fit inside the container */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centers the image */
    width: auto;
    height: 100%;
}

.video-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers content vertically */
    align-items: center; /* Centers content horizontally */
    text-align: center; /* Ensures text is centered */
    width: 100%; /* Ensures the container takes full width */
}

.video-title {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 8px;
    color: #ffffff;
    white-space: nowrap; /* Prevents text from wrapping */
    overflow: hidden; /* Hides overflow text */
    text-overflow: ellipsis; /* Adds ellipsis for truncated text */
    width: 100%;
}

.video-stats {
    font-size: 13px;
    color: #777;
    margin-top: 8px;
    width: 100%;
    margin-bottom: 0;
}

.duration {
    font-weight: bold;
    color: #ffffff;
    background-color: #555;
    padding: 4px 8px;
    border-radius: 6px;
}

.views {
    font-weight: bold;
    color: #fff;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px 0px 10px;
    border-bottom: 1px solid #fd0505;
    margin-bottom: 10px;
    margin-top: 40px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #fd0505;
    padding: 5px;
}

.close-btn:hover {
    color: #ff0000;
}

/* Pagination Styles */
.pagination {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-item {
    margin: 0;
    display: flex; 
    align-items: center; 
    gap: 5px;
}

.page-link {
    color: #fd0505 !important;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 8px 12px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 14px;
    cursor: pointer;
}

.page-link:hover {
    background-color: #555;
    color: #ffffff;
    text-decoration: none;
}

.page-item.active .page-link {
    background-color: #007bff; /* Bootstrap primary color */
    border-color: #007bff;
    color: #ffffff;
}

.page-item.disabled .page-link {
    background-color: #444; /* Darker background for disabled items */
    border-color: #444;
    color: #777; /* Gray text for disabled items */
    cursor: not-allowed;
}

/* Footer Styling */
.site-footer {
    background-color: #1c1c1c;
    color: #ecf0f1;
    padding: 30px 0 0 0;
    font-family: 'Arial', sans-serif;
    margin-top: 40px; /* Add spacing on top */

}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section {
    flex: 1 1 200px;
    margin: 10px;
}

.footer-heading {
    font-size: 18px;
    margin-bottom: 20px;
    color: red;
}

.footer-text {
    font-size: 14px;
    line-height: 1.6;
}

.footer-links, .social-links {
    list-style: none;
    padding: 0;
}

.footer-links li, .social-links li {
    margin-bottom: 10px;
}

.footer-links a, .social-links a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover, .social-links a:hover {
    color: #fd0505;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
}

.newsletter-form button {
    padding: 10px 20px;
    background-color: #fd0505;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    cursor: pointer;
}

.newsletter-form button:hover {
    background-color: #e67e22;
}

.footer-bottom {
    text-align: center;
    padding-top: 10px;
    padding-bottom: 5px;
    border-top: 1px solid #535353;
    font-size: 14px;
}

.footer-bottom p{
    padding-bottom: 0px !important;
    margin-bottom: 0px !important;
}

.search-title {
    color: #fd0505;
    margin-bottom: 15px;
    font-weight: bolder;
}

.active>.page-link, .page-link.active {
    color: #ffffff !important;
    background-color: #ff0000 !important;
}

.top-page {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-page img{
    width: 150px;
}

@media screen and (max-width: 768px) {
    .announcement-leaderboard {
        padding: 10px 20px;
        font-size: 14px;
    }

    .announcement-text {
        margin-right: 20px;
    }

    .top-page {
        flex-direction: column;
        align-items: center;
    }

    .top-page img{
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px;
        gap: 10px;
    }

    .logo {
        height: 25px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-buttons {
        display: none;
    }

    .search-bar {
        flex-grow: 1;
        margin: 0 10px;
    }
    
    .popup img {
        width: 92vw;
        height: 100%;
        object-fit: cover;
    }
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}