* {
  box-sizing: border-box;
}

body {
    background-color: rgb(226, 226, 226);
    margin: 0;
    font-family: Arial, sans-serif;
}

#scores {
    width: 100%;
    height: 125px;
    position: inherit;
}

.alert {
  padding: 20px;
  margin: auto;
  width: 50%;
  background-color: #ffbb00;
  color: black;
  border: 2px solid black;
  border-radius: 14px;
}

.closebtn {
  margin-left: 15px;
  color: black;
  font-weight: bold;
  float: right;
  font-size: 32px;
  line-height: auto;
  cursor: pointer;
  transition: 0.3s;
}

.closebtn:hover {
  color: black;
}

/* Locator Bar */
#Locator-bar {
    background-color: rgb(43, 44, 45); 
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 40px;
    width: 100%;
    position: absolute; 
    overflow: visible; /* Ensure the slant is fully visible */
    z-index: 1;
    padding-left: 100px; /* Move the entire content of the Locator bar to the right */
}

/* Logo Container (Holds the "CSN" text and slant) */
.logo-container {
    position: relative;
    z-index: 2;
    margin-left: 0px; /* Space between logo and buttons */
    height: 100%;
    display: flex;
    justify-content: center; /* Centers content horizontally */
    align-items: center; /* Centers content vertically */
}

/* CSN Text */
.logo {
    color: white;
    z-index: 3; 
    position: relative; 
    width: 100px;
    height: 100px;
    left: -58%; /* Push slant to the right with a 75% margin */
}

/* Red slanted background behind "CSN" text but in front of Locator Bar */
.logo-container::before {
    content: '';
    position: absolute;
    top: 0; /* Start the slant at the very top */
    left: -75%; /* Push slant to the right with a 75% margin */
    width: 125%; /* Adjusted width */
    height: 100%; /* Full height */
    background-color: #d00;
    transform: skewX(-28deg); /* Apply slant effect */
    z-index: 0;
    border-left:10px solid #b40000;
    border-right: 10px solid #b40000;
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: -100px;
    z-index: 10; /* Ensure buttons are above background */
}

.nav-btn {
    background-color: transparent;
    color: white; /* Button text color is white */
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: normal;
    border: none; /* Removed border from buttons */
}

.nav-btn:hover {
    background-color: transparent;
    color: red; /* Button text turns red on hover */
    text-decoration: underline;
    font-style: italic;
}

/* Dropdown Menu */
.dropdown {
    position: relative; /* To position the dropdown content */
    z-index: 999; /* Make sure dropdown container stays on top */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: black;
    min-width: 160px;
    z-index: 9999; /* Ensure dropdown content appears on top */
    top: 100%; /* Position dropdown directly below the "INFORMATION" button */
    left: 0;
    margin-top: 0px; /* Add a small margin to prevent it from touching the button */
}

.dropdown:hover .dropdown-content {
    display: block; /* Make the dropdown content visible on hover */
}

.dropdown-btn {
    background-color: transparent;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    font-weight: normal;
    border: none;
}

.dropdown-btn:hover {
    background-color: transparent;
    color: red;
    text-decoration: underline;
    font-style: italic;
}

#body {
    width: 85%;
    background-color: white;
    border-radius: 15px;
    margin: auto;
    padding: 15px;
    text-align: center;
}

/* Hamburger Button */
.hamburger {
    position: fixed;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Hamburger Bars */
.bar {
    width: 30px;
    height: 4px;
    background: white;
    transition: 0.3s;
}

/* Sidebar Menu */
.sidebar {
    position: fixed;
    top: 6%;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 10);
    display: flex;
    align-items: top;
    transition: 0s;
    overflow: scroll;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    text-align: left;
    width: 100%;
}

.sidebar ul li {
    border-bottom: 1px solid gray;
    line-height: 70px;
}

.sidebar ul li a {
    color: black;
    text-decoration: none;
    font-size: 30px;
    transition: 0s;
    padding: 15px;
}

.sidebar ul li a:hover {
    color: red;
    text-decoration: underline;
    font-style: italic;
}

/* Active Sidebar */
.sidebar.active {
    left: 0;
}

/* Transform Hamburger into 'X' */
.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(8px, 7px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

#About-Header {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: #FF3131;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 20px;
    border-bottom: 2px solid #FF3131;
    padding-bottom: 10px;
}

/* Search Bar Styles */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px auto;
    margin-top: -10px;
    max-width: 500px;
    padding: 0 15px;
}

#videoSearch {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s;
}

#videoSearch:focus {
    border-color: #FF3131;
}

#clearSearch {
    background-color: #FF3131;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 35px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
    width: 65px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#clearSearch:hover {
    background-color: #d00;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 18px;
    position: absolute;
    margin-top: 50px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.no-results i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

@media only screen and (max-width: 1085px) {
    body { margin: 0px; }

    .nav-links {
        display: none;
    }

    .logo {
        display: none;
    }

    .logo-container {
        width: 12%;
        content: '';
        position: absolute;
        top: 0; /* Start the slant at the very top */
        left: 5%; /* Push slant to the right with a 5% margin */
    }

    #Locator-bar {
        position: fixed;
        top: 0;
    }

    #scores {
        display: none;
    }

    #body {
        position: relative;
        top: 50px !important;
        left: auto;
        right: auto;
    }

    #body .alert {
        width: 85%;
    }
}

@media only screen and (min-width: 1086px) {
    #menuToggle {
        display: none;
    }
    #body {
        margin-top: 75px !important; /* Adjust for desktop */
    }
}

/* User icon dropdown styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-icon {
    font-size: 28px !important;
    color: #fff;
    cursor: pointer;
    padding: 10px;
}

.user-menu {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    right: 0;
    min-width: 120px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 6px;
    overflow: hidden;
}

.user-menu a {
    color: black;
    padding: 10px 12px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

.user-menu a:hover {
    background-color: #f1f1f1;
}

.user-dropdown:hover .user-menu {
    display: block;
}

/* Position icon to far right */
.nav-user-icon {
    margin-left: auto;
    display: flex;
    align-items: center;
}

/* Navigation */
.navbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e293b;
}

.nav-links {
    display: flex;
    gap: -100px;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: #1e293b;
    background-color: #f1f5f9;
}/* Reset and Base Styles */

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ff0000;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 2rem;
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.channel-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ddd;
    background-size: cover;
    background-position: center;
}

.channel-title {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.channel-stats {
    color: #666;
    font-size: 0.9rem;
}

.back-link {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: #ff0000;
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: 70vh;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ff0000;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.error-message i {
    font-size: 3rem;
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.error-message h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.retry-btn {
    background: #ff0000;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    text-decoration: none;
    transition: background-color 0.3s;
}

.retry-btn:hover {
    background: #cc0000;
}

/* Videos Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(240px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.video-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px black;
}

.video-card:hover .video-title {
    color: red;
    text-decoration: underline;
    font-style: italic;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #ddd;
    background-size: cover;
    background-position: center;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.video-content {
    padding: 1rem;
    text-align: left;
}

.video-title {
    font-size: 15px !important;
    font-weight: 500;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
}

.video-sport-type {
    color: #666;
    font-size: 0.85rem;
    margin: 0.25rem 0 !important;
    padding: 0 !important;
    text-align: left;
}

.video-date {
    color: #666;
    font-size: 0.8rem;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left;
}

.video-meta {
    color: #666;
    font-size: 0.9rem;
}

.video-views {
    margin-right: 1rem;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 2rem 0;
}

.load-more-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}

.load-more-btn:hover {
    background: #0056b3;
}

.load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Watch Page Styles */
.watch-page {
    background: #000;
    color: #fff;
}

.watch-page .header {
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
}

.watch-main {
    padding: 1rem 0;
}

.video-container {
    background: #fff;
    color: #333;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.video-player {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.video-stats {
    display: flex;
    gap: 1rem;
    color: #666;
}

.video-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}

.action-btn:hover {
    background: #e9ecef;
}

.video-description {
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Related Videos */
.related-videos {
    background: #fff;
    color: #333;
    border-radius: 8px;
    padding: 1.5rem;
}

.related-videos h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.related-videos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.related-video-card {
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.related-video-card:hover {
    background: #f8f9fa;
}

.related-video-thumbnail {
    width: 120px;
    height: 68px;
    background: #ddd;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.related-video-info {
    flex: 1;
}

.related-video-title {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-video-meta {
    color: #666;
    font-size: 0.8rem;
}

/* Footer */
.footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 1600px) {
    .videos-grid {
        grid-template-columns: repeat(4, minmax(240px, 1fr));
    }
}

@media (max-width: 1200px) {
    .videos-grid {
        grid-template-columns: repeat(3, minmax(240px, 1fr));
    }
}

@media (max-width: 900px) {
    .videos-grid {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .channel-info {
        justify-content: center;
    }

    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .video-actions {
        flex-wrap: wrap;
    }

    .related-videos-list {
        grid-template-columns: 1fr;
    }

    .related-video-card {
        flex-direction: column;
    }

    .related-video-thumbnail {
        width: 100%;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }

    .videos-grid {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 1.5rem;
    }

    .channel-avatar {
        width: 50px;
        height: 50px;
    }

    .channel-title {
        font-size: 1.1rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mt-1 {
    margin-top: 1rem;
}

@media only screen and (max-width: 1085px) {
    body { margin: 0px; }

    .nav-links {
        display: none;
    }

    .logo {
        display: none;
    }

    .logo-container {
        width: 12%;
        content: '';
        position: absolute;
        top: 0; /* Start the slant at the very top */
        left: 5%; /* Push slant to the right with a 5% margin */
    }

    #Locator-bar {
        position: fixed;
        top: 0;
    }

    #scores {
        display: none;
    }

    #body {
        position: relative;
        top: 50px !important;
        left: auto;
        right: auto;
    }

    #body .alert {
        width: 85%;
    }
}

@media only screen and (min-width: 1086px) {
    #menuToggle {
        display: none;
    }
    #body {
        margin-top: 75px !important; /* Adjust for desktop */
    }
}

#footer {
    background-color: white;
    color: black;
    padding: 15px;
    margin-top: 50px;
}