/* Video Uploader Styles */
.video-uploader {
    position: relative;
    width: 100%;
    min-height: 200px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-uploader:hover {
    border-color: hsl(var(--base));
    background: rgba(var(--base-rgb), 0.05);
}

.video-uploader.has-files {
    min-height: auto;
    padding: 15px;
}

.video-uploader.drag-over {
    border-color: hsl(var(--base));
    background: rgba(var(--base-rgb), 0.1);
}

.video-uploader input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.video-uploader .upload-text {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.video-uploader .upload-text i {
    font-size: 24px;
    color: hsl(var(--base));
    margin-bottom: 8px;
    display: block;
}

.video-uploader .uploaded {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.uploaded-video {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

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

.uploaded-video video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px 8px 0 0;
}

.uploaded-video .delete-video {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.8);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.uploaded-video .delete-video:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

.uploaded-video .delete-video i {
    font-size: 12px;
}

/* Dark mode support */
[data-theme="dark"] .video-uploader {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .video-uploader:hover {
    background: rgba(var(--base-rgb), 0.1);
}

[data-theme="dark"] .video-uploader .upload-text {
    color: #ccc;
}

[data-theme="dark"] .uploaded-video {
    background: #333;
}

/* Responsive design */
@media (max-width: 768px) {
    .video-uploader .uploaded {
        grid-template-columns: 1fr;
    }
    
    .video-uploader {
        min-height: 150px;
        padding: 15px;
    }
}

/* File type indicator */
.video-uploader::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.3;
}

.video-uploader.has-files::before {
    display: none;
}

/* Video styles for prompt cards on home page */
.trending-item__thumb video,
.featured-item__thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
}

.trending-item__thumb,
.featured-item__thumb {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.trending-item__thumb a,
.featured-item__thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.trending-item__thumb a:hover video,
.featured-item__thumb a:hover video {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Ensure videos maintain aspect ratio */
.trending-item__thumb video,
.featured-item__thumb video {
    aspect-ratio: 16/9;
    min-height: 200px;
}

/* Video controls styling for better UX */
.trending-item__thumb video::-webkit-media-controls,
.featured-item__thumb video::-webkit-media-controls {
    display: none !important;
}

.trending-item__thumb video::-webkit-media-controls-panel,
.featured-item__thumb video::-webkit-media-controls-panel {
    display: none !important;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16/9) {
    .trending-item__thumb video,
    .featured-item__thumb video {
        height: 200px;
    }
}

/* Video styles for prompt details page */
.prompt-details__item video,
.prompt-details__gallery video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.prompt-details__item video {
    max-height: 400px;
    object-fit: cover;
}

.prompt-details__gallery video {
    max-height: 150px;
    object-fit: cover;
}

.prompt-details__gallery .prompt-gallery__item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.prompt-details__gallery .prompt-gallery__item:hover {
    transform: scale(1.05);
}

.prompt-details__gallery .prompt-gallery__item:hover video {
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* Ensure videos maintain aspect ratio on details page */
.prompt-details__item video {
    aspect-ratio: 16/9;
}

.prompt-details__gallery video {
    aspect-ratio: 16/9;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16/9) {
    .prompt-details__item video {
        height: 400px;
    }
    
    .prompt-details__gallery video {
        height: 150px;
    }
}

/* Video styles for admin prompt details page */
.gallery-card video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.gallery-card:hover video {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gallery-card video {
    aspect-ratio: 16/9;
    max-height: 200px;
    object-fit: cover;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16/9) {
    .gallery-card video {
        height: 200px;
    }
} 