﻿/* ── Overlay ── */
#modal-video-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

    #modal-video-guide-overlay.active {
        opacity: 1;
        pointer-events: all;
    }

/* ── modal-video-guide container ── */
.modal-video-guide {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: #1a1a24;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#modal-video-guide-overlay.active .modal-video-guide {
    transform: scale(1) translateY(0);
}

/* ── modal-video-guide header ── */
.modal-video-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

    .modal-video-guide-header h2 {
        font-size: 1.1rem;
        font-weight: 700;
        background: linear-gradient(135deg, #7c5cfc, #c45cfc);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

#close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #22222f;
    color: #9090b0;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

    #close-btn:hover {
        background: rgba(255, 80, 80, 0.15);
        color: #ff6060;
    }

/* ── modal-video-guide body: player + list ── */
.modal-video-guide-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ── Video player ── */
.player-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000;
    min-width: 0;
    justify-content: center;
}

.player-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #9090b0;
    font-size: 0.9rem;
    padding: 32px;
}

    .player-placeholder svg {
        opacity: 0.4;
    }

.video-frame {
    width: 100%;
    aspect-ratio: 16/9;
    display: none;
}

    .video-frame.visible {
        display: block;
    }

.player-info {
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #1a1a24;
    flex-shrink: 0;
    display: none;
}

    .player-info.visible {
        display: block;
    }

    .player-info h3 {
        font-size: 0.95rem;
        font-weight: 600;
        margin-bottom: 4px;
        color: white;
    }

    .player-info p {
        font-size: 0.8rem;
        color: #9090b0;
    }

/* ── Video list ── */
.video-list {
    width: 280px;
    flex-shrink: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
    background: #22222f;
}

    .video-list::-webkit-scrollbar {
        width: 4px;
    }

    .video-list::-webkit-scrollbar-track {
        background: transparent;
    }

    .video-list::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.08);
        border-radius: 4px;
    }

.list-label {
    padding: 14px 16px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9090b0;
    position: sticky;
    top: 0;
    background: #22222f;
    z-index: 1;
}

.video-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 10px;
    margin: 2px 8px;
    transition: background 0.2s, transform 0.15s;
    position: relative;
}

    .video-item:hover {
        background: rgba(124, 92, 252, 0.12);
        transform: translateX(3px);
    }

    .video-item.active {
        background: rgba(124, 92, 252, 0.22);
    }

        .video-item.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 60%;
            background: linear-gradient(180deg, #7c5cfc, #c45cfc);
            border-radius: 0 4px 4px 0;
        }

/*.thumb-wrap {
    position: relative;
    width: 80px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #000;
}

    .thumb-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.2s;
}

.video-item:hover .play-icon,
.video-item.active .play-icon {
    background: rgba(124, 92, 252, 0.5);
}

.play-icon svg {
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.6));
}*/

.item-meta {
    min-width: 0;
}

    .item-meta .title-video-guide {
        font-size: 0.82rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: white;
    }

    .item-meta .sub-video-guide {
        font-size: 0.72rem;
        color: #9090b0;
        margin-top: 2px;
    }

/* ── Responsive ── */
@media (max-width: 640px) {
    .modal-video-guide-body {
        flex-direction: column;
    }

    .video-list {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        max-height: 200px;
    }
}
