/* Widget Detail Modal */
.widget-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.widget-modal.active {
    display: block;
}

.widget-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.widget-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.widget-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    border: 2px solid white;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    color: white;
}

.widget-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.widget-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 500px;
}

/* 왼쪽: 슬라이드쇼 */
.widget-preview-section {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.widget-slideshow {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: transparent
}

.widget-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.widget-slide.active {
    opacity: 1;
}

.widget-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
}

/* 오른쪽: 정보 */
.widget-info-section {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.widget-info-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: #111;
    margin-bottom: 16px;
}

.widget-modal-description {
    font-size: 16px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 32px;
    flex-grow: 1;
}

.widget-download-btn {
    padding: 16px 40px;
    background: #111;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.widget-download-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .widget-modal-content {
        width: 95%;
        max-width: none;
    }
    
    .widget-modal-body {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .widget-preview-section {
        padding: 30px;
    }
    
    .widget-slideshow {
        max-width: 300px;
    }
    
    .widget-info-section {
        padding: 30px;
    }
    
    .widget-info-section h2 {
        font-size: 26px;
    }
    
    .widget-modal-close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.6);
    }
}