/* 
   Specific Styles for Portfolio Logic 
   (YouTube Loader & Image Spotlight)
*/

/* ===== PLAYLIST ITEMS ===== */
.playlist-item {
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.playlist-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.playlist-item.active {
    border-color: #007bff !important;
    background: rgba(0, 123, 255, 0.1) !important;
    opacity: 1 !important;
}

/* ===== LOADING SKELETON FOR YOUTUBE PLAYER ===== */
.player-loader {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #000;
    z-index: 20;
    transition: opacity 0.3s ease;
}

.player-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.skeleton-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(56, 189, 248, 0.2);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
    z-index: 30;
}

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

.player-loader p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
    z-index: 30;
}

/* ===== IMAGE SPOTLIGHT OVERLAY ===== */
.img-spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    cursor: zoom-out;
}

.img-spotlight-content {
    width: 85vw;
    height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.img-spotlight-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    animation: spotlightZoom 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes spotlightZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.img-spotlight-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    z-index: 1200;
    transition: transform 0.3s;
}

.img-spotlight-close:hover {
    transform: rotate(90deg);
}

/* Navigation Arrows */
.spotlight-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1201;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.spotlight-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.spotlight-nav-prev {
    left: 30px;
}

.spotlight-nav-next {
    right: 30px;
}

/* Image Counter */
.spotlight-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1201;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .spotlight-nav {
        width: 40px;
        height: 40px;
    }

    .spotlight-nav-prev {
        left: 15px;
    }

    .spotlight-nav-next {
        right: 15px;
    }

    .spotlight-counter {
        bottom: 20px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ===== VIDEO MODAL (IG REELS) ===== */
#videoModal {
    transition: opacity 0.3s ease;
}

#videoModal video {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ===== FOCUS STYLES FOR ACCESSIBILITY ===== */
.img-spotlight-close:focus,
.playlist-item:focus,
.filter-btn:focus,
.reel-item:focus {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}