/**
 * Frontend CSS - Professional & Clean Design
 * Modern, attractive, and simple styling for all channel list templates
 */

:root {
    --channel-list-accent-color: #9333ea;
    --channel-list-background-color: #000000;
    --channel-list-text-color: #ffffff;
    --channel-list-panel-background: #1a1a1a;
    --channel-list-border-color: #2a2a2a;
}

/* ========================================
   BASE STYLES - Common for all templates
   ======================================== */
.channel-list-directory-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: var(--channel-list-background-color, #000000);
    color: var(--channel-list-text-color, #ffffff);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Search Input - Professional Design */
.channel-list-search-wrapper {
    padding: 24px;
    background: var(--channel-list-background-color, #000000);
}

.channel-list-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.channel-list-search-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--channel-list-panel-background, #1a1a1a);
    border: 1px solid var(--channel-list-border-color, #2a2a2a);
    border-radius: 12px;
    color: var(--channel-list-text-color, #ffffff);
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
}

.channel-list-search-input::placeholder {
    color: #666666;
    font-weight: 400;
}

.channel-list-search-input:focus {
    outline: none;
    background: #1f1f1f;
    border-color: var(--channel-list-accent-color, #9333ea);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

/* Play Button - Modern Design */
.channel-list-play-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--channel-list-accent-color, #9333ea);
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.channel-list-play-button:hover {
    background: #a855f7;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
}

.channel-list-play-button:active {
    transform: translateY(0) scale(0.98);
}

.channel-list-play-button svg {
    width: 16px;
    height: 16px;
    fill: #ffffff;
}

/* No Results */
.channel-list-no-results {
    text-align: center;
    padding: 80px 20px;
    color: #888888;
    font-size: 16px;
    font-weight: 500;
}

/* Scrollbar - Modern Design */
.channel-list-categories-list::-webkit-scrollbar,
.channel-list-channels-list::-webkit-scrollbar,
.channel-list-accordion-list::-webkit-scrollbar,
.channel-list-grid-container::-webkit-scrollbar,
.channel-list-cards-container::-webkit-scrollbar,
.channel-list-minimal-list::-webkit-scrollbar {
    width: 8px;
}

.channel-list-categories-list::-webkit-scrollbar-track,
.channel-list-channels-list::-webkit-scrollbar-track,
.channel-list-accordion-list::-webkit-scrollbar-track,
.channel-list-grid-container::-webkit-scrollbar-track,
.channel-list-cards-container::-webkit-scrollbar-track,
.channel-list-minimal-list::-webkit-scrollbar-track {
    background: transparent;
}

.channel-list-categories-list::-webkit-scrollbar-thumb,
.channel-list-channels-list::-webkit-scrollbar-thumb,
.channel-list-accordion-list::-webkit-scrollbar-thumb,
.channel-list-grid-container::-webkit-scrollbar-thumb,
.channel-list-cards-container::-webkit-scrollbar-thumb,
.channel-list-minimal-list::-webkit-scrollbar-thumb {
    background: var(--channel-list-border-color, #2a2a2a);
    border-radius: 4px;
}

.channel-list-categories-list::-webkit-scrollbar-thumb:hover,
.channel-list-channels-list::-webkit-scrollbar-thumb:hover,
.channel-list-accordion-list::-webkit-scrollbar-thumb:hover,
.channel-list-grid-container::-webkit-scrollbar-thumb:hover,
.channel-list-cards-container::-webkit-scrollbar-thumb:hover,
.channel-list-minimal-list::-webkit-scrollbar-thumb:hover {
    background: var(--channel-list-accent-color, #9333ea);
}

/* ========================================
   CLASSIC TEMPLATE - Two Panel Design
   ======================================== */
.channel-list-directory-layout {
    display: flex;
    height: 100vh;
    gap: 0;
    position: relative;
}

.channel-list-categories-panel,
.channel-list-channels-panel {
    width: 50%;
    background: var(--channel-list-background-color, #000000);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.channel-list-categories-list,
.channel-list-channels-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 24px 24px;
}

.channel-list-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 10px;
    background: var(--channel-list-panel-background, #1a1a1a);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.channel-list-category-item:hover {
    background: #222222;
    border-color: var(--channel-list-border-color, #2a2a2a);
    transform: translateX(4px);
}

.channel-list-category-item.active {
    background: linear-gradient(135deg, var(--channel-list-accent-color, #9333ea) 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(147, 51, 234, 0.4);
    border-color: transparent;
    transform: translateX(0);
}

.channel-list-category-name {
    color: var(--channel-list-text-color, #ffffff);
    font-size: 15px;
    font-weight: 600;
}

.channel-list-category-count {
    color: #888888;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

.channel-list-category-item.active .channel-list-category-count {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.channel-list-channel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 10px;
    background: var(--channel-list-panel-background, #1a1a1a);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.channel-list-channel-item:hover {
    background: #222222;
    border-color: var(--channel-list-border-color, #2a2a2a);
    transform: translateX(-4px);
}

.channel-list-channel-item.hidden {
    display: none;
}

.channel-list-channel-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.channel-list-channel-name {
    color: var(--channel-list-text-color, #ffffff);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-list-channel-category {
    color: #888888;
    font-size: 13px;
    font-weight: 400;
}

/* ========================================
   ACCORDION TEMPLATE - Expandable Categories
   ======================================== */
.channel-list-style-accordion .channel-list-directory-container {
    min-height: auto;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.channel-list-accordion-wrapper {
    width: 100%;
}

.channel-list-accordion-list {
    margin-top: 24px;
}

.channel-list-accordion-item {
    margin-bottom: 16px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--channel-list-panel-background, #1a1a1a);
    border: 1px solid var(--channel-list-border-color, #2a2a2a);
    transition: all 0.3s ease;
}

.channel-list-accordion-item:hover {
    border-color: var(--channel-list-accent-color, #9333ea);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.channel-list-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--channel-list-panel-background, #1a1a1a);
}

.channel-list-accordion-header:hover {
    background: #222222;
}

.channel-list-accordion-header.active {
    background: linear-gradient(135deg, var(--channel-list-accent-color, #9333ea) 0%, #7c3aed 100%);
    color: #ffffff;
}

.channel-list-accordion-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--channel-list-text-color, #ffffff);
    flex: 1;
}

.channel-list-accordion-header.active .channel-list-accordion-title {
    color: #ffffff;
}

.channel-list-accordion-count {
    font-size: 14px;
    color: #888888;
    margin-right: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
}

.channel-list-accordion-header.active .channel-list-accordion-count {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.2);
}

.channel-list-accordion-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--channel-list-text-color, #ffffff);
    transition: transform 0.3s ease;
}

.channel-list-accordion-header.active .channel-list-accordion-icon {
    transform: rotate(180deg);
    color: #ffffff;
}

.channel-list-accordion-content {
    padding: 0;
    background: var(--channel-list-background-color, #000000);
}

.channel-list-accordion-channels {
    list-style: none;
    margin: 0;
    padding: 16px 24px;
}

.channel-list-accordion-channel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--channel-list-border-color, #2a2a2a);
    transition: all 0.2s ease;
}

.channel-list-accordion-channel-item:last-child {
    border-bottom: none;
}

.channel-list-accordion-channel-item:hover {
    padding-left: 8px;
}

.channel-list-accordion-channel-name {
    color: var(--channel-list-text-color, #ffffff);
    font-size: 15px;
    font-weight: 500;
}

.channel-list-accordion-channel-item .channel-list-play-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
}

/* ========================================
   GRID TEMPLATE - Card Grid Layout
   ======================================== */
.channel-list-style-grid .channel-list-directory-container {
    min-height: auto;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.channel-list-grid-wrapper {
    width: 100%;
}

.channel-list-grid-controls {
    margin-bottom: 32px;
}

.channel-list-grid-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.channel-list-filter-btn {
    padding: 12px 24px;
    background: var(--channel-list-panel-background, #1a1a1a);
    border: 1px solid var(--channel-list-border-color, #2a2a2a);
    border-radius: 24px;
    color: var(--channel-list-text-color, #ffffff);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.channel-list-filter-btn:hover {
    background: #222222;
    border-color: var(--channel-list-accent-color, #9333ea);
    transform: translateY(-2px);
}

.channel-list-filter-btn.active {
    background: linear-gradient(135deg, var(--channel-list-accent-color, #9333ea) 0%, #7c3aed 100%);
    border-color: var(--channel-list-accent-color, #9333ea);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.channel-list-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.channel-list-grid-item {
    transition: transform 0.3s ease;
}

.channel-list-grid-item.hidden {
    display: none;
}

.channel-list-grid-card {
    position: relative;
    background: var(--channel-list-panel-background, #1a1a1a);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--channel-list-border-color, #2a2a2a);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.channel-list-grid-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    border-color: var(--channel-list-accent-color, #9333ea);
    background: #1f1f1f;
}

.channel-list-grid-logo {
    width: 90px;
    height: 90px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.channel-list-grid-card:hover .channel-list-grid-logo {
    background: rgba(147, 51, 234, 0.1);
    transform: scale(1.05);
}

.channel-list-grid-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.channel-list-grid-content {
    flex: 1;
    width: 100%;
}

.channel-list-grid-name {
    color: var(--channel-list-text-color, #ffffff);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.channel-list-grid-category {
    color: #888888;
    font-size: 13px;
    display: block;
    font-weight: 400;
}

.channel-list-grid-play {
    margin-top: 16px;
    width: 44px;
    height: 44px;
    background: var(--channel-list-accent-color, #9333ea);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.channel-list-grid-play:hover {
    background: #a855f7;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
}

.channel-list-grid-play svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   CARDS TEMPLATE - Large Card Layout
   ======================================== */
.channel-list-style-cards .channel-list-directory-container {
    min-height: auto;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.channel-list-cards-wrapper {
    width: 100%;
}

.channel-list-cards-header {
    margin-bottom: 32px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.channel-list-cards-filters {
    flex: 1;
    min-width: 200px;
}

.channel-list-category-select {
    width: 100%;
    padding: 14px 18px;
    background: var(--channel-list-panel-background, #1a1a1a);
    border: 1px solid var(--channel-list-border-color, #2a2a2a);
    border-radius: 12px;
    color: var(--channel-list-text-color, #ffffff);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.channel-list-category-select:focus {
    outline: none;
    border-color: var(--channel-list-accent-color, #9333ea);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.channel-list-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.channel-list-card-item {
    transition: transform 0.3s ease;
}

.channel-list-card-item.hidden {
    display: none;
}

.channel-list-card {
    background: var(--channel-list-panel-background, #1a1a1a);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--channel-list-border-color, #2a2a2a);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.channel-list-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    border-color: var(--channel-list-accent-color, #9333ea);
    background: #1f1f1f;
}

.channel-list-card-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.channel-list-card-logo {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.channel-list-card:hover .channel-list-card-logo {
    background: rgba(147, 51, 234, 0.1);
    transform: scale(1.05);
}

.channel-list-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.channel-list-card-info {
    flex: 1;
}

.channel-list-card-title {
    color: var(--channel-list-text-color, #ffffff);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.channel-list-card-badge {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, var(--channel-list-accent-color, #9333ea) 0%, #7c3aed 100%);
    color: #ffffff;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
}

.channel-list-card-description {
    margin: 18px 0;
    flex: 1;
}

.channel-list-card-description p {
    color: #aaaaaa;
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

.channel-list-card-footer {
    margin-top: auto;
    padding-top: 18px;
}

.channel-list-card-play {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--channel-list-accent-color, #9333ea) 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.channel-list-card-play:hover {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
}

.channel-list-card-play svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   LIST TEMPLATE - Simple Two Column
   ======================================== */
.channel-list-style-list .channel-list-directory-container {
    min-height: auto;
    padding: 24px;
    background: #ffffff;
    color: #000000;
}

.channel-list-simple-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.channel-list-simple-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.channel-list-simple-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.channel-list-simple-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.channel-list-simple-item:hover {
    background: #e9ecef;
    border-color: var(--channel-list-accent-color, #9333ea);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.channel-list-simple-name {
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.channel-list-simple-arrow {
    color: var(--channel-list-accent-color, #9333ea);
    font-size: 18px;
    margin: 0 12px;
    font-weight: 600;
}

.channel-list-simple-item .channel-list-play-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
}

.channel-list-style-list .channel-list-search-input {
    background: #f8f9fa;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
}

.channel-list-style-list .channel-list-search-input:focus {
    background: #ffffff;
    border-color: var(--channel-list-accent-color, #9333ea);
}

/* ========================================
   MINIMAL TEMPLATE - Clean Minimal Design
   ======================================== */
.channel-list-style-minimal .channel-list-directory-container {
    min-height: auto;
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    color: #000000;
}

.channel-list-minimal-wrapper {
    width: 100%;
}

.channel-list-minimal-list {
    margin-top: 24px;
}

.channel-list-minimal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-bottom: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.channel-list-minimal-item:hover {
    background: #fafafa;
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
    border-bottom-color: var(--channel-list-accent-color, #9333ea);
}

.channel-list-minimal-item.hidden {
    display: none;
}

.channel-list-minimal-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.channel-list-minimal-name {
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 500;
}

.channel-list-minimal-category {
    color: #666666;
    font-size: 13px;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 6px;
    font-weight: 400;
}

.channel-list-minimal-play {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: transparent;
    border: 2px solid var(--channel-list-accent-color, #9333ea);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--channel-list-accent-color, #9333ea);
}

.channel-list-minimal-play:hover {
    background: var(--channel-list-accent-color, #9333ea);
    color: #ffffff;
    transform: scale(1.1);
}

.channel-list-minimal-play svg {
    width: 16px;
    height: 16px;
}

.channel-list-style-minimal .channel-list-search-input {
    background: #f8f9fa;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
}

.channel-list-style-minimal .channel-list-search-input:focus {
    background: #ffffff;
    border-color: var(--channel-list-accent-color, #9333ea);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .channel-list-directory-layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    .channel-list-categories-panel,
    .channel-list-channels-panel {
        width: 100%;
        height: 50vh;
    }
    
    .channel-list-simple-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .channel-list-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
    
    .channel-list-cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .channel-list-cards-header {
        flex-direction: column;
    }
    
    .channel-list-search-wrapper {
        padding: 16px;
    }
    
    .channel-list-categories-list,
    .channel-list-channels-list {
        padding: 12px 16px 16px;
    }
}

/* Inherit fonts if option is enabled */
body.channel-list-inherit-fonts .channel-list-directory-container {
    font-family: inherit;
}
