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; /* Vertically centers all items in the header */
    justify-content: space-between; /* Spaces items evenly */
    position: sticky;
    top: 0;
    z-index: 99999;
    gap: 20px; /* Adds consistent spacing between header items */
}

/* Logo Styles */
.logo {
    height: 30px; /* Fixed height for the logo container */
    display: flex;
    align-items: center; /* Vertically centers the logo */
    margin-right: 0; /* Remove margin to avoid extra spacing */
    color: #f90;
}

.logo img {
    max-height: 100%; /* Ensure the image does not exceed the container height */
    width: auto; /* Maintain aspect ratio */
    transition: transform 0.3s ease; /* Smooth scaling */
}

.logo img:hover {
    transform: scale(1.1); /* Slightly enlarge on hover */
}
.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; /* Adjust as needed */
    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; /* Hidden by default */
    font-size: 24px;
    cursor: pointer;
    color: #ffffff; /* Ensure the icon is visible */
    margin-right: 0; /* Remove margin to avoid extra spacing */
}

.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: 100%;
    height: 100%;
    object-fit: cover;
}
.popup-overlay.visible {
    visibility: visible;
    opacity: 1;
}

.announcement-leaderboard {
    border: 2px solid #ff9700; /* Yellow border to outline the leaderboard */
    background-color: #1a1002; /* White background */
    padding: 15px 30px;
    text-align: center;
    font-size: 15px;
    font-weight: light;
    color: #ffffff; /* Dark text color */
    position: relative;
    width: 100%;
    box-sizing: border-box;
    border-radius: 1px; /* Slightly rounded corners */
    z-index: 9999;
}

.announcement-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.announcement-text {
    margin-right: 30px;
}

/* Styling for the clickable part of the text */
.announcement-text a {
    color: #ff9700; /* Custom color for the link (yellow) */
    text-decoration: none; /* Remove underline */
    font-weight: bold; /* Make the link bold */
}

.announcement-text a:hover {
    color: #e68900; /* Slightly darker shade on hover */
    text-decoration: underline; /* Add underline on hover */
}

.ad-leaderboard {
    margin: 0.5rem 0;
    text-align: center; /* center inline/inline-block children */
  }
  
  /* Default: hide both ads until media query */
  .iqlan-_desktop,
  .iqlan-_mobile {
    display: none;
    margin: 0 auto; /* center block anchors */
  }
  
  /* Desktop ad (728×90 scaled 10%) */
  .iqlan-_desktop {
    width: 801px;   /* 728px × 1.10 */
  }
  .iqlan-_desktop img {
    display: block;
    width: 100%;
    height: auto;
  }
  
  /* Mobile ad (320×50 scaled 10%) */
  .iqlan-_mobile {
    width: 352px;   /* 320px × 1.10 */
  }
  .iqlan-_mobile img {
    display: block;
    width: 100%;
    height: auto;
  }
  
  /* Show desktop ad on wider screens */
  @media (min-width: 801px) {
    .iqlan-_desktop { display: block; }
  }
  
  /* Show mobile ad on smaller screens */
  @media (max-width: 800px) {
    .iqlan-_mobile { display: block; }
  }
  

.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%; /* Ensures the title takes full width of the container */
}

.video-stats {
    font-size: 13px;
    color: #777; /* Default text color */
    margin-top: 8px; /* Spacing from the channel name */
    width: 100%; /* Ensures stats take full width */
    margin-bottom: 0; /* Removes default margin */
}

.duration {
    font-weight: bold; /* Makes the duration bold */
    color: #ffffff; /* Optional: Change color for better visibility */
    background-color: #555; /* Dark background for the box */
    padding: 4px 8px; /* Padding inside the box */
    border-radius: 6px; /* Rounded corners */
}

.views {
    font-weight: bold;
    color: #fff;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #f90;
    margin-bottom: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #f90;
    padding: 5px;
}

.close-btn:hover {
    color: #ff0000;
}

/* Pagination Styles */
.pagination {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px; /* Spacing between items */
}

.page-item {
    margin: 0;
}

.page-link {
    color: #ffffff; /* White text */
    background-color: #333; /* Dark background */
    border: 1px solid #444; /* Slightly lighter border */
    border-radius: 4px;
    padding: 8px 12px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 14px; /* Smaller font for mobile */
}

.page-link:hover {
    background-color: #555; /* Lighter background on hover */
    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: 40px 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: 15px;
    color: #f90;
}

.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: #f90;
}

.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: #f90;
    border: none;
    border-radius: 5px;
    color: #2c3e50;
    cursor: pointer;
}

.newsletter-form button:hover {
    background-color: #e67e22;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #535353;
    font-size: 14px;
}

@media screen and (max-width: 768px) {
    /* For tablets and smaller screens */
    .announcement-leaderboard {
        padding: 10px 20px; /* Reduce padding on smaller screens */
        font-size: 14px; /* Adjust font size */
    }

    .announcement-text {
        margin-right: 20px; /* Reduce the margin for text */
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px; /* Reduce padding for smaller screens */
        gap: 10px; /* Reduce spacing between items */
    }

    .logo {
        height: 25px; /* Smaller logo for mobile */
    }

    .menu-toggle {
        display: block; /* Show the menu toggle on mobile */
    }

    .nav-buttons {
        display: none; /* Hide nav buttons on mobile */
    }

    .search-bar {
        flex-grow: 1; /* Allow the search bar to take up remaining space */
        margin: 0 10px; /* Adjust margin for smaller screens */
    }
}
