:root {
    --primary-color: #145AFF;
    --text-light: #f1f5f9;
    --text-dark: #1e293b;
    --bg-main: #050714;
    --bg-secondary: #0d1021;
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Instrument Sans", sans-serif;
    color: var(--text-light);
    background-color: var(--bg-main);
    overflow-x: hidden;
}

.channel-header {
    text-align: center;
    padding: 2rem 5%;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.back-to-home {
    position: absolute;
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.back-to-home:hover {
    color: var(--primary-color);
}

.channel-header h1 {
    font-size: 3rem;
    font-family: 'Koulen', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.search-container input,
input[type='text'] {
    width: 100%;
    max-width: 500px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-light);
}

.main-container {
    display: flex;
    padding: 2rem 5%;
}

.category-sidebar {
    flex: 0 0 250px;
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 15px;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.category-sidebar h2 {
    font-family: 'Koulen', sans-serif;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.categories {
    list-style: none;
    max-height: 70vh;
    overflow-y: auto;
}

.country-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
    background: none;
    border: none;
    color: var(--text-light);
    text-align: left;
    font-size: 1rem;
    font-family: "Instrument Sans", sans-serif;
}

.country-btn:hover,
.country-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.channel-content {
    flex-grow: 1;
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
}

.channel-list h2 {
    font-family: 'Koulen', sans-serif;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.channel-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.channel-item {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: var(--text-light);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.channel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.channel-item strong {
    font-weight: 600;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    color: var(--text-light);
}

.channel-item a {
    display: none; /* Hide the link */
}

.loading-message,
.channel-list p {
    grid-column: 1 / -1;
    text-align: left;
    font-size: 1.2rem;
}

.telegram-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 100;
    transition: transform 0.2s ease;
}

.telegram-fab:hover {
    transform: scale(1.1);
}

.telegram-fab svg {
    width: 32px;
    height: 32px;
    fill: white;
}


@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    .category-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 2rem;
    }
    .channel-content {
        padding-left: 0;
    }
     .channel-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .channel-header {
        padding-top: 5rem;
    }
    
    .back-to-home {
        top: 1.5rem;
        left: 1.5rem;
        width: calc(100% - 3rem);
        text-align: left;
    }

    .telegram-fab {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .telegram-fab svg {
        width: 28px;
        height: 28px;
    }
}