/* Video Platform Styles */
:root {
    --video-primary: #FF0000;
    --video-hover: #CC0000;
    --dark-bg: #0f0f0f;
    --dark-card: #1f1f1f;
    --dark-border: #3f3f3f;
}

/* Browse Videos Page */
.videos-header {
    background: linear-gradient(135deg, var(--video-primary) 0%, #CC0000 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
}

.videos-header h1 {
    color: white;
    margin: 0;
    background: none;
    -webkit-text-fill-color: white;
}

.filter-bar {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.video-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--video-primary);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.video-info {
    padding: 0.75rem;
}

.video-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--dark-text);
}

.video-channel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.video-channel-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.video-channel-name {
    font-size: 0.85rem;
    color: var(--light-text);
    font-weight: 500;
}

.video-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted-text);
}

/* Channel Page */
.channel-banner {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--video-primary) 0%, #CC0000 100%);
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.channel-header {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.channel-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--video-primary);
    flex-shrink: 0;
}

.channel-info {
    flex: 1;
}

.channel-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.channel-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--light-text);
}

.channel-description {
    color: var(--light-text);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.subscribe-btn {
    background: var(--video-primary);
    color: white;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscribe-btn:hover {
    background: var(--video-hover);
    transform: scale(1.05);
}

.subscribe-btn.subscribed {
    background: #606060;
}

/* Video Player Page */
.video-player-container {
    background: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.video-player-container video {
    width: 100%;
    display: block;
}

.video-details {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.video-title-large {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.video-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.video-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--light-text);
}

.video-buttons {
    display: flex;
    gap: 0.5rem;
}

.video-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--card-background);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.video-btn:hover {
    background: var(--light-background);
}

.video-btn.active {
    background: var(--video-primary);
    color: white;
    border-color: var(--video-primary);
}

.video-btn i {
    font-size: 1rem;
}

.video-channel-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.channel-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.channel-link:hover .channel-link-name {
    color: var(--video-primary);
}

.channel-link-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-link-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.channel-link-subs {
    font-size: 0.85rem;
    color: var(--light-text);
    margin: 0;
}

/* Comments Section */
.comments-section {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.comments-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--dark-text);
}

.comment-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-input-wrapper {
    flex: 1;
}

.comment-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid var(--border-color);
    padding: 0.5rem 0;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.2s;
}

.comment-input:focus {
    outline: none;
    border-bottom-color: var(--video-primary);
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: var(--dark-text);
    margin-right: 0.5rem;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--muted-text);
}

.comment-text {
    margin-top: 0.5rem;
    line-height: 1.5;
    color: var(--dark-text);
}

.comment-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.comment-like-btn {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.comment-like-btn:hover {
    background: var(--light-background);
}

/* Related Videos Sidebar */
.related-videos {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.related-videos h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.related-video-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: background 0.2s;
}

.related-video-item:hover {
    background: var(--light-background);
}

.related-thumbnail {
    width: 120px;
    height: 68px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-channel {
    font-size: 0.75rem;
    color: var(--light-text);
    margin-bottom: 0.25rem;
}

.related-views {
    font-size: 0.75rem;
    color: var(--muted-text);
}

/* Upload Page */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    background: var(--light-background);
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--video-primary);
    background: var(--card-background);
}

.upload-area.dragover {
    border-color: var(--video-primary);
    background: rgba(255, 0, 0, 0.05);
}

.upload-icon {
    font-size: 4rem;
    color: var(--video-primary);
    margin-bottom: 1rem;
}

.upload-progress {
    display: none;
    margin-top: 1rem;
}

.progress {
    height: 30px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.progress-bar {
    background: var(--video-primary);
    transition: width 0.3s ease;
}

/* Channel Dashboard */
.channel-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-stat {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--video-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--light-text);
    font-size: 0.9rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--muted-text);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    
    .channel-header {
        flex-direction: column;
        text-align: center;
    }
    
    .channel-avatar {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }
    
    .channel-stats {
        justify-content: center;
    }
    
    .video-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .video-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .related-thumbnail {
        width: 100px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        padding: 1rem;
    }
    
    .video-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
}
