/* ==========================================================================
   Content Creators — YouTube directory matching the wiki/streams theme
   --------------------------------------------------------------------------
   Clean centered header, stats card, filter bar, featured + video grids, and
   the video/add/playlist modals. Built on --cc-* tokens remapped to the site
   accent (#2bbdf6). Semantic reds (delete) and gold (featured) are preserved.
   ========================================================================== */

    /* Theme tokens (remapped to the site accent) */
    :root {
        --cc-primary: #2bbdf6;
        --cc-primary-dark: #1a9fd4;
        --cc-bg: #0b0f13;
        --cc-card: #141a20;
        --cc-border: rgba(255, 255, 255, 0.06);
        --cc-text: #ffffff;
        --cc-text-muted: #98a2ac;
        --cc-text-light: #7c848d;
        --cc-featured: #ffd700;
    }

    /* Page + header */
    .content-creators-page {
        background: var(--cc-bg);
        padding: 56px 0 0;
        min-height: calc(100vh - 78px);
    }
    .cc-header { text-align: center; max-width: 760px; margin: 0 auto 40px; padding: 0 20px; }
    .cc-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 16px;
        margin-bottom: 20px;
        border: 1px solid rgba(43, 189, 246, 0.4);
        border-radius: 999px;
        background: var(--qr-green-soft);
        color: var(--qr-green-bright);
        font-size: 0.74rem;
        font-weight: 700;
        letter-spacing: 1.4px;
        text-transform: uppercase;
    }
    .cc-title {
        margin: 0 0 16px;
        color: #ffffff;
        font-weight: 800;
        line-height: 1.08;
        letter-spacing: -0.5px;
        font-size: clamp(2.2rem, 5vw, 3.4rem);
    }
    .cc-title span { color: var(--cc-primary); }
    .cc-subtitle { margin: 0 auto; color: rgba(233, 246, 255, 0.55); font-size: 1.08rem; line-height: 1.65; }

    /* Container */
    .content-creators-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 20px 80px;
        position: relative;
        z-index: 10;
    }

    /* Stats Overview Card */
    .stats-overview-card {
        background: linear-gradient(135deg, var(--cc-card) 0%, #0f141a 100%);
        border-radius: 24px;
        padding: 30px;
        margin-bottom: 30px;
        border: 1px solid var(--cc-border);
        position: relative;
        overflow: hidden;
    }

    .stats-overview-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--cc-primary) 0%, #5fd0fb 100%);
    }

    .stats-overview {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
        margin-top: 30px;
    }

    .stat-overview-item {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--cc-border);
        border-radius: 16px;
        padding: 25px;
        text-align: center;
    }

    .stat-overview-value {
        font-size: 2.5rem;
        font-weight: 700;
        color: var(--cc-primary);
        display: block;
        margin-bottom: 8px;
    }

    .stat-overview-label {
        color: var(--cc-text-muted);
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-weight: 600;
    }

    /* Action Bar */
    .action-bar {
        background: var(--cc-card);
        border-radius: 16px;
        padding: 20px 30px;
        margin-bottom: 30px;
        border: 1px solid var(--cc-border);
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    .btn-add-video {
        background: linear-gradient(135deg, #1580b3 0%, #126896 100%);
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .btn-add-video:hover {
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(43, 189, 246, 0.3);
    }

    /* No-media warning box */
    .cc-warning {
        display: flex;
        align-items: center;
        gap: 16px;
        max-width: 720px;
        margin: 10px auto 0;
        padding: 20px 26px;
        border: 1px solid rgba(245, 158, 11, 0.35);
        border-left: 4px solid #f59e0b;
        border-radius: 14px;
        background: rgba(245, 158, 11, 0.08);
        color: #e2cfa6;
        font-size: 1rem;
        line-height: 1.55;
    }
    .cc-warning > i { flex-shrink: 0; color: #f59e0b; font-size: 1.5rem; }

    /* Featured Videos Section */
    .featured-section {
        margin-bottom: 40px;
    }

    .section-title {
        color: var(--cc-text);
        font-size: 1.8rem;
        font-weight: 700;
        margin-bottom: 25px;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .section-title i {
        color: var(--cc-featured);
    }

    /* Videos Grid */
    .videos-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 25px;
        margin-bottom: 40px;
    }

    /* Tabs Navigation */
    .tabs-navigation {
        display: flex;
        gap: 10px;
        margin-bottom: 30px;
        border-bottom: 2px solid var(--cc-border);
        padding-bottom: 0;
    }

    .tab-btn {
        background: transparent;
        color: var(--cc-text-light);
        border: none;
        padding: 12px 24px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        border-bottom: 3px solid transparent;
        display: flex;
        align-items: center;
        gap: 8px;
        position: relative;
        bottom: -2px;
    }

    .tab-btn:hover {
        color: var(--cc-text);
        background: rgba(43, 189, 246, 0.06);
    }

    .tab-btn.active {
        color: var(--cc-primary);
        border-bottom-color: var(--cc-primary);
    }

    .tab-content {
        display: none;
        animation: fadeIn 0.3s ease;
    }

    .tab-content.active {
        display: block;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Playlist Cards */
    .playlist-card {
        background: var(--cc-card);
        border: 1px solid var(--cc-border);
        border-radius: 16px;
        padding: 24px;
        transition: all 0.3s ease;
        cursor: pointer;
        position: relative;
        overflow: hidden;
    }

    .playlist-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
        border-color: var(--cc-primary);
    }

    .playlist-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 16px;
    }

    .playlist-card-title {
        color: var(--cc-text);
        font-weight: 700;
        font-size: 1.25rem;
        margin-bottom: 8px;
    }

    .playlist-card-description {
        color: var(--cc-text-light);
        font-size: 0.9rem;
        margin-bottom: 16px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .playlist-card-meta {
        display: flex;
        gap: 20px;
        color: var(--cc-text-light);
        font-size: 0.875rem;
    }

    .playlist-card-actions {
        display: flex;
        gap: 10px;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--cc-border);
    }

    /* Playlist Video Items */
    .playlist-video-item {
        position: relative;
        transition: transform 0.3s ease;
    }

    .playlist-video-item:hover {
        transform: translateY(-3px);
    }

    .playlist-video-thumbnail {
        position: relative;
        cursor: pointer;
        overflow: hidden;
        border-radius: 8px;
    }

    .playlist-video-thumbnail img {
        transition: transform 0.3s ease;
    }

    .playlist-video-thumbnail:hover img {
        transform: scale(1.05);
    }

    .playlist-video-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .playlist-video-thumbnail:hover .playlist-video-overlay {
        opacity: 1;
    }

    .playlist-video-index {
        position: absolute;
        top: 8px;
        left: 8px;
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
    }

    .video-card {
        background: var(--cc-card);
        border-radius: 20px;
        border: 1px solid var(--cc-border);
        overflow: hidden;
        transition: all 0.3s ease;
        position: relative;
    }

    .video-card.featured {
        border-color: var(--cc-featured);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    }

    .video-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
        border-color: var(--cc-primary);
    }

    .video-thumbnail {
        position: relative;
        width: 100%;
        height: 200px;
        overflow: hidden;
        cursor: pointer;
    }

    .video-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .video-card:hover .video-thumbnail img {
        transform: scale(1.05);
    }

    .featured-badge {
        position: absolute;
        top: 12px;
        left: 12px;
        background: var(--cc-featured);
        color: #000;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .duration-badge {
        position: absolute;
        bottom: 12px;
        right: 12px;
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
    }

    .play-overlay {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(43, 189, 246, 0.92);
        color: white;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .video-card:hover .play-overlay {
        opacity: 1;
    }

    .video-info {
        padding: 20px;
    }

    .video-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
    }

    .creator-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 2px solid var(--cc-primary);
    }

    .creator-name {
        color: var(--cc-text);
        font-weight: 700;
        font-size: 0.9rem;
    }

    .video-title {
        color: var(--cc-text);
        font-weight: 700;
        font-size: 1rem;
        margin-bottom: 10px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .video-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.85rem;
        color: var(--cc-text-light);
        margin-bottom: 15px;
    }

    .video-stats {
        display: flex;
        gap: 15px;
    }

    .video-stat {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .video-actions {
        display: flex;
        gap: 10px;
    }

    .btn-watch {
        flex: 1;
        background: var(--cc-primary);
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 8px;
        font-weight: 600;
        text-decoration: none;
        text-align: center;
        transition: all 0.3s ease;
    }

    .btn-watch:hover {
        background: var(--cc-primary-dark);
        color: white;
        transform: translateY(-2px);
    }

    .btn-featured {
        background: rgba(255, 215, 0, 0.1);
        color: var(--cc-featured);
        border: 1px solid rgba(255, 215, 0, 0.3);
        padding: 10px 15px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .btn-featured:hover {
        background: rgba(255, 215, 0, 0.2);
        transform: scale(1.1);
    }

    .btn-delete {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
        border: 1px solid rgba(239, 68, 68, 0.3);
        padding: 10px 15px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .btn-delete:hover {
        background: rgba(239, 68, 68, 0.2);
    }

    .btn-playlist {
        background: rgba(59, 130, 246, 0.1);
        color: #3b82f6;
        border: 1px solid rgba(59, 130, 246, 0.3);
        padding: 10px 15px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .btn-playlist:hover {
        background: rgba(59, 130, 246, 0.2);
        transform: scale(1.1);
    }

    /* Filter Bar */
    .filter-bar {
        background: linear-gradient(135deg, rgba(43, 189, 246, 0.06) 0%, rgba(0, 0, 0, 0.3) 100%);
        border-radius: 12px;
        padding: 24px;
        margin-bottom: 30px;
        border: 1px solid rgba(43, 189, 246, 0.2);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
    }

    .filter-form {
        display: grid;
        grid-template-columns: 1fr auto auto auto;
        gap: 12px;
        align-items: center;
    }

    .filter-bar .search-box {
        position: relative;
    }

    .filter-bar .search-box i {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--cc-primary);
        font-size: 0.9rem;
        pointer-events: none;
        z-index: 1;
    }

    .filter-bar .search-box input {
        width: 100%;
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(43, 189, 246, 0.3);
        color: var(--cc-text);
        padding: 11px 14px 11px 40px;
        border-radius: 8px;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }

    .filter-bar .search-box input::placeholder {
        color: rgba(255, 255, 255, 0.4);
    }

    .filter-bar .search-box input:focus {
        outline: none;
        border-color: var(--cc-primary);
        background: rgba(0, 0, 0, 0.5);
        box-shadow: 0 0 0 3px rgba(43, 189, 246, 0.1);
    }

    .filter-bar .category-filter select {
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(43, 189, 246, 0.3);
        color: var(--cc-text);
        padding: 11px 32px 11px 14px;
        border-radius: 8px;
        font-size: 0.9rem;
        cursor: pointer;
        transition: all 0.3s ease;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ff4400' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        min-width: 180px;
    }

    .filter-bar .category-filter select:focus {
        outline: none;
        border-color: var(--cc-primary);
        background-color: rgba(0, 0, 0, 0.5);
        box-shadow: 0 0 0 3px rgba(43, 189, 246, 0.1);
    }

    .filter-bar .category-filter select option {
        background: #1a1f2e;
        color: var(--cc-text);
        padding: 10px;
    }

    .filter-bar .btn-filter {
        background: linear-gradient(135deg, #5fd0fb 0%, #1580b3 100%);
        color: white;
        border: none;
        padding: 11px 20px;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(43, 189, 246, 0.3);
        white-space: nowrap;
    }

    .filter-bar .btn-filter:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(43, 189, 246, 0.4);
        background: linear-gradient(135deg, #7ddbfb 0%, #1a9fd4 100%);
    }

    .filter-bar .btn-clear {
        background: rgba(255, 255, 255, 0.1);
        color: var(--cc-text);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 11px 20px;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 500;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s ease;
        text-decoration: none;
        white-space: nowrap;
    }

    .filter-bar .btn-clear:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }

    .filter-results {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid rgba(43, 189, 246, 0.2);
        color: var(--cc-text-light);
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .filter-results i {
        color: var(--cc-primary);
    }

    .filter-results .filter-tag {
        background: rgba(43, 189, 246, 0.2);
        color: var(--cc-primary);
        padding: 4px 12px;
        border-radius: 20px;
        font-weight: 500;
        border: 1px solid rgba(43, 189, 246, 0.3);
    }

    @media (max-width: 992px) {
        .filter-form {
            grid-template-columns: 1fr;
        }

        .filter-bar .category-filter select {
            width: 100%;
        }

        .filter-bar .btn-filter,
        .filter-bar .btn-clear {
            width: 100%;
            justify-content: center;
        }
    }

    /* Empty State */
    .empty-state {
        text-align: center;
        padding: 80px 30px;
        color: var(--cc-text-muted);
    }

    .empty-state-icon {
        font-size: 4rem;
        margin-bottom: 20px;
        color: var(--cc-text-light);
    }

    .empty-state-title {
        color: var(--cc-text);
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 15px;
    }

    /* Modal */
    .video-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        z-index: 9999;
        display: none;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(10px);
    }

    .video-modal.show {
        display: flex;
    }

    .video-modal-content {
        background: var(--cc-card);
        border-radius: 16px;
        width: 95%;
        max-width: 1200px;
        position: relative;
        border: 1px solid var(--cc-border);
        overflow: hidden;
    }

    .video-modal-header {
        padding: 20px 30px;
        border-bottom: 1px solid var(--cc-border);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .video-modal-close {
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: var(--cc-text);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .video-modal-close:hover {
        background: var(--cc-primary);
    }

    .video-embed-container {
        position: relative;
        padding-bottom: 56.25%; /* 16:9 */
        height: 0;
        overflow: hidden;
    }

    .video-embed-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

    /* Add Video Form */
    .add-video-form {
        background: var(--cc-card);
        border: 1px solid var(--cc-border);
        border-radius: 16px;
        padding: 30px;
        max-width: 600px;
        margin: 0 auto;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-label {
        color: var(--cc-text);
        font-weight: 600;
        margin-bottom: 8px;
        display: block;
    }

    .form-control {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--cc-border);
        color: var(--cc-text);
        border-radius: 8px;
        padding: 12px;
        width: 100%;
        font-size: 1rem;
    }

    .form-control:focus {
        outline: none;
        border-color: var(--cc-primary);
        background: rgba(255, 255, 255, 0.08);
    }

    /* ---- Add Video popup — matches the recruitment apply modal style ---- */
    #addVideoModal .video-modal-content {
        background: #10151b;
        border: 1px solid var(--cc-border);
        border-top: 2px solid var(--cc-primary);
        border-radius: 0;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    }
    #addVideoModal .video-modal-header {
        padding: 22px 28px;
        border-bottom: 1px solid var(--cc-border);
    }
    #addVideoModal .video-modal-header h3 {
        text-transform: uppercase;
        letter-spacing: -0.2px;
        font-size: 1.05rem;
        font-weight: 700;
    }
    #addVideoModal .video-modal-close {
        border-radius: 0;
        background: rgba(255, 255, 255, 0.08);
    }
    #addVideoModal .video-modal-close:hover { background: var(--cc-primary); color: #03212e; }

    #addVideoModal .form-label {
        color: #98a2ac;
        font-size: 0.78rem;
        font-weight: 600;
        letter-spacing: 0.4px;
        text-transform: uppercase;
        margin-bottom: 6px;
    }
    #addVideoModal .form-control,
    #addVideoModal select.form-control {
        background: #0b0f14;
        border: 1px solid var(--cc-border);
        color: #eaf1f8;
        border-radius: 0;
        padding: 11px 14px;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }
    #addVideoModal .form-control::placeholder { color: #5f6871; }
    #addVideoModal .form-control:focus,
    #addVideoModal select.form-control:focus {
        background: #0b0f14;
        border-color: var(--cc-primary);
        box-shadow: inset 0 -2px 0 var(--cc-primary);
        color: #ffffff;
    }
    #addVideoModal select.form-control option { background: #12181f; color: #eaf1f8; }

    #addVideoModal .btn-add-video {
        background: var(--cc-primary);
        color: #03212e;
        border-radius: 0;
        padding: 12px 26px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-size: 0.82rem;
        box-shadow: none;
    }
    #addVideoModal .btn-add-video:hover { background: var(--qr-green-bright); color: #03212e; box-shadow: none; }

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

        .stats-overview {
            grid-template-columns: 1fr;
        }

        .video-modal-content {
            width: 98%;
            margin: 10px;
        }
    }
