
        .overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.4);
            z-index: 1000;
            opacity: 0; visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }
        .overlay.show {
            opacity: 1; visibility: visible;
        }
        .modal {
            position: absolute; 
            background: white;
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
            display: flex;
            flex-direction: column;   
            resize: both; 
            overflow: hidden; 
            min-width: 300px; min-height: 200px;             
            transform: scale(0.95);
            transition: transform 0.3s ease; 
        }
        .overlay.show .modal {
            transform: scale(1);
        }
        .modal.maximized {
            resize: none;
            border-radius: 0;
            transition: all 0.3s ease;
        }
        .modal-header {
            padding: 10px 15px;
            background: #f8f9fa;
            border-bottom: 1px solid #ddd;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: move; 
            user-select: none; 
        }
        .modal-controls span {
            cursor: pointer;
            margin-left: 15px;
            color: #555;
            font-size: 16px;
            font-weight: bold;
        }
        .modal-controls span:hover { color: #000; }
        .modal-body {
            flex: 1; 
            display: flex;
        }
        iframe {
            width: 100%; height: 100%; 
            border: none;
        }