:root {
    --primary: #9d4edd;
    --secondary: #ff5efc;
    --accent: #ff7eee;
    --background: #0f0819;
    --card-bg: #15102a; /* Used for channel items */
    --text: #f1f1f1;
    --gray-text: #aaaaaa;
    --header-height: 70px;
    --input-bg: rgba(21, 16, 42, 0.9);
    --input-border: rgba(157, 78, 221, 0.5);

    /* New glow colors from commands.css */
    --glow-color: #F8F8FF; /* White with slight purple tint */
    --glow-shadow: rgba(248, 248, 255, 0.8); /* Almost white with transparency */
    --glow-shadow-light: rgba(248, 248, 255, 0.4); /* Lighter almost white */
}

/* Globaler Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

/* Body and HTML for full height and background */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    display: flex; /* For footer positioning */
    flex-direction: column; /* For footer positioning */
}

.container {
    width: 100%;
    max-width: 1000px; /* Max width for the list */
    margin: 0 auto;
    padding: 0 20px;
    padding-top: calc(var(--header-height) + 20px);
    flex: 1; /* Allows main content to grow */
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(15, 8, 25, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    box-shadow: 0 5px 20px rgba(157, 78, 221, 0.15);
    animation: slideInFromLeft 0.5s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: text-shadow 0.3s ease;
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 24px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px rgba(157, 78, 221, 0.5);
}

.logo-commands {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--text);
    font-size: 18px;
}

.home-link {
    color: var(--gray-text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.home-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Category Section */
.category-section {
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease forwards;
}

.category-header {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(255, 94, 252, 0.5);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.category-header::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

/* Channel List Specific Styles */
.channel-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Spacing between channel items */
}

.channel-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px 20px;
    color: var(--text);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(157, 78, 221, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease forwards;
}

.channel-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(157, 78, 221, 0.3);
    border-color: rgba(157, 78, 221, 0.5);
}

.channel-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(157, 78, 221, 0.1);
    padding-bottom: 10px;
}

.channel-logo-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    box-shadow: 0 0 8px rgba(157, 78, 221, 0.4);
}

.channel-name-link {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    flex-grow: 1; /* Allows name to take available space */
}

.channel-name-link:hover {
    color: var(--secondary);
    text-shadow: 0 0 5px rgba(255, 94, 252, 0.5);
}

.channel-status {
    font-size: 16px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
}

.status-online {
    background-color: rgba(76, 175, 80, 0.2); /* Greenish */
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.status-offline {
    background-color: rgba(244, 67, 54, 0.2); /* Reddish */
    color: #F44336;
    border: 1px solid #F44336;
}

.channel-details p {
    font-size: 15px;
    margin-bottom: 5px;
    color: var(--gray-text);
}

.channel-details strong {
    color: var(--text);
    font-weight: 600;
}

.channel-item-error {
    border-color: rgba(244, 67, 54, 0.5);
    background-color: rgba(244, 67, 54, 0.05);
}

.channel-item-error .error-message {
    color: #F44336;
    font-weight: 600;
}

.channel-item-error .twitch-link {
    color: var(--accent);
    text-decoration: underline;
    margin-top: 5px;
    display: inline-block;
}


/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.no-results {
    text-align: center;
    padding: 50px 0;
    color: var(--gray-text);
    font-size: 18px;
    animation: fadeIn 0.5s ease forwards;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px; /* Standard width */
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background); /* Background matches main body */
}

::-webkit-scrollbar-thumb {
    background: var(--primary); /* Primary accent color */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary); /* Secondary accent color on hover */
}

/* Custom scrollbar styles from commands.css (overriding general for more specific look) */
::-webkit-scrollbar {
    width: 22px; /* Wider scrollbar */
}

::-webkit-scrollbar-track {
    background: #888888; /* Grey track */
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.2); /* Light black shadow */
}

::-webkit-scrollbar-thumb {
    background-color: #282828; /* Dark thumb */
    border-radius: 20px; /* Roundness */
    border: 3px solid #ffffff; /* White border/padding */
}

::-webkit-scrollbar-thumb:hover {
    background: #333333; /* Slightly lighter dark thumb on hover */
}

/* For Firefox */
* {
    scrollbar-width: thick;
    scrollbar-color: #000000 #181818;
}

/* Responsive */
@media (max-width: 768px) {
    .channel-list {
        grid-template-columns: 1fr;
    }

    .category-header {
        font-size: 22px;
    }

    header {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    .container {
        padding-top: 130px;
    }

    .channel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .channel-name-link {
        font-size: 20px;
    }

    .channel-logo-small {
        margin-right: auto; /* Push status to right */
    }
}