/* =========================================
   1. DIRECTORY GRID STYLING
   ========================================= */
.ucs-directory-wrapper {
    max-width: 1200px;
    margin: 20px auto;
}

/* Filter Form */
.ucs-filter-form {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 30px;
    align-items: flex-end;
}

.ucs-filter-group {
    display: flex;
    flex-direction: column;
}

.ucs-filter-group label {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 5px;
}

.ucs-filter-group select {
    min-width: 200px;
    padding: 8px;
}

/* The Grid */
.ucs-channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Auto-responsive columns */
    gap: 20px;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Individual Card */
.ucs-channel-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

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

.ucs-channel-item a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: #333;
}

.ucs-channel-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 15px auto;
    display: block;
}

.ucs-logo-placeholder {
    width: 100px;
    height: 100px;
    background: #eee;
    margin: 0 auto 15px auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 10px;
}

.ucs-channel-item span {
    display: block;
    font-weight: bold;
    font-size: 16px;
    line-height: 1.4;
}

/* =========================================
   2. VIDEO PLAYER STYLING
   ========================================= */
.ucs-player-flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.ucs-video-player-area {
    flex: 3;
    min-width: 300px;
    position: relative; /* For Overlay positioning */
    background: #000;
}

.ucs-hls-player {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
}

/* Engagement Sidebar */
.ucs-engagement-sidebar {
    flex: 1;
    min-width: 300px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

/* =========================================
   3. PAYWALL OVERLAY
   ========================================= */
.ucs-paywall-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 50; /* Above video */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.ucs-paywall-overlay h2 {
    color: #e74c3c;
    margin-bottom: 10px;
}

.ucs-purchase-btn, .ucs-login-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: #e74c3c;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}
/* Related Channels Section */
.ucs-related-section {
    margin-top: 40px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
    clear: both;
}

.ucs-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.ucs-related-item {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #333;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
}

.ucs-related-item img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    margin-bottom: 5px;
}
/* --- New Search & Pagination Styling --- */

/* Search Input */
.ucs-search-group {
    flex-grow: 1; /* Takes available space */
}

.ucs-input-text {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Pagination Container */
.ucs-pagination {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.ucs-page-links {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ucs-page-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.ucs-page-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.ucs-page-info {
    font-weight: bold;
    color: #666;
    margin: 0 10px;
}

/* BANNER ADS */
.ucs-banner-ad { text-align: center; margin: 20px 0; }
.ucs-ad-top { border-bottom: 2px solid #eee; padding-bottom: 20px; }
.ucs-ad-bottom { border-top: 2px solid #eee; padding-top: 20px; }

/* CHATROOM */
.ucs-engagement-sidebar { display: flex; flex-direction: column; height: 400px; border: 1px solid #ddd; background: #fff; border-radius: 8px; }
.ucs-engagement-sidebar h3 { padding: 10px; border-bottom: 1px solid #eee; margin: 0; background: #f5f5f5; }
.ucs-chat-window { flex-grow: 1; overflow-y: auto; padding: 10px; font-size: 13px; }
.ucs-chat-msg { margin-bottom: 8px; line-height: 1.4; }
.ucs-chat-input-area { display: flex; border-top: 1px solid #eee; padding: 10px; }
.ucs-chat-input-area input { flex-grow: 1; margin-right: 5px; border: 1px solid #ccc; padding: 5px; border-radius: 4px; }
.ucs-chat-login { padding: 20px; text-align: center; }