html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    background: linear-gradient(-45deg, #333, #111);
    background-size: 400% 400%;
    animation: gradientAnimation 10s ease infinite;
    font-family: Arial, sans-serif;
    color: white;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.container {
    width: 80%;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
    padding: 20px 0;
}

.title-header {
    text-align: center;
    margin-bottom: 20px;
}

.video-container {
    position: relative;
    margin-bottom: 20px;
}

video {
    width: 100%;
    height: auto;
}

.controls {
    margin-top: 10px;
    margin-bottom: 10px;
}

.controls button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    margin: 0 5px;
    cursor: pointer;
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
    justify-items: center;
}

.channel-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 10px;
}

.channel-logo.selected {
    border: 4px solid transparent;
    animation: rainbow-border 4s infinite;
}

@keyframes rainbow-border {
    0%, 100% {
        border-color: red;
    }
    25% {
        border-color: orange;
    }
    50% {
        border-color: yellow;
    }
    75% {
        border-color: lime;
    }
}

/* Updated CSS for category select dropdown */
.category-select {
    display: flex;
    align-items: center;
    justify-content: center; /* Center horizontally */
    margin-bottom: 30px; /* Optional: Add some space between elements */
    position: relative; /* Position relative for absolute arrow */
}

.category-select select {
    appearance: none; /* Remove default appearance */
    -webkit-appearance: none; /* For older versions of Safari */
    -moz-appearance: none; /* For older versions of Firefox */
    background-color: rgba(0, 0, 0, 0.5); /* Background color */
    color: white; /* Text color */
    padding: 10px; /* Adjust padding */
    border: none; /* Remove border */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor */
    width: auto; /* Let it adjust based on content */
    max-width: 30%; /* Maximum width */
    min-width: 150px; /* Minimum width */
    text-align-last: center; /* Center text inside the select box */
    outline: none; /* Remove focus outline */
    box-shadow: none; /* Remove any box shadow */
}

@media (max-width: 768px) {
    .category-select select {
        padding: 10px 20px 10px 10px; /* Adjust padding for smaller screens */
    }
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 10px;
    font-size: 1.2em;
}

.progress-bar {
    width: 80%;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    overflow: hidden;
    margin: 20px auto;
}

.progress {
    height: 100%;
    background: #4caf50;
    width: 0;
    transition: width 0.3s;
}

/* Footer container */
.footer {
    background: #111;
    padding: 20px 0;
    text-align: center;
    position: relative; /* Position relative for the rainbow line positioning */
}

/* Animated rainbow line */
.footer .rainbow-line {
    height: 4px;
    background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
    background-size: 200% 200%; /* Double the size of the background for smooth animation */
    position: absolute; /* Absolute positioning */
    top: 0; /* Position at the top of the footer */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Center the line */
    width: 100%; /* Adjust width as needed */
    animation: rainbowAnimation 5s linear infinite; /* Add animation */
}

/* Rainbow gradient animation */
@keyframes rainbowAnimation {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

/* Footer text */
.footer p {
    margin: 10px auto 0; /* Margin to position text below the rainbow line */
    width: 80%; /* Align with the rainbow line */
    background: #111; /* Ensure the background color matches the footer */
    padding: 10px; /* Add padding for better appearance */
}
