/* ==========================================
   VIDEO GALLERY STYLES
   ========================================== */

/* Base Gallery Layout */
.video-gallery {
    display: flex;
    height: 100vh;
    background-color: #0f172a; /* slate-900 */
    color: white;
}

/* Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.gallery-grid .video-item {
    background: #1e293b; /* slate-800 */
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-grid .video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Reel Layout */
.gallery-reel {
    scroll-snap-type: y mandatory;
    overflow-y: auto;
    height: 100vh;
    scroll-behavior: smooth;
}

.reel-item {
    scroll-snap-align: start;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
}

.video-container video,
.video-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video Controls */
.video-controls {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 10;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1rem;
    border-radius: 0.5rem;
}

/* Action Buttons */
.action-buttons {
    position: absolute;
    right: 1rem;
    bottom: 5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 10;
}

.action-button {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-button:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

.action-button:active {
    transform: scale(0.95);
}

/* Video Info */
.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1rem;
    z-index: 10;
}

.video-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.video-description {
    font-size: 0.875rem;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
}

.user-name {
    font-weight: 600;
    font-size: 1rem;
}

.verified-badge {
    color: #60a5fa; /* blue-400 */
    width: 1.25rem;
    height: 1.25rem;
}

/* Tags */
.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Loading States */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid transparent;
    border-top: 2px solid #3b82f6; /* blue-500 */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Transitions */
.fade-enter {
    opacity: 0;
    transform: translateY(1rem);
}

.fade-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-exit {
    opacity: 1;
    transform: translateY(0);
}

.fade-exit-active {
    opacity: 0;
    transform: translateY(-1rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Utility Classes */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-shadow {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .reel-item {
        height: calc(100vh - 4rem);
    }

    .action-buttons {
        right: 0.75rem;
        bottom: 4rem;
        gap: 0.75rem;
    }

    .action-button {
        width: 2.5rem;
        height: 2.5rem;
    }

    .video-info {
        padding: 0.75rem;
    }

    .video-title {
        font-size: 1rem;
    }

    .user-avatar {
        width: 2rem;
        height: 2rem;
    }

    .user-name {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        right: 0.5rem;
        bottom: 3rem;
    }

    .action-button {
        width: 2rem;
        height: 2rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .gallery-reel {
        scroll-behavior: auto;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .action-button {
        background: rgba(0, 0, 0, 0.8);
        border: 1px solid white;
    }

    .tag {
        background: rgba(255, 255, 255, 0.9);
        color: black;
    }
}

/* Focus States */
.action-button:focus,
.video-item:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .action-button:hover {
        transform: none;
    }

    .action-button:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.1);
    }
} 