/* ========================================
   🎮 STYLES POUR LA PAGE STREAMER (VODs)
   ======================================== */

/* === VOD CARDS === */
.vod-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 1.6rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.08);
}

.vod-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.3rem;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    z-index: 10;
}

.vod-card:hover::before {
    transform: scaleX(1);
}

.vod-card:hover {
    transform: translateY(-0.4rem);
    box-shadow: 0 1.2rem 2.4rem rgba(0, 0, 0, 0.15);
    border-color: var(--color-primary);
    background: linear-gradient(135deg, var(--color-bg), var(--color-secondary-light));
}

.vod-card:hover .vod-thumbnail::after {
    opacity: 1;
}

.vod-card:hover .vod-thumbnail img {
    transform: scale(1.08);
}

.vod-card:hover .vod-title {
    color: var(--color-primary);
}

.vod-card:hover .vod-stats span {
    color: var(--color-text);
}

.vod-thumbnail {
    position: relative;
    width: 100%;
    height: 20rem;
    overflow: hidden;
    background: var(--color-secondary);
}

.vod-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vod-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.vod-content {
    padding: 1.6rem;
}

.vod-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.8rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vod-game {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-text);
    padding: 0.4rem 0.8rem;
    border-radius: 0.6rem;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.vod-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4rem;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

.vod-stats {
    display: flex;
    gap: 1.6rem;
    font-size: 1.3rem;
    color: var(--color-muted);
}

.vod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(32rem, 1fr));
    gap: 2.4rem;
}

/* === GAME EDITING === */
.vod-game-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.edit-game-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 0.4rem;
    padding: 0.4rem 0.6rem;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    color: var(--color-text);
}

.vod-card:hover .edit-game-btn {
    opacity: 1;
}

.edit-game-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* === LOADING SPINNER === */
.loading-spinner {
    width: 4rem;
    height: 4rem;
    border: 0.4rem solid var(--color-border);
    border-top: 0.4rem solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === ACTION BUTTONS === */
.btn-fetch, .btn-extract, .btn-clips {
    background: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-fetch:hover, .btn-extract:hover, .btn-clips:hover {
    background: var(--color-primary-dark);
    transform: translateY(-0.2rem);
}

.btn-fetch:disabled, .btn-extract:disabled, .btn-clips:disabled {
    background: var(--color-muted);
    cursor: not-allowed;
    transform: none;
}

.btn-extract {
    background: #9b59b6;
}

.btn-extract:hover {
    background: #8e44ad;
}

.btn-clips {
    background: #e91e63;
}

.btn-clips:hover {
    background: #c2185b;
}

/* === GAME EDIT MODAL === */
.game-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.game-edit-modal.active {
    opacity: 1;
    visibility: visible;
}

.game-edit-content {
    background: var(--color-secondary);
    border-radius: 1.2rem;
    padding: 2.4rem;
    max-width: 50rem;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--color-border);
}

.game-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.game-edit-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-text);
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 2.4rem;
    cursor: pointer;
    color: var(--color-muted);
    transition: color 0.3s;
}

.close-modal-btn:hover {
    color: var(--color-text);
}

.game-search-container {
    margin-bottom: 2rem;
}

.game-search-input {
    width: 100%;
    padding: 1.2rem;
    border: 1px solid var(--color-border);
    border-radius: 0.8rem;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1.6rem;
}

.games-list {
    max-height: 30rem;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: 0.8rem;
    margin-bottom: 2rem;
}

.game-option {
    padding: 1.2rem 1.6rem;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-option:last-child {
    border-bottom: none;
}

.game-option:hover {
    background: var(--color-secondary-light);
}

.game-option.selected {
    background: var(--color-primary);
    color: var(--color-secondary);
}

.game-category {
    font-size: 1.2rem;
    color: var(--color-muted);
    font-style: italic;
}

.add-game-section {
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
    margin-top: 2rem;
}

.add-game-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.add-game-input {
    flex: 1;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.6rem;
    background: var(--color-bg);
    color: var(--color-text);
}

.add-game-btn {
    background: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    padding: 1rem 1.6rem;
    border-radius: 0.6rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.add-game-btn:hover {
    background: var(--color-primary-dark);
}

.modal-actions {
    display: flex;
    gap: 1.2rem;
    justify-content: flex-end;
}

.btn-cancel, .btn-save {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.6rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-cancel {
    background: var(--color-muted);
    color: var(--color-text);
}

.btn-cancel:hover {
    background: #666;
}

.btn-save {
    background: var(--color-primary);
    color: var(--color-secondary);
}

.btn-save:hover {
    background: var(--color-primary-dark);
}

/* === LAYOUT COLUMNS === */
.filters-column {
    flex: 1;
    min-width: 30rem;
}

/* === CLIPS COMPACT SLIDER === */
.clips-compact-slider {
    width: 40rem;
    flex-shrink: 0;
}

.clips-compact-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1.2rem;
    text-align: center;
}

.clips-compact-container {
    position: relative;
    width: 100%;
    height: 28rem;
    overflow: hidden;
    border-radius: 1.2rem;
    background: var(--color-secondary-light);
    border: 1px solid var(--color-border);
}

.clips-compact-track {
    position: relative;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease;
}

.clips-compact-item {
    flex: 0 0 100%;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: var(--color-secondary-dark);
    border-radius: 1.2rem;
    overflow: hidden;
}

.clips-compact-item:hover {
    transform: scale(1.02);
}

.clips-compact-image {
    width: 100%;
    height: 18rem;
    object-fit: cover;
}

.clips-compact-content {
    padding: 1.2rem;
    background: var(--color-secondary);
}

.clips-compact-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.8rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clips-compact-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.2rem;
    color: var(--color-muted);
}

.clips-compact-stats {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.clips-compact-views {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.clips-compact-duration {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.clips-compact-creator {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-primary);
}

.clips-compact-prev,
.clips-compact-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-primary);
    color: white;
    border: none;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.3);
}

.clips-compact-prev:hover,
.clips-compact-next:hover {
    background: var(--color-primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.clips-compact-prev {
    left: 1rem;
}

.clips-compact-next {
    right: 1rem;
}

.clips-compact-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
    z-index: 10;
}

.clips-compact-dots button {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.clips-compact-dots button.active {
    background: var(--color-primary);
    transform: scale(1.3);
}

.clips-compact-dots button:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* === RESPONSIVE === */
/* === SELECTED GAMES SECTION === */
.selected-games-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.selected-games-section h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: var(--color-text);
}

.selected-games-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    min-height: 4rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.8rem;
    background: var(--color-bg);
}

.no-selection {
    color: var(--color-muted);
    font-style: italic;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.selected-game-tag {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--color-primary);
    color: var(--color-secondary);
    padding: 0.6rem 1rem;
    border-radius: 2rem;
    font-size: 1.4rem;
    font-weight: 500;
}

.remove-game-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--color-secondary);
    transition: background 0.3s;
}

.remove-game-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.selected-games-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.btn-clear-selection {
    background: var(--color-muted);
    color: var(--color-text);
    border: none;
    padding: 0.8rem 1.6rem;
    border-radius: 0.6rem;
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-clear-selection:hover {
    background: #666;
}

.selected-games-preview {
    font-size: 1.4rem;
    color: var(--color-text);
}

.selected-games-preview span {
    font-weight: 600;
    color: var(--color-primary);
}

/* Modifier l'affichage des jeux pour la sélection multiple */
.game-option.selected {
    background: var(--color-primary);
    color: var(--color-secondary);
    position: relative;
}

.game-option.selected::after {
    content: "✓";
    position: absolute;
    right: 1.6rem;
    font-size: 1.6rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .vod-grid {
        grid-template-columns: 1fr;
        gap: 1.6rem;
    }
    
    .vod-thumbnail {
        height: 18rem;
    }
    
    .section-padding .d-flex {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-padding .d-flex > div {
        width: 100%;
    }
    
    #searchInput {
        width: 100%;
    }
    
    .game-edit-content {
        width: 95%;
        padding: 1.6rem;
    }
    
    .add-game-form {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .selected-games-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .selected-games-list {
        min-height: 6rem;
    }
    
    /* Clips slider responsive */
    .clips-slider-container {
        height: 24rem;
    }
    
    .clips-slider-title {
        font-size: 2rem;
        margin-bottom: 1.6rem;
    }
    
    .clips-slider-overlay {
        padding: 1.6rem;
    }
    
    .clips-slider-overlay h3 {
        font-size: 1.6rem;
    }
    
    .clips-slider-meta {
        font-size: 1.2rem;
        gap: 1.2rem;
    }
    
    .clips-slider-prev,
    .clips-slider-next {
        width: 4rem;
        height: 4rem;
        font-size: 2rem;
    }
    
    .clips-slider-prev {
        left: 1rem;
    }
    
    .clips-slider-next {
        right: 1rem;
    }
}
