
/* Video Card Styles */
.video-card {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
}

/* Video Container */
.video-container {
    position: relative;
    aspect-ratio: 9/16;
    background: #1a1a1a;
    overflow: hidden;
}

.video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Play/Pause Overlay */
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.video-card:hover .play-overlay,
.video-card.show-controls .play-overlay {
    opacity: 1;
}

.play-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.play-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.play-btn svg {
    width: 32px;
    height: 32px;
}

.video-card.playing .play-icon {
    display: none;
}

.video-card.playing .pause-icon {
    display: block !important;
}

/* Video Controls */
.video-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.video-card:hover .video-controls,
.video-card.show-controls .video-controls {
    opacity: 1;
}

.control-btn {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.control-btn svg {
    width: 20px;
    height: 20px;
}

.mute-btn.muted .volume-on {
    display: none;
}

.mute-btn.muted .volume-off {
    display: block !important;
}

/* Progress Bar */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.progress-bar {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.1s linear;
}

/* Time Display */
.time-display {
    position: absolute;
    bottom: 20px;
    left: 16px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.video-card:hover .time-display,
.video-card.show-controls .time-display {
    opacity: 1;
}

/* Side Actions */
.side-actions {
    position: absolute;
    right: 12px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
}

.action-btn:hover .action-icon {
    background: rgba(0, 0, 0, 0.7);
}

.action-icon svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

.action-btn:hover .action-icon svg {
    transform: scale(1.1);
}

.action-count {
    color: white;
    font-size: 12px;
    font-weight: 600;
}

/* Like Button Special States */
.like-btn[data-liked="true"] .action-icon {
    background: #ff3b5c;
}

.like-btn[data-liked="true"] .heart-icon {
    fill: currentColor;
    transform: scale(1.2);
}

.like-btn:hover .action-icon {
    background: #ff3b5c;
}

/* Description */
.video-description {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 64px;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9));
    color: white;
    font-size: 14px;
    line-height: 1.4;
}

.video-description p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
  
    
    .video-card {
        border-radius: 12px;
    }
    
    .side-actions {
        right: 8px;
        bottom: 60px;
        gap: 12px;
    }
    
    .action-icon {
        width: 40px;
        height: 40px;
    }
    
    .action-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .video-description {
        right: 56px;
        padding: 12px;
    }
}

/* Loading States */
.video-card.loading .video-element {
    opacity: 0.5;
}

.video-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 5;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}