/* Video Player Styles */
.video-player-container {
    margin-bottom: 2rem;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.video-player {
    position: relative;
    width: 100%;
    background: #000;
}

.video-element {
    width: 100%;
    height: auto;
    max-height: 70vh;
    display: block;
    background: #000;
}

/* Custom Video Controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.video-player:hover .video-controls,
.video-controls:hover,
.video-controls.show {
    opacity: 1;
}

.progress-container {
    margin-bottom: 1rem;
    cursor: pointer;
}

.progress-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.progress-filled {
    height: 100%;
    background: #dc2626;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: #dc2626;
    border: 2px solid white;
    border-radius: 50%;
    left: 0%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-container:hover .progress-handle {
    opacity: 1;
}

.controls-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

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

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

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

.play-pause-btn {
    background: #dc2626;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
}

.play-pause-btn:hover {
    background: #b91c1c;
    transform: scale(1.05);
}

.time-display {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 100px;
}

/* Volume Controls */
.volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-slider {
    width: 80px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.volume-container:hover .volume-slider {
    opacity: 1;
}

.volume-slider input[type="range"] {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #dc2626;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #dc2626;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Quality Selector */
.quality-selector {
    position: relative;
}

.quality-dropdown {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
}

.quality-dropdown:hover {
    border-color: #dc2626;
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: none;
}

.loading-spinner.show {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Video Information Section */
.video-info-section {
    margin-bottom: 2rem;
}

.video-header {
    margin-bottom: 1rem;
}

.video-title {
    font-size: 2rem;
    color: #000;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.video-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.rating {
    color: #ffa500;
    font-weight: 500;
}

.video-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #000;
    border: 2px solid #dc2626;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.action-btn:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-2px);
}

/* Advertisement Styles */
.banner-ad {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: 2px solid #dc2626;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner-ad::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.ad-label {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.banner-content {
    font-weight: 600;
    color: #000;
}

.banner-content p {
    margin: 0;
    font-size: 1rem;
}

.sidebar-ad {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 2rem;
    text-align: center;
}

.sidebar-ad .ad-content {
    color: white;
}

.sidebar-ad .ad-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.ad-btn {
    background: white;
    color: #dc2626;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.ad-btn:hover {
    background: #f3f4f6;
    transform: scale(1.05);
}

.vertical-ad {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.vertical-ad-content p {
    margin: 0.5rem 0;
    font-weight: 600;
}

.vertical-ad .ad-btn {
    background: white;
    color: #dc2626;
}

/* Content Columns Layout */
.content-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.left-column {
    background: white;
}

.right-column {
    background: white;
}

/* Video Description */
.video-description {
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.video-description h3 {
    color: #dc2626;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.video-description p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #333;
}

.tag {
    background: #dc2626;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

/* Related Videos Grid */
.related-videos-grid {
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.related-videos-grid h3 {
    color: #dc2626;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.grid-video-item {
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.grid-video-item a {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    width: 100%;
    height: 100%;
}

.grid-video-item a:hover,
.grid-video-item a:visited,
.grid-video-item a:active {
    text-decoration: none !important;
    color: inherit !important;
}

.grid-video-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.15);
    border-color: #dc2626;
}

.grid-thumbnail {
    position: relative;
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.play-overlay-grid {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: white;
    background: rgba(220, 38, 38, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.grid-video-item:hover .play-overlay-grid {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(220, 38, 38, 1);
}

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

.quality-badge-grid {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.quality-badge-grid.premium {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: black;
}

.grid-info {
    padding: 0.75rem;
}

.grid-info h4 {
    color: #000;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-views {
    color: #666;
    font-size: 0.75rem;
    margin: 0;
}

/* Related and Suggested Content */
.related-content,
.suggested-content {
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.related-content h3,
.suggested-content h3 {
    color: #dc2626;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.related-videos,
.suggested-videos {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-video-item,
.suggested-video-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.related-video-item a,
.suggested-video-item a {
    text-decoration: none !important;
    color: inherit !important;
    display: flex;
    gap: 1rem;
    width: 100%;
}

.related-video-item a:hover,
.suggested-video-item a:hover,
.related-video-item a:visited,
.suggested-video-item a:visited,
.related-video-item a:active,
.suggested-video-item a:active {
    text-decoration: none !important;
    color: inherit !important;
}

.related-video-item:hover,
.suggested-video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
}

.related-thumbnail,
.suggested-thumbnail {
    position: relative;
    width: 120px;
    height: 68px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-overlay-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: white;
    background: rgba(220, 38, 38, 0.8);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.duration-small {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
}

.quality-badge-small {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: bold;
}

.quality-badge-small.premium {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: black;
}

.related-info,
.suggested-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-info h4,
.suggested-info h4 {
    color: #000;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.related-views,
.suggested-views {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.suggested-rating {
    color: #ffa500;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Responsive Design for Player */
@media (max-width: 1200px) {
    .content-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .right-column {
        order: -1;
    }
    
    .related-videos,
    .suggested-videos {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    /* Mobile-specific adjustments for post page */
    .content-area {
        padding-top: 4rem; /* Space for mobile menu button */
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .video-player {
        height: 300px !important; /* Smaller video player on mobile */
    }
    
    .video-title {
        font-size: 1.5rem;
    }
    
    .video-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .video-actions {
        gap: 0.5rem;
    }
    
    .action-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .controls-bottom {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .controls-left,
    .controls-center,
    .controls-right {
        justify-content: center;
    }
    
    .volume-slider {
        width: 60px;
    }
    
    .related-thumbnail,
    .suggested-thumbnail {
        width: 100px;
        height: 56px;
    }
    
    .content-columns {
        gap: 1rem;
    }
    
    .video-description,
    .related-videos-grid,
    .related-content,
    .suggested-content {
        padding: 1rem;
    }
    
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .grid-thumbnail {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .video-player-container {
        margin-bottom: 1rem;
    }
    
    .video-controls {
        padding: 0.5rem;
    }
    
    .control-btn {
        font-size: 1rem;
        min-width: 35px;
        height: 35px;
    }
    
    .play-pause-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .time-display {
        font-size: 0.8rem;
        min-width: 80px;
    }
    
    .video-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        text-align: center;
    }
    
    
    .related-videos,
    .suggested-videos {
        grid-template-columns: 1fr;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .grid-thumbnail {
        height: 80px;
    }
    
    .grid-info {
        padding: 0.5rem;
    }
    
    .grid-info h4 {
        font-size: 0.8rem;
    }
    
    .grid-views {
        font-size: 0.7rem;
    }
}

/* Focus and Accessibility */
.control-btn:focus,
.action-btn:focus,
.ad-btn:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

.video-element:focus {
    outline: 3px solid #dc2626;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .video-controls {
        background: rgba(0, 0, 0, 0.95);
    }
    
    .progress-bar {
        background: rgba(255, 255, 255, 0.8);
    }
    
    .banner-ad {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .video-controls,
    .control-btn,
    .action-btn,
    .related-video-item,
    .suggested-video-item {
        transition: none;
    }
    
    .banner-ad::before {
        animation: none;
    }
    
    .spinner {
        animation: none;
    }
}
