/* General body and header styling, you might already have this in your main styles.css */
body {
    background-color: #121212; /* Dark background */
    color: #ffffff; /* White text for readability */
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background-color: #1a1a1a;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #333;
}

header h1 {
    margin: 0;
    color: #007bff; /* Highlight color for the title */
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto; /* Center the main content */
}

/* Styles for the channels container (grid layout) */
.channels-container {
    display: grid;
    /* Responsive grid: auto-fill columns, min 200px, max 1 fraction unit */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px; /* Space between grid items */
    padding: 20px;
    justify-content: center; /* Center items horizontally within the grid area */
    max-width: 1200px;
    margin: 20px auto; /* Center the container itself */
}

/* Styles for individual channel cards */
.channel-card {
    background-color: #282828; /* Slightly lighter dark background for cards */
    border-radius: 8px; /* Rounded corners */
    overflow: hidden; /* Ensures image corners are rounded correctly */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    text-align: center; /* Center text and images */
    padding: 15px;
    display: flex; /* Use flexbox for vertical alignment within the card */
    flex-direction: column;
    align-items: center; /* Center items horizontally in flex container */
    justify-content: space-between; /* Pushes content to top/bottom */
    transition: transform 0.2s ease-in-out; /* Smooth hover effect */
}

.channel-card:hover {
    transform: translateY(-5px); /* Lift card slightly on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

.channel-card img {
    width: 100px; /* Fixed width for channel image */
    height: 100px; /* Fixed height for channel image */
    border-radius: 50%; /* Make image circular */
    object-fit: cover; /* Ensures image covers the area without distortion */
    margin-bottom: 10px; /* Space below the image */
    border: 3px solid #007bff; /* Blue border around the image */
}

.channel-card p {
    color: #ddd; /* Light gray for channel name/ID */
    font-size: 1em;
    margin: 5px 0; /* Vertical spacing for paragraph */
}

.channel-card a {
    color: #007bff; /* Blue for the link */
    text-decoration: none; /* No underline by default */
    font-weight: bold;
    margin-top: 10px; /* Space above the link */
    display: block; /* Make the link a block element to take full width */
}

.channel-card a:hover {
    text-decoration: underline; /* Underline on hover for links */
}

/* Style for live channels */
.channel-card.live-channel {
    border: 3px solid red; /* Red border for live channels */
}

/* Loading message style */
#loadingMessage {
    text-align: center;
    color: #ccc;
    font-size: 1.2em;
    padding: 50px;
}