/* Gallery-specific styles - YouTube/TikTok inspired */



@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Logout Button */
.logout-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffd700;
    transform: translateY(-1px);
}

.logout-btn i {
    font-size: 0.9rem;
}

/* Gallery Hero Section */
.gallery-hero {
    text-align: center;
    padding: 1rem 0;
    color: white;
}

.hero-content { margin-bottom: 0.75rem; }

.gallery-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.gallery-title i {
    color: #ff6b6b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.gallery-subtitle { font-size: 1.05rem; opacity: 0.9; font-weight: 300; margin-bottom: 0.5rem; }

/* Search Bar */
.search-bar { margin-bottom: 0.75rem; }

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.search-container i {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
}

#search-input {
    flex: 1;
    padding: 1rem 1.5rem 1rem 3rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
}

#search-input::placeholder {
    color: #999;
}

.search-btn {
    padding: 1rem 2rem;
    border: none;
    background: #ff6b6b;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.search-btn:hover {
    background: #ff5252;
}

/* Tag Filter Indicator */
.tag-filter-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
    color: #fff;
}

.tag-filter-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.tag-filter-text i {
    color: #667eea;
}

.tag-filter-text strong {
    color: #667eea;
    font-weight: 600;
}

.clear-filter-btn {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.clear-filter-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    border-color: #ff6b6b;
    transform: translateY(-1px);
}

/* Filter Tabs */
.filter-tabs {
    margin-bottom: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tabs-scroll {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.filter-tab.active {
    background: #667eea;
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Videos Grid */
.videos-grid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.video-card-gallery {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.video-card-gallery:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.video-thumbnail-gallery {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    margin-bottom: 0;
    aspect-ratio: 16 / 9;
}

.video-thumbnail-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 2 !important;
    transition: transform 0.3s ease !important;
}

.video-thumbnail-img:hover {
    transform: scale(1.05) !important;
}

/* Image loading states for gallery */
.video-thumbnail-img {
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.video-thumbnail-img.loaded {
    opacity: 1;
}

.loading-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 2rem;
    z-index: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Simple lazy loading for gallery */
.video-thumbnail-img {
    transition: opacity 0.3s ease;
}

.video-thumbnail-gallery i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3rem;
    z-index: 1;
}

.video-thumbnail-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 107, 107, 0.9);
    color: white;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.video-card-gallery:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

.video-info-gallery {
    padding: 0.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.video-title-gallery {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

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

.creator-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
}

.video-meta-gallery {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #999;
}

.video-stats {
    display: flex;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Videos List */
.videos-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-item-list {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-item-list:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-thumbnail-list {
    width: 120px;
    height: 68px;
    background: #f0f0f0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
}

.video-thumbnail-list img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 2 !important;
    transition: transform 0.3s ease !important;
}

.video-thumbnail-list img:hover {
    transform: scale(1.05) !important;
}

.video-thumbnail-list i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 1.5rem;
    z-index: 1;
}

.video-details-list {
    flex: 1;
}

.video-title-list {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.3rem 0;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-description-list {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta-list {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #999;
}

/* Tabs View */
.tabs-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
}

.tab-button {
    padding: 0.5rem 1rem;
    border: none;
    background: #f0f0f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-button:hover {
    background: #e0e0e0;
}

.tab-button.active {
    background: #667eea;
    color: white;
}

.tabs-content {
    margin-top: 2rem;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-video {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.tab-video-info {
    flex: 1;
}

.tab-video-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.tab-video-description {
    color: #666;
    font-size: 0.9rem;
}

.tab-video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    padding: 0.75rem 1rem;
    border: none;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.page-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
}

.page-number {
    padding: 0.75rem 1rem;
    border: none;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.page-number:hover,
.page-number.active {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Video Player */
.video-player-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.video-controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-player-container:hover .video-controls-overlay {
    opacity: 1;
}

/* Subscription Message Overlay */
.subscription-message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.subscription-message-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.subscription-message-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    animation: pulse 2s infinite;
}

.subscription-message-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.subscription-message-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.subscription-message-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.subscription-message-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    justify-content: center;
}

.subscription-message-actions .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
}

.subscription-message-actions .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.subscription-message-actions .btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e0e0e0;
}

.subscription-message-actions .btn-secondary:hover {
    background: #e9ecef;
    border-color: #ccc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .videos-grid-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .video-item-list {
        flex-direction: column;
    }

    .video-thumbnail-list {
        width: 100%;
        height: 120px;
    }

    .tabs-navigation {
        flex-direction: column;
        max-height: none;
    }

    .tab-button {
        text-align: center;
    }

    #search-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .subscription-message-content {
        padding: 2rem;
        margin: 1rem;
    }
    
    .subscription-message-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .subscription-message-content h3 {
        font-size: 1.5rem;
    }
    
    .subscription-message-content p {
        font-size: 1rem;
    }
    
    .subscription-message-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .subscription-message-actions .btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .gallery-header {
        padding: 1rem;
    }

    .gallery-title {
        font-size: 2rem;
    }

    .videos-grid-gallery {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .page-numbers {
        order: 2;
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
}

/* Additional Styles */
.videos-showcase { margin-top: 1rem; }

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    color: #ddd;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
}

.load-more-section {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    padding: 1rem 2rem;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

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

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #ff5252;
}
