/* Eurece Video Gallery Styles */

.eurece-video-gallery {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 20px;
}

/* Main Container - Side by Side */
.video-container {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 60px;
    margin-bottom: 40px;
    align-items: center;
}

/* Main Video Frame */
.main-video-wrapper {
    position: relative;
}

.video-frame {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 40px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 30px;
    overflow: hidden;
}

.video-player iframe,
.video-player video {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 30px;
}

.video-player .tiktok-embed {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

/* Video Details - Right Side */
.video-details {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-quote {
    font-size: 2rem;
    font-weight: 600;
    color: #546e7a;
    line-height: 1.4;
    margin: 0;
    position: relative;
}

.video-quote::before {
    content: '"';
    font-size: 4rem;
    color: #b0bec5;
    position: absolute;
    left: -30px;
    top: -10px;
    opacity: 0.3;
}

.video-description {
    font-size: 1.1rem;
    color: #546e7a;
    line-height: 1.8;
    margin: 0;
}

.video-author {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

.author-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-name::before {
    content: '';
    width: 40px;
    height: 40px;
    background: #e0e0e0;
    border-radius: 50%;
    display: inline-block;
}

.rating-stars {
    display: flex;
    gap: 4px;
}

.rating-stars .star {
    color: #e0e0e0;
    font-size: 1.25rem;
}

.rating-stars .star.filled {
    color: #ffc107;
}

/* Thumbnails Grid - Below Everything */
.video-thumbnails {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-top: 20px;
}

/* Dynamic columns based on data attribute */
.video-thumbnails[data-columns="1"] { grid-template-columns: repeat(1, 1fr); }
.video-thumbnails[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.video-thumbnails[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.video-thumbnails[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.video-thumbnails[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }
.video-thumbnails[data-columns="6"] { grid-template-columns: repeat(6, 1fr); }
.video-thumbnails[data-columns="7"],
.video-thumbnails[data-columns="8"],
.video-thumbnails[data-columns="9"],
.video-thumbnails[data-columns="10"],
.video-thumbnails[data-columns="11"],
.video-thumbnails[data-columns="12"] { 
    grid-template-columns: repeat(6, 1fr);
}

.video-thumb {
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.video-thumb:hover {
    opacity: 1;
    transform: translateY(-4px);
}

.video-thumb.active {
    opacity: 1;
}

.video-thumb.empty {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

.thumb-frame {
    position: relative;
    aspect-ratio: 9 / 16;
    background: #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-thumb.active .thumb-frame {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    border: 3px solid #667eea;
}

.thumb-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-frame video.thumb-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(135deg, #bdbdbd 0%, #9e9e9e 100%);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-thumb:hover .play-overlay {
    opacity: 1;
}

/* Error message */
.eurece-video-error {
    padding: 40px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    text-align: center;
}

.eurece-video-error p {
    color: #856404;
    font-size: 1.1rem;
    margin: 0 0 10px 0;
}

.eurece-video-error details {
    margin-top: 20px;
}

.eurece-video-error summary {
    cursor: pointer;
    color: #856404;
    font-weight: 600;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .video-container {
        grid-template-columns: 400px 1fr;
        gap: 40px;
    }
    
    .video-quote {
        font-size: 1.75rem;
    }
    
    .video-thumbnails {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .eurece-video-gallery {
        margin: 40px auto;
    }
    
    .video-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .main-video-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .video-quote {
        font-size: 1.5rem;
    }
    
    .video-quote::before {
        font-size: 3rem;
        left: -20px;
    }
    
    .video-description {
        font-size: 1rem;
    }
    
    .video-thumbnails {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .video-thumbnails {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .video-quote {
        font-size: 1.25rem;
    }
    
    .thumb-frame {
        border-radius: 12px;
    }
}

/* Loading State */
.video-player.loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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