/* ============================================
   YouTube Clips Dashboard UI — Cyberpunk Style
   ============================================ */

:root {
    --yt-red: #ff0044;
    --yt-red-glow: rgba(255, 0, 68, 0.4);
    --yt-cyan: #00f3ff;
}

/* --- Container Layout --- */
.yt-hybrid-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 80px;
    gap: 28px;
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 120px);
}

/* --- Sidebar --- */
.yt-sidebar {
    width: 290px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.yt-sidebar-section {
    background: rgba(13, 2, 33, 0.85);
    border: 1px solid rgba(255, 0, 68, 0.25);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.yt-sidebar-title {
    font-family: var(--font-display, 'Orbitron', sans-serif);
    font-size: 0.88rem;
    color: #ff3366;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.1em;
}

.yt-sidebar-title .material-icons {
    font-size: 18px;
}

/* Search Box */
.yt-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.yt-search-box input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 0, 68, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-family: var(--font-body, sans-serif);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
}

.yt-search-box input:focus {
    border-color: #ff0044;
    box-shadow: 0 0 12px rgba(255, 0, 68, 0.4);
}

/* Accordion Controls */
.accordion-toggle {
    cursor: pointer;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
    user-select: none;
}

.accordion-toggle:hover {
    color: #ff6688;
}

.accordion-toggle .toggle-icon {
    transition: transform 0.3s ease;
    transform: rotate(180deg);
}

.accordion-toggle.collapsed .toggle-icon {
    transform: rotate(0deg);
}

.accordion-content {
    max-height: 320px;
    overflow-y: auto;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    margin-top: 10px;
    padding-right: 4px;
}

.accordion-content.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
    overflow: hidden;
    margin-top: 0;
}

.accordion-content::-webkit-scrollbar {
    width: 4px;
}
.accordion-content::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 68, 0.3);
    border-radius: 2px;
}
.accordion-content::-webkit-scrollbar-thumb:hover {
    background: #ff0044;
}

/* Checkbox Filter Item */
.yt-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.yt-filter-item:hover {
    background: rgba(255, 0, 68, 0.1);
    color: #fff;
}

.yt-filter-item input[type="checkbox"] {
    accent-color: #ff0044;
    cursor: pointer;
}

.yt-badge-count {
    margin-left: auto;
    font-family: monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 10px;
}

/* Sort & Period Radio / Buttons */
.yt-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.yt-pill-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 0, 68, 0.25);
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-display, sans-serif);
    cursor: pointer;
    transition: all 0.2s;
}

.yt-pill-btn:hover {
    border-color: #ff0044;
    color: #fff;
}

.yt-pill-btn.active {
    background: rgba(255, 0, 68, 0.3);
    border-color: #ff0044;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 0, 68, 0.3);
}

/* --- Main Stream Area --- */
.yt-main-stream {
    flex: 1;
    min-width: 0;
}

/* --- Type Navigation Tabs --- */
.yt-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 0, 68, 0.2);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.yt-type-tab {
    background: rgba(13, 2, 33, 0.7);
    border: 1px solid rgba(255, 0, 68, 0.25);
    color: rgba(255, 255, 255, 0.75);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--font-display, sans-serif);
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.yt-type-tab:hover {
    background: rgba(255, 0, 68, 0.15);
    border-color: #ff0044;
    color: #fff;
}

.yt-type-tab.active {
    background: linear-gradient(135deg, rgba(255, 0, 68, 0.3), rgba(255, 50, 0, 0.2));
    border-color: #ff0044;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 0, 68, 0.35);
}

.yt-type-count {
    background: rgba(0, 0, 0, 0.4);
    font-family: monospace;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.yt-type-tab.active .yt-type-count {
    background: rgba(255, 0, 68, 0.4);
    color: #fff;
}

/* LIVE Dot & Badge */
.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #ff0044;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(255, 0, 68, 0.7);
    animation: livePulse 1.6s infinite;
}

@keyframes livePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 0, 68, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(255, 0, 68, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 0, 68, 0);
    }
}

.yt-card-live-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 0, 68, 0.9);
    color: #fff;
    font-family: var(--font-display, monospace);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 0 10px rgba(255, 0, 68, 0.8);
    z-index: 2;
    letter-spacing: 0.05em;
}

.yt-card-archive-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 191, 255, 0.85);
    color: #fff;
    font-family: var(--font-display, monospace);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.yt-stream-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 0, 68, 0.2);
    padding-bottom: 12px;
}

.yt-stream-title {
    font-family: var(--font-display, sans-serif);
    font-size: 1.2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.yt-stream-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    background: rgba(255, 0, 68, 0.2);
    border: 1px solid #ff0044;
    color: #ff5588;
    border-radius: 4px;
    font-family: monospace;
}

.yt-stream-meta {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Video Grid --- */
.yt-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Video Card */
.yt-card {
    background: rgba(13, 2, 33, 0.85);
    border: 1px solid rgba(255, 0, 68, 0.2);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    position: relative;
}

.yt-card:hover {
    transform: translateY(-6px);
    border-color: #ff0044;
    box-shadow: 0 10px 25px rgba(255, 0, 68, 0.25), 0 0 15px rgba(255, 0, 68, 0.15);
}

/* Thumbnail Wrap */
.yt-card-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

.yt-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.yt-card:hover .yt-card-thumb {
    transform: scale(1.05);
}

.yt-card-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.yt-card-play-overlay i {
    font-size: 48px;
    color: #ff0044;
    text-shadow: 0 0 15px rgba(255, 0, 68, 0.8);
    transform: scale(0.8);
    transition: transform 0.3s;
}

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

.yt-card:hover .yt-card-play-overlay i {
    transform: scale(1);
}

.yt-card-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-family: monospace;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card Content */
.yt-card-content {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.yt-card-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #f0f0f0;
    line-height: 1.45;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.9em;
}

.yt-card-channel {
    font-size: 0.82rem;
    color: #ff5588;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.yt-card-channel i {
    font-size: 14px;
}

.yt-card-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
}

.yt-card-views {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffaa00;
}

.yt-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Load More Button */
.yt-load-more-wrap {
    text-align: center;
    margin-top: 40px;
}

.yt-load-more-btn {
    background: linear-gradient(135deg, rgba(255, 0, 68, 0.2), rgba(255, 100, 0, 0.2));
    border: 1px solid #ff0044;
    color: #fff;
    padding: 12px 36px;
    border-radius: 8px;
    font-family: var(--font-display, monospace);
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s;
}

.yt-load-more-btn:hover {
    background: linear-gradient(135deg, rgba(255, 0, 68, 0.4), rgba(255, 100, 0, 0.4));
    box-shadow: 0 0 20px rgba(255, 0, 68, 0.5);
    transform: translateY(-2px);
}

/* Loading & Empty State */
.yt-loading-box, .yt-empty-box {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-family: monospace;
    color: rgba(255, 255, 255, 0.6);
}

.yt-loading-box i, .yt-empty-box i {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    color: #ff0044;
}

.yt-loading-box i {
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- YouTube Modal Player --- */
.yt-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 1, 15, 0.88);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.yt-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.yt-modal-dialog {
    width: 100%;
    max-width: 960px;
    background: #0d0221;
    border: 1px solid rgba(255, 0, 68, 0.5);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(255, 0, 68, 0.3);
    display: flex;
    flex-direction: column;
    animation: modalScale 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes modalScale {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.yt-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 0, 68, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

.yt-modal-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
}

.yt-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.yt-modal-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.yt-modal-btn:hover {
    color: #ff0044;
    background: rgba(255, 0, 68, 0.15);
}

.yt-modal-body {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.yt-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.yt-modal-footer {
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.yt-modal-info {
    font-size: 0.85rem;
    color: #ff5588;
}

.yt-modal-nav {
    display: flex;
    gap: 10px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .yt-hybrid-container {
        flex-direction: column;
    }
    .yt-sidebar {
        width: 100%;
    }
}

/* --- Tag Filter UI in Sidebar --- */
.yt-tag-filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.4);
    padding: 3px;
    border-radius: 6px;
    border: 1px solid rgba(255, 0, 68, 0.2);
}

.yt-tag-filter-tab {
    flex: 1;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-align: center;
}

.yt-tag-filter-tab:hover {
    color: #fff;
}

.yt-tag-filter-tab.active {
    background: rgba(255, 0, 68, 0.35);
    color: #fff;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(255, 0, 68, 0.3);
}

.yt-tag-list-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.yt-tag-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    user-select: none;
}

.yt-tag-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.yt-tag-item input[type="checkbox"] {
    accent-color: #ff0044;
    cursor: pointer;
}

.yt-tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Card Tags */
.yt-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
    min-height: 18px;
}

.yt-card-tag {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.yt-card-tag:hover {
    transform: scale(1.08);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}
