/* Custom styles for YouTube clone */

/* Smooth transitions */
* {
    transition: all 0.2s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Video card hover effects */
.video-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
}

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

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

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Sidebar transitions */
.sidebar-collapsed {
    transform: translateX(-100%);
}

@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        z-index: 40;
        transform: translateX(-100%);
    }
    
    #sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}

/* Modal animations */
.modal-enter {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Search bar focus effects */
#searchInput:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Category pills active state */
.category-pill {
    white-space: nowrap;
}

.category-pill.active {
    background-color: #1f2937;
    color: white;
}

/* Channel avatar */
.channel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Video metadata */
.video-meta {
    color: #606060;
    font-size: 14px;
    line-height: 1.4;
}

.video-title {
    font-weight: 500;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.channel-name {
    color: #606060;
    font-size: 14px;
}

.channel-name:hover {
    color: #0f0f0f;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .header-actions {
        display: none;
    }
    
    .search-container {
        max-width: 200px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f0f0f;
        color: #f1f1f1;
    }
    
    header {
        background-color: #212121;
    }
    
    aside {
        background-color: #212121;
    }
    
    .video-card {
        background-color: #272727;
    }
    
    .hover\\:bg-gray-100:hover {
        background-color: #3f3f3f;
    }
}
