
#video-circuit-container {
    display: flex;
    gap: 20px;
    max-width: 100%;
}

#video-sidebar {
    width: 300px;
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
    /* max-height: 800px; */
    overflow-y: auto;
}

#video-main-area {
    flex: 1;
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.video-js {
    width: 100% !important;
    height: 400px !important;
}

#player-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    background: #fff;
    padding: 15px 0 10px 0;
}

#player-controls button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: #007cba;
    color: white;
    cursor: pointer;
    font-size: 16px;
}


#player-controls button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* #video-info {
    text-align: center;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 4px;
    margin: 10px 0;
} */

/* #video-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
} */

#video-duration-display {
    font-size: 14px;
    color: #666;
    background: #fff;
    text-align: center;
}

/* #player-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-top: 10px;
} */

#music-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

#toggle-music {
    padding: 5px 10px;
    font-size: 12px;
}

#timeline-container {
    margin-top: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

#timeline-track {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 80px;
    border-radius: 4px;
}

.timeline-section {
    display: flex;
    align-items: center;
}

.timeline-slot {
    width: 70px;
    height: 60px;
    border: 2px dashed #ccc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* margin: 0 5px; */
    position: relative;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.timeline-slot.drag-over {
    border-color: #007cba;
    background: #e7f3ff;
}

.timeline-slot.filled {
    border: 2px solid #007cba;
    background: white;
}

.timeline-video {
    width: 100%;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff4444;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-card {
    font-size: 14px;
    color: #999;
    font-weight: bold;
    text-align: center;
}

/* .video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px; */
/* } */

.video-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px;
    cursor: grab;
    transition: transform 0.2s ease;
    text-align: center;
}

.video-item:hover {
    /* transform: translateY(-2px); */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.video-item.selected {
    border-color: #007cba;
    background: #e7f3ff;
}

.video-item.dragging {
    opacity: 0.7;
    transform: rotate(5deg);
}

.video-item .video-thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

/* .video-item .video-title {
    font-size: 12px;
    margin-top: 5px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
} */

.category-dropdown {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

.videos-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

@media (max-width: 768px) {
    #video-circuit-container {
        flex-direction: column;
    }
    
    
    #timeline-track {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}
header.circuit-Creator-hdr {
    background: #7ad5f9;
}
.header_inner {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    align-items: center;
}

.hdr-rhs {
    width: 100%;
    max-width: 50%;
}

.hdr-rhs .account {
    width: 100%;
    display: flex;
    gap: 25px;
    align-items: center;
    justify-content: flex-end;
}
.header_tittle {
    font-size: 35px;
    color: #000;
    margin-bottom: 0;
}
.logout-link {
    color: #000;
    font-weight: 500;
}
.logout-link:hover{
    color: #D65D74;
    font-weight: 500;
}
#video-circuit-container {
    display: flex;
    gap: 20px;
    min-height: 600px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 100%;
}

#video-sidebar {
    width: 320px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.5s linear;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 26px 20px;
    background: #000000;
    border-bottom: 1px solid rgb(255 255 255 / 12%);
}
.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

#sidebar-content {
    /* padding: 30px 20px; */
    transition: all 0.3s ease;
}

#category-filter {
    margin-bottom: 24px;
}

#category-filter h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.category-dropdown {
    position: relative;
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-item.selected {
    background: #eff6ff;
    color: #1d4ed8;
}

.category-section {
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
}

.category-header:hover {
    background: #f1f5f9;
}

.category-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.category-toggle {
    font-size: 12px;
    color: #6b7280;
    transition: transform 0.2s;
}

.category-section.expanded .category-toggle {
    transform: rotate(180deg);
}

.category-videos {
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.videos-loading {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
}

.video-item {
    display: flex;
    align-items: center;
    padding:8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: move;
    transition: all 0.2s;
}

.video-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.video-item.selected {
    border-color: #7ad5f9;
    background: #eff6ff;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.video-info {
    min-width: 0;
    width: calc(100% - 50px);
}
.video-info h4 {
    margin: 0 0 0px 0;
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    display: inline-block;
    width: 50px;
    white-space: nowrap;
    overflow: hidden !important;
    text-overflow: ellipsis;
}

.video-info p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}
video#main-video,
iframe#cloudflare-player {
    width: 100%;
    aspect-ratio: 8/3.6;
    display: block;
    height: 100%;
    padding: 25px;
}
#video-main-area {
    flex: 1;
    background: #ffffff;
    border-radius: 12px;
    /* border: 1px solid #e5e7eb; */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 20px 20px 40px 0;
}

.main-header {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.05);
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.category-group {
    margin-bottom: 5px;
}
.main-header h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.9);
}
.timeline-info {
    font-size: 14px;
    color: #000000;
    text-align: left;
}
/* 
#video-player-container {
    padding: 20px; 
    border-bottom: 1px solid #e5e7eb;
} */
.hdr-rhs .account a.primary-button {
    padding: 10px 20px;
}
#video-player {
    background: #000000;
    /* border-radius: 8px; */
    overflow: hidden;
}

#player-controls {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 12px;

}

#player-controls button {
    cursor: pointer;
    color: #fff;
    background-image: linear-gradient(90deg, #EACC61 0%, #D65D74 50%, #D65D74 51%, #EACC61 100%);
    background-size: 200%;
    background-position: 0 center;
    font-family: var(--secondaryFont);
    font-weight: 700;
    font-size: 17px;
    border-radius: 8px;
    padding: 15px 25px;
    transition: var(--transition);
    border: 0;
}
div#player-controls button img {
    filter: brightness(0) invert(1);
}
#player-controls button:hover:not(:disabled) {
    background-position: 100% center;
    color: #fff;
    opacity: 1;
}

#player-controls button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.nav-btn {
    padding: 8px 12px;
    font-size: 16px;
}

#player-options {
    text-align: center;
    background: #fff;
    padding-top: 5px;
}
#player-options label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

#progress-bar {
    flex: 1;
    height: 6px;
    background: #374151;
    border-radius: 3px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: #7ad5f9;
    width: 0%;
    transition: width 0.1s;
}

#timeline-container {
    padding: 20px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.timeline-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}
.video-player {
    background: #cee9f9 !important;
    padding: 0 !important;
}
#timeline-duration {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}
button#play-full-circuit img {
    max-width: 15px;
}
.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,
.video-js .vjs-fullscreen-control .vjs-icon-placeholder,
.video-js .vjs-mute-control .vjs-icon-placeholder,
.video-js .vjs-play-control .vjs-icon-placeholder
{
    font-size: 18px;
}
#timeline-track {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    min-height: auto;
    padding-bottom: 8px;
}
#timeline-track::-webkit-scrollbar {
    height: 4px;
    color:#000;
    padding-top:5px;
    border-radius:5px;
}

#timeline-track::-webkit-scrollbar-track {
    background:#d97071;
    border-radius:5px;
    border-radius: 10px;
}
#timeline-track::-webkit-scrollbar-thumb {
background-image: linear-gradient(90deg, #EACC61 0%, #D65D74 50%, #D65D74 51%, #EACC61 100%);
    border-radius: 10px;
}
  
  
.upload-card span {
    font-size: 12px;
    text-align: center;
    line-height: 140%;
}
.timeline-section {
    /* min-width: 150px; */
    display: flex;
    flex-direction: row;
    align-items: center;
}

.section-header {
    background: #f3f4f6;
    color: #374151;
    padding: 8px 12px;
    text-align: center;
    border-radius: 6px 6px 0 0;
    font-weight: 500;
    font-size: 14px;
}
.intro-wpr,
.outro-wpr {
    flex: 0 0 auto;
}
.addition-timeline {
    /* flex: 1 1 auto; */
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    /* overflow-x: auto; */
}
.addition-timeline #main-videos-section {
    display: flex;
    flex-direction: row;
    gap: 8px;
}
.timeline-slot {
    flex: 0 0 auto;
    border: 2px dashed #d1d5db;
    border-radius: 0 0 6px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    position: relative;
    min-height: 100px;
    transition: all 0.3s;
    max-width: 160px;
    min-width: 160px;
}
.timeline-slot.drag-over {
    border-color: #7ad5f9;
    background: #eff6ff;
}

.timeline-slot.filled {
    border-color: #10b981;
    background: #ecfdf5;
}

.upload-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #9ca3af;
    font-weight: 500;
    font-size: 24px;
    z-index: 1;
}

.timeline-video {
    position: relative;
    padding: 5px;
    background: #7ad5f9;
    color: white;
    border-radius: 6px;
    margin: 0 4px;
    display: flex;
    align-items: center;
    width: 100%;
}

.timeline-video .video-thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    margin-right: 0;
    border-radius: 3px;
}
.cat_tabs .categoery-link .tabs-cat p {
    color: #fff;
}
.timeline-video .video-title {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    max-width: 50px;
    text-overflow: ellipsis;
}
#main-videos-section {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
}
.timeline-video .video-duration {
    font-size: 11px;
    opacity: 0.8;
    margin-left: 8px;
}

.timeline-video .remove-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background Music Controls */
#background-music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#background-music-control button {
    padding: 8px 12px;
    background: #7ad5f9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#background-music-control button:hover {
    background: #2563eb;
}

#music-volume {
    width: 100%;
}
.play-pause-btn {
    padding: 8px 16px;
    background: #7ad5f9;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.play-pause-btn:hover:not(:disabled) {
    background: #2563eb;
}

.play-pause-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}
.category-dropdown {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background-color: white;
    font-size: 14px;
    color: #374151;
    margin-bottom: 20px;
}

.category-dropdown:focus {
    outline: none;
    border-color: #7ad5f9;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

#video-categories {
    height: calc(100vh - 210px);
    overflow-y: scroll;
    padding-bottom: 30px;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.mb-viewer{
    display: none;
    cursor: pointer;
}
#player-controls button img {
    max-width: 10px;
}
#video-categories::-webkit-scrollbar {
    width: 0px;
  }
div#player-controls button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

button#play-pause-btn img {
    max-width: 15px;
}

button#reset-btn img {
    max-width: 17px;
}
body:has(.circuit-video-creater)  div#video-main-area {
    margin-top: 0;
}

body:has(.circuit-video-creater) header.circuit-Creator-hdr .hdr-lhs {
    padding-left: 183px;
}

@media(max-width:1280px){
    .video-js {
        height: 320px !important;
    }
    /* #timeline-track {
        padding: 0;
    } */
    /* .timeline-section {
        min-width: 120px;
    } */
        .timeline-slot {
        min-height: 80px;
        max-width: 120px;
        min-width: 120px;
    }
    #timeline-track {
        min-height: 70px;
    }
    .timeline-video .video-thumbnail {
        height: 60px;
    }
    .header_tittle {
        font-size: 30px;
    }
    .hdr-rhs .account a.primary-button {
        padding: 6px 20px;
        min-width: auto;
        font-size: 16px;
    }
     body:has(.circuit-video-creater) header.circuit-Creator-hdr .hdr-lhs {
        padding-left: 130px;
    } 
}
 @media (max-width: 1024px) {
        #video-main-area {
            order: 1;
        }

        .video-js {
            height: 350px !important;
        }
        .mb-viewer{
            display: block;
        }
        div#video-sidebar {
            position: fixed;
            left: -100%;
            z-index: 9;
            height: 100%;
        }
        div#video-sidebar.show-cat{
            left: 0%;
            transition: 0.5s all linear;
        }
        .main-header {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        .timeline-info {
            margin-bottom: 8px;
        }
        header.circuit-Creator-hdr {
            position: sticky;
            top: 0;
            z-index: 99;
        }
        #video-main-area {
            margin: 20px 20px 40px 20px;
        }
        svg.cross {
            display: none;
        }
}
    

/* Responsive Design */
@media (max-width: 768px) {    
    /* #timeline-track {
        gap: 0px;
    } */
    
    .timeline-section {
        margin-bottom: 12px;
    }
    
    #background-music-control {
        bottom: 10px;
        right: 10px;
        padding: 8px;
    }
    .header_tittle {
        font-size: 25px;
    }
    .video-js {
        height: 300px !important;
    }
    #timeline-container {
    padding: 12px;
    }
    #timeline-track {
        flex-wrap: nowrap;
    }
    .hdr-rhs .account {
        gap: 10px;
    }
    .main-header {
        padding: 12px 5px;
    }
    body:has(.circuit-video-creater) header.circuit-Creator-hdr div.hdr-lhs {
        padding-left: 0;
        flex-grow: initial;
        justify-content: flex-start;
    }  
}
@media (max-width: 480px) {
    #player-controls {
        flex-wrap: wrap;
        gap: 5px;
    }
    #video-main-area {
        margin: 20px 15px 40px 15px;
        padding: 10px;
    }
    .header_tittle {
        font-size: 22px;
    }
    #player-controls button {
        padding: 6px 12px;
        font-size: 14px;
    }
    .video-js {
        height: 300px !important;
    }
    #timeline-track {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }
}

