/* CSS Variables */
:root {
    --youtube-red: #ff0000;
    --dark-gray: #202020;
    --light-gray: #f9f9f9;
    --sidebar-width: 260px;
    --sidebar-collapsed: 0;
    --header-height: 64px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--light-gray);
    overflow-x: hidden;
}

/* Header Component */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid #e0e0e0;
    z-index: 1050;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2px;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.menu-toggle:hover {
    background-color: #f0f0f0;
}

.menu-toggle i {
    font-size: 20px;
    transition: transform var(--transition-normal);
}

.menu-toggle.active i {
    transform: rotate(90deg);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: bold;
    font-size: 22px;
}

.brand-logo img {
    width: 130px;
}

.brand-logo:hover {
    color: var(--dark-gray);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--youtube-red);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.search-section {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
    display: flex;
    align-items: center;
}

.search-wrapper {
    display: flex;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 24px;
    overflow: hidden;
    transition: var(--transition-fast);
}

.search-wrapper:focus-within {
    border-color: #1976d2;
    box-shadow: 0 0 0 1px #1976d2;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 16px;
    background: transparent;
}

.search-button {
    width: 64px;
    height: 48px;
    border: none;
    background: #f8f9fa;
    border-left: 1px solid #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.search-button:hover {
    background: #e9ecef;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-button {
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 20px;
}

.action-button:hover {
    background-color: #f0f0f0;
    /* transform: scale(1.05); */
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sidebar Component */
.navigation-sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: 0;
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid #e0e0e0;
    z-index: 1040;
    transition: var(--transition-slow);
    overflow-y: auto;
    transform: translateX(0);
}

.navigation-sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.navigation-sidebar.mobile-hidden {
    transform: translateX(-100%);
}

.sidebar-content {
    padding: 12px 0;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #606060;
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
    border-radius: 0;
    margin: 0 8px;
    border-radius: 12px;
    font-weight: 500;
}

.nav-item:hover {
    background: #f0f0f0;
    color: #030303;
    transform: translateX(4px);
}

.nav-item.active {
    background: #e8f0fe;
    color: #1976d2;
    font-weight: 700;
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.nav-text {
    opacity: 1;
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    white-space: nowrap;
}

.navigation-sidebar.collapsed .nav-text {
    opacity: 0;
    transform: translateX(-8px);
}

.section-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 12px 20px;
}

.subscriptions-wrapper {
    transition: var(--transition-slow);
    overflow: hidden;
}

.navigation-sidebar.collapsed .subscriptions-wrapper {
    max-height: 0;
    opacity: 0;
}

.section-title {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #606060;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copyright-title {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #606060;
    letter-spacing: 0.5px;
}

.subscription-item {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    color: #606060;
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
    margin: 0 8px;
    border-radius: 12px;
}

.subscription-item:hover {
    background: #f0f0f0;
    color: #030303;
}

.channel-thumbnail {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
}

/* Mobile Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1030;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Main Content Layout */
.main-container {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 24px;
    transition: margin-left var(--transition-slow);
    min-height: calc(100vh - var(--header-height));
}

.main-container.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed);
}

/* Video Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}



.video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.video-card:hover {
    /* transform: translateY(-8px); */
    box-shadow: var(--shadow-lg);
}

.video-thumbnail-container {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

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

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

.thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

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

.play-icon-overlay {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: var(--transition-normal);
}

.video-card:hover .play-icon-overlay {
    transform: scale(1);
}

.video-info-section {
    padding: 16px;
    display: flex;
    gap: 12px;
}

.creator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    transition: transform var(--transition-fast);
}

.video-card:hover .creator-avatar {
    transform: scale(1.1);
}

.video-details {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0 0 8px 0;
    color: #030303;
    transition: color var(--transition-fast);
}

.video-card:hover .video-title {
    color: #1976d2;
}

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

/* Video Player Page */
.video-player-container {
    background: #000;
    border-radius: 16px;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    cursor: pointer;
}

.player-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(2deg, #1d1d1d, #393939);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.player-content {
    text-align: center;
}

.play-button-large {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.play-button-large:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.25);
}

.play-button-large i {
    font-size: 32px;
}

.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.video-player-container:hover .player-controls {
    transform: translateY(0);
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
}

.volume-progress {
    width: 60%;
    height: 100%;
    background: white;
    border-radius: 2px;
}

.time-display {
    color: white;
    font-size: 14px;
}

/* Video Details */
.video-header {
    margin-bottom: 20px;
}

.video-main-title {
    font-size: 24px;
    font-weight: 600;
    color: #030303;
    margin-bottom: 16px;
    line-height: 1.3;
}

.video-stats-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.channel-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.channel-details h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #030303;
}

.subscriber-count {
    font-size: 14px;
    color: #606060;
    margin: 0;
}

.subscribe-button {
    padding: 10px 24px;
    border: none;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.subscribe-button.subscribed {
    background: #e9ecef;
    color: #495057;
}

.subscribe-button:not(.subscribed) {
    background: #000;
    color: white;
}

.subscribe-button:hover {
    transform: scale(1.05);
}

.video-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.action-group {
    display: flex;
    background: #f0f0f0;
    border-radius: 24px;
    overflow: hidden;
}

.action-btn {
    padding: 10px 16px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 14px;
    font-weight: 500;
}

.action-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.action-btn.active {
    background: #e3f2fd;
    color: #1976d2;
}

.action-separator {
    width: 1px;
    background: #ddd;
}

.standalone-action {
    background: #f0f0f0;
    border-radius: 24px;
}

/* Video Description */
.video-description {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
    margin: 20px 0;
}

.description-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #606060;
    flex-wrap: wrap;
}

.description-text {
    color: #030303;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Comments Section */
.comments-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.comments-count {
    font-size: 18px;
    font-weight: 600;
    color: #030303;
}

.sort-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: none;
    border: none;
    color: #606060;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.sort-button:hover {
    background: #f0f0f0;
}

.comment-input-section {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.comment-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.comment-input {
    flex: 1;
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 8px 0;
    font-size: 14px;
    outline: none;
    transition: var(--transition-fast);
}

.comment-input:focus {
    border-bottom-color: #1976d2;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 12px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.comment-item:hover {
    background: #f8f9fa;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 14px;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-author {
    font-weight: 600;
    font-size: 13px;
    color: #030303;
}

.comment-timestamp {
    font-size: 12px;
    color: #606060;
}

.comment-text {
    font-size: 14px;
    color: #030303;
    line-height: 1.4;
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.comment-action {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #606060;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.comment-action:hover {
    background: #f0f0f0;
    color: #030303;
}

/* Related Videos Sidebar */
.related-video-item {
    display: flex;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: 12px;
}

.related-video-item:hover {
    background: #f8f9fa;
}

.related-thumbnail {
    width: 160px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    position: relative;
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #030303;
}

.related-meta {
    font-size: 12px;
    color: #606060;
    line-height: 1.3;
}

/* Upload Modal */
.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
    background: #fafafa;
    transition: var(--transition-fast);
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--youtube-red);
    background: #fff5f5;
}

.upload-icon {
    font-size: 48px;
    color: #999;
    margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 991px) {
    .main-container {
        margin-left: 0;
    }

    .main-container.sidebar-collapsed {
        margin-left: 0;
    }

    .navigation-sidebar {
        transform: translateX(-100%);
    }

    .navigation-sidebar.mobile-show {
        transform: translateX(0);
    }

    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .video-stats-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .video-actions {
        /* justify-content: center; */
        gap: 10px;
    }
}

@media (max-width: 767px) {
    .main-header {
        padding: 0 12px;
    }

    .search-section {
        display: none;
    }

    .brand-logo .brand-text {
        display: none;
    }

    .main-container {
        padding: 16px;
    }

    .videos-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .video-main-title {
        font-size: 20px;
    }

    .action-btn span {
        display: none;
    }
    .video-actions{
        gap: 10px;
    }
}

@media (max-width: 575px) {
    .action-button {
        width: 30px;
        height: 30px;
    }

    .video-actions {
        gap: 4px;
    }

    .play-button-large {
        width: 50px;
        height: 50px;
    }
#playerVideoTitle{
    font-size: 15px;
    padding: 0 8px;
}
.volume-slider{
    width: 40px;
}
.control-btn{
    width: 30px;
    height: 30px;
}
.controls-left, .controls-right{
    gap: 5px;
}
    .action-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in {
    animation: slideInLeft 0.4s ease-out;
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    /* -webkit-line-clamp: 2; */
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition: all var(--transition-fast);
}

.modal-body{
    padding: 3rem !important;
}



/* Video Player Container - Fixed positioning and sizing */
.video-player-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* All content inside container should be absolutely positioned */
.video-player-container > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* YouTube iframe styling */
.video-player-container iframe {
    border: none;
    border-radius: 8px;
    background: #000;
    z-index: 2;
}

/* Loading state - prevents layout shift */
.video-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #fff;
    z-index: 1;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.video-loading-state span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Video unavailable state */
.video-unavailable-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #fff;
    text-align: center;
    padding: 2rem;
    z-index: 1;
}

.video-unavailable-state i {
    font-size: 2.5rem;
    color: #ff6b6b;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.video-unavailable-state h5 {
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 500;
    font-size: 1.1rem;
}

.video-unavailable-state p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    font-size: 14px;
}

.video-unavailable-state .btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 13px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.video-unavailable-state .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    transform: translateY(-1px);
}

/* Related videos styling */
.related-video-item {
    display: flex;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-bottom: 12px;
}

.related-video-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.related-thumbnail-wrapper {
    position: relative;
    flex-shrink: 0;
}

.related-thumbnail {
    width: 160px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    background: #333;
}

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

.related-info {
    flex: 1;
    min-width: 0;
}

.related-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    /* -webkit-line-clamp: 2; */
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff;
}

.related-meta {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.related-channel {
    margin-bottom: 2px;
}

.related-stats {
    font-size: 12px;
}

/* Video thumbnails in grid */
.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #333;
    transition: opacity 0.3s ease;
}

.video-thumbnail[src=""],
.related-thumbnail[src=""] {
    opacity: 0;
}

/* Fade in animations */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.slide-in {
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .video-player-container {
        margin-bottom: 15px;
        border-radius: 6px;
    }
    
    .video-player-container iframe {
        border-radius: 6px;
    }
    
    .video-unavailable-state {
        padding: 1.5rem;
    }
    
    .video-unavailable-state i {
        font-size: 2rem;
    }
    
    .related-thumbnail {
        width: 120px;
        height: 68px;
    }
    
    .related-title {
        font-size: 13px;
    }
    
    .related-meta {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .video-player-container {
        padding-bottom: 56.25%; /* Maintain aspect ratio on mobile */
    }
    
    .related-thumbnail {
        width: 100px;
        height: 56px;
    }
    
    .video-unavailable-state {
        padding: 1rem;
    }
}

/* Ensure proper text truncation */
.text-truncate-2 {
    display: -webkit-box;
    /* -webkit-line-clamp: 2; */
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
}


.video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    will-change: transform, box-shadow;
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
}

/* Smooth thumbnail zoom */
.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

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

/* Smooth overlay animation */
.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 16px 16px 0 0;
}

.video-card:hover .thumbnail-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.3);
}

/* Smooth play button animation */
.play-icon-overlay {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
    backdrop-filter: blur(10px);
}

.video-card:hover .play-icon-overlay {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Smooth avatar animation */
.creator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.video-card:hover .creator-avatar {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Smooth title color transition */
.video-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0 0 8px 0;
    color: #030303;
    transition: all 0.3s ease;
    will-change: color;
}

.video-card:hover .video-title {
    color: #1976d2;
}

/* Enhanced duration badge */
.video-duration-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.video-card:hover .video-duration-badge {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

/* Add subtle glow effect on hover */
.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.1), rgba(255, 0, 0, 0.05));
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.video-card:hover::before {
    opacity: 1;
}

/* Ensure content stays above the glow */
.video-card > * {
    position: relative;
    z-index: 2;
}

/* Smooth stagger animation for grid loading */
.video-card.fade-in {
    opacity: 0;
    animation: smoothFadeIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes smoothFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced responsive hover effects */
@media (min-width: 1024px) {
    .video-card:hover {
        transform: translateY(-12px) scale(1.03);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
    }
    
    .video-card:hover .video-thumbnail {
        transform: scale(1.1);
    }
}

/* Reduce animations on mobile for better performance */
@media (max-width: 768px) {
    .video-card {
        transition: all 0.2s ease;
    }
    
    .video-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    }
    
    .video-card:hover .video-thumbnail {
        transform: scale(1.05);
    }
}

/* Disable hover effects on touch devices to prevent sticky hover */
@media (hover: none) and (pointer: coarse) {
    .video-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .video-card:hover .video-thumbnail {
        transform: none;
    }
    
    .video-card:hover .thumbnail-overlay {
        opacity: 0;
    }
    
    .video-card:hover .creator-avatar {
        transform: none;
    }
}

/* Focus states for accessibility */
.video-card:focus-visible {
    outline: 2px solid #1976d2;
    outline-offset: 4px;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

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

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

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

.play-icon-overlay {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

/* Subscribe button states */
.subscribe-button {
    background: #ff0000;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscribe-button:hover {
    background: #171717;
}

.subscribe-button.subscribed {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Like/Dislike buttons */
.action-btn.active {
    color: #1976d2;
}

.action-btn.active i {
    color: #1976d2;
}

.related-info .text-white{
    color: #000 !important;
}