/* Video Player */
.video-container {
    width: 100%;
    background-color: black;
    position: relative;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.video-player-container {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 767px) {
    .video-container {
        position: relative;
        z-index: 50;
        margin-bottom: 0;
    }

    .video-container.sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    .video-container.sticky + .video-placeholder {
        display: block;
    }

    .video-placeholder {
        display: none;
        width: 100%;
        height: 56.25vw; /* Same as video height */
    }

    /* Content spacing adjustments */
    .content-card {
        padding: 0.75rem;
        margin-bottom: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .video-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
        padding: 0;
    }

    .channel-container {
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .video-description {
        margin-bottom: 0.75rem;
    }

    /* Remove the padding-top since we're using placeholder */
    .content-container {
        padding-top: 0;
    }

    .content-container.not-sticky {
        padding-top: 0;
    }

    /* Related videos adjustments */
    .related-container {
        margin-top: 0.75rem;
        border-radius: 0;
        box-shadow: none;
    }
}

/* Desktop View */
@media (min-width: 768px) {
    .video-container {
        position: relative !important; /* Override any sticky behavior */
        margin-bottom: 1.25rem;
    }

    .video-placeholder {
        display: none !important;
    }

    .content-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: 0.5rem;
        box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    }
}

/* Ad Overlay */
.ad-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Hide ad overlay on mobile */
@media (max-width: 767px) {
    .ad-overlay {
        display: none;
    }
}

.ad-content {
    text-align: center;
    padding: 2rem;
}

.ad-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.ad-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
}

.ad-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.ad-close-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.ad-close-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Content Card */
.content-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

/* Video Info */
.video-title {
    font-size: 1.5rem;
    line-height: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #111827;
}

/* Channel Info */
.channel-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}
.channel-info {
    flex: 1;
}
.channel-name {
    font-weight: 500;
    line-height: 1.25;
    color: #4b5563;
}
.video-date {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Video Description */
.video-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.description-text {
    position: relative;
}

.description-content,
.description-more {
    display: inline;
}

.description-more.hidden {
    display: none;
}

.description-toggle {
    display: inline-block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    transition: color 0.2s ease;
}

.description-toggle:hover {
    text-decoration: underline;
}

/* Meta Sections */
.meta-section {
    margin-top: 1.5rem;
}
.meta-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.75rem;
}
.meta-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Mobile View - Collapsible Content */
@media (max-width: 767px) {
    .collapsible-content {
        display: none;
    }
    
    .collapsible-content.active {
        display: block;
    }
    
    .collapsible-toggle {
        display: flex;
        width: 100%;
        background: #f8f9fa;
        border: none;
        padding: 0.5rem 0.75rem;
        font-weight: 500;
        color: #4b5563;
        border-top: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
        margin: 0.5rem 0;
        cursor: pointer;
        align-items: center;
        justify-content: space-between;
        transition: all 0.2s ease;
    }
    
    .collapsible-toggle:hover {
        background: #f1f5f9;
    }
    
    .collapsible-toggle::after {
        content: '▼';
        font-size: 0.75rem;
        color: #6b7280;
        transition: transform 0.2s ease;
    }
    
    .collapsible-toggle.active::after {
        transform: rotate(180deg);
    }

    /* Adjust meta sections spacing for mobile */
    .meta-section {
        margin-top: 1rem;
    }

    .meta-items {
        gap: 0.375rem;
    }

    .category-tag {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .tag-item {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .orientation-item {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Desktop View - Always show content */
@media (min-width: 768px) {
    .collapsible-content {
        display: block !important;
    }
    
    .collapsible-toggle {
        display: none !important;
    }
}

/* Categories */
.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #f3f4f6;
    color: #1f2937;
}

/* Tags */
.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #f8f9fa;
    color: #4b5563;
}

/* Orientation */
.orientation-item {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

/* Related Videos */
.related-container {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    padding: 1.5rem;
}
.related-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #111827;
}
.related-video {
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    margin-bottom: 1rem;
}
.related-video:hover {
    opacity: 0.9;
}
.related-thumbnail-container {
    position: relative;
    flex-shrink: 0;
    width: 140px;
}
.related-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 0.375rem;
}
.related-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 4px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 500;
    line-height: 12px;
}
.related-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.related-video-title {
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
    color: #111827;
}
.related-channel {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Responsive */
@media (min-width: 768px) {
    .video-title {
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .video-container {
        aspect-ratio: 16/9;
    }
    .content-container {
        display: flex;
        gap: 2rem;
    }
    .main-content {
        flex: 1;
    }
    .sidebar {
        width: 402px;
        flex-shrink: 0;
    }
} 