/* General Body Styling */
body {
    font-family: 'Raleway', sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #fff;
    margin: 0;
    padding: 0;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Header Styling */
header h1 {
    margin: 40px 0;
    font-size: 32px;
    font-weight: 700;
    color: #ffeb3b;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Search Bar Styling */
.search-bar {
    margin-bottom: 30px;
}

.search-bar input {
    padding: 12px;
    border: none;
    border-radius: 30px;
    width: 80%;
    max-width: 400px;
    font-size: 18px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
    outline: none;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    border: 2px solid #ff5722;
}

/* Container Styling */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Adjust grid to show 2 columns when possible */
    gap: 20px;
    padding: 0 20px;
    justify-content: center;
}

/* Channel Box Styling */
.channel {
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.channel:hover {
    transform: scale(1.1);
    box-shadow: 0px 8px 16px rgba(255, 87, 34, 0.4);
    border-color: #ff5722;
}

/* Channel Image Styling */
.channel img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.4);
}

/* Channel Text Styling */
.channel p {
    margin: 0;
    font-size: 18px;
    color: #ffeb3b;
    font-weight: 600;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Ensure two columns on smaller screens */
        gap: 10px; /* Reduce gap to fit better */
    }
}