/* Gaming Videos Manager - Frontend Styles */

/* Videos Grid Container */
.gvm-videos-grid {
    display: grid;
    gap: 25px;
    margin: 30px 0;
}

/* Grid Columns */
.gvm-grid-cols-1 {
    grid-template-columns: 1fr;
}

.gvm-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gvm-grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gvm-grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Video Card */
.gvm-video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.gvm-video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Thumbnail Container */
.gvm-video-thumbnail-container {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f0f0f0;
}

.gvm-video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gvm-video-card:hover .gvm-video-thumbnail {
    transform: scale(1.05);
}

/* Video Overlay */
.gvm-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(102, 126, 234, 0.8) 0%, 
        rgba(118, 75, 162, 0.8) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.gvm-video-card:hover .gvm-video-overlay {
    opacity: 1;
}

/* Play Button */
.gvm-play-button {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.gvm-play-button:hover {
    background: white;
    transform: scale(1.1);
}

.gvm-play-icon {
    width: 24px;
    height: 24px;
    fill: #333;
    margin-left: 3px; /* Optical alignment */
}

/* Category Badge */
.gvm-video-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

/* Video Content */
.gvm-video-content {
    padding: 20px;
}

.gvm-video-title {
    margin: 0 0 12px 0;
    font-size: 1.2em;
    font-weight: 700;
    line-height: 1.3;
    color: #333;
}

.gvm-video-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.gvm-video-title a:hover {
    color: #667eea;
}

.gvm-video-description {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Video Meta */
.gvm-video-meta {
    margin-bottom: 15px;
}

.gvm-video-date {
    color: #999;
    font-size: 0.85em;
    font-weight: 500;
    display: block;
    margin-bottom: 10px;
}

/* Video Tags */
.gvm-video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gvm-video-tag {
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: lowercase;
    border: 1px solid rgba(25, 118, 210, 0.1);
    transition: all 0.3s ease;
}

.gvm-video-tag:hover {
    background: #1976d2;
    color: white;
    transform: translateY(-1px);
}

/* Video Actions */
.gvm-video-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.gvm-watch-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.gvm-watch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.gvm-external-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Player Modal */
.gvm-player-modal {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.gvm-player-modal-content {
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    max-width: 90vw;
    max-height: 90vh;
    width: 1000px;
}

.gvm-player-modal .gvm-modal-header {
    background: #2a2a2a;
    border-bottom: 1px solid #444;
    padding: 15px 20px;
}

.gvm-player-modal .gvm-modal-header h2 {
    color: white;
    margin: 0;
}

.gvm-player-close {
    color: #ccc;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.gvm-player-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.gvm-video-player-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

#gvm-youtube-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Loading States */
.gvm-video-card.loading {
    opacity: 0.7;
}

.gvm-video-card.loading .gvm-video-thumbnail {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gvm-grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gvm-grid-cols-3,
    .gvm-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gvm-videos-grid {
        gap: 20px;
        margin: 20px 0;
    }
    
    .gvm-video-content {
        padding: 15px;
    }
    
    .gvm-video-title {
        font-size: 1.1em;
    }
    
    .gvm-play-button {
        width: 60px;
        height: 60px;
    }
    
    .gvm-play-icon {
        width: 20px;
        height: 20px;
    }
    
    .gvm-player-modal-content {
        width: 95vw;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .gvm-grid-cols-2,
    .gvm-grid-cols-3,
    .gvm-grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .gvm-videos-grid {
        gap: 15px;
    }
    
    .gvm-video-card {
        border-radius: 12px;
    }
    
    .gvm-video-content {
        padding: 12px;
    }
    
    .gvm-video-category-badge {
        top: 8px;
        left: 8px;
        padding: 4px 8px;
        font-size: 0.7em;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .gvm-video-card {
        background: #2a2a2a;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .gvm-video-title {
        color: #fff;
    }
    
    .gvm-video-title a {
        color: inherit;
    }
    
    .gvm-video-title a:hover {
        color: #8fa4f3;
    }
    
    .gvm-video-description {
        color: #ccc;
    }
    
    .gvm-video-date {
        color: #999;
    }
    
    .gvm-video-actions {
        border-top-color: #444;
    }
}

/* Accessibility */
.gvm-play-button:focus,
.gvm-watch-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.gvm-video-card:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .gvm-video-card,
    .gvm-video-thumbnail,
    .gvm-video-overlay,
    .gvm-play-button,
    .gvm-watch-btn {
        transition: none;
    }
    
    .gvm-video-card:hover {
        transform: none;
    }
    
    .gvm-video-card:hover .gvm-video-thumbnail {
        transform: none;
    }
}
