:root {
    --primary-bg: #121212;
    --secondary-bg: #181818;
    --card-bg: #282828;
    --text-primary: #FFFFFF;
    --text-secondary: #b3b3b3;
    --accent-color: #1DB954;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    margin: 0;
    padding-bottom: 100px; /* Space for the fixed player */
}

/* Header, Main, Genre, and Card styles remain the same... */
header, main#channel-container, .genre-section, .channel-grid, .channel-card, .error {
    /* (Existing styles from previous step) */
}
header {
    background-color: var(--secondary-bg);
    padding: 1rem 2rem;
    border-bottom: 1px solid #282828;
}
main#channel-container {
    padding: 1.5rem;
}
.genre-section h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}
.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}
.channel-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.channel-card:hover {
    background-color: #3a3a3a;
}
.channel-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background-color: #3a3a3a;
}
.channel-card p {
    margin: 0.8rem 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}
.error { color: #ff4d4d; }
.img-error {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3b3b3' stroke-width='2'%3e%3cpath d='M9 18V5l12-2v13'/%3e%3ccircle cx='6' cy='18' r='3'/%3e%3ccircle cx='18' cy='16' r='3'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 45%;
}

/* Player Styles */
#player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background-color: var(--secondary-bg);
    border-top: 1px solid #282828;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-sizing: border-box;
}

#player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    /* Prevent info from growing too large */
    min-width: 0;
}

#player-logo {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: contain;
    background-color: #3a3a3a;
    flex-shrink: 0; /* Prevent image from shrinking */
}

/* NEW: Styles for text container */
#player-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

#player-title {
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* NEW: Style for the artist name */
#player-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#channel-title {
    font-size: 0.65rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Player Controls & Audio Styles remain the same... */
#player-controls, #play-pause-btn, #audio-player {
    /* (Existing styles from previous step) */
}
#player-controls {
    display: flex;
    align-items: center;
}
#play-pause-btn {
    background: var(--text-primary);
    color: var(--primary-bg);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}
#play-pause-btn:hover {
    transform: scale(1.1);
}
#play-pause-btn svg {
    width: 24px;
    height: 24px;
}
#audio-player {
    display: none;
}